JAM Journal of Applied Mathematics 1687-0042 1110-757X Hindawi Publishing Corporation 560567 10.1155/2014/560567 560567 Research Article A Crank-Nicolson Difference Scheme for Solving a Type of Variable Coefficient Delay Partial Differential Equations Gu Wei 1 Wang Peng 2 Marcellán Francisco J. 1 School of Statistics and Mathematics Zhongnan University of Economics and Law Wuhan 430073 China znufe.edu.cn 2 School of Mathematics Jilin University Changchun 130012 China jlu.edu.cn 2014 2722014 2014 24 11 2013 23 01 2014 27 2 2014 2014 Copyright © 2014 Wei Gu and Peng Wang. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

A linearized Crank-Nicolson difference scheme is constructed to solve a type of variable coefficient delay partial differential equations. The difference scheme is proved to be unconditionally stable and convergent, where the convergence order is two in both space and time. A numerical test is provided to illustrate the theoretical results.

1. Introduction

In the past few years, many scholars pay their attention to the theory of delay differential equations (DDEs) [1, 2]. There are many research results on delay ordinary differential equations [3, 4]; however, only few scholars focus on studies of delay partial differential equations. As we know, since, in most cases, DDEs’ exact solutions cannot be computed analytically, efficient numerical methods are needed to solve such equations.

In this paper, the numerical solutions of the following variable coefficient delay partial differential equations are considered: (1)r(x,t)ut-duxx=f(u(x,t-s)),(x,t)(0,1)×(0,T],(2)u(x,t)=ϕ(x,t),x[0,1],t[-s,0],(3)u(0,t)=α(t),u(1,t)=β(t),t(0,T], where d>0 is the constant diffusion coefficient, s>0 is the delay term, Ω=[0,1]×[-s,T], r(x,t)C((0,1)×(0,T]), and r(x,t)c0>0. In the case of r(x,t)=1, numerical solutions of (1)–(3) have been considered in . A Crank-Nicolson scheme and a linearized compact difference scheme have been proposed by Zhang and Sun in  and , respectively. Q. F. Zhang and C. J. Zhang considered a new linearized compact multisplitting scheme in . We will construct a Crank-Nicolson scheme for solving (1)–(3). The unconditional stability and convergence will be shown in this paper, where the convergence order is two in both space and time. To testify the theoretical results, a numerical test is provided.

The paper is organized as follows. In Section 2, a linearized Crank-Nicolson scheme is constructed to solve (1)–(3). Section 3 considers the solvability, stability, and convergence of the Crank-Nicolson scheme. In Section 4, a numerical test is provided to illustrate the theoretical results. Section 5 gives a brief discussion of this paper.

2. Construction of the Linearized Crank-Nicolson Scheme

In this subsection, a linearized Crank-Nicolson scheme for solving (1)–(3) is constructed. In this paper, we make the following assumptions:

assume that (1)–(3) had a unique solution uC4,3(Ω), u, and its partial derivatives are bounded by a constant c1;

f(u(x,t-s)) has second derivatives, and we denote (4)c2=max|ε1|ε0,|ε2|ε0,|ε3|ε0{f′′|f(u(x,t-s)+ε1)|,|f(u(x,t-s)+ε2)|,|f′′(u(x,t-s)+ε3)|},

where ε0>0, and c2 are constants.

Two positive integers M and j are taken; then let h=1/M, τ=s/j, xi=ih, tk=kτ and tk+1/2=(tk+tk+1)/2. Define Ωhτ=Ωh×Ωτ, where Ωh={xi0iM} and Ωτ={tk-jkN}, N=[T/τ]. Denote Uik=u(xi,tk), 0iM, -jkN. Let (5)𝒲={vik0iM,-jkN} be the grid function space defined on Ωhτ. Introduce the following notations: (6)vik+1/2=vik+vik+12,δtvik+1/2=vik+1-vikτ,δxvi+1/2k=vi+1k-vikh,δx2vik=vi+1k-2vik+vi-1kh2.

Considering (1) at the point (xi,tk+1/2), we have (7)r(xi,tk+1/2)ut(xi,tk+1/2)-d2ux2(xi,tk+1/2)=f(u(xi,tk+(1/2)-j)),1iM-1,0kN-1.

