Finite Difference Representation: X y X U X X y X U X y X U y X X U
Finite Difference Representation: X y X U X X y X U X y X U y X X U
The ultimate goal for the solution of a PDE over a continuous domain is to reduce it to
discrete model which are suitable for high speed computers. One of the standard approach is
using Finite Difference Methods which are applicable to all type of second order PDE.The main
steps in this approach are as follows:
1. Discretization
2. Replacing the derivatives by FD representation
3. Solving the corresponding Difference equations to get the numerical values of ‘u’ at the
discretized nodes
The first and third point will be discussed later. Let us discuss the approximation of the partial
derivatives by corresponding Finite Differences.
Let u(x, y) be the dependent variable .The Taylor’s series expansion can be written as:
u ( x, y ) ( x ) 2 2u ( x, y )
u ( x x, y ) u ( x, y ) x (2.1)
x 2 x 2
Retaining terms upto first order,we have,
u u ( x x, y ) u ( x, y )
O(x) (2.2)
x x
u
This is called as first order forward difference approximation for
x .
u u ( x, y y ) u ( x, y )
Similarly, O(y )
y y
If (x,y) are represented by dummy variables i,j such that xi = i∆x and yj = j∆y.
Then (xi, yj) = ( i∆x, j∆y) = (ih, jk).Here h=∆x and k=∆y. Thus ui,j = u(xi, yj).Hence
u 1
ui 1, j ui , j o( h) (2.3)
x i , j h
This formula (2.3) has a truncation error of order h i.e. o(h).
Similarly one can use Backward Difference Formula by using the expansion of u(x-∆x, y) and
write
u
1
ui , j ui 1, j o(h). ( 2 .4 )
x i , j h
u (x) 3 3u
u( x x, y) u( x x, y) 2x
x 3 x 3
u u ( x x, y ) u ( x x, y )
o ( x ) 2
x 2 x
u
1
ui 1, j ui 1, j o( h) 2 (2.5)
x i , j 2h
To obtain finite difference approximation for second order derivatives,we can use
2u
u ( x x, y ) 2u ( x, y ) u ( x x, y ) (x) 2 o(x) 4
x 2
2u u ( x x, y ) 2u ( x, y ) u ( x x, y )
2 o(x) 2
x x , y (x) 2
2u u 2ui , j ui 1, j
2 i 1, j o( h 2 ) (2.6)
x i , j h 2
This is the best formula for second order derivative,known as Central difference formula.
2u 2u
,
Similarly, one can have formula for x y y etc.
2
The above formulae can also be represented in the form of computational molecule as follows:
u 1 +o(h2)
‐‐‐
‐ 0 1
x 2h
u i‐1, j u i, j u i+1, j
1
u i, j+1
u
(1 / 2k ) +o(k2)
y 0 u i , j
‐ u i ,j‐1
2u 1 ‐ +o(h2)
2 1 1
x 2
h
1 u i‐1, j
u i , j u i+1, j
‐ 0 1
2u 1
2 +o(h2)
xy 4h
1 0 ‐
u i, j
1 0 ‐
The above approximations, when substituted in the PDE reduces it to the set of difference
equation which can be solved iteratively.However due to truncation error ,care has to be taken
for convergence and stability of the solution.
Example: Obtain the equivalent finite difference formulation of the given PDE
u u 2 u
a
t x x 2
Solution:
r 2r r
u i , j 1 u i 1, j ar u i , j 1 ar u i 1, j
x x x