You are on page 1of 11

# 1

## PARTIAL DIFFERENTIAL EQUATION

G Fu
y
u
E
x
u
D
y
u
C
y x
u
B
x
u
A = +
c
c
+
c
c
+
c
c
+
c c
c
+
c
c
2
2 2
2
2

0 4
2
= AC B 0 4
2
> AC B 0 4
2
< AC B

Parabolic Equation Hyperbolic Equation Elliptic Equation

Solution Steps:

1. Draw the grid solutions and consider the value of
boundary and initial conditions.
2. Write PDE in the form of finite-difference .
3. Calculate
j i
u
,
level by level (molecule graph).
4. Find the answer through the solution of linear
equation system.

2
Parabolic Equation

Focus: Heat Equation

0 L
Temperature distribution: ( ) t x u ,

Heat Equation:
2
2
2
x
u
c
t
u
c
c
=
c
c
0 , 0 > < < t L x

Boundary conditions :
( )
( )
2
1
,
, 0
c t L u
c t u
=
=

Initial condition : ( ) ( ) x f x u = 0 ,

Method

Explicit Finite-Difference
method

3
Explicit Finite-Difference Method

( ) ( )
j i
t x u t x u , , =

j i
u
,
=

Finite difference formula for this method:

k
u u
t
u
j i j i j i , 1 , ,

=
c
c
+
(forward difference)

2
, 1 , , 1
2
,
2
2
h
u u u
x
u
j i j i j i j i +
+
=
c
c
(central difference)

t t t k
i i
A = =
+1
and x x x h
i i
A = =
+1

Hence,
2
2
2
x
u
c
t
u
c
c
=
c
c

2
, 1 , , 1
2
, 1 ,
2
h
u u u
c
k
u u
j i j i j i j i j i + +
+
=

4
e.g.

Given the heat equation:
0
4
2
2
2
=
c
c

c
c
x
u
t
u
t

with

( ) ( ) 0 , 4 , 0 = = t u t u 0 > t
( )
|
.
|

\
|
+
|
.
|

\
|
=
4
cos 1
4
sin 0 ,
x x
x u
t t
4 0 s s x
take 0 . 1 = h and 04 . 0 = k , solve the heat equation up
to second level.

5
Hyperbolic Equations

Focus: Wave Equations

0 L

Displacement distribution : ( ) t x u ,
Wave equation :
2
2
2
2
2
x
u
c
t
u
c
c
=
c
c

0 , 0 > < < t L x
Boundary conditions :
( )
( ) 0 ,
0 , 0
=
=
t L u
t u

Initial conditions : ( ) ( ) x f x u = 0 , initial displacement
( ) ( ) x g x
t
u
=
c
c
0 , initial velocity

method finite difference

Finite Difference Method

( ) ( )
j i
t x u t x u , , =

j i
u
,
=

6
Finite difference formula:

2
1 , , 1 ,
2
,
2
2
k
u u u
t
u
j i j i j i j i +
+
=
c
c

2
, 1 , , 1
2
,
2
2
h
u u u
x
u
j i j i j i j i +
+
=
c
c

Initial conditions (velocity)
( ) ( )
k
u u
x g x
t
u
j i j i
2
0 ,
1 , 1 , +

= =
c
c
Consider this
condition at 1
st
level

t t t k
i i
A = =
+1
and x x x h
i i
A = =
+1

Thus,
2
2
2
2
2
x
u
c
t
u
c
c
=
c
c

2
, 1 , , 1
2
2
1 , , 1 ,
2 2
h
u u u
c
k
u u u
j i j i j i j i j i j i + +
+
=
+

7
2 0 s s x
e.g.

Given the wave equation
0
1
2
2
2
2
=
c
c

c
c
x
u
t
u
t
2 0 < < x

where

( ) ( ) 0 , 2 , 0 = = t u t u 0 > t
( ) ( ) x x u t sin 0 , =
( ) ( ) x x u
t
t 2 cos 0 , =

take
1 . 0 = = A k x
, solve this equation up to the second
level.

8
b y s s 0
a x s s 0
Elliptic Equations

Focus: Poisson Equation and Laplaces Equation
b

x

0 a
y
Steady-state temperature distribution : ( ) y x u ,

Poisson Equation : ( ) y x f
y
u
x
u
,
2
2
2
2
=
c
c
+
c
c

b y a x < < < < 0 , 0

If; ( ) 0 , = y x f then,
Laplaces equation : 0
2
2
2
2
=
c
c
+
c
c
y
u
x
u

b y a x < < < < 0 , 0

Boundary conditions :
( ) ( )
( ) ( )
( ) ( )
( ) ( ) x g b x u
x g x u
y f y a u
y f y u
2
1
2
1
,
0 ,
,
, 0
=
=
=
=

9
Method finite difference

Finite Difference Method

( ) ( )
j i
t x u t x u , , =

j i
u
,
=

Finite Difference Formula:

2
, 1 , , 1
2
,
2
2
h
u u u
x
u
j i j i j i j i +
+
=
c
c

2
1 , , 1 ,
2
,
2
2
k
u u u
y
u
j i j i j i j i +
+
=
c
c

Thus,

Poisson equation
( ) y x f
y
u
x
u
,
2
2
2
2
=
c
c
+
c
c

( )
j i
j i j i j i j i j i j i
y x f
k
u u u
h
u u u
,
2 2
2
1 , , 1 ,
2
, 1 , , 1
=
+
+
+
+ +

10
Laplaces Equation
0
2
2
2
2
=
c
c
+
c
c
y
u
x
u

0
2 2
2
1 , , 1 ,
2
, 1 , , 1
=
+
+
+
+ +
k
u u u
h
u u u
j i j i j i j i j i j i

e.g. (Poissons Equation)

Use finite difference method to find the approximate
solutions for this equation
( )
xy
e y x
y
u
x
u
2 2
2
2
2
2
+ =
c
c
+
c
c
1 0 , 2 0 < < < < y x
with ( ) ( ) 1 0 , , 0 = = x u y , ( )
y
e y u
2
, 2 = and ( )
x
e x u = 1 , .
Take
0 . 1 = = A h x
and
25 . 0 = = A k y
.

11
e.g. (Laplaces Equation)

Use finite difference to find the linear equation system
for
0 = +
yy xx
u u 5 . 1 0 , 5 . 1 0 < < < < y x

with ( ) ( ) 0 0 , , 0 = = x u y u , ( ) ( ) 2 5 . 1 , , 5 . 1 = = x u y u . Take
5 . 0 = = k h .