67, 4 (2015), 258–268 December 2015 ON SOLVING PARABOLIC EQUATION WITH HOMOGENEOUS

advertisement
MATEMATIQKI VESNIK
originalni nauqni rad
research paper
67, 4 (2015), 258–268
December 2015
ON SOLVING PARABOLIC EQUATION WITH HOMOGENEOUS
BOUNDARY AND INTEGRAL INITIAL CONDITIONS
Mladen Ignjatović
Abstract. In this paper we consider the second order parabolic partial differential equation with constant coefficients subject to homogeneous Dirichlet boundary conditions and initial
condition containing nonlocal integral term. We derive first and second order finite difference
schemes for the parabolic problem, combining implicit and Crank-Nicolson methods with two
discretizations of the integral term. One numerical example is presented to test and illustrate the
proposed algorithm.
1. Introduction
The first paper devoted to partial differential equations with nonlocal integral condition goes back to J. R. Cannon [3]. For parabolic partial differential
equations with nonlocal condition the reader can see Bouziani [2], Dehghan [6],
Ionkin [8], Kamynin [10]. Problems related to elliptic equations were considered by
(among others) Ashyralyev [1], Gushin [7]. Deghan [5] and Pulkina [11] dealt with
hyperbolic equations. In this article, we consider parabolic differential equation
with homogeneous Dirichlet boundary conditions and nonlocal weighted integral
condition
∂u
∂2u
=
+ f (x, t), (x, t) ∈ Ω,
∂t
∂x2
u(0, t) = u(1, t) = 0, 0 < t < T,
Z T
u(x, 0) =
α(s)u(x, s) ds + g(x),
(1)
(2)
(3)
0
where g(x) and f (x, t) are given smooth functions on (0, 1) and Ω = [0, 1] × [0, T ]
RT
respectively, under assumption 0 |α(ρ)| dρ < 1, α(t) > 0 for t ∈ [0, T ].
The paper is organized as follows: In Section 2 we propose that a solution
of the problem (1)–(3) exists. In Sections 2 and 3, we present, respectively, first
2010 Mathematics Subject Classification: 65M12, 65M06, 65M22
Keywords and phrases: Finite difference method; stability estimate; parabolic equation;
non-local condition; second-order of convergence.
258
259
On solving parabolic equation
and second order of convergence Euler implicit scheme for solving this problem. In
Section 4, we prove stability and give error analysis of second order of convergence
Euler difference scheme. Numerical results that illustrate theoretical discussion are
presented in Section 5.
2. Existence of solution
Let us suppose that the functions f and g can be expressed in terms of their
Fourier sine series in Ω,
f (x, t) =
∞
P
φk (t) sin(kπx),
∞
P
g(x) =
k=1
γk sin(kπx)
k=1
and search for a solution of the problem (1)–(3) in the form
∞
P
u(x, t) =
vk (t) sin(kπx).
(4)
k=1
For any given n ∈ N, we define functions
fn (x, t) =
n
P
φk (t) sin(kπx),
gn (x) =
k=1
n
P
γk sin(kπx)
k=1
and problem Pn ,
∂un
∂ 2 un
=
+ fn (x, t), (x, t) ∈ Ω,
∂t
∂x2
un (0, t) = un (1, t) = 0, 0 < t < T,
Z T
un (x, 0) =
α(s)un (x, s) ds + gn (x), x ∈ [0, 1].
(5)
(6)
0
We will try to find solution un of the problem Pn in the form
un (x, t) =
n
P
vk (t) sin(kπx).
(7)
k=1
From (5) we have
n
P
(vk0 (t) + k 2 π 2 vk ) sin(kπx) =
k=1
n
P
φk (t) sin(kπx),
k=1
and since the set of functions {sin(kπx)}nk=1 is linearly independent on [0, 1],
vk0 (t) + k 2 π 2 vk = φk (t),
k = 1, . . . , n, t ∈ [0, T ].
General solution to linear differential equations (8) is
µ
¶
Z t
2 2
2 2
vk (t) = e−k π t Ck +
φk (r)ek π r dr ,
0
k = 1, . . . , n.
(8)
(9)
260
M. Ignjatović
Now vk (0) = Ck . From (6) and (7) we have
µZ T
¶
n
P
un (x, 0) =
α(s)vk (s) ds + γk sin(kπx),
un (x, 0) =
k=1
n
P
0
vk (0) sin(kπx) =
k=1
that is
Z
n
P
Ck sin(kπx),
k=1
T
Ck =
α(s)vk (s) ds + γk ,
k = 1, . . . , n.
0
Now substituting (9) into the last equation we have
Z T
Z T
Z
2 2
2 2
Ck = Ck
α(s)e−k π s ds +
α(s)e−k π s
0
0
s
φk (r)ek
2
π2 r
dr ds + γk ,
0
k = 1, . . . , n, and finally
RT
2 2 Rs
2 2
α(s)e−k π s 0 φk (r)ek π r dr ds + γk
0
Ck =
RT
1 − 0 α(s)e−k2 π2 s ds
k = 1, . . . , n.
(10)
In order to prove the convergence of the series (4) we will use a well known
result which says that if F (t) ∈ C m [0, 1] then for its sine and cosine Fourier coefficients the following assessment stands:
|ak |, |bk | = o(k −m ).
So if g(x) and f (x, t) are functions of class C 2 [0, 1], then
|γk | ≤
const
const
and |φk | ≤
.
k2
k2
Now using (10), |Ck | ≤ const
k2 which is a sufficient condition for convergence of the
sequence un (x, t) and thereby (4). Now we have shown that for any n ∈ N the
problem Pn has a solution un , so when n → ∞, by construction, we conclude that
there exists a solution u to the problem (1)–(3).
3. First order of convergence finite difference scheme
Let us discretize the problem (1)–(3) with a first order Euler implicit scheme:
find Uij , i = 0, . . . , N, j = 0, . . . , M , such that
k+1
U k+1 − 2Uik+1 + Ui−1
Uik+1 − Uik
− i+1
= f (ih, (k + 1)τ ),
(11)
τ
h2
1
T
1 ≤ i ≤ N − 1,
= h; 0 ≤ k ≤ M − 1,
= τ, i, k, M, N ∈ N,
N
M
with boundary conditions
k
U0k = UN
= 0,
0 ≤ k ≤ M.
(12)
261
On solving parabolic equation
The integral condition is discretized by rectangular rule
U 0 (x) =
M
P
α(mτ )U m (x)τ + g(x),
x = xi = ih,
m=1
(13)
where Uij represents numerical approximation of u(xi , tj ), the value of the analytical
solution u at mesh-point (xi , tj ) and xi = ih, tj = jτ .
The discretized problem (11)–(13) can be written in the matrix form
AUi+1 + BUi + AUi−1 = ϕi ,
i = 1, . . . , N − 1,
(14)
where vector Ui contains approximated values on the different time levels on the
space point xi = ih:
 U0 
