AAA Abstract and Applied Analysis 1687-0409 1085-3375 Hindawi Publishing Corporation 548292 10.1155/2012/548292 548292 Research Article A Characteristic Difference Scheme for Time-Fractional Heat Equations Based on the Crank-Nicholson Difference Schemes Karatay Ibrahim Bayramoglu Serife R. Bǎleanu Dumitru Department of Mathematics Fatih University Buyukcekmece 34500 Istanbul Turkey fatih.edu.tr 2012 31 10 2012 2012 25 04 2012 27 08 2012 27 08 2012 2012 Copyright © 2012 Ibrahim Karatay and Serife R. Bayramoglu. 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.

We consider the numerical solution of a time-fractional heat equation, which is obtained from the standard diffusion equation by replacing the first-order time derivative with Riemann-Liouville fractional derivative of order α, where 0<α<1. The main purpose of this work is to extend the idea on Crank-Nicholson method to the time-fractional heat equations. We prove that the proposed method is unconditionally stable, and the numerical solution converges to the exact one with the order O(τ2+h2). Numerical experiments are carried out to support the theoretical claims.

1. Introduction

Fractional calculus is one of the most popular subjects in many scientific areas for decades. Many problems in applied science, physics and engineering are modeled mathematically by the fractional partial differential equations (FPDEs). We can see these models adoption in viscoelasticity [1, 2], finance [3, 4], hydrology [5, 6], engineering [7, 8], and control systems . FPDEs may be investigated into two fundamental types: time-fractional differential equations and space-fractional differential equations.

Several different methods have been used for solving FPDEs. For the analytical solutions to problems, some methods have been proposed: the variational iteration method [12, 13], the Adomian decomposition method , as well as the Laplace transform and Fourier transform methods [17, 18].

On the other hand, numerical methods which based on a finite-difference approximation to the fractional derivative, for solving FDPEs , have been proposed. A practical numerical method for solving multidimensional fractional partial differential equations, using a variation on the classical alternating-directions implicit (ADI) Euler method, is presented in . Many finite-difference approximations for the FPDEs are only first-order accurate. Some second-order accurate numerical approximations for the space-fractional differential equations were presented in . Here, we propose a Crank-Nicholson-type method for time-fractional differential heat equations with the accuracy of order O(τ2+h2).

