Anda di halaman 1dari 2

Lecture -2

2. Taylor’s series method:


Consider the differential equation
dy
 f  x, y  ; y  x0   y0 ... (1)
dx
If ( ) is the exact solution of (1), then the Taylor series for ( ) around x = x0 is given by

 x  x0 
2

y  x   y0   x  x0  y 0
'  y0"  ........... ... (2)
2!
If the values of y0' , y0" ,.... are known, then (2) gives a power series for y. The second and higher
order derivatives are obtained by successively differentiating the equation for the first derivatives
i.e.
"= ′= +

y "'  f "  f xx  2 f f xy  f 2 f yy  f x f y  f f y2 , etc.

Now, substitute the value of x in the series at which we wish to determine y and retain the
sufficient number of terms from the series to get the desired accuracy of solution.

Example:
Use Taylor series method to solve = + , (0) = 1 at = 0.2,0.4 correct to 3D.

Solution: We know
h 2 " h3 "' ...... h n  n  ...
y  x   y  x0  h   y0  hy  y0  y0 
'
0  y0   , where h = (x - x0)
2! 3! n!
Also, = + (0) = 1
"= 1+ ′ "(0) = 2
"′ = " "′(0) = 2
= "′ (0) = 2

Now, we have by Taylor’s series:


h2 h3 h4 h5 .....
y  x0  h   1  h  2 2 2 2  
2 6 24 120
where x0  0 and we get
h 2 h3 h 4 h5 .....
y 0  h  1 h      
2 3 12 60
For h = 0.2, it gives
. .
(0.2) = 1 + 0.2 + 0.04, + + +⋯

=1.24+0.002667+0.000133+.... = 1.24280
Note that the fifth term in this series is 0.00013 < 0.0005. Hence, value of y(0.2) correct to 3D
may be obtained by adding first four terms and thus
(0.2) = 1.24267 ≅ 1.243 ( 3D )
. . .
But, (0.4) = 1 + 0.4 + 0.16 + + + +⋯ 

=1 + 0.4 + 0.16 + 0.02133 + 0.00213 + 0.00017 + ⋯ 


Here, for the accuracy of 3D, we have to add the first five terms as the sixth term is
0.00017 < 0.0005 and thus y(0.4) = 1.58346. = 1.583 ( 3D )
So, we conclude that as the value of x increases then for the same accuracy, more terms are
required in the Taylor’s series.
To overcome this problem, one can shift the origin of Taylor’s series to consider the less number
of terms from the series. We mean, write a fresh Taylor’s series after obtaining each two or three
values of y to retain only first few terms even for large values of x for the desired accuracy.
Error of the Taylor series method is simply the first term of the discarded part of the series at
some point  ( , + ℎ); . . if first n-term have been retained in obtaining the value of y
then
n

y   ,    x 0, x0  h  i.e. O  h n 
h n
Error of Taylor series will be 
n!

Anda mungkin juga menyukai