Initial Value Problems for ODE

Vegeedog
Numerical Methods
Published in
Jun 6, 2022

--

Here, we are discussing 4 common numerical methods.

  1. Euler 1st explicit approximation (1st order Taylor series approximation)
  2. 2nd order Taylor series approximation
  3. Heun’s method
  4. Runge-Kutta methods

Euler 1st explicit approximation (1st order Taylor series approximation) : O(h²)

2nd order Taylor series approximation: O(h³)

Heun’s method: O(h²)

Runge-Kutta methods

The 4th order Runge-Kutta method : O(h⁴)

The 4th order RK is easy to implement & good convergence results for non-stiff problems

Example: (in MATLAB)

Given: x’ = x-t²+1, for t=[0,2], and initial value x(0) = 0.5

Euler’s method

4th order Runge-Kutta method

Only need to modify the iterative part (line14~18).

It is easy to see that 4th order Runge-Kutta approximate the actual function much better, which is quite reasonable since regarding the error term, Euler’s method is of O(h²) and 4th order Runge-Kutta is of O(h⁴).

--

--