numerical ode solutions runge kutta and extensions
play

Numerical ODE Solutions (Runge-Kutta and Extensions) Kiel Williams - PowerPoint PPT Presentation

Numerical ODE Solutions (Runge-Kutta and Extensions) Kiel Williams 09/23/2016 Algorithms Group Form of the Problem Need to solve: Other initial condition types exist for higher-order equations (boundary-values) Accurate ODE


  1. Numerical ODE Solutions (Runge-Kutta and Extensions) Kiel Williams 09/23/2016 Algorithms Group

  2. Form of the Problem  Need to solve:  Other initial condition types exist for higher-order equations (boundary-values)  Accurate ODE solutions essential to countless theoretical problems  Many, many, many different approaches for doing this. We'll review some of the most common and straightforward

  3. Simplest Guess: Euler Approach  Simplest guess for discretizing solution:  But method works poorly:  How can we do better in controlled way? − Runge-Kutta family of techniques

  4. Going Beyond: Runge-Kutta  Runge-Kutta methods all take form:  Described pictorially by Butcher tables:  For the Euler method:

  5. 4th-Order Runge-Kutta  The Runge-Kutta method typically refers to 4th-order Runge-Kutta:  In Butcher form:

  6. 4th-Order Runge-Kutta  The Runge-Kutta method typically refers to 4th-order Runge-Kutta:  In Butcher form:

  7. Runge-Kutta Examples and Contrast  RK4 does well, even for large step-sizes − RK4 error of ~0.0001, compared to ~0.1 for Euler  RK4 error scales as O( h 5 )  If y' depends strictly on x, RK4 is equivalent to Simpson's Rule integration

  8. Runge-Kutta Alternatives: Multi-Step Methods  Runge-Kutta isn't the only feasible option − Instead of expanding the Butcher table, evaluate the derivative at more places  2-Step Adams-Bashforth is one of the simplest useful methods:  Like Euler's method, but weights first-derivative value at different places  Coefficient determined by Lagrange polynomial interpolation formula

  9. Runge-Kutta Alternatives: Multi-Step Methods  Adams-Bashforth substantially beats Euler − A-B error of ~0.01, compared to ~0.1 for Euler  Adams-Bashforth error scales as O( h 3 )  One drawback: need 2 points to start the chain − Need one Euler or RK4 step to initiate

  10. Implicit Methods for ODE's  All methods shown so far are explicit methods, with recursion relations of form:  Implicit methods involve recursions relations of the form:  Offer improved accuracy, but need to solve an equation to get y n+1 , evaluate right-hand side of equation  Typical ways to do this: fixed-point iteration, Newton's method

  11. Implicit Methods for ODE's, Backward-Euler  Backward's Euler is simplest implicit method: (Forward Euler, Explicit) (Backward Euler, Implicit)  To extract value of y n+1 needed to evaluate right-hand side, use fixed-point iteration to achieve self-consistency:

  12. Implicit Methods for ODE's, Backward-Euler  In this example, backward-Euler doesn't do much better than basic Euler – Not always true!  Error-scaling is the same as Euler  Added complication: need input tolerance for self-consistency loop Best to have − tolerance as function of h

  13. Implicit Multi-Step: Adams-Moulton  Adams-Moulton methods family combine Adams-Bashforth multi-step approach with implicit techniques  Most-obvious non-trivial example is ODE analog to the trapezoid rule:  Arbitrarily high-order algorithms generated very similarly to higher-order Adams-Bashforth approach

  14. Implicit Multi-Step: Adams-Moulton  Trapezoid much better Euler, competitive with RK4 − Much simpler algorithm than RK4!  Error scaling goes as O( h 4 ) – compare to O( h 3 ) for 2-step Adams-Bashforth

  15. Exponential Integrators  Equations whose solutions contain e ax terms notoriously hard to handle – exp. integrators consider ODE's of form:  We can discretize the exact formal solution to this equation:  Allows exponential part of y' to be handled exactly – can treat the “rest” of y' as a perturbative expansion

  16. Exponential Integrators  Exponential methods exactly solve y = y' – Even “good” explicit methods accumulate large errors  Big drawback: one must often approximate to get ODE in proper form to implement

  17. Summary  Euler method is poor, motivates superior techniques: − Explicit methods solve ODE by extrapolating from values of y, y' at previous points − Examples include all Runge-Kutta type methods, including RK4, multi-step methods like Adams- Bashforth  Implicit methods require knowledge of function value at next point: − Require solving an equation, but give better scaling for same # of function evaluations − Often preferred in solution of “stiff” ODE's.

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