Professional Documents
Culture Documents
Unit 5 Qb-Numerical Methods-2 - II Sem 2022-23
Unit 5 Qb-Numerical Methods-2 - II Sem 2022-23
( x − x0 )2
( y)0 , ( y)0 etc. Hence the Taylor’s series y( x) = y0 + ( x − x0 ) ( y )0 + ( y )0 + ...
2!
gives the values of y for every value of x for which the series converges.
Problems:
Using Taylor’s method approximate the solution of the following initial value problems
y1(1) = y 0 +
h
2
f (x0 , y 0 ) + f (x1 , y1E ) where y1(1) is known as the first modified value of y1
y1(2 ) = y 0 + f (x0 , y 0 ) + f (x1 , y1(1) ) , y1(2) is known as the second modified value of y1
h
2
y1(3) = y 0 + f (x0 , y 0 ) + f (x1 , y1(2 ) ) , y1(3) is known as the third modified value of y1
h
2
.
.
h
2
y1(n ) = y 0 + f (x0 , y 0 ) + f (x1 , y1(n −1) ) , y1( ) is known as the n th modified value of y1
n
----------------------------------------------------------------------------------------------------------------
Then, x 2 = x1 + h , y 2 = ?
To find y 2 use Modified Euler’s formula which is given below:
y2P = y1 + h f ( x1 , y1 ) ,
y 2(1) = y1 + h
2
f (x1 , y1 ) + f (x 2 , y 2E ) , y 2(1) is known as the first modified value of y 2
y 2(2 ) = y1 + f (x1 , y1 ) + f (x 2 , y 2(1) ) , y2(2) is known as the second modified value of y 2
h
2
y 2(3) = y1 + f (x1 , y1 ) + f (x2 , y 2(2 ) ) , y2(3) is known as the third modified value of y 2
h
2
.
.
y 2(n ) = y1 + f (x1 , y1 ) + f (x2 , y 2(n −1) ) , y2(n ) is known as the n th modified value of y 2
h
2
Similarly, we can find the values of y3 , y4 , ...
Problems:
Determine how much substance will remain at the moment t = 50 sec by Modified
Euler’s method with h = 25.
III Runge-Kutta method of fourth-order
= f (x, y ) with y ( x0 ) = y0 and taking h as the step length.
dy
Consider
dx
Then, x1 = x0 + h , y1 = ?
To find y1 use the Runge-Kutta formula which is given below:
y1 = y0 + k where k =
1
(k1 + 2k 2 + 2k 3 + k 4 ) ,
6
h k
k1 = h f ( x0 , y0 ) , k 2 = h f x0 + , y 0 + 1 ,
2 2
h k
k 3 = h f x 0 + , y 0 + 2 , k 4 = h f ( x0 + h , y 0 + k 3 ) .
2 2
----------------------------------------------------------------------------------------
Then, x 2 = x1 + h , y 2 = ?
To find y 2 use the Runge-Kutta formula which is given below:
y2 = y1 + k where k =
1
(k1 + 2k 2 + 2k 3 + k 4 ) ,
6
h k
k1 = h f (x1 , y1 ) , k 2 = h f x1 + , y1 + 1 ,
2 2
h k
k 3 = h f x1 + , y1 + 2 , k 4 = h f (x1 + h , y1 + k3 ) .
2 2
Similarly, we can find the values of y3 , y4 , ...
Problems:
Solve the following differential equations using Runge-Kutta method of fourth-order:
1) y = x + y , y ( 0 ) = 1 at x = 0.2 Ans: y(0.2) = 1.2428
2) ( x + y ) y = 1 , y ( 0.4) = 1 at x = 0.5
dy y 2 − x 2
3) = with y ( 0 ) = 1 at x = 0.2 and 0.4 . Ans: y(0.2) = 1.196, y(0.4) = 1.3752
dx y 2 + x 2
4) y = x + y 2 , y ( 0) = 1 at x = 0.2 in steps of 0.1 Ans: y(0.1) = 1.1165, y(0.2) = 1.2736
dy 2 xy + e x
5) = with y (1) = 0 at x = 1.2 Ans: y(1.2) = 0.1402
dx x 2 + xe x
6) y = 3x + y 2 at x = 1.1 , given that y = 1.2 when x = 1 Ans: y(1.1) = 1.7278
3) From the data given below, find y at x = 1.4 , using Milne’s predictor-corrector
dy y
formula: = x2 + x 1 1.1 1.2 1.3
dx 2 y 2 2.2156 2.4549 2.7514