Unit-4
Solution of differential Equations
The general first order differential equation
…. (1)
With the initial condition … (2)
In general, the solution of first order differential equation in one of the two forms:
a) A series for y in terms of power of x, from which the value of y can be obtained by direct solution.
b) A set of tabulated values of x and y.
The case (a) is solved by Taylor’s Series or Picard method whereas case (b) is solved by Euler’s, Runge Kutta Methods etc.
Picard’s method-
Let us suppose the first order equation-
It is required to find out that particular solution of equation (1) which assumes the value when ,
Now integrate (1) between limits, we get-
This is equivalent to equation (1),
For it contains the not-known y under the integral sign,
As a first approximation to the solution, put in f(x, y) and integrate (2),
For second approximation-
Similarly-
And so on.
Example: Find the value of y for x = 0.1 by using Picard’s method, given that-
Sol.
We have-
For first approximation, we put y = 1, then-
Second approximation-
We find it very hard to integrate.
Hence we use the first approximation and take x = 0.1 in (1)
Example: Obtain the Picard’s second approximation for the given initial value problem-
Find y (1).
Sol.
The first approximation will be-
Replace y by , we get-
The second approximation is-
The third approximation-
It is very difficult to solve the integration-
This is the disadvantage of the method.
Now we get from the second approximation-
At x = 1-
Euler’s method:
In this method the solution is in the form of a tabulated values
Integrating both side of the equation (i) we get
Assuming that in this gives Euler’s formula
In general formula
, n=0,1, 2….
Error estimate for the Euler’s method
Example1: Use Euler’s method to find y (0.4) from the differential equation
with h=0.1
Given equation
Here
We break the interval in four steps.
So that
By Euler’s formula
, n=0,1,2,3 ……(i)
For n=0 in equation (i) we get
For n=1 in equation (i) we get
.01
For n=2 in equation (i) we get
For n=3 in equation (i) we get
Hence y (0.4) =1.061106.
Example2: Using Euler’s method solve the differential equation for y at x=1 in five steps
Given equation
Here
No. of steps n=5 and so that
So that
Also
By Euler’s formula
, n=0,1,2,3,4 ……(i)
For n=0 in equation (i) we get
For n=1 in equation (i) we get
For n=2 in equation (i) we get
For n=3 in equation (i) we get
For n=4 in equation (i) we get
Hence
Example3: Given with the initial condition y=1 at x=0.Find y for x=0.1 by Euler’s method (five steps).
Given equation is
Here
No. of steps n=5 and so that
So that
Also
By Euler’s formula
, n=0,1,2,3,4 ……(i)
For n=0 in equation (i) we get
For n=1 in equation (i) we get
For n=2 in equation (i) we get
For n=3 in equation (i) we get
For n=4 in equation (i) we get
Hence
Modified Euler’s Method:
Instead of approximating as in Euler’s method. In the modified Euler’s method, we have the iteration formula
Where is the nth approximation to .The iteration started with the Euler’s formula?
Example1: Use modified Euler’s method to compute y for x=0.05. Given that
Result correct to three decimal places.
Given equation
Here
Take h = = 0.05
By modified Euler’s formula the initial iteration is
)
The iteration formula by modified Euler’s method is
-----(i)
For n=0 in equation (i) we get
Where and as above
For n=1 in equation (i) we get
For n=3 in equation (i) we get
Since third and fourth approximation are equal.
Hence y=1.0526 at x = 0.05 correct to three decimal places.
Example2: Using modified Euler’s method, obtain a solution of the equation
Given equation
Here
By modified Euler’s formula the initial iteration is
The iteration formula by modified Euler’s method is
-----(i)
For n=0 in equation (I) we get
Where and as above
For n=1 in equation (i) we get
For n=2 in equation (i) we get
For n=3 in equation (i) we get
Since third and fourth approximation are equal.
Hence y=0.0952 at x=0.1
To calculate the value of at x=0.2
By modified Euler’s formula the initial iteration is
The iteration formula by modified Euler’s method is
-----(ii)
For n=0 in equation (ii) we get
1814
For n=1 in equation (ii) we get
1814
Since first and second approximation are equal.
Hence y = 0.1814 at x=0.2
To calculate the value of at x=0.3
By modified Euler’s formula the initial iteration is
The iteration formula by modified Euler’s method is
-----(iii)
For n=0 in equation (iii) we get
For n=1 in equation (iii) we get
For n=2 in equation (iii) we get
For n=3 in equation (iii) we get
Since third and fourth approximation are same.
Hence y = 0.25936 at x = 0.3
Key takeaways-
1. Picard’s method-
2. Euler’s method:
, n=0,1, 2...
3. Modified Euler’s Method:
Taylor’s Series Method:
The general first order differential equation
…. (1)
With the initial condition … (2)
Let be the exact solution of equation (1), then the Taylor’s series for around is given by
(3)
If the values of are known, then equation (3) gives apowwer series for y. By total derivatives we have
,
And other higher derivatives of y. The method can easily be extended to simultaneous and higher –order differential equations. In general,
Putting in these above results, we can obtain the values of finally, we substitute these values of in equation (2) and obtain the approximate value of y; i.e. the solutions of (1).
Example1: Solve, using Taylor’s series method and compute .
Here This implies that .
Differentiating, we get
.
.
.
The Taylor’s series at ,
(1)
At in equation (1) we get
At in equation (1) we get
Example2: Using Taylor’s series method, find the solution of
At ?
Here
At implies that or or
Differentiating, we get
implies that or .
implies that or
implies that or
implies that or
The Taylor’s series at ,
(1)
At in equation (1) we get
At in equation (1) we get
Example3: Solve numerically, start from and carry to using Taylor’s series method.
Here .
We have
Differentiating, we get
implies that or
implies that or .
implies that
implies that
The Taylor’s series at ,
Or
Here
The Taylor’s series
.
Runge-kutta methods-
This method is more accurate than Euler’s method.
Consider the differential equation of first order
Let be the first interval.
A second order Runge Kutta formula
Where
Rewrite as
A fourth order Runge Kutta formula:
Where
Example1: Use Runge Kutta method to find y when x=1.2 in step of h=0.1 given that
Here
Also
By Runge Kutta formula for first interval
Again
A fourth order Runge Kutta formula:
To find y at
A fourth order Runge Kutta formula:
Example2: Apply Runge Kutta fourth order method to find an approximate value of y for x=0.2 in step of 0.1, if
Here
Also
By Runge Kutta formula for first interval
A fourth order Runge Kutta formula:
Again
A fourth order Runge Kutta formula:
Example3: Using Runge Kutta method of fourth order, solve
Here
Also
By Runge Kutta formula for first interval
)
A fourth order Runge Kutta formula:
Hence at x = 0.2 then y = 1.196
To find the value of y at x=0.4. In this case
A fourth order Runge Kutta formula:
Hence at x = 0.4 then y=1.37527
Simultaneous equation using Runge Kutta method of 2 orders:
The second order differential equation
Let then the above equation reduces to first order simultaneous differential equation
Then
This can be solved as we discuss above by Runge Kutta Method. Here for and for .
A fourth order Runge Kutta formula:
Where
Example1: Using Runge Kutta method of order four, solve to find
Given second order differential equation is
Let then above equation reduces to
Or
(say)
Or .
By Runge Kutta Method we have
A fourth order Runge Kutta formula:
Example2: Using Runge Kutta method, solve
for correct to four decimal places with initial condition .
Given second order differential equation is
Let then above equation reduces to
Or
(say)
Or .
By Runge Kutta Method we have
A fourth order Runge Kutta formula:
And
.
Example3: Solve the differential equations
for
Using four order Runge Kutta method with initial conditions
Given differential equation are
Let
And
Also
By Runge Kutta Method we have
A fourth order Runge Kutta formula:
And
.
Key takeaways-
Runge-kutta methods-
A second order Runge Kutta formula
Where
A fourth order Runge Kutta formula:
Where
Milne’s predictor corrector formula-
For given dy/dx = f (x, y) and y = and x = , to find the value of y for x = , by using Milne’s method,
We follow the steps given below-
The value being given, here we calculate-
By Taylor’s series or Picard’s method.
Now we calculate-
Then to find
We substitute Newton’s forward interpolation formula-
In the relation-
By putting x = , dx = h dn
Neglecting fourth and higher order differences and expressing in terms of the function values, we get-
This is called a predictor.
Now having found we obtain a first approximation to
Then the better value of is found by simpson’s rule as-
Which is called corrector.
Then an improved value of is computed and again corrector is applied to find a better value of .
We continue this step until remains unchanged.
Once and are obtained to desired degree of accuracy,
is found from the predictor as-
And
is calculated.
Then the better approximation to the value of we get from the corrector as-
We repeat until becomes stationary and we proceed to calculate .
This is called the Milne’s predictor-corrector method.
Adams - Bashforth predictor and corrector formula-
This is called Adams - Bashforth predictor formula.
And
This is called Adams - Bashforth corrector formula.
Example: Find the solution of the differential equation in the range for the boundary conditions y = 0 and x = 0 by using Milne’s method.
Sol.
Where
To get the first approximation-
We put y = 0 in f(x, y),
Giving-
In order to find the second approximation, we put y = in f (x, y)
Giving-
And the third approximation-
Now determine the starting values of the Milne’s method from equation (1), by choosing h = 0.2
Now using the predictor-
X = 0.8
,
And the corrector-
, ................(2)
Now again using corrector-
Using predictor-
X = 1.0,
,
And the corrector-
,
Again using corrector-
, which is same as before
Hence
Example: Solve the initial value problem , y(0) = 1 to find y (0.4) by using Adams-Bashforth method.
Starting solutions required are to be obtained using Runge-Kutta method of order 4 using step value h = 0.1
Sol.
Here we have-
Here
So that-
Thus
To find y (0.2)-
Here
Thus,
Y (0.2) =
To find y (0.3)-
Here
Thus,
Y (0.3) =
Now the starting values of Adam’s method with h = 0.1-
Using predictor-
Using corrector-
Hence
Key takeaways-
References