1 / 54

EE 3561 : Computational Methods Topic 8 Solution of Ordinary Differential Equations

Learn to solve first-order ODEs using Runge-Kutta methods, including RK2, RK3, RK4, and higher order. Understand the accuracy-effort trade-off in choosing the right method.

danilow
Download Presentation

EE 3561 : Computational Methods Topic 8 Solution of Ordinary Differential Equations

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. EE 3561 : Computational MethodsTopic 8Solution of Ordinary Differential Equations Lesson 5: Applications of Runge-Kutta Methods to solve first order ODEs (c)AL-DHAIFALLAH1435

  2. Lessons in Topic 8 • Lesson 1: Introduction to ODE • Lesson 2: Taylor series methods • Lesson 3: Midpoint and Heun’s method • Lesson 4: Runge-Kutta methods • Lesson 5: Applications of RK method • Lesson 6: Solving systems of ODE (c)AL-DHAIFALLAH1435

  3. Learning Objectives of Lesson 4 • Use Runge-Kutta methods of different orders to solve first order ODEs. (c)AL-DHAIFALLAH1435

  4. Runge-Kutta Method (c)AL-DHAIFALLAH1435

  5. Runge-Kutta Methods RK2 (c)AL-DHAIFALLAH1435

  6. Runge-Kutta Methods RK3 (c)AL-DHAIFALLAH1435

  7. Runge-Kutta Methods RK4 (c)AL-DHAIFALLAH1435

  8. Runge-Kutta Methods Higher order Runge-Kutta methods are available Higher order methods are more accurate but require more calculations. Fourth order is a good choice. It offers good accuracy with reasonable calculation effort Click to see Butcher’s Fifth order Runge-Kutta method (c)AL-DHAIFALLAH1435

  9. Fifth Order Runge-Kutta Methods (c)AL-DHAIFALLAH1435

  10. Second Order Runge-Kutta Method (c)AL-DHAIFALLAH1435

  11. Second Order Runge-Kutta Method (c)AL-DHAIFALLAH1435

  12. Second Order Runge-Kutta Method (c)AL-DHAIFALLAH1435

  13. Example 1Second Order Runge-Kutta Method (c)AL-DHAIFALLAH1435

  14. Example 1Second Order Runge-Kutta Method (c)AL-DHAIFALLAH1435

  15. Example 1Second Order Runge-Kutta Method (c)AL-DHAIFALLAH1435

  16. Example 1Second Order Runge-Kutta Method (c)AL-DHAIFALLAH1435

  17. Example 1Second Order Runge-Kutta Method (c)AL-DHAIFALLAH1435

  18. Example 1Second Order Runge-Kutta Method (c)AL-DHAIFALLAH1435

  19. Example 1Summary of the solution Summary of the solution (c)AL-DHAIFALLAH1435

  20. Solution after 100 steps (c)AL-DHAIFALLAH1435

  21. Example 24-order Runge-Kutta Method See RK4 Formula (c)AL-DHAIFALLAH1435

  22. Example 2Fourth Order Runge-Kutta Method (c)AL-DHAIFALLAH1435

  23. Example 2Fourth Order Runge-Kutta Method See RK4 Formula (c)AL-DHAIFALLAH1435

  24. Runge-Kutta Methods RK4 (c)AL-DHAIFALLAH1435

  25. Example 2Fourth Order Runge-Kutta Method Click to See The solution (c)AL-DHAIFALLAH1435

  26. Example 2Fourth Order Runge-Kutta Method Click to Go back (c)AL-DHAIFALLAH1435

  27. Example 2Summary of the solution Summary of the solution (c)AL-DHAIFALLAH1435

  28. Remaining Lessons in Unit 7 Lessons 6: Solving Systems of high order ODE (c)AL-DHAIFALLAH1435

  29. EE 3561 : Computational MethodsLesson 6: Solution of Systems of ODEs Dr. Mujahed Al-Dhaifallah ( Term 342) (c)AL-DHAIFALLAH1435

  30. Learning Objectives of Lesson 6 • Convert a single (or a system of ) high order ODEs to a system of first order ODEs • Use the methods discussed earlier in this unit to solve systems of first order ODEs. (c)AL-DHAIFALLAH1435

  31. Outlines of Lesson 6 • Solution of a system of first order ODEs • Conversion of a high order ODEs to a system of first order ODEs • Conversion of a system of high order ODEs to a system of first order ODEs • Use different methods to solve systems of first order ODEs. • Use different methods to solve high order ODEs. • Use different methods to solve systems of high order ODEs. (c)AL-DHAIFALLAH1435

  32. Solving a system of first order ODEs • Methods discussed earlier such as Euler, Runge-Kutta,…are used to solve first order ordinary differential equations • The same formulas will be used to solve a system of first order ODEs. In this case, the differential equation is a vector equation and the dependent variable is a vector variable. (c)AL-DHAIFALLAH1435

  33. Euler method for solving a system of first order ODEs Recall Euler method for solving first order ODE. (c)AL-DHAIFALLAH1435

  34. Example Euler method Euler method to solve a system of n first order ODE. (c)AL-DHAIFALLAH1435

  35. Solving a system of n first order ODEs • Exactly the same formula is used but the scalar variables and functions are replaced by vector variables and vector values functions. • Y is a vector of length n • F(Y,x) is vector valued function (c)AL-DHAIFALLAH1435

  36. Example :Euler method for solving a system of first order ODEs (c)AL-DHAIFALLAH1435

  37. Example :RK2 method for solving a system of first order ODEs (c)AL-DHAIFALLAH1435

  38. Example :RK2 method for solving a system of first order ODEs (c)AL-DHAIFALLAH1435

  39. Method for solving a system of first order ODEs • We have extended Euler and RK2 methods to solve systems of first order ODE • Other methods used to solve first order ODE can be easily extended to solve systems of first order ODE (c)AL-DHAIFALLAH1435

  40. High Order ODE • How do solve second order ODE? • How do solve high order ODE? (c)AL-DHAIFALLAH1435

  41. The general approach to solve ODEs convert solve high order ODE System of first order ODE convert solve Second order ODE Two first order ODEs (c)AL-DHAIFALLAH1435

  42. Conversion Procedure convert solve • Select of dependent variables One way is to take the original dependent variable and its derivatives up to one degree less than the highest order derivative. • Write the Differential Equations in terms of the new variables. The equations comes from the way the new variables are defined or from the original equation. • Express the equations in matrix form high order ODE System of first order ODE (c)AL-DHAIFALLAH1435

  43. Remarks on the Conversion Procedure convert solve • Any nth order ODE is converted to a system of n first order ODE. • There are infinite number of ways to select the new variables. As a result, for each high order ODE there are infinite number of set of equivalent first order systems of ODEs. • Use a table to make conversion easier. high order ODE System of first order ODE (c)AL-DHAIFALLAH1435

  44. Example of converting High order ODE to first order ODEs One degree less than the highest order derivative (c)AL-DHAIFALLAH1435

  45. Example of converting High order ODE to first order ODEs (c)AL-DHAIFALLAH1435

  46. Example of converting High order ODE to first order ODEs One degree less than the highest order derivative (c)AL-DHAIFALLAH1435

  47. Example of converting High order ODE to first order ODEs (c)AL-DHAIFALLAH1435

  48. Conversion Procedure for Systems of high order ODEs convert solve • Select of dependent variables take the original dependent variables and their derivatives up to one degree less than the highest order derivative for each variable. • Write the Differential Equations in terms of the new variables. The equations comes from the way the new variables are defined or from the original equation. • Express the equations in matrix form System of high order ODE System of first order ODE (c)AL-DHAIFALLAH1435

  49. Example of converting High order ODE to first order ODEs One degree less than the highest order derivative One degree less than the highest order derivative (c)AL-DHAIFALLAH1435

  50. Example of converting High order ODE to first order ODEs One degree less than the highest order derivative One degree less than the highest order derivative (c)AL-DHAIFALLAH1435

More Related