Solving differential equations Jiří Chmelík, Marek Trtík PA199 ‹#› uInitial value problem for ordinary differential equations. u uForward Euler’s method. u uBackward Euler’s method. u uMidpoint method. u uRunge-Kutta methods. Outline ‹#› u Initial value problem ‹#› Initial value problem ‹#› Initial value problem ‹#› Direction field Step 1 Step 2 Step 3 Draw more arrows. Step 4 Predict solutions. ‹#› Numerical solution ‹#› Taylor theorem ‹#› uExamples (Taylor approximation): Numerical solution ‹#› ‹#› Forward Euler’s method ‹#› Forward Euler’s method ‹#› Forward Euler’s method ‹#› uInstability issue: u The iteration process may diverge. uExample: Forward Euler’s method ‹#› Forward Euler’s method ‹#› Forward Euler’s method ‹#› u Backward Euler’s method ‹#› Backward Euler’s method ‹#› Backward Euler’s method ‹#› Backward Euler’s method ‹#› uWe can plot out result and compare it with forward Euler’s method: Backward Euler’s method ‹#› Backward Euler’s method ‹#› uWe can plot out result and compare it with forward Euler’s method: Backward Euler’s method ‹#› Backward Euler’s method ‹#› u Midpoint method ‹#› Midpoint method (*) ‹#› Midpoint method (*) ‹#› Midpoint method ‹#› Midpoint method ‹#› Midpoint method ‹#› Midpoint method ‹#› Midpoint method ‹#› u Runge-Kutta methods ‹#› Runge-Kutta methods ‹#› Runge-Kutta methods ‹#› Runge-Kutta methods ‹#› Runge-Kutta methods ‹#› Runge-Kutta methods ‹#› Runge-Kutta methods ‹#› Runge-Kutta methods ‹#› Schema of numerical methods Picture source: [2] ‹#› u[1] A. Witkin, D. Baraff; Differential Equation Basics; Physically Based Modeling: Principles and Practice, 1997 u[2] J.C.Butcher; Numerical methods for ordinary differential equations; 3rd edition, Wiley, 2016. u[3] https://tutorial.math.lamar.edu/Classes/DE/DE.aspx References