Professional Documents
Culture Documents
MAFE208IU-L14 - Elliptic Equation
MAFE208IU-L14 - Elliptic Equation
Lecture 1:
Finite-difference
method for elliptic
equations
Introduction
A partial differential equation (PDE) is an equation
that involves an unknown function and its partial
derivatives.
Example: Heat equation
u ( x, y, z, t ) 2 u 2u 2u
= 2 + 2 + 2
t x y z
K
= : thermal diffusivity (cm 2 / s)
C
: density of the material (g/cm3 )
C : heat capacity of the material [cal/(g O C )]
K : thermal conductivity [cal/(s cm O C )]
u = temperature (OC ) in a body at point ( x, y, z ), time t (s) 2
Laplace Equation
2u ( x, y , z ) 2u ( x, y , z ) 2u ( x , y , z )
+ + =0
x 2
y 2
z 2
MAFE208IU-L14 3
Wave Equation
2u ( x , y , z , t ) 2
u 2
u 2
u
= c 2 + 2 + 2
2
t 2
x y z
MAFE208IU-L14 4
The Black–Scholes
equation
In mathematical finance, Black–Scholes
equation is
V 1 2 2 V V 2
+ S + rS − rV = 0
t 2 S 2
S
where V is the price of the option as a function of stock
price S and time t, r is the risk-free interest rate, and σ is
the volatility of the stock
MAFE208IU-L14 5
Linear Second Order PDEs
A PDE is said to be linear if it is linear in the
unknown function and all its derivatives
A uxx + B uxy + C u yy + D( x, y, u, u x , u y ) = 0,
where A, B, and C are functions of x and y
MAFE208IU-L14 6
Linear Second Order PDEs
Classification
A second order linear PDE (2-independent variables)
A u xx + B u xy + C u yy + D ( x, y , u , u x , u y ) = 0,
is classified based on (B 2 − 4 AC) as follows:
B 2 − 4 AC 0 Elliptic
B 2 − 4 AC = 0 Parabolic
B 2 − 4 AC 0 Hyperbolic
MAFE208IU-L14 7
Poisson Equation Boundary Conditions
Let R be a planar domain, and denote its
2
u u
2 2
+ 2 = f ( x, y), ( x, y)
x y
2
u = g ( x, y), ( x, y)
is called a Dirichlet problem because the value of
u is specified on the boundary. For simplicity we
will assume that = (0, a) (0, b) and therefore
= { ( x, y) : 0 x a, y = 0, b or 0 y b, x = 0, a }
Finite Difference Grid
Ω is divided into m equal parts along x-axis and n parts along y-axis
yn = b
• • • boundary points
• • • • interior points
• • •
y2 • • •
y1 • • •
O x1 x2 xm = a
u ( xi +1 , y j ) − 2u ( xi , y j ) + u ( xi −1 , y j ) u ( xi , y j +1 ) − 2u ( xi , y j ) + u ( xi , y j −1 )
+ fij
(x) 2
(y ) 2
b
• • •
• • • Notations:
• • •
y2 • • • fij = f ( xi , y j )
y1 • • •
xm = a
ui , j u ( xi , y j )
O x1 xi
For boundary points u( xi , y j ) = g ( xi , y j )
Finite Difference Approximation
We approximate u ( xi , y j ) by the solutions ui , j of
ui +1, j − 2ui , j + ui −1, j ui , j +1 − 2ui , j + ui , j −1
+ = fi , j
(x) 2
(y ) 2
1 i m − 1, 1 j n − 1
b
• • • Where, at every
• • • boundary point,
• • •
y2 • • • we define
y1 • • •
xm = a
ui , j = g ( xi , y j )
O x1 x2 11
Finite Difference Approximation
If we choose x = y = h
ui +1, j + ui −1, j + ui , j +1 + ui , j −1 − 4 ui , j = h fi , j
2
1 i m − 1, 1 j n − 1
b u0, j = g 0, j , um, j = g m, j
• • •
• • • ui ,0 = gi ,0 , ui ,n = gi ,n
• • •
y2 • • •
y1 • • •
O x1 x2 xm = a
12
2D Laplace Equation
T ( x, y ) T ( x, y )
2 2
+ =0
x 2
y 2
MAFE208IU-L14 13
2D Laplace equation
Solution Technique
x = y = h
Ti , j +1
Ti −1, j Ti , j Ti +1, j
Ti , j −1
75 50
Example 1 To be determined
T12
T11 T21
T01 = 75
T10 = 0
T22
T20 = 0
MAFE208IU-L14 19
Example 2
Use a finite-difference method with ∆x=∆y=1/2 to compute
Approximate values of solution of the boundary-value problem
2u ( x, y) 2u ( x, y)
+ = 4, 0 x 1, 0 y 2
y xu = ( x − 2)2 y
2 2
2
with boundary conditions
u3
3/2 u ( x, 0) = x 2 , u ( x, 2) = ( x − 2) 2 , 0 x 1
u2 u (0, y ) = y 2 , u (1, y ) = ( y − 1) 2 , 0 y 2
1
u=y 2 u = (1 − y)2
u1
1/2 And find the errors, given the exact
uxx + u yy = 4
solution:
x
O
u=x 2
1/2
u( x, y) = ( x − y)2
1
Solution
ui +1, j + ui −1, j + ui , j +1 + ui , j −1 − 4 ui , j = h 2 fi , j = 1
xi = 1/ 2, y j = j / 2, 1 i 2, 1 j 4
2
−4u1 + u2 = 1/ 4 (1)
u3 0 + 1 + u3 + u1 − 4u2 = 1
3/2 u1 − 4u2 + u3 = 0 (2)
u2 1/ 4 + 9 / 4 + 9 / 4 + u2 − 4u3 = 1
1 u2 − 4u3 = −15 / 4 (3)
u = y2 u = (1 − y) 2
u ( x, y ) = e xy
MAFE208IU-L15
Exercise 2
Using ∆x=∆y=1/3, find approximate solution of the
boundary value problem
u xx + u yy = 6 + e x , 0 x 1, 0 y 1
u (0, y ) = 2 y 2 + 1, u (1, y ) = 2 y 2 + e + 1, 0 y 1
u ( x, 0) = x 2 + e x , u ( x,1) = x 2 + e x + 2, 0 x 1
y
1
Find the error
given exact solution: u3 u4
2/3
u ( x, y) = x + 2 y + e
2 2 x
u1 u2
1/3
O x
ui +1, j + ui −1, j + ui , j +1 + ui , j −1 − 4 ui , j = h 2 f i , j 1/3 2/3 1
Exercise 3
Using ∆x=∆y=1/3, find approximate solution of the
boundary value problem
u xx + u yy − u x = 6 − 2 x, 0 x 1, 0 y 1
u (0, y ) = 2 y 2 + 1, u (1, y ) = 2 y 2 + e + 1, 0 y 1
u ( x, 0) = x 2 + e x , u ( x,1) = x 2 + e x + 2, 0 x 1
y
1
Find the error
given exact solution: u3 u4
2/3
u ( x, y) = x + 2 y + e
2 2 x
u1 u2
1/3
O x
MAFE208IU-L15
1/3 2/3 1
Homework Chapter 6
2u ( x, y) 2u ( x, y)
+ = ( mx 2
+ ny 2
) e xy
, 0 x 2, 0 y 1
x 2
y 2
MAFE208IU-L15
Homework Chapter 6
Problem 2: Approximate solution of the heat equation
u ( x, t ) m 2u ( x, t )
= 0 x 1, t 0
t 5n x 2
with boundary conditions u(0, t ) = u(1, t ) = 0, t 0
and initial condition u( x,0) = 2sin(2 x), 0 x 1
MAFE208IU-L15 26
Homework Chapter 6: Problem 3
Determine the steady state temperature at all points
of a heated sheet of metal. The edges of the sheet are
kept at a constant temperature: 300, 150, 100, and 0
degrees as in Figure below.
100 150
Deadline: 2 weeks
MAFE208IU-L14 27