scientific computing
play

Scientific Computing Maastricht Science Program Week 4 Frans - PowerPoint PPT Presentation

Scientific Computing Maastricht Science Program Week 4 Frans Oliehoek <frans.oliehoek@maastrichtuniversity.nl> Recap Matlab...! Supervised Learning find f that maps {x 1 (j) ,...,x D (j) } y (j) Interpolation f


  1. Scientific Computing Maastricht Science Program Week 4 Frans Oliehoek <frans.oliehoek@maastrichtuniversity.nl>

  2. Recap  Matlab...!  Supervised Learning  find f that maps {x 1 (j) ,...,x D (j) } → y (j)  Interpolation  f goes through the data points  linear regression  lossy fit, minimizes 'vertical' SSE x 1  Unsupervised Learning  PCA  We just have data points {x 1 (j) ,...,x D (j) } u =( u 1, u 2 ) x 2

  3. Numerical Differentiation and Integration

  4. Numerical Differentiation and Integration  Finding derivatives or primitives of a function f  not always easy or possible....  no closed form solution exists  the solution is a very complex expression that is hard to evaluate  we may not know f (as before!) → numerical methods

  5. Numerical Differentiation  If we want to know the rate of change...  E.g.:  fluid in a cylinder with a hole in the bottom, measured every 5 seconds.  High-speed camera images of animal movements, (jumping in frogs and insects, suction feeding in fish, and the strikes of mantis shrimp)  determine speed  and acceleration

  6. Numerical Differentiation  Determine the vertical speed at t=0.25 0.45 0.4 0.35 0.3 0.25 frog height(t) 0.2 0.15 0.1 0.05 0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7  what would you do?

  7. Numerical Differentiation  Determine the vertical speed at t=0.25...  a few options... 0.39 0.39 0.38 0.38 0.37 frog height(t) 0.37 0.36 0.36 0.35 0.18 0.2 0.22 0.24 0.26 0.28 0.3 0.32 0.34 0.36

  8. Numerical Differentiation  Determine the vertical speed at t=0.25...  a few options... 0.39 0.39 0.38 0.38 0.37 frog height(t) 0.37 0.36 0.36 0.35 0.18 0.2 0.22 0.24 0.26 0.28 0.3 0.32 0.34 0.36

  9. Numerical Differentiation  Determine the vertical speed at t=0.25...  a few options... backward finite forward finite difference 0.39 difference 0.39 0.38 0.38 0.37 frog height(t) 0.37 0.36 0.36 0.35 0.18 0.2 0.22 0.24 0.26 0.28 0.3 0.32 0.34 0.36

  10. Numerical Differentiation  Determine the vertical speed at t=0.25...  a few options... backward finite forward finite difference 0.39 difference 0.39 0.38 0.38 Other Ideas? 0.37 frog height(t) 0.37 0.36 0.36 0.35 0.18 0.2 0.22 0.24 0.26 0.28 0.3 0.32 0.34 0.36

  11. Numerical Differentiation  Determine the vertical speed at t=0.25...  a few options... 0.39 0.39 0.38 0.38 0.37 frog height(t) Centered finite 0.37 difference 0.36 0.36 0.35 0.18 0.2 0.22 0.24 0.26 0.28 0.3 0.32 0.34 0.36

  12. Numerical Integration  Integration: the reversed problem...  Suppose we travel in a car with a broken odometer  Speedometer is working...

  13. Numerical Integration  maintain speeds, to figure out traveled distance t v(t) km/h enter highway ramp 0 80 30 120 65 128 120 122 728 120 traffic jam 733 0 798 20 836 20 941 70 970 120 1350 123 exit highway ramp 1404 90

  14. Numerical Integration  maintain speeds, to figure out traveled distance t v(t) km/h enter highway ramp 0 80 30 120 65 128 120 122 140 728 120 traffic jam 120 733 0 100 798 20 80 836 20 v(t) km/h 60 941 70 40 970 120 20 1350 123 exit highway ramp 0 1404 90 0 200 400 600 800 1000 1200 1400 1600

  15. Numerical Integration  maintain speeds, to figure out traveled distance t v(t) km/h enter highway ramp 0 80 30 120 65 128 120 122 How far did we travel? 140 728 120 traffic jam 120 733 0 100 798 20 80 836 20 v(t) km/h 60 941 70 40 970 120 20 1350 123 exit highway ramp 0 1404 90 0 200 400 600 800 1000 1200 1400 1600

  16. Midpoint Formula  Approximate the integral with a finite sum integration interval y x x 1 x M ̄ ̄ x 0 x 1 x M

  17. Midpoint Formula integration interval y x x 1 x M ̄ ̄ H size of interval x 0 x 1 x M

  18. Midpoint Formula integration interval y x k = x k − 1 + x k ̄ 2 Approximation of the integral: M I MP ( f )= H ∑ f (̄ x k ) k = 1 x x 1 x M ̄ ̄ x 0 x 1 x M

  19. Trapezoid Formula integration interval y x I 1 I M x 0 x 1 x M

  20. Trapezoid Formula integration interval y I k = H f ( x k − 1 )+ f ( x k ) 2 Approximation of the integral: M I MP ( f )= ∑ I k k = 1 x I 1 I M x 0 x 1 x M

  21. Symbolic Integration  Finally: when faced with a difficult integral... → try 'symbolic' packages!

  22. Symbolic Integration  Finally: when faced with a difficult integral... → try 'symbolic' packages!

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend