Professional Documents
Culture Documents
Taylor Series Method, Euler's Method and Modified Euler's Method
Taylor Series Method, Euler's Method and Modified Euler's Method
We know that an ODE of the first order is of the form � �, �, �' = 0 and can often be
written in the explicit form �' = �(�, �). An initial value problem for this equation is of the
form
�' = � �, � , � �0 = �0
where �0 and �0 are given and we assume that the problem has a unique solution on some
open interval � < � < � containing �0 . We shall discuss methods of computing
approximate numeric values of the solution of the above initial value problem at the
equidistant points on the �-axis �1 = �0 + ℎ, �2 = �0 + 2ℎ, �3 = �0 + 3ℎ, … where the step
size ℎ is a fixed positive real number. These methods are suggested by the Taylor series
expansion of an infinitely differentiable function.
Then
� �+1 � �+1
�� (�) = � − �0
(� + 1)!
for some � between �0 and �. Moreover, if
lim �� (�) = 0
�→∞
then the Taylor series for � expanded about �0 converges to �(�), that is
∞
� � �0 �
� � = � − �0
�!
�=0
�' = � �, � , � �0 = �0
where �0 and �0 are given, we assume that the problem has a unique solution on some
open interval � < � < � containing �0 and � is an infinitely differentiable function on (�, �).
Let � = �0 + ℎ, then by Taylor series expansion of � , we have
∞ ∞
� � �0 �
� � �0 �
� �0 + ℎ = � � = � − �0 = ℎ .
�! �!
�=0 �=0
That is,
ℎ2 '' ℎ3
� �0 + ℎ = � �0 + ℎ �' �0 + � �0 + �''' �0 + ⋯.
2 3!
To compute approximate numeric values of the solution of the above initial value problem
at the equidistant points on the �-axis �1 = �0 + ℎ, �2 = �0 + 2ℎ, �3 = �0 + 3ℎ, …, we use
the above form of Taylor series expansion. Thus we have the approximate values are
ℎ2 '' ℎ3
� �1 = � �0 + ℎ = � �0 + ℎ �' �0 + � �0 + �''' �0 + ⋯,
2 3!
'
ℎ2 '' ℎ3 '''
� �2 = � �1 + ℎ = � �1 + ℎ � �1 + � �1 + � �1 + ⋯,
2 3!
'
ℎ2 '' ℎ3 '''
� �3 = � �2 + ℎ = � �2 + ℎ � �2 + � �2 + � �2 + ⋯,
2 3!
and so on. In general
ℎ2 '' ℎ3
� ��+1 = � �� + ℎ = � �� + ℎ �' �� + � �� + �''' �� + ⋯.
2 3!
'
ℎ2 '' ℎ3 '''
� ��+1 = � �� + ℎ � �� + � �� + � �� .
2 3!
That is,
ℎ2 '' ℎ3 '''
��+1 = �� + ℎ �'� + � + � .
2 � 3! �
Given that, �' = ��. So, �'' = 1 + �2 � and �''' = 3� + �3 � . Now using ℎ = 0.2 and
the given initial condition � 0 = 1, that is �0 = 0, �0 = 1, we find,
Thus,
ℎ2 '' ℎ3 '''
�1 = �0 + ℎ �'0 + �0 + �0 = 1.02.
2 3!
Similarly we calculate �2 , �3 , �4 , �5 and are given in the below table.
From the above table we get the solution of the initial value problem as
� 0.2 = 1.0200, � 0.4 = 1.0828, � 0.6 = 1.1964, � 0.8 = 1.3757, � 1.0 = 1.6463 .
�2
Note: The exact solution is �(�) = � 2 , and so the exact value of � 1 is 1.6487.
Thus,
ℎ2 '' ℎ3 '''
�1 = �0 + ℎ �'0 + � + � = 0.0339.
2 0 3! 0
Similarly, we calculate �2 , �3 , �4 and are given in the below table.
From the above table we get the solution of the initial value problem as
Note: The exact solution is �(�) = �� − � − 1, and so the exact value of � 1 is 0.7183.
Example: Solve the initial value problem
�' = � + � 2 , � 0 = 0; ℎ = 0.1
using Taylor series method up to 3rd order derivative. Do 10 steps.
Solution: We have to solve the initial value problem
�' = � + � 2 , � 0 = 0.
with ℎ = 0.25 . That is we have to find the values of �(�) at
�1 = 0.1, �2 = 0.1, �3 = 0.3, …, �9 = 0.9, �10 = 1.0.
It is given that �0 = 0, � �0 = 0, ℎ = 0.1 . Let denote � �� = �� . We have to use Taylor
series method up to 3rd order derivative. That is we have to use
ℎ2 '' ℎ3
� ��+1 = � �� + ℎ �' �� + � �� + �''' �� .
2 3!
That is,
ℎ2 '' ℎ3 '''
��+1 = �� + ℎ �'� + �� + �� .
2 3!
Given that, �' = � + � 2 .
So,
�'' = 2 � + � 1 + �'
And
�''' = 2(1 + 4�' + 3�'2 )
Using ℎ = 0.1 and the given initial condition � 0 = 0 , that is �0 = 0, �0 = 0 , we do the
following 10 steps.
Step 1.
�'0 = �0 + �0 2
= 0, �''0 = 2(�0 + �0 )(1 + �'0 ) = 0, �''' ' '2
0 = 2(1 + 4�0 + 3�0 ) = 2.
Thus,
ℎ2 '' ℎ3 '''
�1 = �0 + ℎ �'0 + � + � =.
2 0 3! 0
Similarly, we do the rest steps and are given in the below table.
Note: The exact solution is �(�) = tan � − �, and so the exact value of � 1 is 0.05574.
Euler's method
From use Taylor series method, we have,
'
ℎ2 '' ℎ3 '''
� ��+1 = � �� + ℎ � �� + � �� + � �� + ⋯.
2 3!
For small ℎ the higher powers ℎ2 , ℎ3 , …, are very small and if we drop all of them to get the
crude approximation
� ��+1 = � �� + ℎ �' ��
i.e.,
��+1 = �� + ℎ � ��, �� .
Geometrically, this is an approximation of the curve of by a polygon whose first side is
tangent to this curve at ��.
��+1 = �� + ℎ � ��, �� .
Thus
2
�1 = �0 + ℎ� �0 , �0 = 0 + 0.1 ⋅ 0 − 0 =0
Similarly, we calculate �2 , …, �10 and are given in the below table.
� �� ��
1 0.1 0.0000
2 0.2 0.0010
3 0.3 0.0050
4 0.4 0.0137
5 0.5 0.0286
6 0.6 0.0508
7 0.7 0.0810
8 0.8 0.1193
9 0.9 0.1656
10 1.0 0.2196
�20 = 1.1001, �21 = 1.1424, �22 = 1.1483, �23 = 1.1492, �24 = 1.1493, �25 = 1.1493.
Thus, �2 = 1.1493. Again
�30 = 1.3144 , �31 = 1.3938, �32 = 1.4140, �33 = 1.4193, �34 = 1.4207, �35 = 1.4212,
�36 =1.4212.
Thus, �4 = 2.2349.
Therefore, �1 = 1.0334, �2 = 1.1493, �3 =1.4212, �4 = 2.2349.
2
Note: The exact solution of the above initial value problem is � � = 2−�2 and �1 = 1.0323,