i
 Ui1 

Ui = 
,
 .. 
.
UiM (M +1)×1
i = 0, 1, . . . , N.
Note that, due to the boundary condition (12),
 
0
0

U0 = UN = 
 ... 
0
1
 − τ1


B= 0
 .
 ..
0
−τ α(1τ ) −τ α(2τ )
1
2
0
τ + h2
1
2
1
−τ
+
τ
h2
..
..
.
.
0
0
...
...
...
..
.
...
0
0
0
..
.
0
− h12









−τ α((M − 1)τ )
0
0
..
.
− τ1
Vector ϕi is defined in the following way:
 g 
i
(16)
(M +1)×1
The matrices A and B are defined as follows:

0
0
0
...
0
 0 − h12
0
...
0

1
0
0
−
.
.
.
0
h2

A=.
.
.
.
..
..
..
..
 ..
.

0
0
0
. . . − h12
0
0
0
...
0

.
(15)
 fi1 

ϕi = 
.
 .. 
.
fiM (M +1)×1
(M +1)2

−τ α(M τ )

0


0
.


..

.
1
2
+
(M +1)2
τ
h2
262
M. Ignjatović
The system of matrix equations (14) can be solved using the simplified form of
Gaussian elimination for tridiagonal systems of linear equations, known as tridiagonal matrix algorithm (or Thomas algorithm) adapted for solving tridiagonal
systems of linear matrix equations.
We will find unknown vectors Ui using the following formula:
Ui = αi+1 Ui+1 + βi+1 ,
i = N − 1, . . . , 1,
(17)
,
(18)
while due to boundary conditions
UN
 
