Академический Документы
Профессиональный Документы
Культура Документы
Praveen Singh
A partial differential equation (PDE) is an equation involving an unknown function u(x,y,…) of two
or more variables and some or all of its partial derivatives. It basically a relationship between an
unknown function u(x,y,..) and its derivatives with respect to the independent variables x, y,... .
𝜕𝑢
We often denote derivative by subscripts thus, = 𝑢𝑥 .
𝜕𝑥
A solution of a PDE is a function u(x, y, … ) that satisfies equation identically, at least in some
region of the x, y … variables.
Consider the generic form of a second order linear partial differential equation in two variables with
constant coefficients:
𝐴𝑢𝑥 + 𝐵𝑢𝑥𝑦 + 𝐶𝑢𝑦𝑦 + 𝐷𝑢𝑥 + 𝐸𝑢𝑦 + 𝐹 = 𝐺(𝑥, 𝑦)
If 𝐵 2 − 4𝐴𝐶 > 0, then the equation is called hyperbolic, for example wave equation.
If 𝐵 2 − 4𝐴𝐶 = 0, then the equation is called parabolic, for example heat conduction equation.
If 𝐵 2 − 4𝐴𝐶 < 0, then the equation is called elliptic, for example Laplace equation.
Parabolic form of partial differential equation is used to describe a wide family of problems in
science including heat diffusion, ocean acoustic propagation, physical or mathematical systems
with a time variable and processes like heat diffusing through a solid. 1
Consider a thin bar of length L, of uniform cross-section and constructed of homogeneous material.
Suppose that the side of the bar is perfectly insulated so no heat transfer could occur through it (heat
could possibly still move into or out of the bar through the two ends of the bar). Thus, the
movement of heat inside the bar could occur only in the x-direction. Then, the amount of heat
content at any place inside the bar, 0 < x < L, and at any time t > 0, is given by the temperature
distribution function u(x, t). It satisfies the homogeneous one-dimensional heat conduction
equation:
𝑢𝑡 = 𝑘𝑢𝑥𝑥
where 𝑢(𝑡, 𝑥) is the temperature at time t and at position x and k is a constant. The symbol 𝑢𝑡
signifies the partial derivative with respect to time variable t, and similarly 𝑢𝑥𝑥 is the second partial
derivative with respect to x. This equation says, roughly, that temperature at a given time and point
rises or falls at a rate proportional to the difference between the temperature at that point and the
average temperature near that point. The quantity 𝑢𝑥𝑥 measures how far off the temperature is from
satisfying the mean value property of harmonic functions.
𝑢𝑡 = −𝐿𝑢
where L is the second – order elliptic operator (implying L must be positive also a case where L is
non-positive is described below). Such a system can be hidden in an equation of the form
∇. (𝑎(𝑥)∇𝑢(𝑥)) + 𝑏(𝑥)𝑇 ∇𝑢(𝑥) + 𝑐𝑢(𝑥) = 𝑓(𝑥)
if the matrix-valued function a(x) has a kernel of dimension 1.
2
It turns out that any arbitrary Δt cannot be used for explicit methods because of numerical
instability concerns. The second step is to approximate the derivatives with finite difference
approximations.
Forward Euler method
At a grid point (𝑥𝑖 , 𝑡 𝑘 ), 𝑘 > 0 on using the forward FD approximation for 𝑢𝑡 and central
FD approximation for 𝑢𝑥𝑥 we have
𝑢(𝑥𝑖 , 𝑡 𝑘 + ∆𝑡) − 𝑢(𝑥𝑖 , 𝑡 𝑘 ) 𝑢(𝑥𝑖−1, 𝑡 𝑘 ) − 2𝑢(𝑥𝑖 , 𝑡 𝑘 ) + 𝑢(𝑥𝑖+1 , 𝑡 𝑘 )
=𝛽 + 𝑓(𝑥𝑖 , 𝑡 𝑘 ) + 𝑇(𝑥𝑖 , 𝑡 𝑘 )
∆𝑡 ℎ2
where the dots denote the higher order terms, so the discretization is 𝑂(ℎ2 + ∆𝑡). The discretization
is first order in time and second order in space, when the finite difference(FD) equation is
𝑈𝑖𝑘+1 + 𝑈𝑖𝑘 𝑘
𝑈𝑖−1 − 2𝑈𝑖𝑘 + 𝑈𝑖+1
𝑘
=𝛽 2
+ 𝑓𝑖𝑘
∆𝑡 ℎ
where 𝑓𝑖𝑘 = 𝑓(𝑥𝑖 , 𝑡 𝑘 ), with 𝑈𝑖𝑘 again denoting the approximate value for the true solution𝑢(𝑥𝑖 , 𝑡 𝑘 ).
When 𝑘 = 0, 𝑈𝑖0 is the initial condition at the grid point (𝑥𝑖 , 0); and from the values 𝑈𝑖𝑘 at the time
level k the solution of the FD equation at the next time level k+1 is
𝑘
𝑈𝑖−1 − 2𝑈𝑖𝑘 + 𝑈𝑖+1
𝑘
𝑈𝑖𝑘+1 = 𝑈𝑖𝑘 + ∆𝑡 (𝛽 + 𝑓𝑖𝑘 ) , 𝑖 = 1,2, … , 𝑚 − 1.
ℎ2
The solution of the FD equations is thereby directly obtained from the approximate solution
at previous time steps. We successively compute the solution at 𝑡1 from the initial
condition at 𝑡 0 , and then at 𝑡 2 using the approximate solution at 𝑡1 .
3
The backward Euler method is also consistent, and the discretization error is again 𝑂(ℎ2 + ∆𝑡).
Using the backward Euler method, we cannot get 𝑈𝑖𝑘+1 with a few simple algebraic operations
because all of the 𝑈𝑖𝑘+1 ′𝑠 are coupled together. Thus, we need to solve the following tridiagonal
system of equations, in order to get the approximate solution at the time level k+1.
𝛽∆𝑡
Where 𝜇 = and 𝑓𝑖𝑘+1 = 𝑓(𝑥𝑖 , 𝑡 𝑘+1 ). Note that we can use 𝑓(𝑥𝑖 , 𝑡 𝑘 ) instead of 𝑓(𝑥𝑖 , 𝑡 𝑘+1 ),
ℎ2
since the method is first order accurate in time. Such a numerical method is called an
implicit, because the solution at time level k + 1 are coupled together. The advantage of
the backward Euler method is that it is stable for any choice of Δt.
4
The resulting ODE system can be solved using the standard initial value software (like MATLAB),
which may use a variable time-step/variable order approach with time local error control.
The most important advantage of the MOL approach is that it has not only the simplicity of the
explicit methods but also the superiority (stability advantage) of the implicit ones unless a poor
numerical method for solution of ODEs is employed. It is possible to achieve higher-order
approximations in the discretization of spatial derivatives without significant increases in the
computational complexity.
5
𝑘𝑐 2
𝑢𝑖,𝑗+1 − 𝑢𝑖,𝑗 = 2 [𝑢𝑖−1,𝑗 − 2𝑢𝑖,𝑗 + 𝑢𝑖+1,𝑗 ]
ℎ
Or, 𝑢𝑖,𝑗+1 = 𝛼𝑢𝑖−1,𝑗 − (1 − 2𝛼)𝑢𝑖,𝑗 + 𝛼𝑢𝑖+1,𝑗 (1.1)
where 𝛼 = 𝑘𝑐 2 /ℎ2 is the mesh ratio parameter. This formula enables us to determine the value of
u at the (i, j+1) mesh points in the terms of the known function values at the point 𝑥𝑗−1 , 𝑥𝑖 and 𝑥𝑖+1
at the instant 𝑡𝑗 it is a relation between function values at the time levels j+1 and j and is therefore
called a 2-level formula in schematic form as shown below:
1
Hence (1.1) is called the Schmidt explicit formula which is valid only for 0 < 𝛼 < 2.
1 1
In particular when 𝛼 = , equation (1.1) reduces to 𝑢𝑖,𝑗+1 = (𝑢𝑖−1,𝑗 + 𝑢𝑖+1,𝑗 )
2 2
which shows that the value of u at 𝑥𝑖 at time 𝑡𝑗+1 is the mean of the u-value at 𝑥𝑖−1 and 𝑥𝑖+1 at time
𝑡𝑗 . This known as bender-Schmidt recurrence relation, gives the values of at the internal mesh points
with the help of boundary condition.
6
𝜕𝑢 𝜕2 𝑢
Considering 1-D Heat equation = 𝑐 2 𝜕𝑥 2 ,
𝜕𝑡
and applying a finite difference spatial discretization for the right-hand side, the Crank–Nicolson
discretization is then:
𝛼∆𝑡
or, substituting 𝑟 = 2(∆𝑥 2 ) :
𝑛+1
−𝑟𝑢𝑖+1 + (1 + 2𝑟)𝑢𝑖𝑛+1 − 𝑟𝑢𝑖−1
𝑛+1 𝑛
= 𝑟𝑢𝑖+1 + (1 − 2𝑟)𝑢𝑖𝑛 + 𝑟𝑢𝑖−1
𝑛
which is a tridiagonal problem, so that 𝑢𝑖𝑛+1 may be efficiently solved similarly as described in
backward Euler method.
Particularly, the Black–Scholes option pricing model's differential equation can be transformed
7
into the heat equation, and thus numerical solutions for option pricing can be obtained with the
Crank–Nicolson method.
Risk Latte Americas Inc.
Machine Learning
5. Iterative method (Jacobi’s iteration method)
The iterative methods can be applied to solve the finite-difference equations can be obtained in
the preceding section. In the Crank-Nicolson method for typical heat equation we have
which is second order in time and in space if u(x, y, t) ∈ C4. It is unconditionally stable for linear
problems. We can use symbolic expressions to discuss the method, rewritten as
1
𝑘+
2 𝑘 ∆𝑡 2 𝑘+12 ∆𝑡 2 𝑘 ∆𝑡 𝑘+12
𝑈𝑖,𝑗 = 𝑈𝑖,𝑗 + 𝛿 𝑈 + 𝛿𝑦𝑦 𝑈𝑖,𝑗 + 𝑓𝑖,𝑗 ,
2 𝑥𝑥 𝑖,𝑗 2 2
1
𝑘+1 𝑘+ ∆𝑡 2 𝑘+12 ∆𝑡 2 𝑘+1 ∆𝑡 𝑘+12
𝑈𝑖,𝑗 = 𝑈𝑖,𝑗 2 + 𝛿 𝑈 + 𝛿𝑦𝑦 𝑈𝑖,𝑗 + 𝑓𝑖,𝑗 ,
2 𝑥𝑥 𝑖,𝑗 2 2
The key idea of the ADI method is to use the implicit discretization dimension by dimension,
by taking advantage of fast tridiagonal solvers for
1
𝑘+
2 𝑘 ∆𝑡 2 𝑘+12 ∆𝑡 2 𝑘 ∆𝑡 𝑘+12
𝑈𝑖,𝑗 = 𝑈𝑖,𝑗 + 𝛿 𝑈 + 𝛿𝑦𝑦 𝑈𝑖,𝑗 + 𝑓𝑖,𝑗 ,
2 𝑥𝑥 𝑖,𝑗 2 2
1 1 1
𝑘+ 𝑘+ 𝑘+
For fixed j, we get a tridiagonal system of equations for 𝑈1𝑗 2 , 𝑈2𝑗 2 , … , 𝑈𝑚−1.𝑗
2
, assuming a
Where,
∆𝑡 𝑘+12 1
𝑘
𝑈1,𝑗 + 𝑓1,𝑗 + 𝜇𝑢𝑏𝑐 (𝑎, 𝑦𝑗 )𝑘+2 + 𝜇(𝑈1,𝑗−1
𝑘 𝑘
− 2𝑈1,𝑗 𝑘
+ 𝑈1,𝑗+1 )
2
𝑘 ∆𝑡 𝑘+1 𝑘 𝑘 𝑘
𝑈2,𝑗 + 𝑓2,𝑗 2 + 𝜇(𝑈2,𝑗−1 − 2𝑈2,𝑗 + 𝑈2,𝑗+1 )
2
𝑘 ∆𝑡 𝑘+12 𝑘 𝑘 𝑘
𝐹̂ = 𝑈3,𝑗 + 𝑓3,𝑗 + 𝜇(𝑈3,𝑗−1 − 2𝑈3,𝑗 + 𝑈3,𝑗+1 )
2
⋮
1
𝑘 ∆𝑡 𝑘+
2 𝑘 𝑘 𝑘
𝑈𝑚−2,𝑗 + 𝑓𝑚−2,𝑗 + 𝜇(𝑈𝑚−2,𝑗−1 − 2𝑈𝑚−2,𝑗 + 𝑈𝑚−2,𝑗+1 )
2
𝑘 ∆𝑡 𝑘+12 𝑘 𝑘 𝑘 𝑘+
1
[ 𝑈𝑚−1,𝑗 + 𝑓𝑚−1,𝑗
+ 𝜇(𝑈 𝑚−1,𝑗−1 − 2𝑈 𝑚−1,𝑗 + 𝑈 𝑚−1,𝑗+1 ) + 𝜇𝑢𝑏𝑐 (𝑏, 𝑦𝑗 ) 2
]
2
1 1
𝛽∆𝑡 𝑘+
And 𝜇 = 2ℎ2 , and 𝑓𝑖,𝑗 2
= 𝑓(𝑥𝑖 , 𝑡 𝑘+2 ). For each j, we can solve a symmetrical tridiagonal system of
equations.
10