0% found this document useful (0 votes)
17 views

Unit 3

Uploaded by

mufaddal hamid
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Unit 3

Uploaded by

mufaddal hamid
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

Module3:Numerical Methods–3

Contents
Ordinary differential equations : Taylor’s series, Euler and modified Euler’s methods. Runge
Kutta method of fourth order for solving first and second order
equations.Milne’sandAdam’spredicator-correctormethods.Partialdifferential
equations:FinitedifferencesolutiontwodimensionalLaplaceequationandPoissionequation,
Implicitandexplicitmethodsforonedimensionalheatequation(Bender-SchmidtandCrank-
Nicholsonmethods), Finite difference explicit method for wave equation

Ordinary differential equations: Many problems in Engineering and Science can be formulated
into ordinary differentional equations satisfying certain given conditions. If these conditions are
prescribed for one point only, then the differential equation together with the condition is
known as an initial value problem. If the conditions are prescribed for two or more points, then
the problem is termed as boundary value problem. A limited number of these differentional
equations can be solved by analytical methods. Hence numerical methods play very important
role in the solution of differential equations.

We shall discuss some of the following methods for obtaining numerical solution of first order
and first degree Ordinary Differential Equation.

[I] Taylor’s Seriesmethod.

[II]Euler’s method.

[III] Modified Euler’s method.

[IV] Milne’smethod / Milne’sPredictor-Corrector method.

[V] Runge-Kutta method.

[VI] Adam’s Bash forth Method.

Method-I:Numerical Solution to Ordinary Differential Equation By Taylor’s Series


method

Consider the differential equation

-------------------------- (1)
Subject to

Then ,we by Taylor’s

If then

Example- Using Taylor’s Series method, find the solution of

With correct to five decimal places at

Solution: Given that with i.e.

i.e.

Differentiate with respect to

Again Differentiate with respect to

Again Differentiate with respect to

andso on

Now by Taylor’s Series method,

At
Method-II :Numerical Solution to Ordinary Differential Equation By Euler’smethod

Euler’smethod,as such, is of very little practical importance, but illustrates in simple form ,the
basic idea of those numerical methods,which seek to determine the change corresponding
to small increase in the argument

Let us consider the equation

-------------------------- (1)

Subject to

Let be the solution of (1) and let ,……… be


equidistant values of

In an small interval, a curve is nearly a straight line. This is the property used in Euler’smethod.

The approximation is given by

= + where

Example- UsingEuler’smethod, find an approximate value of corresponding to

With

Solution: Given that With

We have ,the approximation is given by

= + where (1)

We
take

Old +0.1

0.0 1.0 1.0 1.0 +0.1 (1.0) = 1.10


0.1 1.10 1.20 1.10 +0.1 (1.20) = 1.22
0.2 1.22 1.42 1.22+0.1 (1.42) = 1.36
0.3 1.36 1.66 1.36+0.1 (1.66) = 1.53
0.4 1.53 1.93 1.53+0.1 (1.93) = 1.72
0.5 1.72 2.22 1.72+0.1 (2.22) = 1.94
0.6 1.94 2.54 1.94+0.1 (2.54) = 2.19
0.7 2.19 2.89 2.19+0.1 (2.89) = 2.48
0.8 2.48 3.29 2.48+0.1 (3.29) = 2.81
0.9 2.81 3.71 2.81+0.1 (3.71) = 3.18
1.0 3.18

Thus the required approximate value is


3.18.

Method-III :Numerical Solution to Ordinary Differential Equation By Euler’s Modified method

Let us consider the equation

-------------------------- (1)

Subject to

Let be the solution of (1) and let ,……be equidistant


values of

In each step of this method ,we first compute the auxiliary value

= + where (2)

andthenthe new value

……….(3)

where

This Modified method is a Predictor-Corrector method; because in each step,we first predict a
value by (2) and then correct it by (3).

Example:Using Euler’s modifiedmethod,solvenumerically the equation

Subject to in the steps of 0.2


Solution: Given that

Subject to i.e.

Now for this , we have by Euler’s modifiedmethod ,Predictor formula

