Hyperbolic Equations
A general form of Hyperbolic equation is defined as:
∂2u 2
2∂ u
= c , 0 ≤ x ≤ L, t > 0 (1)
∂t2 ∂x2
Omitting c, as it depends on physical properties of the medium:
∂2u ∂2u
= , 0 ≤ x ≤ L, t > 0 (2)
∂t2 ∂x2
Appropriate boundary conditions are prescribed at the endpoints x = 0, L.
There will be two initial conditions (Cauchy conditions) prescribed at t = 0:
u(x, 0) = f (x) (3)
∂u
= g(x) (4)
∂t t=0
The Hyperbolic equations can be solved using finite difference methods, method of characteristics,
and more.
Finite Difference Method
Subdividing the domain D = [0 ≤ x ≤ L] × [t ≥ 0] into rectangular meshes:
xi = i∆x, i = 0(1)N, x0 = 0, xN = L
with time step ∆t, so that ui,j denotes the value of u at mesh point (i, j) where xi = i∆x, tj = j∆t.
Assume Dirichlet conditions at x = 0 and x = L.
Explicit Method
Discretize the p.d.e (2) at the mesh point (i, j) approximating derivatives by central differences:
ui,j−1 − 2ui,j + ui,j+1 ui−1,j − 2ui,j + ui+1,j
= + O(∆x2 ) (5)
∆t2 ∆x2
Neglecting the truncation error:
∆t
ui,j+1 = r2 (ui−1,j + ui+1,j ) + 2(1 − r2 )ui,j − ui,j−1 , i = 1(1)N − 1, r= (6)
∆x
For j = 1, using ui,0 = f (xi ) = fi , the formula becomes:
1
ui,2 = r2 (ui−1,1 + ui+1,1 ) + 2(1 − r2 )ui,1 − fi (7)
∂u
From the initial condition ∂t t=0 = g(x), approximated by central difference:
ui,1 − ui,−1
= g(xi ) (8)
2∆t
or
ui,−1 = ui,1 − 2∆t gi (9)
Substituting for j = 0, the formula becomes:
ui,1 = r2 (ui−1,0 + ui+1,0 ) + 2(1 − r2 )ui,0 − (ui,1 − 2∆tgi ) (10)
or
r2
ui,1 = (ui−1,0 + ui+1,0 ) + (1 − r2 )ui,0 + ∆tgi , i = 1(1)N − 1 (11)
2
The molecule for the explicit scheme:
Implicit Method
Discretize the p.d.e (2) such that time derivative is replaced by central difference and space derivative
by average of central differences:
ui,j−1 − 2ui,j + ui,j+1 1 ui−1,j+1 − 2ui,j+1 + ui+1,j+1 ui−1,j−1 − 2ui,j−1 + ui+1,j−1
= + + O(∆x2 )
∆t2 2 ∆x2 ∆x2
(12)
Assuming r = ∆t/∆x, and neglecting truncation error, we get:
−r2 ui−1,j+1 + 2(1 + r2 )ui,j+1 − r2 ui+1,j+1 = r2 ui−1,j−1 − 2(1 + r2 )ui,j−1 + r2 ui+1,j−1 + 4ui,j (13)
i = 1(1)N − 1
This can be solved at each time level.
The molecule for the implicit scheme:
2
Example
Example: The function u satisfies:
∂2u ∂2u
= , 0 ≤ x ≤ 1, t>0 (14)
∂t2 ∂x2
with boundary conditions:
u = 0 at x = 0, x = 1, t>0
and initial conditions:
∂u
u(x, 0) = 2x(1 − x), = 0, 0≤x≤1
∂t t=0
Use explicit method to find the solution for t = 0(0.1)1.0 with ∆x = 0.1, ∆t = 0.1.
Here, r = ∆t/∆x = 1.
Using the explicit formula:
ui,j+1 = r2 (ui−1,j + ui+1,j ) + 2(1 − r2 )ui,j − ui,j−1
ui,j+1 = ui−1,j + ui+1,j − ui,j−1 , j ≥ 0, i = 1(1)9 (2)
Approximating
∂u
= 0, 0 ≤ x ≤ 1, t=0
∂t
by central difference for j = 0, we get
ui,−1 = ui,1
Therefore, for j = 0, we have
1
ui,1 = (ui−1,0 + ui+1,0 ), i = 1(1)9 (3)
2
The given problem is symmetric about the point x = 0.5, i.e., u(x, 0) is symmetric and boundary
conditions as well as derivative initial condition are symmetric. Therefore, we need to calculate the
solutions only for i = 1(1)5 only. The values of u computed using eq. (2) and (3) are tabulated as
follows:
3
t\x 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0
0.0 0 0.1 0.32 0.42 0.48 0.50 0.48 0.42 0.32 0.18 0
0.1 0 0.16 0.30 0.40 0.46 0.48 0.46 0.40 0.30 0.16 0
0.2 0 0.12 0.24 0.34 0.40 0.42 0.40 0.34 0.24 0.12 0
0.3 0 0.08 0.16 0.24 0.30 0.32 0.30 0.24 0.16 0.08 0
0.4 0 0.04 0.08 0.12 0.16 0.18 0.16 0.12 0.08 0.04 0
0.5 0 0 0 0 0 0 0 0 0 0 0
0.6 0 −0.04 −0.08 −0.12 −0.16 −0.18 −0.16 −0.12 −0.08 −0.04 0
0.7 0 −0.08 −0.16 −0.24 −0.30 −0.32 −0.30 −0.24 −0.16 −0.08 0
0.8 0 −0.12 −0.24 −0.34 −0.40 −0.42 −0.40 −0.34 −0.24 −0.12 0
0.9 0 −0.16 −0.30 −0.40 −0.46 −0.48 −0.46 −0.40 −0.30 −0.16 0
1.0 0 −0.18 −0.32 −0.42 −0.48 −0.50 −0.48 −0.42 −0.32 −0.18 0
Stability Analysis of Explicit Scheme
The explicit scheme
∆t
ui,j+1 = r2 (ui−1,j + ui+1,j ) + 2(1 − r2 )ui,j − ui,j−1 for i = 1(1)N − 1, r= (15)
∆x
is linear in u, therefore the formula for the error can be written in the same manner as:
ep,q+1 = r2 (ep−1,q + ep+1,q ) + 2(1 − r2 )ep,q − ep,q−1 (16)
By putting
ep,q = eαq∆t eiβp∆x
in eq. (17.2), we have
eα(q+1)∆t eiβp∆x = r2 eαq∆t eiβ(p−1)∆x + eαq∆t eiβ(p+1)∆x + 2(1 − r2 )eαq∆t eiβp∆x − eα(q−1)∆t eiβp∆x
or
eα∆t = r2 e−iβ∆x + eiβ∆x + 2(1 − r2 ) − e−α∆t
Let eα∆t = ξ, then
ξ = r2 (2 cos β∆x) + 2(1 − r2 ) − ξ −1
or
ξ 2 = 2 r2 (cos β∆x − 1) + 1 ξ − 1
or
β∆x
ξ 2 = 2 r2 −2 sin2 +1 ξ−1
2
or
β∆x
ξ 2 − 2 1 − 2r2 sin2 ξ+1=0 (17)
2
If ξ1 and ξ2 are two roots of eq. (17), then
β∆x
ξ1 + ξ2 = 2 1 − 2r2 sin2 (18)
2
and
ξ1 ξ2 = 1 (19)
1
From (19), we have |ξ1 | = |ξ2 | , implying that if |ξ1 | < 1 then |ξ2 | > 1 and vice-versa.
4
But for stability, we must have |ξ1 | ≤ 1 and |ξ2 | ≤ 1.
Therefore, for stability we must have |ξ1 | = |ξ2 | = 1.
Now, from (18),
2 2 β∆x
|ξ1 + ξ2 | = 2 1 − 2r sin
2
or
2 2 β∆x
|ξ1 | + |ξ2 | ≥ 2 1 − 2r sin
2
or
2 2 β∆x
2 1 − 2r sin ≤1+1
2
or
2 2 β∆x
−1 ≤ 1 − 2r sin ≤1
2
From the left inequality,
1
r2 ≤
2 β∆x
sin 2
or
r2 ≤ 1
where
∆t
r=
∆x
Hence, Explicit Scheme is stable if r2 ≤ 1.
The implicit scheme
−r2 ui−1,j+1 + 2(1 + r2 )ui,j+1 − r2 ui+1,j+1 = r2 ui−1,j − 2(1 + r2 )ui,j + r2 ui+1,j + 4ui,j (20)
is linear in u, therefore the formula for the error can be written in the same manner as:
−r2 ep−1,q+1 + 2(1 + r2 )ep,q+1 − r2 ep+1,q+1 = r2 ep−1,q−1 − 2(1 + r2 )ep,q−1 + r2 ep+1,q−1 + 4ep,q (21)
By putting ep,q = eαq∆t eiβp∆x in eq. (21), we have
−r2 eα(q+1)∆t eiβ(p−1)∆x + 2(1 + r2 )eα(q+1)∆t eiβp∆x − r2 eα(q+1)∆t eiβ(p+1)∆x
= r2 eα(q−1)∆t eiβ(p−1)∆x − 2(1 + r2 )eα(q−1)∆t eiβp∆x + r2 eα(q−1)∆t eiβ(p+1)∆x + 4eαq∆t eiβp∆x (22)
Taking eαq∆t eiβp∆x as a common factor and cancelling from both sides. We get:
−r2 eα∆t e−iβ∆x + 2(1 + r2 )eα∆t − r2 eα∆t eiβ∆x = r2 e−α∆t e−iβ∆x − 2(1 + r2 )e−α∆t + r2 e−α∆t eiβ∆x + 4
(23)
or
−r2 eα∆t (e−iβ∆x + eiβ∆x ) + 2(1 + r2 )eα∆t = r2 e−α∆t (e−iβ∆x + eiβ∆x ) − 2(1 + r2 )e−α∆t + 4 (24)
Now:
eiβ∆x + e−iβ∆x = 2 cos(β∆x) (25)
Thus, simplifying:
−r2 eα∆t 2 cos(β∆x) + 2(1 + r2 )eα∆t = r2 e−α∆t 2 cos(β∆x) − 2(1 + r2 )e−α∆t + 4
Let eα∆t = ξ, then:
(1 + r2 − r2 cos β∆x)ξ = e−α∆t (r2 cos β∆x − 1 − r2 ) + 2
5
thus:
(1 + r2 − r2 cos β∆x)ξ = ξ −1 (−r2 cos β∆x − 1 − r2 ) + 2
Multiplying through by ξ, we get:
β∆x β∆x
(1 + 2r sin2 )ξ 2 + (1 + 2r sin2 )ξ − 2 = 0 (26)
2 2
If ξ1 and ξ2 are two roots of this equation, then:
β∆x
1 + 2r sin2 2
ξ1 + ξ2 = − = −1 (27)
β∆x
1 + 2r sin2 2
and
−2
ξ1 ξ2 = (28)
β∆x
1 + 2r sin2 2
For stability, we must have |ξ1 | ≤ 1 and |ξ2 | ≤ 1.
From (27), we have
|ξ1 + ξ2 | = 1
implying that
|ξ1 | + |ξ2 | ≤ 1
Therefore, we must have
|ξ1 | ≤ 1, |ξ2 | ≤ 1
Hence, Implicit scheme is unconditionally stable.