Download as pdf or txt
Download as pdf or txt
You are on page 1of 35

Program : B.

Tech
Subject Name: Mathematics III
Subject Code: BT-401
Semester: 4th
Downloaded from be.rgpvnotes.in

Module3:Numerical Methods–3

Contents
O di a diffe e tiale uatio s:Ta lo s se ies, Eule a d odifiedEule s
methods. RungeKuttamethodoffourthorderfor solving
fi sta dse o do de e uatio s.Mil e sa dAda sp edi ato -
correctormethods.Partialdifferential
equations:FinitedifferencesolutiontwodimensionalLaplaceequationandPoissio
nequation,
Implicitandexplicitmethodsforonedimensionalheatequation(Bender-
SchmidtandCrank-
Nicholsonmethods),Finitedifferenceexplicitmethodforwaveequation

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] Pi a d s ethod of su essi e approximation.

[II] Ta lo s Seriesmethod.

[III] Eule s method.

*IV+ Modified Eule s ethod.

*V+ Mil e s ethod / Mil e sP edi to -Corrector method.

[VI Runge-Kutta method.

*VII+ Ada s Bash fo th Method.

Page no: 1 Follow us on facebook to get real-time updates from RGPV


Downloaded from be.rgpvnotes.in

Method-I :Pi a d’s Method of su essi e app o i atio s fo fi st o de a d


first degree differential equation :--

Consider the differential equation

= , --------------------------(1)

Subject to 0 = 0.This equation can be written as

= ,

Integrating between the limits,


We get = ,
0

− 0
= ,

= 0
+ , ---------------------------- (2)

Whi h is a i teg al e uatio e ause the u k o fu tio is p ese t


under the integral sign.Such an equation can be solved by successive
approximation as follows;

For first approximation 1,we replace y by 0 in , in the R.H.S. of equation


(2),
i.e. = + , --------------------------------- (3)
1 0 0

Now, for second approximation 2,we replace y by 1 in , in the R.H.S. of


equation (2),
. = + , --------------------------------- (4)
2 0 1

Proceeding in this way, we get 3, 4, 5,−−−−−−−

The ฀ approximation is given by


= + , ,n=1,2,3----------
0 −1

The process is to be stopped when the two values of y, viz , −1 ,are same
to the desired degree of accuracy.

Page no: 2 Follow us on facebook to get real-time updates from RGPV


Downloaded from be.rgpvnotes.in

Example-: Find the Picard approximations y1,y2, y3 to the solution of the

initial value problem y'=y, y(0) =2 .Use y 3 to estimate the value of y (0.8) and

compare it with the exact solution.

Solution: The ฀ approximation is given by


= + , ,n=1,2,3 ---------- (1)
0 −1

For First approximation 1 , we replace y by 0 in , in the R.H.S. of

equation (1)

Therefore, = + ,
1 0 0

Here,y0 =2, the value of y1 is

 2 dx  2  2x
x
y1=2+ , 0 = 0 =2
0 where

Similarly,

  2  2x  dx 2  2x  x
x
2
y2 =2+
0

also

y3=2+ 0 (2  2x  x )dx  2  2x  x 
x 2 2 x3
3

At x= 0.8

2 1 3
y3=2+2(0.8)+(0.8) + (0.8)
3

Page no: 3 Follow us on facebook to get real-time updates from RGPV


Downloaded from be.rgpvnotes.in

=4.41

By Direct Method: The solution of the initial-value problem, found by

separation of variables, is y=2ex. At x=0.8

y=2e0.8=4.45

Method-II :Nu e i al Solutio to O di a Diffe e tial E uatio B Ta lo ’s


Series method

Consider the differential equation

= , -------------------------- (1)

Subject to 0 = 0.

The , e Ta lo s

= = 0 + − 0

− 0 − 02 − 03
= + ′
+ ′′
+ ′′′
0 0 0 0
1! 2! 3!
+⋯…………

If 0 = 0 then
2 3
′ ′′ ′′′
= 0+ 0+ 0+ 0+⋯…………
1! 2! 3!
Example- Usi g Ta lo ’s Se ies ethod, fi d the solutio of

= − 1With 1 = 2correct to five decimal places at = 1.02

Solution: Given that = − 1with 1 = 2 i.e. = 1 =2


0 0

′ ′ ′
i.e. = −1 ∴ 0= 0 0 − = . − = = 0

Differentiate with respect to


′′ ′ ′′ ′ ′′
= + ∴ 0= 0 + 0 0 = 2 + 1.1 = 3 = 0

Page no: 4 Follow us on facebook to get real-time updates from RGPV


Downloaded from be.rgpvnotes.in

Again Differentiate with respect to


′′′
=2 ′+ ′′
∴ ′′′
0=2 ′0+ 0
′′
0 = 2.1 + 1.3 = 5 = ′′′
0

Again Differentiate with respect to


′′′′ ′′ ′′′ ′′′′ ′′ ′′′ ′′′′
=3 + ∴ 0=3 0+ 0 0 = 3.3 + 1.5 = 14 = 0

andso on

No Ta lo s “e ies ethod,

− 0 ′ − 02 ′′
− 03 ′′′
y = 0 + 0 + 0 + 0
1! 2! 3!
+⋯…………

− − 2 − 3 − 4
=> =2 + .1+ .3+ .5+ . 14
1! 2! 3! 4!
+⋯…………

At = 1.02

. − . − 2 . − 3
=> =2 + .1+ .3+ .5
1! 2! 3!
. − 4
+ . +⋯…………
4!
=> = 2.020606.

Method-III :Numerical Solution to Ordinary Differential Equation By


Eule ’s ethod

Eule s ethod,as su h, is of e little p a ti al i po ta e, ut illust ates i


simple form ,the basic idea of those numerical methods,which seek to
determine the change∆y in y corresponding to small increase in the argument
.

Let us consider the equation

= , -------------------------- (1)

Subject to 0 = 0.

Page no: 5 Follow us on facebook to get real-time updates from RGPV


Downloaded from be.rgpvnotes.in

Let = be the solution of (1) and let 0 , 1= 0 + h, 2 = 0 + 2h


,……… e e uidista t alues of .

In an small interval, a curve is nearly a straight line. This is the property used in
Eule ’s ethod.

The ฀ approximation is given by

+1 = + h f xn , where = 0.1,2,3 … … …

Example- Usi gEule s ethod, fi d a app o i ate alue of corresponding to


= 1, ฀

= + With 0 = 1

Solution: Given that = + With 0 = 1

We have ,the ฀ approximation is given by

+1 = + h f xn , where = . , , … … … (1). We take = 10 ฀ =


0.1, ฀ ฀ . ฀ (1)

= + 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.

Page no: 6 Follow us on facebook to get real-time updates from RGPV


Downloaded from be.rgpvnotes.in

Method-IV :Nu e i al Solutio to O di a Diffe e tial E uatio B Eule ’s


Modified method

Let us consider the equation

= , -------------------------- (1)

Subject to 0 = 0.

Let = be the solution of (1) and let 0 , 1= 0 + h, 2 = 0 + 2h


,…… e e uidista t alues of .

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

+1 = + h f xn , where = . , , … … … (2)

andthenthe new value


h −1

+1 = + 2 [f xn , + f xn+1, +1 ……….

where 1,2,3 … … ..

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: Usi g Eule s odified ethod, sol e u e i all the e uatio

= +

Subject to 0 = 1 0.6 in the steps of 0.2

Solution: Given that

= +

Subject to 0 = 1 i.e. 0 = 0, 0. =1 h = 0.2

∴ w� �av� ,

= , . = . , . = . , . = .

Page no: 7 Follow us on facebook to get real-time updates from RGPV


Downloaded from be.rgpvnotes.in

. = , . =?, . =? , . =?

No fo this, e ha e Eule s odified ethod ,

Predictor formula

+1 = + h f xn , where = . , , … … … (1)

and then the new value by Corrector formula


h −1
+1 = + 2 [f xn , + f xn+1, +1 ……….

Where 1,2,3 … … ..

Now by (1), for finding the value of 1. =0


∴ w� �av� ,

1 = 0 + h f x0 , 0 = 1 + 0.2[ 0 + 0 = 1.2

Now by (2)this value of


1, h

For First iteration put = 1 =0 (2)

+ h [f x ,
1 0
= +fx ,
1 0 0 0 1 1
2
0.2 0
1=1+ [ + + +
1 0 0 1 1
2
1 0.2 0
=> =1+ [ 0 + 1 + 0.2 + 1.2 where = = 1.2
1 2 1 1

Now for second iteration put = 2 =02,


2 h 1 0.2 1
= + [f x , +f x , =1+ [ + + +
1 0 0 0 1 1 0 0 1 1
2 2
= 1.2309

Similarly third iteration put = 3 =0 2,


3 h 2 0.2 2
= + [f x , +f x , =1+ [ + + +
1 0 0 0 1 1 0 0 1 1
2 2
= 1.2309

Page no: 8 Follow us on facebook to get real-time updates from RGPV


Downloaded from be.rgpvnotes.in

Hence ,from above ,Since 2 ≈ 3 = 1.2309


1 1

∴ ��� � , �� . = . , = .

Again apply Eule ’s Modified method for more accurate approximations ,

Hence , by (1), for finding the value of 2. =1


∴ w� �av� ,

2 = 1 + h f x1 , 1 = 1.2309 + 0.2[ 1 + 1 = 1.49279

Now by (2) this value of


2, h

For First iteration put = 1 =1 (2)

+ h [f x ,
1 0
= +fx ,
2 1 1 1 2 2
2
0.2 0
1 = 1.2309 + [ + + +
2 1 1 2 2
2
1 0.2
=> = 1.2309 + [ 0.2 + 1.2309 + 0.4 + 1.49279 =1.52402
2 2

where 0 = = 1.49279
2 2

Now for second iteration put = 2 =1 2,

+ h [f x ,
2 1
= +fx ,
2 1 1 1 2 2
2
= 1.2309 + 0.2 [ + + + 1 = 1.525297
1 1 2 2
2

Similarly third iteration put =3 =1 2 ,

+ h [f x ,
3 2
= +fx ,
2 1 1 1 2 2
2
= 1.2309 + 0.2 [ + + + 2 = 1.52535
1 1 2 2
2

Also,similarly fourth iteration put = 4 =1 2,

3 = 1.52535
2

Page no: 9 Follow us on facebook to get real-time updates from RGPV


Downloaded from be.rgpvnotes.in

∴ w� �av� , 2. = 0.4 , = 1.52535

Hence ,by again (1), for finding the value of 3. =2


∴ w� �av� ,

3 = 2 + h f x2 , 2 = 1.52535 + 0.2[ 2 + 2 = 1.85236

Now by (2) this value of


3, h

For First iteration put = 1 =2 (2)

+ h [f x ,
1 0
= +fx ,
3 2 2 2 3 3
2
0.2 0 0
1 = 1.52535 + [ + + + where = = 1.85236
3 2 2 2 3 3 3 3

1 0.2
=> = 1.52535 + [ 0.4 + 1.52535 + 0.6 + 1.85236 =1.88496
3 2

Similarly by putting = 2, ,3,4 =2 2,

=> 2 = 1.88615, 3 = 1.88619, 4 = 1.88619


3 3 3

∴ w� �av� , 3. = 0.6 , = 1.88619

Method-V :Numerical Solution to Ordinary Diffe e tial E uatio B Mil e’s


ethod / Mil e’s P edi to -Corrector method

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


first predict a value of +1 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 0 = 0.

Then the predictor formula for finding +1 is


4h ′ ′ ′
= + [2 − +2 ]……………..
+1, −3 3 −2 −1

Page no: 10 Follow us on facebook to get real-time updates from RGPV


Downloaded from be.rgpvnotes.in

And the Corrector formula for finding +1

h ′ ′ ′
+1, = −1
+ [2 −1 +4 + +1 ]……………………
3

Now from above , it is clear that only = , , , … … … possible i.e. we shall


find , ., … … … .. ,we must required four prior values
, ., . of .

Example: Usi g Mil e s ethod, sol e u e i all the e uatio

= 2 1+

Subject to 1=1, 1.1 = 1.233 , 1.2 = 1.548 , 1.3 =


1.979 1.4

Solution: Given that

= 2 1+

∴ w� �av� ,

= , . = . , . = . , . = . , . = .

. = , . = . , . = . , . = . , . =?

We ha e Mil e s ethod,
4h ′ ′ ′
= + [2 − +2 ] … … … … … .. (1)
+1, −3 3 −2 −1

And the Corrector formula for finding +1

h ′ ′ ′
+1, = −1
+ [2 −1 +4 + +1 ]……………………
3

Now to find . , put = 3, 1


4h ′ ′ ′
= + [2 − +2 ]…………………
4, 0 3 1 2 3

For this , we have . = ,


′ 2
1 = 1 1+ . = 2.7019
′ 2
2 = 2 1+ . = 3.6691

Page no: 11 Follow us on facebook to get real-time updates from RGPV


Downloaded from be.rgpvnotes.in

′ 2
3 = 3 1+ . = 5.0345

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


4 .0.1
We get , 4, =1+ [2. . − . + . . ]= .
3
′ 2
4 = 4 1+ . = 7.0046

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

put = 3, 2
h ′
= + [2 ′ ′ ] = 2.5750
4, 2
3 2 +4 3 + 4

i.e. 1.4 = 2.5750

Method-VI: Numerical Solution to Ordinary Differential Equation By Runge-


Kutta method [ i.e. Fourth order 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 0 = 0. by Runge-Kutta method, compute y1. as followes

k1. = h 0 , 0.

h k1.
k2. = h 0 + , 0+
2 2
h k2.
k3 = h 0 + , 0 +
2 2
k4 = h 0 + ฀, 0 + k 3.

∴ ��� �
k1. + 2 k2. + k 3 + k4
�=
6
Hence, y1. = 0. +�= 1

Similarly, we can compute 2 = y2.

Page no: 12 Follow us on facebook to get real-time updates from RGPV


Downloaded from be.rgpvnotes.in

k1. = h 1 , 1.

h k1.
k2. = h 1 + , 1 +
2 2
h k2.
k3 = h 1 + , 1 +
2 2
k4 = h 1 + ฀, 1 + k 3.

∴ ��� �
k1. + 2 k2. + k 3 + k4
�=
6
Hence, y2. = 1. +�= 2 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


฀ = 1.2 . . 1.2 0.1

= 2 + 2 Subject to 1 = 1.5

Solution: Given that = 2 + 2 Subject to 1 = 1.5

∴ w� �av� , ฀ = 0.1

= , . = . , . = . ,

. = . , . =?, . =?,

First , we will compute 1.1 . . .

For this , we have

k1. = h 0 , 0. = 0.1 12 + 1.5 2 = 0.325

k =h + h, + k1. = 0.1 1.05 2 + 1.6625 2 = 0.3866


2. 0 0
2 2

Page no: 13 Follow us on facebook to get real-time updates from RGPV


Downloaded from be.rgpvnotes.in

k =h + h, + k2. = 0.1 1.05 2 + 1.6933 2 = 0.3969


3 0 0
2 2

k4 = h 0 + ฀, 0 + k 3. = 0.1 1.1 2 + 1.8969 2 = 0.4808

∴ ��� �
k1. + 2 k2. + k 3 + k4
�= = 0.3954
6
Hence,� . = .+ �= = . + . = .

Similarly, we can compute 2 = y2.

For this, we have

k1. = h 1 , 1. = 0.1 1.1 2 + 1.8954 2 = 0.4802

k =h + h , + k1. = 0.1 1.1 + 0.05 2 + 1.8954 + 0.2401 2


2. 1
2 1 2
= 0.5882
h k2.
k3 = h 1 + , 1 + = 0.6116
2 2
k4 = h 1 + ฀, 1 + k 3. = 0.7725

∴ w� �av�
k1. + 2 k2. + k 3 + k4
�= = 0.60815
6
Hence, y2. = 1. +�= 2 = 2.5035

Method-VII:Numerical Solution to Ordinary Diffe e tial E uatio B Ada ’s


Bash forth method

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


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

Let us consider the equation

= , -------------------------- (1)

Page no: 14 Follow us on facebook to get real-time updates from RGPV


Downloaded from be.rgpvnotes.in

Subject to 0 = 0.

Then the predictor formula for finding 1 is


h
= + [55 − 59 + 37 −9 ]……………..
1, 0 24 0 −1 − −

It is called Ada ’s Bashfo th predictor formula.

And the Corrector formula for finding 1

h
= + [9 + 19 −5 + ]……………………
1, 0 24 1 0 − −

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

Note :-I p a ti e ,the Ada s Bash fo th ethod togethe ith fou th o de


Runge-Kutta method have been found to be most useful.

Example: Usi gAda sBashfo thmethod, solve the equation

= 2 1+

Subject to 1=1, 1.1 = 1.233 , 1.2 = 1.548 , 1.3 =


1.979 1.4

Solution: Given that

= 2 1+

∴ w� �av� ,

= . , . = . , . = . , . = . , . = .

− . = . , − . = . , − . = . , . = . , . = �. . 1. =
?

Hence , −3 = 1.0 2 1 + 1.000 = 2.000

Similarly −2 = 1.1 2 1 + 1.233 = 2.702, −1 = 1.2 2 1 + 1.548 = 3.669

, 0 = 1.3 2 1 + 1.979 = 5.035

Page no: 15 Follow us on facebook to get real-time updates from RGPV


Downloaded from be.rgpvnotes.in

Now, the predictor formula for finding 1 is


h
= + [55 − 59 + 37 −9 ] = 2.573
1, 0 24 0 −1 − −

and 1 = 1.4 2 1 + 2.573 = 7.004

And the Corrector formula for finding 1


h
= + [9 + 19 −5 + ]
1, 0 24 1 0 − −

0.1
= 1.979 + [9× . + × . − × . + . ] = 2.575
24

i.e. 1.4 = 2.575 .

Numerical Solution of Partial differential 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

�2
+
�2
+
�2
+

+
� + = ………………………………… 1)
� 2 � � � 2 � �

Where , , , , , , are all functions of , .

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

The standard examples are

(1) Two dimensional Laplace equation


�2 �2
+ =0
� 2 � 2
(2) Two dimensional Poission equation

Page no: 16 Follow us on facebook to get real-time updates from RGPV


Downloaded from be.rgpvnotes.in

�2 �2
+ = ( , )
� 2 � 2

[II]If 2 − = 0 at a point in the , plane, then the equation (1) is


called parabolic.

The standard example is one dimensional heat equation

�2 1 �
=
� 2 2

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

The standard example is one dimensional wave equation

�2 1 �2
=
� 2 2 � 2

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).

Page no: 17 Follow us on facebook to get real-time updates from RGPV


Downloaded from be.rgpvnotes.in

(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 = , = = 0,1,2, … … …
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

� +1, − ,
= = ฀
� −
, −1,
= ฀

+1, −1,
= ,
2฀

� , +1 − ,
= =

, − , −1
=
, − , −1
= +1
2

Page no: 18 Follow us on facebook to get real-time updates from RGPV


Downloaded from be.rgpvnotes.in

�2 −1, −2 , + +1,
=
� 2 ฀2
�2 , − −2 , + , +1
=
� 2 2

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
�2 �2
+ = 0 ………………….. 1)
� 2 � 2

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,


−1, − 2 , + +1, , − − 2 , + , +1
+ =0
฀2 2
Since =
฀,
−1, −2 , + +1, , − −2 , + , +1
+ =0
฀2 ฀2

−1, + + , +1 + , −1
……………………… (2)
+1,
=> , =
4

, +1

, +1,
−1,

Page no: 19 Follow us on facebook to get real-time updates from RGPV


Downloaded from be.rgpvnotes.in

, −1

This shows that the value of , = u , at any interior mesh point is the
a e age of it s alues at fou eigh o i g poi ts to left, ight, a o e a d
below.This is alled the “ta da d fi e poi t fo ula “FPF o as Li e a s
averaging procedure.

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

=> , =
−1, +1 + +1, −1 + +1, +1 + −1 , −1
…………………… (3)
4

−1, +1
+1, +1

−1, −1 +1, −1

This shows that the value of , = u , is the average (or Arithmetic mean)
of it s alues at the fou eigh o i g diago al esh poi ts.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 wheneverpossible 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 1, 2 , 3………….., 16.Now ,we
are to determine initial values of , = u , at the interior mesh points
region . Since the value 5 at the center an therefore the values 1, 3, 7, 9,
are computed by using Diagonal five point formula (DFPF), therefore ,we have

Page no: 20 Follow us on facebook to get real-time updates from RGPV


Downloaded from be.rgpvnotes.in

1 1 1
5 =4[ 1 + 9 + 13 + 5] ; 1= 4[ 15 + 11 + 13 + 5] ; 3= 4[ 5 +
9+ 11 + 7] ;
1 1
7= 4[ 1+ 5+ 15 + 3] ; 9= 4[ 3+ 5+ 7+ 5]
The values at the remaining interior mesh points i.e. the values of
2, 4, 6, 8, are computed by using, Standard five point formula (SFPF)
therefore,
1
we have 1 1
2= 4[ 1+ 3+ 11 + 5] ; 4=4[ 15 + 5+ 1+ 7] ; 6= 4[ 5+ 7+

3+ 9];

1
8 = [ 7+ 9+ 5+ 3]
4
Thus ,we have computed all values 1, 2, 3, … . . , 9 once. The accuracy of
1, 2, 3, … . . , 9 are improved by the repeated application of the any one of
the following iterative formulae.

(i) Gauss sJa o i s ite ati e method

( +1)
1
= [ −1, + +1, +
,
, +1 + , −1]
4
Where = 0,1,2, … … be the no. of iterations.
(ii) Gauss s “eidal s ite ati e method

( +1)
1 +1 +1
= [ −1,
, +1, + + , +1 + , −1]
4
Where = 0,1,2, … … be the no. of iterations.

This method of finite difference is well explained by Example.

Page no: 21 Follow us on facebook to get real-time updates from RGPV


Downloaded from be.rgpvnotes.in

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

Page no: 22 Follow us on facebook to get real-time updates from RGPV


Downloaded from be.rgpvnotes.in

Page no: 23 Follow us on facebook to get real-time updates from RGPV


Downloaded from be.rgpvnotes.in

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=x 3 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.

Page no: 24 Follow us on facebook to get real-time updates from RGPV


Downloaded from be.rgpvnotes.in

u(0,y)=u(x,0)=0,u(x,1)=u(1,y)=100 with the square meshes ,each of length


h=1/3.

[II] Solution of One dimensional heat equation:-

In this session, we will discuss the finite difference solution of one dimensional
heat flow equation by Explicit and implicit method

Explicit Method (Bender-Schmidt method)

This formula is called Bender-Schmidt formula.

Implicit method (Crank-Nicholson method)

This expression is called Crank-Ni holso s i pli it s he e. We ote that C a k


Ni holso s s he e o e ges fo all alues of

Page no: 25 Follow us on facebook to get real-time updates from RGPV


Downloaded from be.rgpvnotes.in

The use of the above simplest scheme is given below.

The value of u at A=Average of the values of u at B, C, D, E

Note

In this scheme, the values of u at a time step are obtained by solving a


system of linear equations in the u k o sui.

Example: when u(0,t)=0,u(4,t)=0 and with initial condition u(x,0)=x(4-x) upto


t=sec
By initial conditions, u(x,0)=x(4-x) ,we have

1. Solve u xx = 2ut assuming ∆x=h=1

Sol:By Bender-Schmidt recurrence relation,

Page no: 26 Follow us on facebook to get real-time updates from RGPV


Downloaded from be.rgpvnotes.in

For applying eqn(1) ,we choose


Here a=2,h=1.Then k=1
By initial conditions, u(x,0)=x(4-x) ,we have

Page no: 27 Follow us on facebook to get real-time updates from RGPV


Downloaded from be.rgpvnotes.in

Page no: 28 Follow us on facebook to get real-time updates from RGPV


Downloaded from be.rgpvnotes.in

Page no: 29 Follow us on facebook to get real-time updates from RGPV


Downloaded from be.rgpvnotes.in

[III] Solution of One dimensional wave equation:-

Introduction

The one dimensional wave equation is of hyperbolic type. In this session, we


discuss the finite difference solution of the one dimensional wave equation

Page no: 30 Follow us on facebook to get real-time updates from RGPV


Downloaded from be.rgpvnotes.in

Page no: 31 Follow us on facebook to get real-time updates from RGPV


Downloaded from be.rgpvnotes.in

Practice Problems:

Page no: 32 Follow us on facebook to get real-time updates from RGPV


Downloaded from be.rgpvnotes.in

Example: Solve the equation uxx  u yy  8x 2 y2 over the square mesh of


following figure with u , =0 on the boundary and mesh length=1.

2u 2u 
   2
 2 
x2
y2
Example: Solve the equation ฀ 

10(x y 10) over the square


with sides x  y  0, to x  y  3 with u(x, y)  0 on the boundary and mesh
Page no: 33 length is one. Follow us on facebook to get real-time updates from RGPV
We hope you find these notes useful.
You can get previous year question papers at
https://qp.rgpvnotes.in .

If you have any queries or you want to submit your


study notes please write us at
rgpvnotes.in@gmail.com

You might also like