CH#6 Numerical PDE and Optimization-01!02!2022-Final-Form
CH#6 Numerical PDE and Optimization-01!02!2022-Final-Form
CH#6 Numerical PDE and Optimization-01!02!2022-Final-Form
CHAPTER # 6
NUMERICAL
PARTIAL DIFFERENTIAL
EQUATIONS (PDE)
&
OPTIMIZATION
CHAPTER # 6
Numerical PDE and Optimization
Part I: Numerical Partial Differential Equations (PDE)
7.1.1 Introduction:-
We often encounter PDE in science and engineering especially in problems involving wave
phenomena, heat condition is homogenous solids and potential theory. As it is not possible
or very difficult to find analytical solution for most of the PDE in closed form, we go in
sufficiently approximate solutions by simple numerical methods, of the various numerical
methods available for solving PDE, the method of finite difference equation corresponding
to the given PDE is first obtained by replacing partial differential coefficients in it by the
finite difference approximations and then solved by arithmetic procedure.
7.1.2 Classification of PDE:-
A partial differential equation (PDE) involves two or more independent variables. The most
general form of linear PDE of the second order in two independent variable is:
(1)
or
(2)
Where A, B, C, D, E, F are in general functions of and . The equation ( ) and( )of 2nd
order PDE is classified as:
1):Elliptic if
2):Parabolic if
3):Hyperbolic if
7.1.3 Standard Examples:-
1): Elliptic equation:-
a): The Laplace equation is given by:
OR
Here
( ) OR ( )
Here
Here
Here
Example # 1:-
Classify the following PDE:-
( ) ( )( )
Example # 2:-
Classify the following PDE:
( )( )
Example # 3:-
Classify the following PDE:
( )( )( )
Note:-
There are many methods for solving PDE numerically. The following three methods are
very famous in this study:
1): Finite difference method (FDM)
2): Finite element method (FEM)
3): Finite volume method (FVM)
Let us now discuss the Finite Difference Method.
( ) ( )
( ) [Forward Difference]
( ) ( )
( ) [Backward Difference]
( ) ( ) ( )
( )
( ) ( )
( ) [Forward Difference]
( ) ( )
( ) [Backward Difference]
( ) ( ) ( )
( )
7.1.5Graphical Representation:-
A Rectangular domain is divided into divisions with step-size in direction as
and division with step size in direction as as shown in the following figure.
The points of intersection of these families of lines are called Mesh point or lattice point
grid points.
( )
( ) ( )
( )
( )
[Forward Difference]
[Backward Difference]
[Forward Difference]
[Backward Difference]
OR
( ) (SFPF)
( ) (SFPF)
That is the value of at any interior point is the arithmetic mean of the values of at the
four lattice points. This is called standard five point formula (SFPF).
Schematic diagram
Central value = average of other four values
( ) (DFPF)
( ) (DFPF)
Which is called the diagonal five point formula (DFPF).This formula is valid from the fact
that the Laplace equation is invariant when the coordinate axes are rotated through an
angle of .
Important note:-
1): In all computation we use the standard formula (SFPF) instead of the diagonal formula
(DFPF), wherever possible as the error in the diagonal is times more than the error in
standard formula.
2): We use an iteration process called liebmann’s process to solve the Laplace equation. We
will explain this method by some examples.
Example # 1:-
Solve the Laplace equation and find by liebmanns’s method the values at the
interior lattice in the following diagram.
Solution:-
Let us take the initial value of then we have the following initial values from the
given diagram.
For critical values:-
( )
( ) (DFPF)
( )
( ) (SFPF)
( )
( ) (SFPF)
( )
( ) (SFPF)
( ) ( ) ( )
( )
( ) ( ) ( )
( )
( ) ( ) ( )
( )
( ) ( ) ( ) ( )
Example #2
Find by the liebmann’s method the values at the interior lattice points of a square region of
the harmonic function whose boundary value are as shown in the following figure.
Solution:-
Since is harmonic it must satisfy the Laplace equation:
OR
Let the interior values of at the 9 grid points be We will find the values of
at the interior mesh points. We proceed to refine them.
( )
( ) (DFPF)
( )
( ) (DFPF)
( )
( ) (DFPF)
( )
( ) (DFPF)
( )
( ) (SFPF)
( )
( ) (SFPF)
( )
( ) (SFPF)
( )
( ) (SFPF)
( ) ( ) ( )
( )
( ) ( ) ( ) ( )
( )
( ) ( ) ( )
( )
( ) ( ) ( ) ( )
( )
( ) ( ) ( ) ( ) ( )
( )
( ) ( ) ( ) ( )
( )
( ) ( ) ( )
( )
( ) ( ) ( ) ( )
( )
( ) ( ) ( )
( )
“Table of values”
( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )
Example #3
Solve the Laplace equation for the following Mesh with boundary condition
(see figure in the next page).
A 500
C D
Solution:-
The values of are symmetric about lines and .Hence by symmetry, we have:
( )
( ) (DFPF)
( )
( ) (SFPF)
( )
( ) (SFPF)
( ) ( ) ( )
( )
( ) ( ) ( ) ( ) ( ) ( )
( ) ( )
( ) ( ) ( ) ( ) ( ) ( )
( ) ( )
( ) ( ) ( ) ( ) ( ) ( ) ( )
( ) ( )
( ) ( ) ( ) ( )
( ) ( ) ( ) ( )
,
“Table of values”
( ) ( ) ( ) ( )
Example #4:-
Solve the Laplace equation for the following square Mesh with boundary
condition:
Solution:-
The values of are symmetric about lines . Hence by symmetry, we have:
( ) ( )
Then
( )
( ) (SFPF)
( )
( ) (SFPF)
( ) ( ) ( )
( ) ( )
( ) ( ) ( )
( ) ( )
( )
( ) ( ) ( )
( ) ( )
( ) OR ( )
( )
( ( ))
( ( ))
By applying this formula at each mesh point, we will get similar equations in the pivotal
values . These equations can be solved by iteration techniques. The error in this method
is of order ( ).
Example #5:-
Solve the Poisson equation ( ), over the squaremesh with sides
and with on the boundary and mesh length unit.
( ) = ( )
( ) ( )
( )
( )
( ) ( )
( ( ))
( ( ))
Here
( ( )) (1)
( ) ( )
( ) ( )
( ) ( )
( ) ( )
It is clear that:
( ) ( )
( )
( )
( )
( )
( )
( ) ( )
( )
( ) ( )
( )
“Table of values”
( ) ( ) ( )
Example #6:-
Solve , for square mesh with on the boundary dividing the square into
sub-square of length unit.
Solution:-
The Poisson equation is given by:
( )
Since and boundary condition are symmetrical about axes and the line , we
have
We need to find only. The standard formula for Poisson equation is given by:
( ( ))
( )
Here
( ) (1)
( ( ) ( ) )
(2)
( ( ) ( ) )
(3)
( ( ) ( ) )
(4)
Subject to constraints:
( )
( )
…………………………………………….
…………………………………………….
…………………………………………….
( )
and
Subject to constraints:
…………………………………………………
…………………………………………………
and
If are slack variables, then the standard table for this problem is:
Choose the minimum ratio, say . Then row is the pivot row and is the pivot
element.
Step-3: (Change the Basic Variables):-
Replace the basic variable in the left-hand columnby .
Step-4: (Reduce Pivot to ):-
In row replace by for
Step-5: (Gaussian-Elimination):-
Using Gaussian elimination, annihilate the column except the pivot. The algorithm is
repeated until at step-1, the maximum is achieved.
Remark:-
1):In case we proceed without taking negative of the coefficient in objective function in
the initial table, then we have to take negative of the optimal solution in row. The
process is stopped when all entries in row become non-positive.
2):One exception occurs at step-2 above, when all the , in the optimal column
are zero or negative and it becomes impossible to identify the row to continue the
method. The feasible region in this case is unbounded and so the solution is unbounded.
Example # 1:-
Find the maximum of:
Subject to constraints:
and
Solution:-
Introducing the slack variable, the standard form of the given LPP is:
Maximize: :
Subject to:
and
Then the basic feasible solution are
, , , and
-10
⁄
5 20
The most negative value in the row is . Therefore, we have marked the column
containing this element. Since minimum ratio lies is the row, the Pivot element is .
Marking the Pivot equal to and replacing by . We get the following table:
⁄ ⁄
Applying , , , we get
⁄ ⁄
⁄ ⁄
⁄ ⁄
Since all the entries in row are non-negative the required solution is:
, and
Example # 2:-
Use the simplex method to solve the problem:
Maximize:
Subject to:
and
Solution:-
Introducing the slack variables, the standard form of the given LPP is:
Maximize:
Subject to:
and
Then the basic feasible solution is:
, ,
-3
3 2/3
The most negative value in the row is which lies in column. Thus the key column
is column. The minimum positive ratio lies in row. Therefore, the Pivot element is
and the Pivotal row is row. We divide the Pivotal row throughout by so that Pivot
becomes . We replace by in the left column and perform row operation as:
Applying , , , we get:
-4
⁄
⁄ ⁄
⁄
13/3 ⁄ 11/13
Now the most negative value in the row is . Therefore the Key column is column.
The minimum positive ratio lies in row. Therefore, the Pivot element is ⁄ . We divide
the Pivot row throughout by ⁄ so that Pivot become . Then we replace by in the left
column and perform the following row operation as:
Applying , , , we get:
⁄
⁄ ⁄
⁄
⁄ ⁄
⁄
⁄ ⁄
Since all the entries in row are non-negative, we have achieved the solution. Hence the
solution is:
, , and
Example # 3:-
Use the simplex method to solve the following LPP:
Maximize:
Subject to constraints:
and
Solution:
Introducing the slack variables, the standard form of the LPP is:
Maximize:
Subject to constraints:
and
Therefore the basic feasible solution is:
, ,
Thus, the initial basic feasible solution is shown by the following table:
-3
⁄ 1
2
The most negative value of is . The minimum ratio is . Therefore, pivot element is .
Making pivot equal to , replacing by and annihilating the columnusing row
operation.
Applying , , , we get:
⁄ ⁄
⁄ ⁄
⁄ ⁄
Since all the entries in the row are non-negative, the optimal solution has been achieved.
The optimal solution is:
, , and
Example # 4:-
Use simplex Method to solve the following LPP:
Minimize:
Subject to constraints:
and
Solution:-
We first convert the given problem to the maximization problem by taking:
Maximize:
Subject to constraints:
and
and
Then the basic feasible solution is:
-3
4 3
⁄
The most negative value of is in column and the minimum ratio is in row.
Therefore, Pivot element is . Making the Pivotelement by dividing row throughout
by , replacing by and applying elementary row operation.
Applying we get:
⁄
-1/2
⁄
3/2 4
⁄ ⁄
⁄ ⁄
Applying
⁄ ⁄ ⁄
⁄ ⁄ ⁄
⁄ ⁄ ⁄
⁄ ⁄
Since all the entries in row are non-negative the solution to the problem is achieved.
Therefore, the solution to the problem is
and
Example # 5:-
Use simplex method to solve the following LPP:
Maximize:
Subject to the constraints:
and
Solution:-
Introducing the slack variables, the standard
Maximize:
Subject to constraints:
and
-4
3 4
The most negative value of is shown in column and then the minimum ratio is in
row. Therefore, the Pivot element is . Making the Pivot element by dividing row
throughout by , replacing by and applying elementary row operation to annihilate the
element in column.
Applying we get
⁄ ⁄
⁄ ⁄
The most negative value of is in column but the element – and ⁄ in the optimal
column are both negative and it becomes impossible to identify a row to continue the
method. The region in this case is unbounded. Hence the problem has unbounded solution.
Example # 6:-
Solve the following LPP by simplex method:
Maximize:
Subject to:
and
Solution:-
Introducing the slack variables, the standard form of the given LPP is:
Maximize:
Subject to:
and
Then the basic feasible solution is:
-1
1 1
Since the coefficient of in column and column are equal, we may choose any of
these columns as the Key column. Let us choose column as the Key column. Then
positive ratio lies with row. Therefore, the Pivot is and Pivotal row is row.
Replacing by and using elementary row operation:
Applying and we get:
The most negative value of is now in column but the coefficients in column are
both negative. Thus, it is impossible to identify a row to continue this process. The region in
this case is unbounded. Hence the LPP has unbounded solution.
( )
( ) ̂ ̂
EXCERSICE-7
Part-I: Numerical Partial Differential Equations (NPDE)
Question # 1:-
Solve the Laplace equation and find by Liebmann’s method the values at the
interior lattice in the following diagram.
Answer:-
Question # 2:-
Find by the Liebmann’s method the values at the interior lattice points of a square region
of the harmonic function whose boundary value are as shown in the following figure.
4
Answer:-
Question # 3:-
Solve the Laplace equation for the following mesh with boundary condition.
500
Answer:-
Question # 4:-
Solve the Laplace equation for the following square mesh with boundary
condition:
Answer:-
Question # 5:-
Using the given boundary values, solve the Laplace equation
, at the nodal points of the square grid shown in the figure:
2 3
Answer:-
Question # 6:-
Solve the Laplace equation , for the square mesh withthe boundary values
shown in figure.
Answer:-
Question # 7:-
Solve the Laplace equation , in the square region with mesh points and boundary
conditions shown in the figure.
Answer:-
Question # 8:-
Solve Laplace equation , at the internal mesh points of the square region with
the boundary values shown in the figure.
Answer:-
Question # 9:-
Solve , for he square region with the given boundary conditions:
Answer:-
Question # 10:-
Solve the Poisson equation ( ), over the squaremesh with sides
and with on the boundary and mesh length unit.
Answer:-
Question # 11:-
Solve for square mesh given , on theboundarydividing the square into -
sub-square oflength unit.
Answer:-
Question # 12:-
Solve the poission equation , over the squaremesh with sides
and with on the boundary and mesh length unit, correct to two decimal places.
Answer:-
Question # 13:-
Solve the Poisson equation ⁄ , over the square mesh with sides
and with on the boundary and mesh length unit, correct to two decimal
places.
Answer:-
PART-II: OPTIMIZATION
Linear Programming (Simplex method)
Question # 15:-
Find the maximum of:
Subject to the constraints:
and
Answer:-
Question # 16:-
Use simplex method to solve the problem:
Maximize:
Subject to the constraints:
and
Answer:-
Question # 17:-
Use simplex method to solve following LPP:
Maximize:
Subject to the constraints:
and
Answer:-
Question # 18:-
Use simplex method to solve following LPP:
Maximize:
and
Answer:-
Question # 19:-
Use simplex method to solve following LPP:
Maximize:
Subject to the constraints:
and
Answer:-
Unbounded solution
Question # 20:-
Solve the following LPP by simplex method:
Maximize:
Subject to the constraints:
and
Answer:-
Unbounded Solution
Question # 21:-
Maximize:
Subject to the constraints:
and
Answer:-
Question # 22:-
Maximize:
Subject to the constraints:
and
Answer:-
Question # 23:-
Maximize:
Subject to the constraints:
and
Answer:-
Question # 24:-
Maximize:
Subject to the constraints:
and
Answer:-
Question # 25:-
Maximize:
Subject to the constraints:
Answer:-
Question # 26:-
Maximize:
Subject to the constraints:
and
Answer:-
Question # 27:-
Maximize:
Subject to the constraints:
and
Answer:-
Question # 28:-
Maximize:
Subject to the constraints:
and
Answer:-
Question #29:-
Maximize:
Subject to the constraints:
and
Answer:-
Question # 30:-
Minimize:
Subject to the constraints:
and
Answer:-
SUMMARY
Part-I: Numerical Partial Differential Equations (PDE)
Classification of PDE:-
The most general form of linear PDE of the second order in two independent variable is:
(1)
OR
(2)
Where A, B, C, D, E, F are in general functions of and . The equation ( ) and( )of 2nd
order PDE is classified as:
1):Elliptic if
2):Parabolic if
3):Hyperbolic if
Or
( ) Or ( )
( ) ( )
( ) [Forward Difference]
( ) ( )
( ) [Backward Difference]
( ) ( ) ( )
( )
( ) ( )
( ) [Forward Difference]
( ) ( )
( ) [Backward Difference]
( ) ( ) ( )
( )
Or
( ) (SFPF)
( ) (SFPF)
That is the value of at any interior point is the arithmetic mean of the values of at the
four lattice points. This is called standard five point formula (SFPF).
( ) (DFPF)
( ) (DFPF)
Which is called the diagonal five point formula (DFPF).This formula is valid from the fact
that the Laplace equation is invariant when the coordinate axes are rotated through an
angle of .
7): Poisson equation:-
Poisson equation is of the form:
( ) Or ( )
( )
( ( ))
By applying this formula at each mesh point, we will get similar equations in the pivotal
values . These equations can be solved by iteration techniques. The error in this method
is of order ( ).
Part-II: Optimization
8): Linear Programming Problem(Simplex Method):-
A problem involving linear programming in its solution is called a linear programming
problem, generally written as LPP.
A general LPP with variable and in constraints can be expressed in the following way:
Optimize:
Subject to constraints:
( )
( )
……………………………………………
……………………………………………
( )
and
( )
( )
……………………………………………
……………………………………………
( )
and
Step-5: (Gaussian-Elimination):-
( )
( ) ̂ ̂