Sei sulla pagina 1di 2

Chapter 4: Solution of Ordinary Differential Equation

An equation involving derivatives of an unknown function of one independent variable is called


ordinary differential equation (ODE). For example

dv cv
1. g
dt m

d 2x dx
2. m 2
 c  kx  0
dt dt

Initial value problem for the first order ODE could be written as

dy
 f ( x, y) y ( x0 )  y0
dx

where f ( x, y) is a function in x and y .


y ( x0 )  y0 is named as an initial condition, the value of y0 is when x0 .

Example of first order initial value problem (IVP)

1. y'  4 y  5 y(0)  2

dy
2.  ty  3 y(0)  0
dt

dy
3.  3x 2t 2  cost t (1)  4
dt

Faculty of Engineering and Built Environment, SEGi University Kota Damansara


Prepared by: Fatin Nur Diana binti Abu Samah
4.1 Euler’s method

The general form of Euler’s method as follows

yi 1  yi  hF xi , yi 

4.2 Heun’s method

Heun’s method is another alternate approach for improving the estimate of the slope
involves the determination of two derivatives for the interval.

The general form of Heun’s method as follows

yi 1  yi 
h
2
 
F xi , yi   F xi 1 , yi 1
o

where
o
yi 1 is an intermediate prediction and calculated by using Euler’s method.

4.3 Classical fourth-order Runge-Kutta method

The most popular RK method is fourth order. The general form as follows

yi1  yi 
h
k1  2k2  2k3  k4 
6
Where

k1  f ( x i , y i )

k 2  f ( x i  0.5h, y i  0.5k1 h)

k 3  f ( xi  0.5h, y i  0.5k 2 h)

k 4  f ( xi  h, y i  k 3 h)

Faculty of Engineering and Built Environment, SEGi University Kota Damansara


Prepared by: Fatin Nur Diana binti Abu Samah

Potrebbero piacerti anche