= + where (1)

and then the new value by Corrector formula

……….(2)

Where n

Now by (1), for finding the value of

= +

Now by (2)this value of

For First iteration put

where

Now for second iteration put

Similarly third iteration put


Hence ,from above ,Since

Again apply Euler’sModified method for more accurate approximations ,

Hence , by (1), for finding the value of

= +

Now by (2) this value of

For First iteration put

=1.52402

where

Now for second iteration put

Similarly third iteration put


Also ,similarly fourth iteration put

Hence , by again (1), for finding the value of

= +

Now by (2) this value of

For First iteration put

where

=1.88496

Similarly by putting

Method-IV :Numerical Solution to Ordinary Differential Equation By Milne’s method /


Milne’s Predictor-Corrector method

As the name suggests,predictor-corrector method is the method in which,we first predict a


value of by using a certain formula and then correct this value by using a more accurate
formula. i.e.

Let us consider the equation

-------------------------- (1)

Subject to
Then the predictor formula for finding is

[2

And the Correctorformula for finding

[2

Now from above ,it is clear that only possible i.e. we shall find
,we must required four prior values of .

Example:UsingMilne’smethod, solve numerically the equation

Subject to

Solution: Given that

We have by Milne’smethod,

[2

And the Correctorformula for finding

[2

Now to find , put

[2 …………………(3)

For this ,we have


Hence ,on putting all the above values in (3)

We get , [2

Now ,we shall correct this value of of by the corrector formula (2) as

put

[2

i.e.

Method-V:Numerical Solution to Ordinary Differential Equation By Runge-Kutta method

Runge-Kutta method is more accurate method of great practical importance. The working
procedure is as follows,

To solve -------------------------- (1)

Subject to by Runge-Kutta method, compute

Hence,

Similarly, we can compute


Hence, and so on for succeeding intervals.

Therefore , we can notice that the only change in the formulae for succeeding intervals is in the
values of This refinement was carried out by two German mathematicians C.D.T.
Runge (1856-1927) and M.W.Kutta (1867-1944).

Example 1.UsingRunge-Kutta method to find

Subject to

Solution: Given that Subject to

First ,we will compute

For this ,we have


Hence,

Similarly, we can compute

For this, we have

Hence,

Method-VI:Numerical Solution to Ordinary Differential Equation By Adam’s Bash forth


method

It is thepredictor-corrector method ,in which, we first predict a value of by using a certain


formula and then correct this value by using a more accurate formula. i.e.

Let us consider the equation

-------------------------- (1)

Subject to

Then the predictor formula for finding is

[55

It is called Adam’s Bashforthpredictor formula.

And the Correctorformula for finding


[9

Now from above, it is clear that,for applying this method , we require four starting values of .

Note :-In practice ,the Adam’s Bashforthmethod together with fourth order Runge-Kutta method
have been found to be most useful.

Example:UsingAdam’sBashforthmethod, solve the equation

Subject to

Solution: Given that

Hence ,

Similarly ,

Now,the predictor formula for finding is

[55

and

And the Correctorformula for finding

[9

[9
i.e.

Numerical Solution of Partialdifferential equations:[Finite difference solution two


dimensional Laplace equation and Poission equation, Implicit and explicit methods for one
dimensional heat equation (Bender-Schmidt and Crank- Nicholson methods), Finite difference
explicit method for wave equation]:Many physical problems are mathematically modeled as
boundary value problems ,associated with second order Partial differential equations. These
second order Partial differential equations are classified into three distinct types. They are
elliptic, parabolic and hyperbolic. A general second order linear Partial differential equation is
of the form

…………………………………(1)

Where are all functions of .

[I]If at a point in the plane, then the equation (1) is called Elliptic

The standard examples are

(1) TwodimensionalLaplaceequation

(2) TwodimensionalPoissionequation

[II]If at a point in the plane, then the equation (1) is called parabolic.

The standard example is one dimensional heat equation


[III ]If at a point in the plane, then the equation (1) is called hyperbolic.

The standard example is one dimensional wave equation

Numerical methods for solving boundary value problems for each three types are slightly
different from one another.Most commonly used numerical method to solve such problems is
termed as finite difference method or net method. In this method, the derivatives appearing in
the equation and the boundary conditions are replaced by their finite difference
approximations. Then the given equation is changed into a system of linear equations, which
are solved by iterative procedures.This process is slow but produces good resultsin many
boundary value problems.
Geometrical representation of Partial Difference Quotients:

The plane is divided into a series of rectangles of sides and by equidistant


lines drawn parallel to the axis of coordinates. As shown in above figure (1).

(i, j+2)

(i, j+1)
K=1

(i-2, j) (i-1, j) (i, j) (i+1, j) (i+2, j)

(i, j-1)

(i, j-2)

h=1

Now ,we can interpret the above idea in a different notation by drawing two sets of parallel lines
and ,
The point of intersection of these family of lines are called mesh points or lattice points. The point
is called the grid point and is surrounded by the neighboring points as shown in below figure (2).
If is a function of two variables then the values of at the point is denoted
by

We can write

,
Now replacing the derivatives in any partial differential equation by their corresponding difference
approximations, we obtain the finite difference analogues of the given equations.

[I] Numerical Solution ofElliptic equations by Finite difference method:-

An important equation of the Elliptic type is Two dimensional Laplace equation


…………………..(1)

This type of equation arises in potential and steady state flow problems. The solution u of (1) is
satisfied at every point of the region subject to given boundary conditions on the closed curve. Consider a
rectangular region for which u is known at the boundary. Divide this region for which u is
Known at the boundary.Divide this region into a network of square mesh of side .

Now, replacing the derivatives in (1) by their difference approximations,

Since ,

……………………… (2)
This shows that the value of at any interior mesh point is the average of it’s values at four
neighboring points to left, right, above and below.This is called the Standard five point formula (SFPF) or
as Lineman’s averaging procedure.

Sometimes a formula similar to (2) is used which is given by

…………………… (3)

This shows that the value of is the average (or Arithmetic mean) of its values at the four
neighboring diagonal mesh points. This is called the Diagonal five point formula (DFPF).
Although (3) is less accurate than (2), yet it serves as a reasonably good approximation for obtaining the
starting values at the mesh points. In the iteration procedure, but whenever possible formula (2) is
preferred in comparison to formula (3).
Now to solve a Laplace equation by finite difference method, we adapt the following set
procedure

Suppose that the given boundary values are , ………….., .Now ,we are to determine
initial values of at the interior mesh points region Since the value at the center an
therefore the values are computed by using Diagonal five point formula (DFPF),
therefore ,we have

;
;
;

;
The values at the remaining interior mesh points i.e. the values of are computed by using,
Standard five point formula (SFPF) therefore, we have
;
;
;

Thus,we have computed all values once. The accuracy of are


improved by the repeated application of the any one of the following iterative formulae.

(i) Gauss sJacobi’s iterative method

Where be the no. of iterations.


(ii) Gauss s Seidal ‘s iterative method

Where be the no. of iterations.

This method of finite difference is well explained by Example.


Sol:
Let u1 , u2 ……u9 be the values of u at the interior mesh points of the given region.By symmetry
about the lines AB and the line CD,we observe

Hence it is enough to find u1 , u2 , u4 , u5


Calculation of rough values
u5 =1500
u1 =1125
u2 =1187.5
u4 =1437.5
Gauss-seidel
scheme
When steady state condition prevail, the temperature distribution of the plate is represented
by Laplace equation uxx+uyy=0.The temperature along the edges of the square plate of side 4
are given by along x=y=0,u=x3 along y=4 and u=16y along x=4, divide the square plate into 16
square meshes of side h=1 ,compute the temperature a iteration process.

Solution of Poisson equation:-

This expression is called the replacement formula.Applying this equation at each internal mesh
point ,we get a system of linear equations in ui,where ui are the values of u at the internal mesh
points.Solving the equations, the values ui are known.
u(0,y)=u(x,0)=0,u(x,1)=u(1,y)=100 with the square meshes ,each of length h=1/3.
******************************************************************************

You might also like