Euler and Runge Kutta

18
1 Numerical Solution of Ordinary Differential Equation A first order initial value problem of ODE may be written in the form • Example: Numerical methods for ordinary differential equations calculate solution on the points, where h is the steps size 0 ) 0 ( ), , ( ) ( ' y y t y f t y 0 ) 0 ( , 1 ) ( ' 1 ) 0 ( , 5 3 ) ( ' y ty t y y y t y h t t n n 1

description

Numerical Methods for ODE

Transcript of Euler and Runge Kutta

  • Numerical Solution of Ordinary Differential EquationA first order initial value problem of ODE may be written in the form

    Example:

    Numerical methods for ordinary differential equations calculate solution on the points,where h is the steps size

  • Numerical Methods for ODEEuler MethodsForward Euler MethodsBackward Euler MethodModified Euler Method

    Runge-Kutta MethodsSecond OrderThird OrderFourth Order

  • Forward Euler MethodConsider the forward difference approximation for first derivative

    Rewriting the above equation we have

    So, is recursively calculated as

  • Example: solve

    Solution:

    etc

  • Graph the solution

  • Backward Euler MethodConsider the backward difference approximation for first derivative

    Rewriting the above equation we have

    So, is recursively calculated as

  • Example: solve

    Solution:Solving the problem using backward Euler method for yields

    So, we have

  • Graph the solution

  • Modified Euler MethodModified Euler method is derived by applying the trapezoidal rule to integrating ; So, we have

    If f is linear in y, we can solved for similar as backward euler methodIf f is nonlinear in y, we necessary to used the method for solving nonlinear equations i.e. successive substitution method (fixed point)

  • Example: solve

    Solution:f is linear in y. So, solving the problem using modified Euler method for yields

  • Graph the solution

  • Second Order Runge-Kutta MethodThe second order Runge-Kutta (RK-2) method is derived by applying the trapezoidal rule to integrating over the interval . So, we have

    We estimate by the forward euler method.

  • So, we have

    Or in a more standard form as

  • Third Order Runge-Kutta MethodThe third order Runge-Kutta (RK-3) method is derived by applying the Simpsons 1/3 rule to integrating over the interval . So, we have

    We estimate by the forward euler method.

  • The estimate may be obtained by forward difference method, central difference method for h/2, or linear combination both forward and central difference method. One of RK-3 scheme is written as

  • Fourth Order Runge-Kutta MethodThe fourth order Runge-Kutta (RK-4) method is derived by applying the Simpsons 1/3 or Simpsons 3/8 rule to integrating over the interval . The formula of RK-4 based on the Simpsons 1/3 is written as

  • The fourth order Runge-Kutta (RK-4) method is derived based on Simpsons 3/8 rule is written as

    Chapter 6 / Ordinary Differential Equation