Unit 1
Numerical methods
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.
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
. |
Key takeaways
- The Taylor’s series for around is given by
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
- Euler’s method:
, n=0,1,2,…. |
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
|
Given
equation 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
|
Given
equation 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
|
Given
equation 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 |
Solution of Second order ODE using 4th order Runge-Kutta method:
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 RungeKutta 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 RungeKutta Method we have A fourth order Runge Kutta formula: |
Example2: Using RungeKutta 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 RungeKutta method with initial conditions
Given differential equation are Let And Also By RungeKutta Method we have A fourth order Runge Kutta formula: And . |
Key takeaways
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 approaximation 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 continues 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.
By using Picards method- 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 intital 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
- E. Kreyszig, “Advanced Engineering Mathematics”, John Wiley & Sons, 2006.
- P. G. Hoel, S. C. Port And C. J. Stone, “Introduction To Probability Theory”, Universal Book Stall, 2003.
- S. Ross, “A First Course in Probability”, Pearson Education India, 2002.
- W. Feller, “An Introduction To Probability Theory and Its Applications”, Vol. 1, Wiley, 1968.
- N.P. Bali and M. Goyal, “A Text Book of Engineering Mathematics”, Laxmi Publications, 2010.
- B.S. Grewal, “Higher Engineering Mathematics”, Khanna Publishers, 2000.
- T. Veerarajan, “Engineering Mathematics”, Tata Mcgraw-Hill, New Delhi, 2010
- Higher engineering mathematics, HK Dass