Docsity

Methods for Solving Initial Value Problems (IVP) of Ordinary Differential Equations (ODE) , Study notes of Computer Science

Toggle sidebar
bg1
B. Methods for solving a single IVP
1. Taylor series methods
•Idea: approximate x(tk+1) a truncated Taylor series for x, expanded about tk.
•Examples
–Euler’s method:
xk+1 =xk+hf(tk, xk)
–Higher order methods
xk+1 =xk+hf(tk, xk) + h2
2f0(tk, xk) + · · · +hp
p!f(p−1)(tk, xk)
2. Runge-Kutta methods
•Idea: get better approximation to x(t+h) by evaluating fat more places, rather than
by differentiating f.
•Examples
–RK method of order 2
xk+1 =xk+h
2[f(tk, xk) + f(tk+1, xk+hf (tk, xk))]
–RK method of order 4
K1=hf(tk, xk),
K2=hf tk+h
2, xk+1
2K1,
K3=hf tk+h
2, xk+1
2K2,
K4=hf(tk+1, xk+K3),
xk+1 =xk+1
6(K1+ 2K2+ 2K3+K4)
1
pf2

Partial preview of the text

Download Methods for Solving Initial Value Problems (IVP) of Ordinary Differential Equations (ODE) and more Study notes Computer Science in PDF only on Docsity!

B. Methods for solving a single IVP

  1. Taylor series methods
    • Idea: approximate x(tk+1) a truncated Taylor series for x, expanded about tk.
    • Examples
      • Euler’s method: xk+1 = xk + hf (tk, xk)
      • Higher order methods

xk+1 = xk + hf (tk, xk) +

h^2 2 f^

′(tk, xk) + · · · + hp p! f^

(p−1)(tk, xk)

  1. Runge-Kutta methods
    • Idea: get better approximation to x(t + h) by evaluating f at more places, rather than by differentiating f.
    • Examples
      • RK method of order 2

xk+1 = xk + h 2

[f (tk, xk) + f (tk+1, xk + hf (tk, xk))]

  • RK method of order 4

K 1 = hf (tk, xk), K 2 = hf

( tk + h 2

, xk +^1 2

K 1

) ,

K 3 = hf

( tk + h 2

, xk +^1 2

K 2

) , K 4 = hf (tk+1, xk + K 3 ), xk+1 = xk +^16 (K 1 + 2K 2 + 2K 3 + K 4 )

  1. Multistep methods
    • Idea: use information from t 0 ,... , tk to compute xk+1.
    • Examples
      • An “explicit” m-step formula:

xk+1 =

∑^ k j=k+1−m

αj xj +

∑^ k j=k+1−m

βj f (tj , xj ),

where the αj and βj are chosen to minimize the local error.

  • An Adams-Bashforth m-step formula:

xk+1 = xk + h

  ∑^ k j=k+1−m

βj f (tj , xj )

  (^).

  • A 3-step Adams-Bashforth formula:

xk+1 = xk + h 12

(23f (tk, xk) − 16 f (tk− 1 , xk− 1 ) + 5f (tk− 2 , xk− 2 )).

  1. Implicit methods
    • Idea: xk+1 is defined implicitly at each step
    • Examples:
      • Backward Euler. xk+1 = xk + hf (tk+1, xk+1)
      • Trapezoidal rule.

xk+1 = xk + h(f (tk, xk) + f (tk+1, xk+1))

  • 3-step Adams-Moulton.

xk+1 = xk + 24 h(9f (tk+1, xk+1) + 19f (tk, xk) − 5 f (ti− 1 , xi− 1 ) + f (ti− 2 , xi− 2 ))