From Taylor expansion, (8)ut(xi,tk+1/2)=δtUik+1/2-τ2243ut3(xi,ηik),ηik(tk,tk+1),2ux2(xi,tk+1/2)=12[2ux2(xi,tk)+2ux2(xi,tk+1)]-τ284ux2t2(xi,γik)=12(δx2Uik+δx2Uik+1)-h224[4ux4(ξik,tk)+4ux4(ξik+1,tk+1)]-τ284ux2t2(xi,γik),ξik,ξik+1(xi-1,xi+1),γik(tk,tk+1),f(u(xi,tk+(1/2)-j))=f(u(xi,tk-j))+τ2f(u(xi,tk-j))ut(xi,tk-j)+ζik-j=f(Uik-j)+τ2f(Uik-j)δtUik+(1/2)-j+ζik-j,ζik-j(tk-j,tk+1-j), where |ζik-j|c3τ2. Substituting (8) into (7) and denoting rik+1/2=r(xi,tk+1/2), we obtain (9)rik+1/2δtUik+1/2-dδx2Uik+1/2=f(Uik-j)+τ2f(Uik-j)δtUik+(1/2)-j+Rik, where (10)|Rik|c4(τ2+h2),1iM-1,0kN-1. Discretizing the initial and boundary conditions of (2) and (3), we obtain (11)Uik=ϕ(xi,tk),0iM,-jk0,(12)U0k=α(tk),      UMk=β(tk),1kN. Replacing Uik by uik and omitting Rik, we obtain the following Crank-Nicolson scheme: (13)rik+1/2δtuik+1/2-dδx2uik+1/2=f(uik-j)+τ2f(uik-j)δtuik+(1/2)-j,uik=ϕ(xi,tk),0iM,-jk0,u0k=α(tk),uMk=β(tk),1kN.

3. The Solvability, Convergence, and Stability of the Crank-Nicolson Scheme

Define the following grid function space on Ωh: (14)V=vv=(v0,v1,,vM),v0=vM=0.

If vV, introducing the following notations: (15)v=hi=1M-1(vi)2,|v|1=hi=1M(vi-vi-1h)2,v=max0iM|vi|. The following two inequalities are satisfied : (16)v12|v|1,(17)v16|v|1. For the analysis of the difference scheme, the following Lemma is needed.

Lemma 1 (see [<xref ref-type="bibr" rid="B8">8</xref>]).

Let {Fkk0} be nonnegative sequence and satisfy (18)Fk+1A+Bτi=1kFl,k=0,1,; then (19)Fk+1Aexp(BKτ),k=0,1,2,, where A and B are nonnegative constants.

Theorem 2.

The difference scheme (13) has a unique solution, under the condition that h and τ are small enough.

Proof.

From the positive definiteness of the coefficient matrix of the scheme (13), we can easily obtain the results of Theorem 2 by the mathematical induction method.

Denoting eik=Uik-uik, 0iM, -jkN, subtracting (13) from (9), (11), and (12), respectively, we obtain the following error equations: (20)rik+1/2δteik+1/2-dδx2eik+1/2=f(Uik-j)-f(uik-j)+τ2[f(Uik-j)δtUik+(1/2)-j-f(uik-j)δtuik+(1/2)-j]+Rik,(21)eik=0,0iM,-jk0,(22)e0k=0,eMk=0,1kN.

Theorem 3.

Letting h and τ be small enough, one has (23)ekC(τ2+h2),0kN, where C>0 is independent of h and τ.

Proof.

Multiplying (20) by hδteik+1/2 and summing up for i from 1 to M-1, we obtain (24)hi=1M-1rik+1/2(δteik+1/2)2-dhi=1M-1δx2eik+1/2δteik+1/2=I1+I2, where (25)I1=hi=1M-1{f(Uik-j)-f(uik-j)+τ2[f(Uik-j)δtUik+(1/2)-j-f(uik-j)δtuik+(1/2)-j]}δteik+1/2,I2=hi=1M-1Rikδteik+1/2.

The mathematical induction method will be used to prove Theorem 3. From (21), we have ek=0, for -jk0. Suppose that (23) is true for 0<kl, we will prove that (23) is also valid for k=l+1.