0
0

= U0 = 
 ... 
0
(M +1)×1
the coefficients αi and βi of dimension (M + 1)2 i (M + 1) × 1 are given by
αi+1 = −(B + Aαi )−1 A
βi+1 = (B + Aαi )
−1
(19)
(ϕi − Aβi ),
(20)
where α1 is the zero matrix and β1 is the vector with all zeros. The order of
algorithm complexity is O(M 3 N ).
4. Second order of convergence finite difference scheme
In this part we present the second order difference scheme. The Crank-Nicolson
[4] second order difference scheme for the problem (1)–(3) is given by: find Uij ,
i = 0, . . . , N , j = 0, . . . , M , such that
k+1
k+1
k+1
k
k
+ Ui−1
− 2Uik + Ui−1
Uik+1 − Uik
1 Ui+1 − 2Ui
1 Ui+1
−
−
τ
2
h2
2
h2
= f (ih, (k + 0.5)τ ),
1 ≤ i ≤ N − 1,
1
= h;
N
0 ≤ k ≤ M − 1,
T
= τ,
M
(21)
i, k, M, N ∈ N,
with boundary conditions
k
U0k = UN
= 0,
0 ≤ k ≤ M.
(22)
For the integral condition approximation, we use the trapezoidal rule
U 0 (x) =
M τ ¡
¢
P
α(mτ )U m (x) + α((m − 1)τ )U m−1 (x) + g(x).
m=1 2
(23)
Similarly as in the first order scheme, the second order difference scheme can be
written in the matrix form
AUi+1 + BUi + AUi−1 = ϕi ,
i = 1, . . . , N − 1.
263
On solving parabolic equation
The vectors Ui , i = 0, 1, . . . , N are given in the same way as in (15) and (16), while
the matrices A and B are defined as follows


0
0
0
...
0
0
 − 2h1 2 − 2h1 2
0
...
0
0 


1
1
 0
− 2h2 − 2h2 . . .
0
0 
A=

 .
..
..
..
.. 
..
 ..
.
.
.
.
. 
1
0
0
0
. . . − 2h2 − 2h1 2 (M +1)2

1 − τ2 α(0)
 − 1 + 12
h
 τ
B=
..

.
0
−τ α(1τ ) . . .
1
1
...
τ + h2
..
..
.
.
0
...
Vector ϕi is defined by

−τ α((M − 1)τ ) − τ2 α(M τ )

0
0

.

..
..

.
.
1
1
− τ1 + h12
(M +1)2
τ + h2

gi
f
 i0.5
ϕi = 
..

.
fiM −0.5




