Numerical methods for solving differential equations

Pocket

Given the boudary-value problem

\displaystyle dy/dx = f(x, y)\ \ \ y(x_0) = y_0\ \ \ (1)

it may not be possible to obtain an exact solution. In such case various methods are available for obtaining an approximate or numerical solution. In the following we list several methods.

  1. Step by step or Euler method
  2. Taylor series method
  3. Picard’s method
  4. Runge-Kutta method

1. Step by step or Euler method

In this method we replace the differential equation of (1) by the approximation

\displaystyle \frac{y(x_0 + h)-y(x_0)}{h} = f(x_0, y_0)\ \ \ (2)

so that

\displaystyle y(x_0 + h) = y(x_0) + hf(x_0, y_0)\ \ \ (3)

By continuity in this manner we can then find y(x_0 + 2h),\ y(x_0 + 3h), etc. We choose h sufficiently small so as to obtain good approximations.

A modified procedure of this method can also be used.

2. Taylor series method

By successive differentiation of the differential equation in (1) we can find y'(x_0),\ y''(x_0),\ y'''(x_0),\cdots. Then the solution is given by the Taylor series

\displaystyle y(x) = y(x_0) + y'(x_0)(x - x_0) + \frac{y''(x_0)(x - x_0)^2}{2!} + \cdots\ \ \ (4)

assuming that the series converges. If it does we can obtain y(x_0 + h) to any desired accuracy.

3. Picard’s method

By integrating the differential equation in (1) and using the boundary condition, we find

\displaystyle y(x) = y_0 + \int^{x}_{x_0}\! f(u, y)du\ \ \ (5)

Assuming the approximation y_1(x) = y_0, we obtain from (5) a new approximation.

\displaystyle y_2(x) = y_0 + \int^{x}_{x_0}\! f(u, y_1)du\ \ \ (6)

Using this in (5) we obtain another approximation.

\displaystyle y_3(x) = y_0 + \int^{x}_{x_0}\! f(u, y_2)du\ \ \ (7)

Continuing in this manner we obtain a sequence of approximations y_1, y_2, y_3,\cdots. The limit of this sequence, if it exists, is the required solution. However, by carrying out the procedure a few times, good approximations can be obtained.

4. Runge-Kutta method

This method consists of computing

\displaystyle \left.\begin{array}{rcl}k_1 & = & hf(x_0, y_0) \\ k_2 & = & hf(x_0 + \frac{1}{2}h, y_0 + \frac{1}{2}k_1) \\ k_3 & = & hf(x_0 + \frac{1}{2}h, y_0 + \frac{1}{2}k_2 \\ k_4 & = & hf(x_0 + \frac{1}{2}h, y_0 + \frac{1}{2}k_3) \end{array} \right\}\ \ \ (8)

Then

\displaystyle y(x_0 + h) = y_0 + \frac{1}{6}(k_1 + 2k_2 + 2k_3 + k_4)\ \ \ (9)

These methods can also be adapted for higher order differential equations by writing them as several first order equations.

Pocket

投稿者: admin

趣味:写真撮影とデータベース. カメラ:TOYO FIELD, Hasselblad 500C/M, Leica M6. SQL Server 2008 R2, MySQL, Microsoft Access.

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です