From the inductive assumption, we have (26)ekC(τ2+h2),0kl. In the following, each term of (24) will be estimated. Consider (27)hi=1M-1rik+1/2(δteik+1/2)2c0δtek+1/22,-dhi=1M-1δx2eik+1/2δteik+1/2=d2τ(|ek+1|12-|ek|12). From (H1) and (H2), we have (28)f(Uik-j)-f(uik-j)+τ2[f(Uik-j)δtUik+(1/2)-j-f(uik-j)δtuik+(1/2)-j]c2|eik-j|+τ2[f(Uik-j)δteik+(1/2)-j+(f(Uik-j)-f(uik-j))×(δtUik+(1/2)-j-δteik+(1/2)-j)]C(|eik-j|+|eik+1-j|). Using the above inequality, we have (29)I1Chi=1M-1(|eik-j|+|eik+1-j|)|δteik+1/2|ɛhi=1M-1(δteik+1/2)2+Ch(i=1M-1(eik-j)2+i=1M-1(eik+1-j)2)=ɛδtek+1/22+C(ek-j2+ek+1-j2),I2ɛhi=1M-1(δteik+1/2)2+Chi=1M-1(Rik)2ɛδtek+1/22+C(τ2+h2)2. Inserting (27)–(29) into (24), we obtain (30)c0δtek+1/22+d2τ(|ek+1|12-|ek|12)2ɛδtek+1/22+C(ek-j2+ek+1-j2)+C(τ2+h2)2,0kl. Taking ɛ=c0/2, we have (31)d2τ(|ek+1|12-|ek|12)C(ek-j2+ek+1-j2)+C(τ2+h2)2,0kl. The above inequality has the following form: (32)|ek+1|12|ek|12+Cτ(ek-j2+ek+1-j2)+Cτ(τ2+h2)2,0kl. Summing up (32) for k, noticing (21), and exploiting (17), we have (33)|ek+1|12|e0|12+Cτm=0k(em-j2+em+1-j2)+Cτk=0l(τ2+h2)2Cτm=1k+1-jem2+C(τ2+h2)2Cτm=1k|em|12+C(τ2+h2)2,0kl. By Lemma 1, we have (34)|el+1|12C(τ2+h2)2, where C is a constant which depends on c0, c1, c2, d, and T. From (16), we obtain (35)el+1C(τ2+h2). By the inductive principle, this completes the proof.

Remark 4.

Theorem 3 shows that the convergence order of the variable coefficient delay partial differential equations (1) is o(t2+h2). However, for the constant coefficient delay partial differential equations (r(x,t)=1 in (1)), a Crank-Nicolson scheme with o(t2+h2) convergence is constructed in , and a new difference scheme with o(t2+h4) convergence is constructed in .

To discuss the stability of the difference scheme (13), we consider the following problem: (36)r(x,t)vt-dvxx=f(v(x,t-s)),(x,t)(0,1)×(0,T],v(x,t)=ϕ(x,t)+ψ(x,t),x[0,1],t[-s,0],v(0,t)=α(t),v(1,t)=β(t),t(0,T]. The following difference scheme solving for (36) can be obtained: (37)rik+1/2δtvik+1/2-dδx2vik+1/2=f(vik-j)+τ2f(vik-j)δtvik+(1/2)-j,vik=ϕ(xi,tk)+ψik,0iM,-jk0,v0k=α(tk),vMk=β(tk),1kN, where ψik is a perturbation of ϕ(xi,tk).

Similar to the proof of Theorem 3, the following stability result can be obtained.

Theorem 5.

Denote (38)ηik=vik-uik,0iM,-jkN. Then, there exist constants c5 and c6 such that (39)ηkc5τhm=-j0i=1M-1(ψik)2 under the condition that h and τ are small enough and max-jk0,0iM|ψik|c6.

Remark 6.

Under the condition of assumptions (H1) and (H2) and max-jk0,0iM|ψik|c6, for small h and τ, we can get the stability results of Theorem 5 (which can be referred to in [8, 10, 11]), where the difficulty is that rik+1/21; the proof can be referred to in the proof of Theorem 3.

4. Numerical Test

In this section, a numerical example is considered to validate the algorithm provided in this paper, and the numerical solutions uik of the example are obtained by exploiting scheme (13). Define (40)E(h,τ)=max0iM,0kN|u(xi,tk)-uik|.

Consider the following problem: (41)r(x,t)ut-uxx=u(x,t-0.1),x(0,1),t(0,1],u(x,t)=e-x(1+t),x(0,1),t[-0.1,0],u(0,t)=1+t,u(1,t)=e-1(1+t),      t(0,1], where r(x,t)=2(t+0.95). The exact solution of (41) is u(x,t)=e-x(1+t).

Table 1 provides some numerical results of difference scheme (13) solving for (41) with step size h=τ=0.01. Table 2 gives the maximum absolute errors between numerical solutions and exact solutions with different step sizes. From Table 2, we can see that when both the space step size and the time step size are reduced by a factor of 1/2, then the maximum absolute errors are reduced by a factor of approximately 1/4.

Numerical results of (41) when h=τ=1/100.