In this work, we consider the following time-fractional heat equation: (1.1)Mαu(t,x)tα=2u(t,x)x2+f(t,x),(0<x<1,0<t<1),u(0,x)=r(x),0x1,u(t,0)=0,u(t,1)=0,0t1. Here, the term Mαu(t,x)/tα denotes α-order-modified Riemann-Liouville fractional derivative  given with the formula: (1.2)Mαu(t,x)tα={1Γ(1-α)t0tu(s,x)-u(0,x)(t-s)αds,if0<α<1,tu(t,x),ifα=1, where Γ(·) is the Gamma function.

Remark 1.1.

If r(x)=0, then the Riemann-Liouville and the modified Riemann-Liouville fractional derivatives are identical, since the Riemann-Liouville derivative is given by the following formula: (1.3)αu(t,x)tα={1Γ(1-α)t0tu(s,x)(t-s)αds,if0<α<1,tu(t,x),ifα=1. If r(x) is nonzero, then there are some problems about the existence of the solutions for the heat equation (1.1). To rectify the situation, two main approaches can be used: the modified Riemann-Liouville fractional derivative can be used  or the initial condition should be modified . We chose the first approach in our work.

2. Discretization of the Problem

In this section, we introduce the basic ideas for the numerical solution of the time-fractional heat equation (1.1) by Crank-Nicholson difference scheme.

For some positive integers M and N, the grid sizes in space and time for the finite-difference algorithm are defined by h=1/M and τ=1/N, respectively. The grid points in the space interval [0,1] are the numbers xi=ih, i=0,1,2,,M, and the grid points in the time interval [0,1] are labeled tn=nτ, n=0,1,2,,N. The values of the functions U and f at the grid points are denoted Uin=U(tn,xi) and fin=f(tn,xi), respectively.

As in the classical Crank-Nicholson difference scheme, we will obtain a discrete approximation to the fractional derivative αU(t,x)/tα at (tn+(1/2),xi). Let (2.1)H(t,x)=1Γ(1-α)0tu(s,x)-u(0,x)(t-s)αds. Then, we have (2.2)αU(tn+1/2,xi)tα=tH(tn+1/2,xi)=H(tn+1,xi)-H(tn,xi)τ+O(τ2). Now, we will find the approximations for H(tn+1,xi) and H(tn,xi): (2.3)H(tn+1,xi)=1Γ(1-α)0tn+1u(s,xi)-u(0,xi)(tn+1-s)αds=1Γ(1-α)j=1n+1(j-1)τjτu(s,xi)(tn+1-s)αds-u(0,xi)((n+1)τ)1-αΓ(2-α)=1Γ(1-α)j=1n+1(j-1)τjτ[(s-tj)-τUij-1+(s-tj-1)τUij+O(τ2)]1(tn+1-s)αds=1Γ(1-α)-Ui0((n+1)τ)1-αΓ(2-α)=τj=0n(aj-jbj)Uin-j-τj=0n(aj-(j+1)bj)Uin-j+1-Ui0((n+1)τ)1-αΓ(2-α)+Rn+1, where (2.4)Rn+1=1Γ(1-α)j=1n+1(j-1)τjτO(τ2)ds(tn+1-s)α=1(1-α)Γ(1-α)O(τ2)j=1n+1[(n-j+2)1-α-(n-j+1)1-α]τ1-α=1Γ(2-α)(n+1)1-αO(τ3-α).

Similarly, we can obtain (2.5)H(tn,xi)=1Γ(1-α)0tnu(s,xi)-u(0,xi)(tn-s)αds=τj=1n(aj-1-(j-1)bj-1)Uin-j-τj=1n(aj-1-jbj-1)Uin-j+1-Ui0(nτ)1-αΓ(2-α)+Rn, where Rn=(1/Γ(2-α))n1-αO(τ3-α) and (2.6)aj=τ-α(2-α)Γ(1-α)[(j+1)2-α-j2-α],bj=τ-α(1-α)Γ(1-α)[(j+1)1-α-j1-α].

Then, we can write the following approximation: (2.7)αU(tn+1/2,xi)tα=H(tn+1,xi)-H(tn,xi)τ+O(τ2)=qnUi0+j=0npjUin+1-j+Rn+1-Rnτ+O(τ2)=qnUi0+j=0npjUin+1-j+1Γ(2-α)[(n+1)1-α-n1-α]O(τ2-α)+O(τ2)=qnUi0+j=0npjUin+1-j+1Γ(2-α)[(n+1)1-α-n1-ατ]O(τ3-α)+O(τ2)=qnUi0+j=0npjUin+1-j+1Γ(2-α)[(τ(n+1))1-α-(τn)1-ατ]O(τ2)+O(τ2), where (2.8)q0=3a0-a1+2b1-2b0,qn=an-an-1+(n-1)bn-1-(n+1)bn,for1nN-1,p0=b0-a0,p1=2a0-a1+2b1-b0,pj=(-aj-2+2aj-1-aj)+(j-2)bj-2-(2j-1)bj-1+(j+1)bj,forj2.

On the other hand, using the mean-value theorem, we get (2.9)(τ(n+1))1-α-(τn)1-ατ=f(c)=constant, where f(x)=x1-α and tn<c<tn+1. So, we obtain the following second-order approximation for the modified Riemann-Liouville derivative: (2.10)αU(tn+(1/2),xi)tα=H(tn+1,xi)-H(tn,xi)τ+O(τ2)=qnUi0+j=0npjUin+1-j+O(τ2).

3. Crank-Nicholson Difference Scheme

Using the approximation above, we obtain the following difference scheme which is accurate of order O(τ2+h2): (3.1)qnUi0+j=0npjUin+1-j-[Ui+1n+1-2Uin+1+Ui-1n+12h2+Ui+1n-2Uin+Ui-1n2h2]=f(tn+τ2,xi),0nN-1,1iM-1,Ui0=r(xi),1iM-1,U0n=0,UMn=0,0nN.

We can arrange the system above to obtain (3.2)(-12h2)(Ui+1n+1+Ui+1n)+qnUi0+j=0npjUin+1-j+(-12h2)(Ui-1n+1+Ui-1n)=f(tn+τ2,xi),0nN-1,1iM-1,Ui0=r(xi),1iM-1,U0n=0,UMn=0,0nN.

The difference scheme above can be written in matrix form: (3.3)AUi+1+BUi+AUi-1=φi, where φi=[φi0,φi1,φi2,,φiN]T, φi0=r(xi), φin=f(tn+1/2,xi), 1nN, 1iM, and Ui=[Ui0,Ui1,Ui2,,UiN]T.

Here, A(N+1)×(N+1) and B(N+1)×(N+1) are the matrices of the form (3.4)A=(-12h2),B=[1q0+1h2p0+1h2q1p1+1h2p0+1h2q2p2p1+1h2  p0+1h2    qN-1pN-1p2p1+1h2p0+1h2  ].

We note that the unspecified entries are zero at the matrices above.

Using the idea on the modified Gauss-Elimination method, we can convert (3.3) into the following form: (3.5)Ui=αi+1Ui+1+βi+1,i=M-1,,2,1,0.

This way, the two-step form of difference schemes in (3.3) is transformed to one-step method as in (3.5).

Now, we need to determine the matrices αi+1 and βi+1 satisfying the last equality. Since U0=α1U1+β1=0, we can select α1=O(N+1)×(N+1) and β1=O(N+1)×1. Combining the equalities Ui=αi+1Ui+1+βi+1 and Ui-1=αiUi+βi and the matrix equation (3.3), we have (3.6)(A+Bαi+1+Aαiαi+1)Ui+1+(Bβi+1+Aαiβi+1+Aβi)=φi. Then, we write (3.7)A+Bαi+1+Aαiαi+1=0,Bβi+1+Aαiβi+1+Aβi=φi, where  1iM-1.

So, we obtain the following pair of formulas: (3.8)αi+1=-(B+Aαi)-1A,βi+1=(B+Aαi)-1(φi-Aβi), where  1iM-1.

4. Stability of the Method

The stability analysis is done by using the analysis of the eigenvalues of the iteration matrix αi (1iM) of the scheme (3.5).

Let  ρ(A) denote the spectral radius of a matrix A, that is, the maximum of the absolute value of the eigenvalues of the matrix A.

We will prove that ρ(αi)<1, (1iM), by induction.

Since α1 is a zero matrix ρ(α1)=0<1.

Moreover, α2=-B-1A,ρ(α2)=  ρ(-B-1A)=-11/h2+p0·-12h2=1/h22(1/h2+p0), since α2 is of the form (4.1)α2=[0*1/h22(1/h2+p0)**1/h22(1/h2+p0)***1/h22(1/h2+p0)](N+1)×(N+1),p0=b0-a0=τ-α(1-α)Γ(1-α)-τ-α(2-α)Γ(1-α)=τ-αΓ(3-α)>0, therefore, ρ(α2)<1.

Now, assume ρ(αi)<1. After some calculations, we find that (4.2)αi+1=-(B+Aαi)-1A=(12h2)[0*1B2,2-(1/2h2)αi2,2**1B3,3-(1/2h2)αi3,3  ***  ***1BN+1,N+1-(1/2h2)αiN+1,N+1] and we already know that Bj,j=1/h2+w0 and αij,j=ρ(αi) for 2jN+1: (4.3)ρ(αi+1)=|1/2h21/h2+p0-(1/2h2)ρ(αi)|=M22[M2(1-ρ(αi)/2)+p0].

Since 0ρ(αi)<1, it follows that ρ(αi+1)<1. So, ρ(αi)<1 for any i, where 1iM.

Remark 4.1.

The convergence of the method follows from the Lax equivalence theorem  because of the stability and consistency of the proposed scheme.

5. Numerical Analysis Example 5.1.

Consider (5.1)αu(t,x)tα=2u(t,x)x2+2t(2-α)Γ(3-α)sin(x-x2)+t2[sin(x-x2)(1-2x)2+2cos(x-x2)],(0<x<1,0<t<1),u(0,x)=0,0x1,u(t,0)=0,u(t,1)=0,0t1.

Exact solution of this problem is U(t,x)=t2sin(1-x)x. The solution by the Crank-Nicholson scheme is given in Figure 1. The errors when solving this problem are listed in the Table 1 for various values of time and space nodes.

The errors in the table are calculated by the formula max0nM,0kN|u(tk,xn)-Unk| and the error rate formula is |Ek|/|Ek+1|.

Error table for Example 5.1.

α = 0.2 α = 0.5 α = 0.9
M N Error Rate Error Rate Error Rate
32 8 0.0018870311 0.0016846217 0.0009754809
32 16 0.0004703510 4.01 0.0004052354 4.16 0.0002461078 3.97
32 32 0.0001172029 4.01 0.0000969929 4.18 0.0000650942 3.78
32 64 0.0000291961 4.01 0.00002314510 4.19 0.0000198362 3.28

(a) The approximate solutions of Example 5.1 by the proposed method when N=32,  M=32, and α=0.5. (b) The errors for some values of M and N when t=1 and α=0.5.

Example 5.2.

Consider (5.2)αu(t,x)tα=2u(t,x)x2+24t(2-α)Γ(5-α)(x2-x)-2t4,(0<x<1,0<t<1),u(0,x)=0,0x1,u(t,0)=0,u(t,1)=0,0t1.

Exact solution of this problem is U(t,x)=t4x(x-1). The solution by the Crank-Nicholson scheme is given in Figure 2. The errors when solving this problem are listed in Table 2 for various values of time and space nodes and several values of α.

It can be concluded from the tables and the figures that when the step size is reduced by a factor of 1/2, the error decreases by about 1/4. The numerical results support the claim about the order of the convergence.

The errors for some values of M, N, and α.

α = 0.3 α = 0.5 α = 0.8
M N Error Rate Error Rate Error Rate
4 4 0.02321328680 0.02286737567 0.02173420667
8 8 0.00583004420 3.98 0.00577931685 3.96 0.00554721754 3.92
16 16 0.00146112785 3.99 0.00145293106 3.98 0.00140076083 3.96
32 32 0.00036572715 3.995 0.00036424786 3.99 0.00035252421 3.97
64 64 0.00009148685 3.998 0.00009122231 3.99 0.00008860379 3.98

(a) The approximate solutions of Example 5.2 by the proposed method when N=32,  M=32, and α=0.5. (b) The errors for some values of M and N when t=1 and α=0.5.

6. Conclusion

In this work, the Crank-Nicholson difference scheme was successfully extended to solve the time-fractional heat equations. A second-order approximation for the Riemann-Liouville fractional derivative is obtained. It is proven that the time-fractional Crank-Nicholson difference scheme is unconditionally stable and convergent. Numerical results are in good agreement with the theoretical results.