Numerical Methods To Solve Initial Value Problems An Over View of Runge-Kutta Fehlberg and Dormand and Prince Methods. William Mize Quick Refresher ο We are looking at Ordinary Differential Equations ο More specifically Initial Value Problems ο Simple Examples: x′ = π₯ + 1 ο Solution of: π₯ = π π‘ − 1 π₯ 0 =0 ο x ′ = 6π‘ − 1 Solution of: π₯ = 3π‘ 2 − t + 4 π₯ 1 =6 A Problem ο How practical are analytical methods? ′ ο Equation: x = π − π‘ 2 −π πππ‘ + ln |π πππ‘ + π‘ππβπ‘ 3 | ο We chose to find a Numerical solution because ο Closed-form is to difficult to evaluate ο No close-form solution Some Quick Ground work ο First Start with Taylor Series Approximations ο Then Move onto Runge-Kutta Methods for Approximations ο Lastly onto Runge-Kutta Fehlberg and Dormand and Prince Methods for Approximation and keeping control of error How these Methods Work ο All of the Methods will be using a step size method. ο Error is determined by the size of step, order, and method used. ο When actually calculating these, almost always done via computer. Taylor Series Methods(Brief) ο Taylor Series As Follows ο x π‘ + β = π₯ π‘ + βπ₯ ′ π‘ + 1 2 ′′ β π₯ 2! π‘ + 1 3 ′′′ π‘ β π₯ 3! + ο Most Basic is Euler’s Method ο x π‘ + β ≈ π₯ π‘ + βπ₯ ′ π‘ ο Higher Order Approximations better Accuracy ο But at a cost ο What can we do? 1 4 ′′′′ β π₯ 4! π‘ +. . Runge-Kutta Methods ο Named After Carl Runge and Wilhelm Kutta ο What they do? ο Do the same Job as Taylor Series Method, but without the analytic differentiation. ο Just like Taylor Series with higher and higher order methods. ο Runge-Kutta Method of Order 4 Well accepted classically used algorithm. Runge-Kutta of Order 2 ο We don’t want to take derivatives for approximations ο Instead use Taylor series to create Runge-Kutta methods to approximate solution with just function evaluations. β ο π 2 π‘, π¦ = π π‘, π¦ + π ′ π‘, π¦ 2 ο We Want to Approximate this with ο π΄π π‘ + π, π₯ + π ο Find A, B, C ο We get: πΎ1 = βπ(π‘, π₯) ο πΎ2 = βπ(π‘ + β, π₯ + πΎ1 ) ο 1 2 x π‘ + β = π₯ π‘ + (πΎ1 + πΎ2 ) Error π(β2 ) Runge-Kutta of Order 4 1 x π‘ + β = π₯ π‘ + (πΎ1 + 2πΎ2 + 2πΎ3 + πΎ4 ) 6 πΎ1 = βπ(π‘, π₯) 1 1 πΎ2 = βπ(π‘ + β, π₯ + πΎ1 ) 2 2 1 1 πΎ3 = βπ(π‘ + β, π₯ + πΎ2 ) 2 2 πΎ4 = βπ(π‘ + β, π₯ + πΎ3 ) Error of Order π(β5 ) So What's next? ο Already Viable Numerical Solution established what's the next step? ο We want to control our Error and Step size at each step. ο These methods are called adaptive. ο Why? ο Cost Less ο Keep within Tolerance ο Also look for More efficient ways of doing these things. ο 10 Function Evaluation for RK4 and RK5 ο Just 6 for RKF4(5) Runge-Kutta Fehlberg ο Coefficients ∝ πΎ , πΆπΎ , βπΎλ , πΆπΎ are found via Taylor expansions Next Step to find These Coefficients Further Deriving ο We assume πΆ1 = 0, πΆ1 = 0, ∝ 4 =1 More and more… ο So this was way more complicated than I actually thought it would be. ο But it’s all leading some where! ο Eventually we want to have all the πΆπΎ , βπΎλ , πΆπΎ in terms of ∝ 2 and ∝ 5 . ο From there was must figure out our ∝ ∝ 5. ο ∝ 5 ends up being arbitary 2 and How to find ∝ 2 ο First Take coefficients from the 5th order equation. ο Which ultimately leads to ο Where we chose ∝ 2= 1/3 and ∝ 2= 3/8 ∝ 2= 1/3 ∝ 2= 3/8 Comparison(Problem) Comparisons of Methods Dormand and Prince Methods Visual Comparison of Methods Conclusion ο Taylor’s method uses derivatives to solve ODE ο RK uses only a combination of specific function evaluations instead of derivatives to approximate solution of the ODE ο RKF is beneficial because you can control your step size so you have your global error within a predetermined tolerance ο RK4 and RK5 uses 10 function evaluations vs RKF just 6 ο Runge-Kutta Fehlberg is widely accepted and used commercially(Matlab, Mathematica, maple, etc) Sources ο Numerical Mathematics and Computing. Sixth Edition; Ward Cheny, David Kincaid ο Low-Order classical Runge-Kutta Formulas with StepSize Control and their Application to some heat transfer problems. By Erwin Fehlberg(1969) ο A family of embedded Runge-Kutta Formulae. By Dormand and Prince(1980)