( x , t ) Numerical solution Exact solution    | u ( x i , t k ) - u i k |
( 0.5,0.1 ) 0.667184 0.667184 2.501 e - 007
( 0.5,0.2 ) 0.727837 0.727837 4.324 e - 007
( 0.5,0.3 ) 0.788490 0.788490 5.702 e - 007
( 0.5,0.4 ) 0.849144 0.849143 6.812 e - 007
( 0.5,0.5 ) 0.909797 0.909796 7.753 e - 007
( 0.5,0.6 ) 0.970450 0.970449 8.586 e - 007
( 0.5,0.7 ) 1.031103 1.031102 9.347 e - 007
( 0.5,0.8 ) 1.091756 1.091755 1.006 e - 006
( 0.5,0.9 ) 1.152409 1.152408 1.074 e - 006
( 0.5,1.0 ) 1.213062 1.213061 1.140 e - 006

Maximum norm errors of (41) with different step sizes.

h τ E ( h , τ ) E ( h , τ ) / E ( h / 2 , τ / 2 )
1/10 1/10 1.138 e - 004 *
1/20 1/20 2.872 e - 005 3.962
1/40 1/40 7.182 e - 006 3.999
1/80 1/80 1.796 e - 006 4.000
1/160 1/160 4.489 e - 007 4.000

Figure 1 provides us with the error curves of numerical solutions for (41) at t=1 by using scheme (13). Figures 2 and 3 give the error surface of the numerical solutions with step sizes h=τ=1/80 and h=τ=1/160, respectively.

Error curves of difference scheme (13) solving for problem (41) with different step sizes, when t=1.

Error surface maps of difference scheme (13) solving for problem (41) with step size h=τ=1/80.

Error surface maps of difference scheme (13) solving for problem (41) with step size h=τ=1/160.

Generally speaking, from the results of the tables and the figures provided, we can see that the numerical results are coincident with the theoretical results.

5. Conclusion

In this paper, a type of variable coefficient delay partial differential equations is considered. A linearized Crank-Nicolson scheme is constructed and is proved to be unconditionally stable and convergent. Finally, a numerical test is provided to illustrate the theoretical results.

Conflict of Interests

The authors declare that there is no conflict of interests regarding the publication of this paper.

Acknowledgments

This work is supported by the Project Sponsored by the Scientific Research Foundation for the Returned Overseas Chinese Scholars, State Education Ministry (no. 2013693), the National Natural Science Foundation of PR China (nos. 71301166, 11301544, 11201487, and 11101184), and the Science Foundation for Young Scientists of Jilin Province (20130522101JH).

Li D. F. Zhang C. J. Nonlinear stability of discontinuous Galerkin methods for delay differential equations Applied Mathematics Letters 2010 23 4 457 461 10.1016/j.aml.2009.12.003 MR2594863 ZBL1191.65111 Azbelev N. V. Maksimov V. P. Rakhmatullina L. F. Introduction to the Theory of Functional Differential Equations 1991 Moscow, Russia Nauka MR1144998 Hale J. K. Theory of Functional Differential Equations 1993 New York, NY, USA Springer Diekmann O. van Gils S. A. Lunel S. V. Walther H.-O. Delay Equations: Functional-, Complex-, and Nonlinear Analysis 1995 New York, NY, USA Springer 10.1007/978-1-4612-4206-2 MR1345150 Zhang Z.-B. Sun Z.-Z. A Crank-Nicolson scheme for a class of delay nonlinear parabolic differential equations Journal on Numerical Methods and Computer Applications 2010 31 2 131 140 MR2759616 ZBL1240.65266 Sun Z.-Z. Zhang Z.-B. A linearized compact difference scheme for a class of nonlinear delay partial differential equations Applied Mathematical Modelling 2013 37 3 742 752 10.1016/j.apm.2012.02.036 MR3002185 Zhang Q. F. Zhang C. J. A new linearized compact multisplitting scheme for the nonlinear convection-reaction-diffusion equations with delay Communications in Nonlinear Science and Numerical Simulation 2013 18 12 3278 3288 MR3081362 10.1016/j.cnsns.2013.05.018 Sun Z.-Z. The Numerical Methods for Partial Equations 2005. (Chinese) Beijing, China Science Press Jin Y. F. Jiang J. X. Hou C. M. Guan D. H. New difference scheme for general delay parabolic equations Journal of Information and Computational Science 2012 9, article 18 5579 5586 Huang C. M. Vandewalle S. An analysis of delay-dependent stability for ordinary and partial differential equations with fixed and distributed delays SIAM Journal on Scientific Computing 2004 25 5 1608 1632 10.1137/S1064827502409717 MR2087328 ZBL1064.65078 Huang C. M. Vandewalle S. Unconditionally stable difference methods for delay partial differential equations Numerische Mathematik 2012 122 3 579 601 10.1007/s00211-012-0467-7 MR2983092 ZBL1272.65066