Page 1
Chapter 06.indd 135 5/31/2017 10:59:53 AM
Page 2
Chapter 06.indd 135 5/31/2017 10:59:53 AM
\ In general,
y
n+1
= y
n
+ hy
n
' +
h
2
2!
y
n
? +… will be the iterative formula.
Example
Given
dy
dx
= x - y
2
with the initial condition y(0) = 1
Find y (0.1) using Taylor series method with step size 0.1.
Solution
f (x, y) = x - y
2
x = 0.1, x
0
= 0, y
0
= 1, h = 0.1
y' = x - y
2
? y'(0) = x
0
- y
0
2
= - 1;
y? = 1 - 2yy' ? y?(0) = 1 - 2y
0
y
0
'
= 1 - 2 (1) (-1) = 3
y?' = -2yy? - 2(y')
2
? y?' (0) = -2 (1) (3) - 2 (-1)
2
= -6 - 2 = -8
By Taylor’ s formula,
y (0.1) = y
1
= y
0
+ hy ' (0) +
h
2
2!
y? (0) +
h
3
3!
y'? (0) +
…
? y
1
= 1 + (0.1) (-1) +
(. )
!
()
(. )
!
()
01
2
3
01
3
8
23
+- +
…
= 1 - 0.1 + 0.015 - 0.0013 +
…
y
1
= 0.9137.
Picard’s Method of Successive
Approximation
Given the differential equation
dy
dx
= f (x, y) (1)
Integrate Eq. (1) from x
0
to x, we get
dy fx ydx
x
x
x
x
=
? ?
(, )
0 0
?- =
?
yx yx fx ydx
x
x
() () (, )
0
0
?= +
?
yx yx fx ydx
x
x
() () (, )
0
0
(2)
Put y = y
0
, we get the first approximation,
y
n
= y
0
+ fx ydx
n
x
x
(, ).
-
?
1
0
Example
Given
dy
dx
= 1 + xy and y (0) = 1. Evaluate y (0.1) by Picard’ s
method upto three approximations.
Solution
f (x, y) = 1 + xy
x
0
= 0, y
0
= 1
The first approximation y
1
= y
0
+ fx ydx
x
x
(, )
0
0
?
1 + 1
0
0
+
?
xy dx
x
x
= 1 + 1
0
+
?
xdx
x
y
1
= 1 + x +
x
2
2
At x = 0.1, y
1
= 1 + (0.1) +
(. ) 01
2
2
= 1.105
The second approximation y
2
,
= y
0
+ fx ydx
x
x
(, )
1
0
?
? y
2
= 1 + 1
1
0
+
?
xy dx
x
? y
2
= 1 + 11
2
2
0
++ +
?
?
?
?
?
?
?
?
?
?
?
?
?
xx
x
dx
x
= 1 + 1
2
2
3
0
++ +
?
?
?
?
?
? ?
xx
x
dx
x
= 1 + x
xx x
++ +
234
23 8
At x = 0.1, y
2
= 1 + (0.1) +
(. )( .) (. ) 01
2
01
3
01
8
234
++
y(0.1) = 1.10534
The third approximation y
3
= y
0
+ fx ydx
x
x
(, )
2
0
?
·
? y
3
= 1 + () . 1
2
0
+
?
xy dx
x
1 + 11
23 8
234
0
++ ++ +
?
?
?
?
?
?
?
?
?
?
?
? ?
xx
xx x
dx
x
1 + 1
23 8
2
34 5
0
++ ++ +
?
?
?
?
?
? ?
xx
xx x
dx
x
= 1 + x +
x
2
2
+
x
3
3
+
xx x
45 6
81548
++
At x = 0.1,
y
3
= 1 + (0.1) +
(. )( .) (. )( .) (. ) 01
2
01
3
01
8
01
15
01
48
234 56
++ ++
(. )( .) (. )( .) (. ) 01
2
01
3
01
8
01
15
01
48
234 56
++ ++
= 1 + 0.1 + 0.005 + 0.0003 + 0.0000125 +
0.0000006 + 0.00000002
y
3
= 1.105313
Chapter 06.indd 136 5/31/2017 10:59:56 AM
Page 3
Chapter 06.indd 135 5/31/2017 10:59:53 AM
\ In general,
y
n+1
= y
n
+ hy
n
' +
h
2
2!
y
n
? +… will be the iterative formula.
Example
Given
dy
dx
= x - y
2
with the initial condition y(0) = 1
Find y (0.1) using Taylor series method with step size 0.1.
Solution
f (x, y) = x - y
2
x = 0.1, x
0
= 0, y
0
= 1, h = 0.1
y' = x - y
2
? y'(0) = x
0
- y
0
2
= - 1;
y? = 1 - 2yy' ? y?(0) = 1 - 2y
0
y
0
'
= 1 - 2 (1) (-1) = 3
y?' = -2yy? - 2(y')
2
? y?' (0) = -2 (1) (3) - 2 (-1)
2
= -6 - 2 = -8
By Taylor’ s formula,
y (0.1) = y
1
= y
0
+ hy ' (0) +
h
2
2!
y? (0) +
h
3
3!
y'? (0) +
…
? y
1
= 1 + (0.1) (-1) +
(. )
!
()
(. )
!
()
01
2
3
01
3
8
23
+- +
…
= 1 - 0.1 + 0.015 - 0.0013 +
…
y
1
= 0.9137.
Picard’s Method of Successive
Approximation
Given the differential equation
dy
dx
= f (x, y) (1)
Integrate Eq. (1) from x
0
to x, we get
dy fx ydx
x
x
x
x
=
? ?
(, )
0 0
?- =
?
yx yx fx ydx
x
x
() () (, )
0
0
?= +
?
yx yx fx ydx
x
x
() () (, )
0
0
(2)
Put y = y
0
, we get the first approximation,
y
n
= y
0
+ fx ydx
n
x
x
(, ).
-
?
1
0
Example
Given
dy
dx
= 1 + xy and y (0) = 1. Evaluate y (0.1) by Picard’ s
method upto three approximations.
Solution
f (x, y) = 1 + xy
x
0
= 0, y
0
= 1
The first approximation y
1
= y
0
+ fx ydx
x
x
(, )
0
0
?
1 + 1
0
0
+
?
xy dx
x
x
= 1 + 1
0
+
?
xdx
x
y
1
= 1 + x +
x
2
2
At x = 0.1, y
1
= 1 + (0.1) +
(. ) 01
2
2
= 1.105
The second approximation y
2
,
= y
0
+ fx ydx
x
x
(, )
1
0
?
? y
2
= 1 + 1
1
0
+
?
xy dx
x
? y
2
= 1 + 11
2
2
0
++ +
?
?
?
?
?
?
?
?
?
?
?
?
?
xx
x
dx
x
= 1 + 1
2
2
3
0
++ +
?
?
?
?
?
? ?
xx
x
dx
x
= 1 + x
xx x
++ +
234
23 8
At x = 0.1, y
2
= 1 + (0.1) +
(. )( .) (. ) 01
2
01
3
01
8
234
++
y(0.1) = 1.10534
The third approximation y
3
= y
0
+ fx ydx
x
x
(, )
2
0
?
·
? y
3
= 1 + () . 1
2
0
+
?
xy dx
x
1 + 11
23 8
234
0
++ ++ +
?
?
?
?
?
?
?
?
?
?
?
? ?
xx
xx x
dx
x
1 + 1
23 8
2
34 5
0
++ ++ +
?
?
?
?
?
? ?
xx
xx x
dx
x
= 1 + x +
x
2
2
+
x
3
3
+
xx x
45 6
81548
++
At x = 0.1,
y
3
= 1 + (0.1) +
(. )( .) (. )( .) (. ) 01
2
01
3
01
8
01
15
01
48
234 56
++ ++
(. )( .) (. )( .) (. ) 01
2
01
3
01
8
01
15
01
48
234 56
++ ++
= 1 + 0.1 + 0.005 + 0.0003 + 0.0000125 +
0.0000006 + 0.00000002
y
3
= 1.105313
Chapter 06.indd 136 5/31/2017 10:59:56 AM
Multi-step Methods
Euler’s Method
For the differential equation
dy
dx
= f (x, y) with initial condi-
tion y(x
0
) = y
0
, the Euler’ s iteration formula is
y
n
= y
n-1
+ h f (x
n-1
, y
n-1
), n = 1, 2, 3,…
The process is very slow and to obtain accuracy, h must
be very small, i.e., we have to divide [x
0
, x
n
] into a more
number of subintervals of length ‘h’.
NOTE
Example
Solve
dy
dx
yx
yx
=
-
+
, y (0) = 1, find y(0.5) by Euler’s method
choosing h = 0.25.
Solution
f (x, y) =
yx
yx
-
+
x
0
= 0, y
0
= 1, h = 0.25
Euler’ s iteration formula,
y
n
= y
n-1
+ h f (x
n-1
, y
n-1
)
Put n = 1,
x
1
= 0.25 ? y
1
= y(0.25) = y
0
+ h f (x
0
, y
0
)
= 1 + (0.25)
yx
yx
00
00
-
+
?
?
?
?
?
?
= 1 + (0.25)
10
10
-
+
= 1.25
Put n = 2
x
2
= 0.5 ? y
2
= y(0.5) = y
1
+ h f (x
1
, y
1
)
= (1.25) + (0.25)
yx
yx
11
11
-
+
?
?
?
?
?
?
= 1.25 + (0.25)
1250 25
1250 25
..
..
-
+
?
?
?
?
?
?
= 1.25 + 0.166666 = 1.4166
\ y(0.5) = 1.4166
Modified Euler’s Method
For the differential equation
dy
dx
= f (x, y) with initial condi-
tion y(x
0
) = y
0
, the Modified Euler’ s iteration formula is
y
r
(n)
= y
r-1
+
h
2
[ f (x
r -1
, y
r - 1
) + f (x
r
, y
r
n-1
)]
To find y
n
, we proceed to find the approximations y
n
(0)
,
y
n
(1)
, y
n
(2)
… until the two successive approximations are
approximately equal.
y
n
(0)
is found by Euler’ s method, i.e., yy hf x
nn n
()
(,
0
11
=+
--
y
n-1
)
NOTE
Example
Find y for x = 0.1 using modified Euler’ s method for the dif-
ferential equation
dy
dx
= log(x + y) with y(0) = 1.
Solution
Given f (x, y) = log(x + y)
x
0
= 0, y
0
= 1, h = 0.1
To find y
1
, x
1
= 0.1
y
1
(0)
= y
0
+ h f (x
0
, y
0
)
= 1 + (0.1) log(0 + 1) = 1
y
1
(1)
= y
0
+
h
2
[f (x
0
, y
0
) + f (x
1
, y
1
(0)
)]
= y
0
+
h
2
[log (x
0
+ y
0
) + log (x
1
+ y
1
(0)
)]
= 1 +
01
2
.
[log (0 + 1) + log(0.1 + 1)]
= 1 +
01
2
.
[log 1 + log 1.1] = 1.0047
y
1
(2)
= y
0
+
h
2
[ f (x
0
, y
0
) + f (x
1
, y
1
(1)
)]
= y
0
+
h
2
[log(0 + 1) + log(x
1
+ y
1
(1)
)]
= 1 +
01
2
.
[log(0 + 1) + log(0.1 + 1.0047)]
= 1.0049
y
1
(3)
= y
0
+
h
2
[ f(x
0
, y
0
) + f(x
1
, y
1
(2)
)]
= 1 +
01
2
.
[log(0 + 1) + log(0.1 + 1.0049)]
= 1.0049
\ y
1
= 1.0049.
Runge–Kutta Methods
First Order Runge–Kutta Method
y
1
= y
0
+ hy
0
1
[same as Euler’ s method]
Second Order Runge–Kutta Method
The formula is y
1
= y
0
+
1
2
(k
1
+ k
2
)
where k
1
= h f (x
0
, y
0
) and k
2
= h f (x
0
+ h, y
0
+ k
1
)
Third Order Runge-Kutta Method
The formula is y
1
= y
0
+
1
6
(k
1
+ 4k
2
+ k
3
)
where k
1
= h f (x
0
, y
0
)
Chapter 06.indd 137 5/31/2017 10:59:58 AM
Page 4
Chapter 06.indd 135 5/31/2017 10:59:53 AM
\ In general,
y
n+1
= y
n
+ hy
n
' +
h
2
2!
y
n
? +… will be the iterative formula.
Example
Given
dy
dx
= x - y
2
with the initial condition y(0) = 1
Find y (0.1) using Taylor series method with step size 0.1.
Solution
f (x, y) = x - y
2
x = 0.1, x
0
= 0, y
0
= 1, h = 0.1
y' = x - y
2
? y'(0) = x
0
- y
0
2
= - 1;
y? = 1 - 2yy' ? y?(0) = 1 - 2y
0
y
0
'
= 1 - 2 (1) (-1) = 3
y?' = -2yy? - 2(y')
2
? y?' (0) = -2 (1) (3) - 2 (-1)
2
= -6 - 2 = -8
By Taylor’ s formula,
y (0.1) = y
1
= y
0
+ hy ' (0) +
h
2
2!
y? (0) +
h
3
3!
y'? (0) +
…
? y
1
= 1 + (0.1) (-1) +
(. )
!
()
(. )
!
()
01
2
3
01
3
8
23
+- +
…
= 1 - 0.1 + 0.015 - 0.0013 +
…
y
1
= 0.9137.
Picard’s Method of Successive
Approximation
Given the differential equation
dy
dx
= f (x, y) (1)
Integrate Eq. (1) from x
0
to x, we get
dy fx ydx
x
x
x
x
=
? ?
(, )
0 0
?- =
?
yx yx fx ydx
x
x
() () (, )
0
0
?= +
?
yx yx fx ydx
x
x
() () (, )
0
0
(2)
Put y = y
0
, we get the first approximation,
y
n
= y
0
+ fx ydx
n
x
x
(, ).
-
?
1
0
Example
Given
dy
dx
= 1 + xy and y (0) = 1. Evaluate y (0.1) by Picard’ s
method upto three approximations.
Solution
f (x, y) = 1 + xy
x
0
= 0, y
0
= 1
The first approximation y
1
= y
0
+ fx ydx
x
x
(, )
0
0
?
1 + 1
0
0
+
?
xy dx
x
x
= 1 + 1
0
+
?
xdx
x
y
1
= 1 + x +
x
2
2
At x = 0.1, y
1
= 1 + (0.1) +
(. ) 01
2
2
= 1.105
The second approximation y
2
,
= y
0
+ fx ydx
x
x
(, )
1
0
?
? y
2
= 1 + 1
1
0
+
?
xy dx
x
? y
2
= 1 + 11
2
2
0
++ +
?
?
?
?
?
?
?
?
?
?
?
?
?
xx
x
dx
x
= 1 + 1
2
2
3
0
++ +
?
?
?
?
?
? ?
xx
x
dx
x
= 1 + x
xx x
++ +
234
23 8
At x = 0.1, y
2
= 1 + (0.1) +
(. )( .) (. ) 01
2
01
3
01
8
234
++
y(0.1) = 1.10534
The third approximation y
3
= y
0
+ fx ydx
x
x
(, )
2
0
?
·
? y
3
= 1 + () . 1
2
0
+
?
xy dx
x
1 + 11
23 8
234
0
++ ++ +
?
?
?
?
?
?
?
?
?
?
?
? ?
xx
xx x
dx
x
1 + 1
23 8
2
34 5
0
++ ++ +
?
?
?
?
?
? ?
xx
xx x
dx
x
= 1 + x +
x
2
2
+
x
3
3
+
xx x
45 6
81548
++
At x = 0.1,
y
3
= 1 + (0.1) +
(. )( .) (. )( .) (. ) 01
2
01
3
01
8
01
15
01
48
234 56
++ ++
(. )( .) (. )( .) (. ) 01
2
01
3
01
8
01
15
01
48
234 56
++ ++
= 1 + 0.1 + 0.005 + 0.0003 + 0.0000125 +
0.0000006 + 0.00000002
y
3
= 1.105313
Chapter 06.indd 136 5/31/2017 10:59:56 AM
Multi-step Methods
Euler’s Method
For the differential equation
dy
dx
= f (x, y) with initial condi-
tion y(x
0
) = y
0
, the Euler’ s iteration formula is
y
n
= y
n-1
+ h f (x
n-1
, y
n-1
), n = 1, 2, 3,…
The process is very slow and to obtain accuracy, h must
be very small, i.e., we have to divide [x
0
, x
n
] into a more
number of subintervals of length ‘h’.
NOTE
Example
Solve
dy
dx
yx
yx
=
-
+
, y (0) = 1, find y(0.5) by Euler’s method
choosing h = 0.25.
Solution
f (x, y) =
yx
yx
-
+
x
0
= 0, y
0
= 1, h = 0.25
Euler’ s iteration formula,
y
n
= y
n-1
+ h f (x
n-1
, y
n-1
)
Put n = 1,
x
1
= 0.25 ? y
1
= y(0.25) = y
0
+ h f (x
0
, y
0
)
= 1 + (0.25)
yx
yx
00
00
-
+
?
?
?
?
?
?
= 1 + (0.25)
10
10
-
+
= 1.25
Put n = 2
x
2
= 0.5 ? y
2
= y(0.5) = y
1
+ h f (x
1
, y
1
)
= (1.25) + (0.25)
yx
yx
11
11
-
+
?
?
?
?
?
?
= 1.25 + (0.25)
1250 25
1250 25
..
..
-
+
?
?
?
?
?
?
= 1.25 + 0.166666 = 1.4166
\ y(0.5) = 1.4166
Modified Euler’s Method
For the differential equation
dy
dx
= f (x, y) with initial condi-
tion y(x
0
) = y
0
, the Modified Euler’ s iteration formula is
y
r
(n)
= y
r-1
+
h
2
[ f (x
r -1
, y
r - 1
) + f (x
r
, y
r
n-1
)]
To find y
n
, we proceed to find the approximations y
n
(0)
,
y
n
(1)
, y
n
(2)
… until the two successive approximations are
approximately equal.
y
n
(0)
is found by Euler’ s method, i.e., yy hf x
nn n
()
(,
0
11
=+
--
y
n-1
)
NOTE
Example
Find y for x = 0.1 using modified Euler’ s method for the dif-
ferential equation
dy
dx
= log(x + y) with y(0) = 1.
Solution
Given f (x, y) = log(x + y)
x
0
= 0, y
0
= 1, h = 0.1
To find y
1
, x
1
= 0.1
y
1
(0)
= y
0
+ h f (x
0
, y
0
)
= 1 + (0.1) log(0 + 1) = 1
y
1
(1)
= y
0
+
h
2
[f (x
0
, y
0
) + f (x
1
, y
1
(0)
)]
= y
0
+
h
2
[log (x
0
+ y
0
) + log (x
1
+ y
1
(0)
)]
= 1 +
01
2
.
[log (0 + 1) + log(0.1 + 1)]
= 1 +
01
2
.
[log 1 + log 1.1] = 1.0047
y
1
(2)
= y
0
+
h
2
[ f (x
0
, y
0
) + f (x
1
, y
1
(1)
)]
= y
0
+
h
2
[log(0 + 1) + log(x
1
+ y
1
(1)
)]
= 1 +
01
2
.
[log(0 + 1) + log(0.1 + 1.0047)]
= 1.0049
y
1
(3)
= y
0
+
h
2
[ f(x
0
, y
0
) + f(x
1
, y
1
(2)
)]
= 1 +
01
2
.
[log(0 + 1) + log(0.1 + 1.0049)]
= 1.0049
\ y
1
= 1.0049.
Runge–Kutta Methods
First Order Runge–Kutta Method
y
1
= y
0
+ hy
0
1
[same as Euler’ s method]
Second Order Runge–Kutta Method
The formula is y
1
= y
0
+
1
2
(k
1
+ k
2
)
where k
1
= h f (x
0
, y
0
) and k
2
= h f (x
0
+ h, y
0
+ k
1
)
Third Order Runge-Kutta Method
The formula is y
1
= y
0
+
1
6
(k
1
+ 4k
2
+ k
3
)
where k
1
= h f (x
0
, y
0
)
Chapter 06.indd 137 5/31/2017 10:59:58 AM
k
2
= h f x
0
+
1
2
1
2
01
hy k , +
?
?
?
?
?
?
and
k
3
= h f (x
0
+ h, y
0
+ k') where k' = h f(x
0
+ h, y
0
+ k
1
).
Fourth Order Runge–Kutta Method
The formula is y
1
= y
0
+
1
6
(k
1
+ 2k
2
+ 2k
3
+ k
4
)
where k
1
= h f (x
0
, y
0
)
k
2
= h f x
0
+
1
2
1
2
01
hy k , +
?
?
?
?
?
?
k
3
= h f x
0
+
1
2
1
2
02
hy k , +
?
?
?
?
?
?
and k
4
= h f (x
0
+ h, y
0
+ k
3
)
Example
Given
dy
dx
= x
2
+ y
2
, y (1) = 1.2. Find y(1.05) applying fourth
order Runge–Kutta method, with h = 0.05.
Solution
f (x, y) = x
2
+ y
2
, x
0
= 1, y
0
= 1.2, h = 0.05
\k
1
= h f (x
0
, y
0
) = (0.05) [x
0
2
+ y
0
2
]
= (0.05) [1
2
+ (1.2)
2
] = 0.122
k
2
= h f
x
h
y
k
00
1
22
++
?
?
?
?
?
?
,
= (0.05) [f (x
0
+ 0.025, y
0
+ 0.061]
= (0.05) [f (1.025, 1.261)]
= (0.05) [(1.025)
2
+ (1.261)
2
] = 0.1320
k
3
= h f
x
h
y
k
00
2
22
++
?
?
?
?
?
?
,
= (0.05) f (1 + 0.025, 1.2 + 0.066)
= (0.05) f (1.025, 1.266)
= (0.05) [(1.025)
2
+ (1.266)
2
] = 0.1326 and k
4
= h
f (x
0
+ h, y
0
+ k
3
)
= (0.05) f (1 + 0.05, 1.2 + 0.1326)
= (0.05) f (1.05, 1.3326)
= (0.05) [(1.05)
2
+ (1.3326)
2
] = 0.1439
\ y
1
= y(1.05) = y
0
+
1
6
(k
1
+ 2k
2
+ 2k
3
+ k
4
)
= 1.2 +
1
6
[0.122 + 2(0.1320) + 2(0.1326)
+ 0.1439]
= 1.2 +
1
6
[0.7951] = 1.3325
Predictor–Corrector Methods
Milne’s Predictor Formula
y
n
p
+1
= y
n-3
+
4
3
h
(2y
n-2
- y
n-1
+ 2y
n
)
Milne’s Corrector Formula
y
n
c
+1
= y
n-1
+
h
3
[y
n-1
+ 4y
n
+ y
n+1
p
]
Adams–Bashforth Predictor Formula
y
n
p
+1
= y
n
+
h
24
[55y
n
- 59y
n-1
+ 37y
n-2
- 9y
n-3
]
Adams–Moulton Corrector Formula
y
n
c
+1
= y
n
+
h
24
[9
1
y
n
p
+
+ 19y
n
- 5y
n-1
+ y
n-2
]
Chapter 06.indd 138 5/31/2017 11:00:01 AM
Read More