1 / 40

Today’s class

Today’s class. Ordinary Differential Equations Runge-Kutta Methods. Ordinary Differential Equations. A differential equation is an equation made up of a function and derivatives of that function Example

carlyn
Download Presentation

Today’s class

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Today’s class • Ordinary Differential Equations • Runge-Kutta Methods Prof. Jinbo Bi CSE, UConn

  2. Ordinary Differential Equations • A differential equation is an equation made up of a function and derivatives of that function • Example • An ordinary differential equation (ODE) is a differential equation with only one independent variable Prof. Jinbo Bi CSE, UConn

  3. Ordinary Differential Equations • First-order - highest derivative in the ODE is a first derivative • Second-order - highest derivative in the ODE is a second derivative • Linear - ODE is of the following form Prof. Jinbo Bi CSE, UConn

  4. Initial-Value & Boundary-Value Conditions • IV Conditions • All conditions are given at the same value of the independent variable • BV Conditions • Conditions are given at different value of the independent variables • The numerical methods for solving Initial-value and boundary-value are different. Prof. Jinbo Bi CSE, UConn

  5. Runge-Kutta Methods • Focus on methods to solve first order ODE • Runge-Kutta Methods • Euler’s Method • Huen and Midpoint methods • Classic 4th-order R-K method Prof. Jinbo Bi CSE, UConn

  6. Euler’s Method Prof. Jinbo Bi CSE, UConn

  7. Euler’s Method Prof. Jinbo Bi CSE, UConn

  8. Euler’s Method • Example: • True: • h = 0.5 Prof. Jinbo Bi CSE, UConn

  9. Euler’s Method Prof. Jinbo Bi CSE, UConn

  10. Error Analysis • Global truncation errors • Local truncation - from application of Euler’s method over a single step • Propagation truncation - from approximation produced during previous steps Prof. Jinbo Bi CSE, UConn

  11. Error Analysis • Start with Taylor Series expansion • Local truncation error Prof. Jinbo Bi CSE, UConn

  12. Error Analysis • Global Truncation Error Prof. Jinbo Bi CSE, UConn

  13. Euler’s Method • Not very accurate • Reducing the step size can improve accuracy but will also increase computation • Can be useful for quick analysis (assuming large step size) Prof. Jinbo Bi CSE, UConn

  14. Euler’s Method Improvements • Higher order Taylor Series • Heun’s Method • Midpoint/Improved Polygon Method Prof. Jinbo Bi CSE, UConn

  15. Higher order Taylor Series • If f is a function of both the dependent and independent variables, you need to calculate the partial derivatives Prof. Jinbo Bi CSE, UConn

  16. Heun’s Method • Main drawback of Euler’s method is that it assumes that the derivative at the beginning of the interval is the same across the interval • A better estimate involves looking at the derivatives at both ends of the interval and then averaging • Heun method uses the average of the derivatives at the points (xi, yi) and (xi+1, yi+1) to compute yi+1. Since, the derivative at (xi+1, yi+1) is unknown, first to estimate yi+1, then using the average derivative to compute yi+1. Prof. Jinbo Bi CSE, UConn

  17. Heun’s Method • Local truncation error is O(h3) and global truncation error is O(h2) Prof. Jinbo Bi CSE, UConn

  18. Heun’s Method Prof. Jinbo Bi CSE, UConn

  19. Heun’s Method • Can further use yi+1to re-estimate the derivative at (xi+1, yi+1) and then obtain a better result. The iteration can go on until an accurate result is achieved • Further iterations may not converge on the true answer but it will converge on a finite truncation error Prof. Jinbo Bi CSE, UConn

  20. Heun’s Method Prof. Jinbo Bi CSE, UConn

  21. Midpoint Method Prof. Jinbo Bi CSE, UConn

  22. Midpoint Method Prof. Jinbo Bi CSE, UConn

  23. Midpoint Method Prof. Jinbo Bi CSE, UConn

  24. Runge-Kutta Methods Prof. Jinbo Bi CSE, UConn

  25. The principles of Runge-Kutta Method Prof. Jinbo Bi CSE, UConn

  26. The principles of Runge-Kutta Method Prof. Jinbo Bi CSE, UConn

  27. The principles of Runge-Kutta Method Prof. Jinbo Bi CSE, UConn

  28. The principles of Runge-Kutta Method Prof. Jinbo Bi CSE, UConn

  29. Heun method Midpoint method The principles of Runge-Kutta Method Prof. Jinbo Bi CSE, UConn

  30. Third-order Runge-Kutta Method Prof. Jinbo Bi CSE, UConn

  31. Classic 4th-order Runge-Kutta Method Prof. Jinbo Bi CSE, UConn

  32. Classic 4th-order Runge-Kutta Method Prof. Jinbo Bi CSE, UConn

  33. Classic 4th-order Runge-Kutta Method Prof. Jinbo Bi CSE, UConn

  34. Comparison of Runge-Kutta Methods Prof. Jinbo Bi CSE, UConn

  35. Systems of ODEs Prof. Jinbo Bi CSE, UConn

  36. Higher-order ODE Prof. Jinbo Bi CSE, UConn

  37. Systems of ODEs • Can use same higher-order Runge Kutta methods with systems of ODEs • Must be careful in determining slopes • First find slopes at the initial value (k1) • Then slopes at the midpoints (k2) • Then refine slopes at the midpoint (k3) • Then find slopes at the endpoint (k4) Prof. Jinbo Bi CSE, UConn

  38. Systems of ODEs Prof. Jinbo Bi CSE, UConn

  39. Systems of ODEs Prof. Jinbo Bi CSE, UConn

  40. Next class • Ordinary Differential Equations • Read Chapter 25, 26 Prof. Jinbo Bi CSE, UConn

More Related