.
(M +1)×1
This system of matrix equations can be solved using formulas (17)–(20). The order
of algorithm complexity is also O(M 3 N ).
5. Stability and error analysis of the second order difference scheme
The following lemma proves stability of the difference scheme (21)–(23).
Lemma 5.1. Assume that g(x) and f (x, t) are given continuous functions on
[0, 1] and Ω = [0, 1] × [0, T ] respectively. Let α(t) also be a known function, such
RT
that 0 |α(ρ)| dρ < 1, α(t) > 0 and α00 (t) < ∞. Then the solution of the scheme
(21)–(23) satisfies the following stability estimate:
·
¸
−1
2
2C 2
τ MP
k 2
2
max kU kh ≤
kgkh + 1 +
kf m+0.5 k2h ,
1≤k≤M
1−C
(1 − C)2 16 m=0
RT
where the constant C depends only on 0 |α(ρ)| dρ.
Proof. From
RT
0
|α(ρ)| dρ < 1 we get
Z T
|α(ρ)| dρ = 1 − δ, where δ ∈ (0, 1).
0
Using the error formula for trapezoidal rule we have
¯Z T
¯
M
¯
¯
τ P
¯
¯ ≤ 1 T Dτ 2 ,
|α(ρ)|
dρ
−
[α(mτ
)
+
α((m
−
1)τ
)]
¯
¯ 12
2 m=1
0
(24)
264
M. Ignjatović
where D stands for D = max0≤t≤T |α00 (t)|. If we choose τ so that
q
that is τ ≤
1
δ
T Dτ 2 ≤ ,
12
2
6δ
TD ,
we have that
M
τ P
[α(mτ ) + α((m − 1)τ )]
2 m=1
Z T
Z T
M
τ P
=
α(ρ) dρ +
[α(mτ ) + α((m − 1)τ )] −
α(ρ) dρ
2 m=1
0
0
Z T
Z T
¯τ P
¯
¯ M
¯
[α(mτ ) + α((m − 1)τ )] −
≤
α(ρ) dρ + ¯
α(ρ) dρ¯
2
m=1
0
0
δ
δ
≤ 1 − δ + = 1 − = C < 1.
2
2
Approximating the integral term in initial condition using the trapezoidal rule we
have
M
τ P
U 0 (x) =
[α(mτ )U m (x) + α((m − 1)τ )U m−1 (x)] + g(x),
2 m=1
whereby it follows that
kU 0 kh ≤ C max kU k kh + kgkh ,
0≤k≤M
(25)
PN
2 1
where k·kh is defined as kU i kh = ( j=0 hUji ) 2 . Using the inequality for stability of
weighted scheme, which can be found in [9] (for weight parameter θ = 0.5 weighted
scheme is Crank-Nicolson scheme).
−1
τ MP
kf m+0.5 k2h ,
0≤k≤M
16 m=0
√
√
√
and the well-known inequality a + b ≤ a + b, a, b ≥ 0 we obtain
s
−1
τ MP
k
0
max kU kh ≤ kU kh +
kf m+0.5 k2h .
0≤k≤M
16 m=0
max kU k k2h ≤ kU 0 k2h +
From inequalities (25), (27) we get
s
kU 0 kh ≤ CkU 0 kh + C
−1
τ MP
kf m+0.5 k2h + kgkh ,
16 m=0
and the final estimate for kU 0 kh
s
−1
C
τ MP
1
kU 0 kh ≤
kgkh .
kf m+0.5 k2h +
1 − C 16 m=0
1−C
(26)
(27)
265
On solving parabolic equation
After substitution in (26) and using the obvious inequality 2ab ≤ a2 + b2 , we get
·
¸
−1
2
2C 2
τ MP
k 2
2
max kU kh ≤
kgkh + 1 +
kf m+0.5 k2h ,
1≤k≤M
1−C
(1 − C)2 16 m=0
which proves stability of the algorithm for sufficiently small τ .
Now we will analyze the error of the finite difference scheme (21)–(23) proposed
for solution of the problem (1)–(3). In order to do that, let us first define the global
error
zij = uji − Uij ,
for i = 0, . . . , N , j = 0, . . . , M , where uji = u(xi , tj ). It can easily be seen that the
global error satisfies the finite difference scheme of the form
k+1
k+1
k+1
k
k
− 2zik + zi−1
1 zi+1 − 2zi + zi−1
1 zi+1
zik+1 − zik
k+ 1
−
−
= ψi 2 ,
2
2
τ
2
h
2
h
i = 1, . . . , N − 1, : k = 0, . . . , M − 1,
k
z0k = zN
= 0,
zi0 =
M
P
m=1
τ
2
¡
k+ 12
where the terms ψi
5.1,
max
1≤k≤M
kz k k2h
0 ≤ k ≤ M.
¢
α(mτ )zim + α((m − 1)τ )zim−1 + χi , 0 ≤ i ≤ N
·
¸
−1
2
2C 2
τ MP
m+ 1
2
≤
kχi kh + 1 +
kψi 2 k2h .
2
1−C
(1 − C) 16 m=0
m+ 21
k+ 21
−
=
Ã
(29)
and χi will be determined later. So, according to Lemma
In order to estimate the global error, we need to estimate kψi
substitute (30) into (28), we have
ψi
(28)
(30)
kh . If we
k+1
k+1
k+1
uk+1
− uki
1 ui+1 − 2ui + ui−1
1 uki+1 − 2uki + uki−1
i
−
−
τ
2
h2
2
h2
!
k+1
k+1
k+1
k+1
k
k
k
+ Ui−1
1 Ui+1 − 2Ui
1 Ui+1 − 2Uik + Ui−1
Ui
− Ui
−
−
. (31)
τ
2
h2
2
h2
According to (21) the part of the right-hand side between the brackets of the last
equation, is equal to f (xi , tk+ 12 ) that is, taking (11) into account, further equal to
∂u
1
∂t (xi , tk+ 2 )
"
−
∂2u
1
∂x2 (xi , tk+ 2 ),
so
#
∂u
uk+1
− uki
i
−
(xi , tk+ 21 ) +
=
τ
∂t
Ã
!#
"
k+1
k+1
k+1
uki+1 − 2uki + uki−1
1 ui+1 − 2ui + ui−1
∂2u
(xi , tk+ 12 ) −
+
. (32)
∂x2
2
h2
h2
k+ 1
ψi 2
266
M. Ignjatović
If we now expand function u in a Taylor series about the point (xi , tk+ 12 ) in tdirection we have
uk+1
− uki
∂u
τ 2 ∂3u
i
=
(xi , tk+ 21 ) +
(xi , tk+ 12 ) + · · · .
τ
∂t
24 ∂t3
By expanding function u in a Taylor series first about the point (xi , tk+ 12 ) in xdirection and then expanding that again about the point (xi , tk+ 12 ) in t-direction
yields
µ 2
¶
k+1
uk+1
+ uk+1
1 2 ∂4u
∂ u
i+1 − 2ui
i−1
=
(xi , tk+ 12 ) + h
(xi , tk+ 12 ) + · · ·
h2
∂x2
12 ∂x4
µ 3
¶
∂ u
τ
1 2 ∂5u
(xi , tk+ 12 ) + h
(xi , tk+ 12 ) + · · ·
+
2 ∂x2 ∂t
12 ∂x4 ∂t
µ
¶
1 ³ τ ´2
∂4u
1 2 ∂6u
+
(xi , tk+ 12 ) + h
(xi , tk+ 12 ) + · · · + · · ·
2 2
∂x2 ∂t2
12 ∂x4 ∂t2
uk
−2uk +uk
There is a similar expansion for i+1 h2i i−1
µ 2
¶
uki+1 − 2uki + uki−1
1 2 ∂4u
∂ u
=
(xi , tk+ 12 ) + h
(xi , tk+ 12 ) + · · ·
h2
∂x2
12 ∂x4
µ 3
¶
τ
∂ u
1 2 ∂5u
1) +
1) + ···
−
(x
,
t
h
(x
,
t
i
i
k+ 2
k+ 2
2 ∂x2 ∂t
12 ∂x4 ∂t
µ 4
¶
³
´
1 τ 2
∂ u
1 2 ∂6u
1
1
+
(x
,
t
)
+
h
(x
,
t
)
+
·
·
·
+ ···
i k+ 2
i k+ 2
2 2
∂x2 ∂t2
12 ∂x4 ∂t2
Now substituting the last three equations in (32) gives us
τ 2 ∂3u
1
∂4u
τ 2 ∂4u
(xi , tk+ 12 ) + · · · − h2 4 (xi , tk+ 12 ) −
(xi , tk+ 21 ) + · · · ,
3
24 ∂t
12 ∂x
8 ∂x2 ∂t2
(33)
k + 12
and the final estimate for ψi
k+ 12
ψi
=
k+ 12
|ψi
|≤
h2
τ2
M4x + (3M2x2t + M3t ) + H.O.T.
12
24
where H.O.T. signifies terms of higher order than h2 and τ 2 and
¯
¯ m+n
¯
¯ ∂
¯
Mmxnt = max ¯ m n u(x, t)¯¯ .
(x,t)∈Ω ∂x ∂t
In order to give final estimate for the global error, we also need to estimate χi .
From (29), (23) and (13),
Z T
M
τ P
χi =
α(s)u(xi , s) ds −
[α(mτ )um (x) + α((m − 1)τ )um−1 (x)].
2 m=1
0
267
On solving parabolic equation
So using (24) we have that
1
T Dτ 2 .
(34)
12
Now if we substitute (34), (33) into (30) we get the final error estimate of the
Crank-Nicolson scheme
|χi | ≤
max kuk − U k k2h ≤ c(τ 2 + h2 ),
1≤k≤M
where c is a positive constant, independent of h and τ . Thus, we deduce that CrankNicolson scheme unconditionally converges in the norm k · kh , with the convergence
rate O(τ 2 + h2 ).
6. Numerical results
Let us observe the equation
∂u
∂2u
=
+ 2et sin x
∂t
∂x2
(35)
in the area [0, π] × [0, 1], with boundary conditions
u(0, t) = u(π, t) = 0,
and an initial condition
Z
1
u(x, 0) =
(36)
e−s u(x, s) ds.
(37)
0
The analytical solution of given problem (35)–(37) is
u(x, t) = et sin x.
Errors for the first and second order scheme are given in Tables 1 and 2, respectively.
Note that errors ε2 and εmax are determined, respectively, by formulas:
à PN PM
i=0
ε2 =
j
2
j=0 (Ui − u(ih, jτ ))
! 12
MN
,
εmax = max |Uij − u(ih, jτ )|.
0≤i≤N
0≤j≤M
N, M
N
N
N
N
=M
=M
=M
=M
= 10
= 20
= 40
= 80
ε2
εmax
4.3308e − 2
1.8524e − 2
8.5570e − 3
4.1111e − 3
8.7449e − 2
3.8582e − 2
1.8108e − 2
8.7704e − 3
Table 1. Errors of the first order scheme
268
M. Ignjatović
N, M
N
N
N
N
=M
=M
=M
=M
= 10
= 20
= 40
= 80
ε2
εmax
4.8817e − 3
1.1249e − 3
2.6992e − 4
6.6104e − 5
9.8572e − 3
2.3429e − 3
5.7120e − 4
1.4102e − 4
Table 2. Errors of the second order scheme
Overall, it can be concluded that the proposed finite difference schemes for
solving this problem are stable and that they satisfy the given order of convergence.
Acknowledgement. The author is indebted to Professor B. Jovanović for
introducing him to the problem, helpful comments and for the references.
REFERENCES
[1] A. Ashyralyev,On well-posedness of the nonlocal boundary value problems for elliptic equations, Numer. Funct. Anal. Optim., 24 (2003), 1–15.
[2] A. Bouziani, On a class of parabolic equations with nonlocal boundary conditions, Bull. Classe
Sci., Acad. Royale Belg., 10 (1999), 61–77.
[3] J. R. Cannon, The solution of the heat equation subject to specification of energy, Quart.
Appl. Math., bf21, 2 (1963), 155–160.
[4] J. Crank, P. Nicolson, A practical method for numerical evaluation of solutions of partial
differential equations of the heat conduction type, Proc. Camb. Phil. Soc., 43 (1947), 50–67.
[5] M. Dehghan,On the solution of an initial-boundary value problem that combines Neumann
and integral condition for the wave equation, Numer. Methods Partial Diff. Eq., 21 (2004)
24–40.
[6] M. Dehghan, Numerical solution of a parabolic equation with non-local boundary specifications, Appl. Math. Comput., 145 (2003), 185–194.
[7] A. K. Gushin, V. P. Mikhailov, On solvability of nonlocal problems for second-odered elliptic
equation, Matem. Sbornik, 185 (1994), 121–160.
[8] N. I. Ionkin, Solutions of boundary value problem in heat conductions theory with nonlocal
boundary conditions, Differ. Equations, 13, 1 (1977), 294–304.
[9] B. Jovanović, E. Süli, Analysis of Finite Difference Schemes for Linear Partial Differential
Equations with Generalized Solutions, Springer Series in Computational Mathematics, 45,
Springer, London, 2013.
[10] L. I. Kamynin, A boundary value problem in the theory of the heat conduction with nonclassical boundary condition, USSR Comput. Math. Phys., 4, 6 (1964), 33–59.
[11] L. S. Pulkina, A nonlocal problem with integral conditions for hyperbolic equations, Electr.
J. Diff. Eq., 45 (1999), 1–6.
(received 14.08.2014; in revised form 13.05.2015; available online 20.06.2015)
Faculty of Technology, University of East Sarajevo, Karakaj bb, 75400 Zvornik, Bosnia and Herzegovina
E-mail: ignjatovic@gmail.com
Download