Three-Point Compact Approximation for the Caputo Fractional Derivative

7 downloads 0 Views 301KB Size Report
Oct 6, 2015 - Department of Applied Mathematics and Statistics. University of Rousse, Rousse 7017, Bulgaria ymdimitrov@uni-ruse.bg. October 7, 2015.
arXiv:1510.01619v1 [math.NA] 6 Oct 2015

THREE-POINT COMPACT APPROXIMATION FOR THE CAPUTO FRACTIONAL DERIVATIVE

Yuri Dimitrov Department of Applied Mathematics and Statistics University of Rousse, Rousse 7017, Bulgaria [email protected] October 7, 2015 Abstract In this paper we derive the fourth-order asymptotic expansions of the trapezoidal approximation for the fractional integral and the L1 approximation for the Caputo derivative. We use the expansion of the L1 approximation to obtain the three point compact approximation for the Caputo derivative n X  13 1 (α) 1 (α) 1 (α) δk yn−k = yn(α) − yn−1 + yn−2 + O h3−α , α Γ(2 − α)h 12 6 12 k=0 (α)

with weights δ0 (α)

δ1

(α)

= 21−α − 2 + 2ζ(α − 1), δ2

(α)

δk

(α)

= 1 − ζ(α − 1), δn

= (n − 1)1−α − n1−α ,

= 1 − 22−α + 31−α − ζ(α − 1),

= (k − 1)1−α − 2k1−a + (k + 1)1−α ,

(k = 3 · · · , n − 1),

where y is a differentiable function which satisfies y ′ (0) = 0. The numerical solutions of the fractional relaxation and the time-fractional subdiffusion equations are discussed. 2010 Math Subject Classification: 26A33, 34A08, 34E05, 41A25 Key Words and Phrases: Caputo derivative, integral approximation, fractional differential equation, compact finite difference scheme.

1

1

Introduction

Fractional calculus is a rapidly growing field of science. Differential equations with the Caputo and Riemann-Liouville fractional derivatives are used for modeling processes in economics, physics and engineering [6, 26, 37, 40, 43]. The Caputo fractional derivative and the fractional integral of arbitrary order are defined as a convolution of the derivatives of the function and the power function. The fractional integral of order α > 0 on the interval [0, x] and the Caputo derivative of order n + α, where 0 < α < 1 and n is a positive integer are defined as Z x 1 α I y(x) = (x − ξ)α−1 y(ξ)dξ, Γ(α) 0 Z x (n+1) 1 y (t) (n+α) n+α y (x) = D y(x) = dt. Γ(1 − α) 0 (x − t)α The Caputo derivative is expressed as a composition of the fractional integral of order 1 − α and the derivative of the function of order n + 1 y (n+α) (x) = I 1−α y (n+1) (x). While analytical methods such as separation of variables, Laplace and Fourier transforms are used for solution of fractional differential equations, most of the equations used in practical applications are solved by a numerical method. The finite difference schemes for numerical solution of partial fractional differential equations use a discretization of the fractional derivative. Let N be a positive integer and XN = {xn = nh; n = 0, 1, · · · , N} be a uniform mesh on the interval [0, x] with step size h = x/N. Denote by yn the value of the function y at the point xn . An important approximation for the Caputo derivative is the L1 approximation yn(α) ≈ (α)

with weights σ0

n X 1 (α) σ yn−k , Γ(2 − α)hα k=0 k

(1)

(α)

= 1, σn = (n − 1)1−a − n1−a ,

(α)

σk = (k + 1)1−α − 2k 1−α + (k − 1)1−α ,

(k = 2, · · · , n − 1).

When the function y has a continuous second derivative, the accuracy of the L1 approximation is O(h2−α ) ([38]). The L1 approximation has been often 2

used for numerical solution of ordinary and two-dimensional partial fractional differential equations. The accuracy of the L1 approximation is insufficient for numerical solution of multidimensional fractional differential equations which require a large number of computations, especially when the order of fractional differentiation is close to one. There is an increasing interest in high-order approximations for the Caputo and Riemann-Liouville fractional derivatives, which stems from the practical and the mathematical value of the fractional derivatives. In previous work [13] we determined the second-order expansion of the L1 approximation (7) and the second-order approximation for the Caputo derivative (2), by modifying the first three coefficients of the L1 approximation with the value of the Riemann zeta function ζ(α − 1), yn(α) (α)

(α)

where δk = σk (α)

δ0

(α)

n X  1 (α) 2 = δ y + O h , n−k Γ(2 − α)hα k=0 k

(2)

for 2 ≤ k ≤ n and (α)

= σ0 − ζ(α − 1), δ1

(α)

(α)

= σ1 + 2ζ(α − 1), δ2

(α)

= σ2 − ζ(α − 1).

One approach for constructing high-order approximations for the Caputo and Riemann-Liouville fractional derivatives is based on approximating the function y on the subintervals of the mesh XN by Lagrange polynomials or spline interpolation [5, 4, 10, 33, 36]. Another commonly used approach for approximation of the fractional derivative is based on the expansion of the generating function and the Fourier transform of the approximation [7, 8, 12, 34, 50, 55]. The two approaches are effective for constructing approximations for the fractional derivatives, although the formulas for the weights of the high-order approximations may involve complex expressions. The compact approximations use an approximation for the fractional derivative and the higher accuracy is achieved by approximating a linear sum of fractional derivatives on adjacent nodes of the mesh. The compact approximations combine simpler expressions for the weights with a high-order accuracy of the approximation. Compact finite difference schemes for numerical solutions of partial fractional differential equations based on the Gr¨ unwald and shifted Gr¨ unwald approximations are discussed in [12, 23, 46, 52, 55]. Yan,Pal and Ford [51] construct an approximation of the Caputo derivative and a numerical solution of the fractional relaxation equation with accuracy O (h3−α ). Gao, Sun and Zhang [19] use a quadratic interpolation on a three-point stencil to derive an L1 − 2 3

formula approximation for the Caputo derivative with accuracy O (h3−α ). In recent work, Li, Wu and Ding [35] derive an approximation for the Caputo derivative of order 3 − α and compute the numerical solutions of the advection-diffusion equation with accuracy O (τ 3−α + h2 ) and O (τ 3−α + h4 ). In [14] we discuss a method for improving the accuracy of the numerical solutions of the ordinary fractional relaxation equation y (α) (x) + λy(x) = F (x), and the time-fractional subdiffusion equation ∂ α u(x, t) ∂ 2 u(x, t) = + F (x, t), ∂tα ∂x2 when the solutions are nonsmooth functions at the initial point and we compare the numerical solutions which use the L1 approximation (1) and the modified L1 approximation (2) for the Caputo derivative. The method is based on computing the fractional Taylor polynomials of the solution at the initial point of fractional differentiation. In the present paper we extend the results of [13]. In Lemma 11 we determine the fourth-order expansion of the L1 approximation for the Caputo derivative N X ζ(α − 1) ′′ 1 (α) σk y(x − kh) = y (α) (x)+ y (x)h2−α α Γ(2 − α)h k=0 Γ(2 − α)  2  2 d (α) h ζ(α − 2) ′′′ y ′ (0) + y (x) − − y (x)h3−α dx2 Γ(−α)x1+α 12 Γ(2 − α)   (4)  ζ(α − 1) y (x) 4−α + ζ(α − 3) + h + O h4 , 6 2Γ(2 − α)

and the three-point compact approximation

n X 13 1 (α) 1 (α) 1 (α) δk yn−k ≈ yn(α) − yn−1 + yn−2 . α Γ(2 − α)h k=0 12 6 12

(3)

When the function y is a differentiable function and y ′(0) = 0 the accuracy of compact approximation (3) is O (h3−α ). The outline of the paper is as follows. In section 2 we introduce the facts from Fractional calculus used in the rest of the paper. In section 3 we determine the fourth-order expansion (8) of the trapezoidal approximation 4

for the fractional integral of order 2−α. In section 4 we determine the fourthorder expansion (9) of the L1 approximation for the Caputo derivative and the three-point compact approximation (3). In section 5 we compare the numerical solutions of the fractional relaxation and subdiffusion equations which use approximations (1), (2) and (3). 2

Preliminaries

The Caputo derivative of order α, when 0 < α < 1 is defined as Z x dα y(x) 1 y ′ (t) α (α) D y(x) = y (x) = = dt. dxα Γ(1 − α) 0 (x − t)α Denote by J α y(x) the fractional integral Z x α J y(x) = (x − t)α y(t)dt. 0

When α = 0 the fractional integral J 0 y(x) is equal to the definite integral of the function y on the interval [0, x]. The fractional integrals J α y(x) and I α y(x) are related with J α y(x) = Γ(1 + α)I 1+α y(x). In [13] we showed that Γ(2 − α)y (α) (x) = Γ(2 − α)I 2−α y ′′(x) + y ′(0)x1−α . Then Γ(2 − α)y (α) (x) = J 1−α y ′′ (x) + x1−α y ′ (0). The Miller-Ross sequential derivative is defined as y [α1] (x) = y (α1 ) (x),

y [α1 +α2 ] (x) = D α1 D α2 y(x),

y [α1+α2 +···+αn ] (x) = D α1 D α2 · · · D αn y(x). Denote y [nα](x) = y [α+α+···+α] (x) = D α D α · · · D α y(x).

5

(4)

The fractional Taylor polynomials of degree m for the Miller-Ross derivatives y [nα](0) are defined as Tm(α) (x) =

m X y [nα](0) αn x . Γ(αn + 1) n=0

The fractional Taylor polynomials approximate the value of the function (α) y(h) ≈ Tm (h), where h is a small positive number. The one-parameter and two-parameter Mittag-Leffler functions are defined for α > 0 as Eα (x) =

∞ X n=0

xn , Γ(αn + 1)

Eα,β (x) =

∞ X n=0

xn . Γ(αn + β)

When α = β = 1 the Mittag-Leffler functions are equal to the exponential function. The Caputo derivative and the fractional integral of the exponential function are expressed with the Mittag-Leffler functions as [22] D α eλx = λx1−α E1,2−α (λx),

I α eλx = xα E1,1+α (λx).

From the formula for the sine function sin x =

eix − e−ix , 2i

we obtain D α sin(λx) =

λ 1−α x (E1,2−α (iλx) + E1,2−α (−iλx)) , 2

i I α sin(λx) = − xα (E1,1+α (iλx) − E1,1+α (−iλx)) , 2 and J α eλx = Γ(1 + α)x1+α E1,2+α (λx), i J α sin(λx) = − Γ(1 + α)x1+α (E1,2+α (iλx) − E1,2+α (−iλx)) . 2 The expressions for the analytical solutions of fractional differential equations often contain the Mittag-Leffler functions. The initial value problem,  (α) y + λy = 0, t > 0, (n − 1 < α < n), y (k) (0) = bk , (k = 0, 1, · · · , n − 1), 6

has the solution y(x) =

n−1 X

bk xk Eα,k+1 (−λxα ) .

k=0

The Gr¨ unwald-Letnikov fractional derivative is closely related to Caputo and Riemann-Liouville derivatives   N 1 X α n α e D y(x) = lim α y(x − nh), (−1) h↓0 h n n=0 where

  Γ(α + 1) α α(α − 1) · · · (α − n + 1) = = . n Γ(n + 1)Γ(α − n + 1) n!  (α) Denote ωn = (−1)n αn . The Gr¨ unwald formula approximation for the Caputo derivative has a first-order accuracy N 1 X (α) ω y(x − kh) = y (α) (x) + O (h) . hα k=0 n

When the function y is differentiable and y(0) = y ′(0) = y ′′(0) = 0, the Gr¨ unwald formula approximates the Caputo derivative at the point x − αh/2 with second-order accuracy   N  αh 1 X (α) (α) + O h2 . x− ωn y(x − kh) = y α h 2 k=0

The Gr¨ unwald formula approximation for the Caputo derivative has a fourthorder expansion N α α(1 + 3α) [2+α] 1 X (α) ωn y(x − kh) = y (α) (x) − y [1+α] (x)h + y (x)h2 α h k=0 2 24

+

 α2 (1 + α) [3+α] y (x)h3 + O h4 , 48

when y(0) = y ′ (0) = y ′′ (0) = y ′′′ (0) = 0. In [12] we discuss the two-point and three-point compact Gr¨ unwald approximations for the Caputo derivative and the numerical solutions of the fractional relaxation and subdiffusion 7

equations. n α   1 X (α) α  (α) (α) 2 ω y = y + 1 − y + O h , n−k n−1 n k hα k=0 2 2

 2    n a 11a a2 5a (α) 1 X (α) (α) ωk yn−k = yn−2 + yn−1 − − α h k=0 8 24 12 4    17a a2 + 1− yn(α) + O h3 . + 24 8

(5)

In the present paper we derive the fourth-order expansion (8) of the trapezoidal approximation for the fractional integral J α y(x) and three-point compact approximation (3) for the modified L1 approximation. The trapezoidal sum of the function y on the interval [0, x] is defined as ! n−1 X h y(kh) + y(x) . y(0) + Th [y] = 2 k=1

When the function y is a differentiable function the trapezoidal sum is a second-order approximation for the definite integral on the interval [0, x], Z x  Th [y] = y(t)dt + O h2 . 0

The asymptotic expansion of the trapezoidal approximation for the definite integral is given by the Euler-MacLaurin formula [2, 27, 29], Th [y] =

Z

0

x

∞ X  B2n y(ξ)dξ + y (2n−1) (x) − y (2n−1) (0) h2n . (2n)! n=1

The Bernouli numbers Bn with an odd index are equal to zero, and the Bernoulli numbers with an even index are expressed with the values of the Riemann zeta function at the even integrs B2n = (−1)n+1

8

2(2n)! ζ(2n). (2π)2n

The Bernoulli numbers have a high growth rate and the above sum diverges for many standard calculus functions. The properties of the Bernoulli numbers and the Bernoulli polynomials are discussed in Kouba [27]. The asymptotic expansion formula for the sum of the powers of the first n integers is related to the Euler-MacLaurin formula [2]  n−1 ∞  X n1+α X α + 1 Bm α k = ζ(−α) + . (6) m 1 + α m=0 nm k=1 In [13] we use expansion formula (6) to derive the second order expansions 1+α

h

N X

 y(0)xα h + ζ(−α)y(x)h1+α + O h2 , k y(x − kh) = J y(x) + 2 k=0 α

α

N X  1 ζ(α − 1) ′′ (α) σk y(x − kh) = y (α) (x) + y (x)h2−α + O h2 . (7) α Γ(2 − α)h Γ(2 − α) k=0

In the present paper we extend the results from [13]. We determine the fourth-order expansions h1+α

N X k=0

k α y(x − kh) −

y(0)xα h = J α y(x) + ζ(−α)y(x)h1+α 2

αxα−1 y(0) − xα y ′(0) 2 + h − y ′(x)ζ(−1 − α)h2+α 12  y ′′ (x) ζ(−2 − α)h3+α + O h4 , + 2

N X 1 h2 (α) (α) [2+α] σ y(x − kh) = y (x) + y (x) Γ(2 − α)hα k=0 k 12

+

(8)

(9)

y ′ (0) ζ(α − 2) ′′′ h2 ζ(α − 1) ′′ y (x)h2−α − − y (x)h3−α 1+α Γ(2 − α) Γ(−α)x 12 Γ(2 − α)    y (4) (x) 4−α ζ(α − 1) h + O h4 , + ζ(α − 3) + 6 2Γ(2 − α)

and the three-point compact approximation for the Caputo derivative n X 1 1 (α) 1 (α) 13 (α) δk yn−k ≈ yn−2 − yn−1 + yn(α) . α Γ(2 − α)h k=0 12 6 12

9

The accuracy of the approximation is O (h3−α ) when y ′(0) = 0. The functions y(x) = ex − x and y(x) = cos x are differentiable functions and satisfy the condition y ′ (0) = 0. In Table 1 and Table 2 we compute the error and the order of compact approximation (3) and fourth-order expansion (8). Table 1: Error and order of approximation (3) for the functions y(t) = et − t (left) with α = 0.5, x = 2, and y(t) = cos t, α = 0.75, x = 1 (right). h Error Order 0.05 0.000751014 2.397394 0.025 0.000138643 2.437469 0.0125 0.000025183 2.460848 0.00625 4.53 × 10−6 2.474854 0.003125 8.10 × 10−7 2.483489

h Error Order 0.05 0.0002819560 2.178218 0.025 0.0000607879 2.213615 0.0125 0.0000129516 2.230656 0.00625 2.74 × 10−6 2.239427 0.003125 5.79 × 10−7 2.244120

Table 2: Error and order of approximation (8) for the functions y(t) = et and α = 0.75, x = 2 (left) and y(t) = sin t, α = 0.25, x = 1 (right). h Error 0.05 1.18 × 10−7 0.025 6.19 × 10−9 0.0125 3.35 × 10−10 0.00625 1.92 × 10−11 0.003125 1.14 × 10−12 3

Order 4.389900 4.274558 4.185221 4.120378 4.076583

h 0.05 0.025 0.0125 0.00625 0.003125

Error 1.18 × 10−8 7.55 × 10−10 4.81 × 10−11 3.06 × 10−12 1.94 × 10−13

Order 3.959934 3.966716 3.972384 3.977080 3.980632

Fourth-Order Expansion of the Trapezoidal Approximation for the Fractional Integral

In the present section we determine the fourth-order expansion (8) of the trapezoidal approximation for the fractional integral Z x α J y(x) = (x − t)α y(t)dt, 0

where 0 < α < 1. When the function y is a differentiable function on the interval [0, x], the trapezoidal approximation for the definite integral 10

has second-order accuracy O (h2 ). From the Euler-MacLaurin formula the trapezoidal sum of the function y has a fourth-order asymptotic expansion Z x  h2 ′ Th [y] = y(t)dt + (y (x) − y ′(0)) + O h4 . 12 0

The function z(t) = (x − t)α y(t) has a singularity on [0, x], because its first derivative is unbounded at the point t = x. In Theorem 5 we determine the fourth-order expansion of the trapezoidal approximation for the fractional integral J α y(x). The expansion formula contains the term ζ(−α)y(x)h1+α . When y(x) 6= 0 the trapezoidal approximation for the definite integral of the function z has accuracy O (h1+α ) and the trapezoidal approximation has second-order accuracy if y(x) = 0. In Lemma 1, Lemma 2 and Lemma 3 we determine the fourth-order expansions of the trapezoidal approximations for the functions (x − t)α , (x − t)1+α , (x − t)2+α , on the interval [0, x]. The proofs of the lemmas use the expansion formula approximation for the sum of the powers of the first n integers   n X n1+α nα α α−1 1 α k = ζ(−α) + + + n +O . (10) 1+α 2 12 n3−α k=1

Lemma 1. Let y(t) = 1 and z(t) = (x − t)α . Then Th [z] = J α y(x) + ζ(−α)h1+α +

Proof. The function z has trapezoidal sum 1+α

Th [z] = h and J α y(x) =

x1+α . 1+α

 αxα−1 2 h + O h4 . 12

n X

1 k α − xα h, 2 k=1

From (10)

1 α 1 x1+α + xα h + ζ(−α)h1+α + xα−1 h2 − xα h + O Th [z] = 1+α 2 12 2 We have that h1+α /n3−α = h4 /(nh)3−α = h4 /x3−α . Then  α Th [z] = J α y(x) + ζ(−α)h1+α + xα−1 h2 + O h4 . 12 11



h1+α n3−α



.

Lemma 2. Let y(t) = (x − t)α and z(t) = (x − t)1+α . Then Th [z] = J α y(x) +

 (1 + α)xα 2 h + ζ(−1 − α)h2+α + O h4 . 12

Proof. From expansion (10) n X

k

1+α

k=1

n2+α n1+α 1 + α α = ζ(−1 − α) + + + n +O 2+α 2 12

We have that J α y(x) =

x2+α 2+α



1 n2−α



.

and 2+α

Th [z] = h

n X k=1

k 1+α −

x1+α h. 2

Then x1+α 1+α α 2 x1+α x2+α + h+ x h + ζ(−1 − α)h2+α − h+O Tn [z] = 2+α 2 12 2



h2+α n2−α

 1+α α 2 x h + ζ(−1 − α)h2+α + O h4 , 12 4 = h /(nh)2−α = h4 /x2−α .

Th [z] = J α y(x) + because h2+α /n2−α

Lemma 3. Let y(t) = (x − t)1+α and z(t) = (x − t)2+α . Then Th [z] = J α y(x) + Proof. From (10) n X k=1

k

2+α

 (2 + α)x1+α 2 h + ζ(−2 − α)h3+α + O h4 . 12

n3+α n2+α 2 + α 1+α = ζ(−2 − α) + + + n +O 3+α 2 12

We have that J α y(x) =

x3+α 3+α

and 3+α

Th [z] = h

n X k=1

k 2+α −

12

x2+α h. 2



1 n1−α



.



,

Then x3+α x2+α 2 + α 1+α 2 x2+α 2+α Th [z] = + h+ x h +ζ(−2−α)h − h+O 3+α 2 12 2



h3+α n1−α



,

 2 + α 1+α 2 x h + ζ(−2 − α)h3+α + O h4 , 12 4 = h /(nh)1−α = h4 /x1−α .

Tn [z] = J α y(x) + because h3+α /n1−α

In the next theorem we determine the fourth-order expansion of the trapezoidal approximation for the fractional integral J α y(x), when the function y(x) is a polynomial. Theorem 4. Let y(t) be a polynomial and z(t) = (x − t)α y(t). Then Th [z] = J α y(x) + y(x)ζ(−α)h1+α −

z ′ (0) 2 h − y ′(x)ζ(−1 − α)h2+α 12  y ′′ (x) + ζ(−2 − α)h3+α + O h4 . 2

Proof. Let y(t) be a polynomial of degree m. From Taylor expansion of the function y(t) at the point t = x y(t) =

m X k=0

2

k

pk (x − t) = p0 + p1 (x − t) + p2 (x − t) +

m X k=3

pk (x − t)k .

The coefficients pk are expressed with the values of the derivatives of the function y(t) at the point t = x, pk = (−1)k y (k) (x)/k!.

(11)

Denote 2

y1 (t) = p0 + p1 (x − t) + p2 (x − t) ,

y2 (t) =

m X k=3

pk (x − t)k ,

z1 (t) = (x − t)α y1 (t),

z2 (t) = (x − t)α y2 (t).

y(t) = y1 (t) + y2 (t),

z(t) = z1 (t) + z2 (t).

Then

13

The function z(t) has a first derivative at the point t = 0, z(t) =

m X k=0

pk (x − t)α+k = p0 (x − t)α + p1 (x − t)1+α + p2 (x − t)2+α + z2 (t),

z ′ (t) = −αp0 (x − t)α−1 − (1 + α)p1 (x − t)α − (2 + α)p2 (x − t)1+α + z2′ (t), z ′ (0) = −αp0 xα−1 − (1 + α)p1 xα − (2 + α)p2 xα+1 + z2′ (0).

(12)

The function z2 (t) has a continuous and bounded third derivative on [0, x] and z2′ (x) = 0. From the Euler-MacLaurin formula, the trapezoidal sum of the function z2 (t) has a fourth-order expansion Th [z2 ] = J α y2 (x) −

 h2 ′ z2 (0) + O h4 . 12

(13)

Now we determine the fourth-order expansion for the trapezoidal sum of the function z1 (t). From Lemma 1, Lemma 2 and Lemma 3, Th [z1 ] = p0 Th [(x − t)α ] + p1 Th [(x − t)1+α ] + p2 Th [(x − t)2+α ],  αxα−1 2 x1+α 1+α (14) Th [z1 ] = p0 + ζ(−α)h + h 1+α 12   2+α (1 + α)xα 2 x 2+α + h + ζ(−1 − α)h + p1 2+α 12  3+α   x (2 + α)x1+α 2 3+α + p2 + O h4 . + h + ζ(−2 − α)h 3+α 12 

From (12), (13) and (14) we obtain

z ′ (0) 2 h 12  + p1 ζ(−1 − α)h2+α + p2 ζ(−2 − α)h3+α + O h4 .

Th [z] = J α y(x)+p0 ζ(−α)h1+α −

From the formula (11) for the coefficients of y(t), p0 = y(x),

p1 = −y ′ (x),

14

p2 =

y ′′ (x) . 2

Then Th [z] = J α y(x)+y(x)ζ(−α)h1+α −

z ′ (0) 2 h 12

− y ′(x)ζ(−1 − α)h2+α +

 y ′′ (x) ζ(−2 − α)h3+α + O h4 . 2

Now we extend the result from Theorem 4 to any sufficiently differentiable function y on the interval [0, x]. By the Weierstrass Approximation Theorem every continuous function on the interval [0, x] is uniformly approximated by polynomials: for every ǫ > 0 there exists a polynomial p(t) such that |y(t) − p(t)| < ǫ. We can show that if y(t) is a sufficiently differentiable function, there exists a polynomial p(t) such that |y ′ (t) − p′ (t)| < ǫ,

|y(t) − p(t)| < ǫ,

|y ′′ (t) − p′′ (t)| < ǫ,

for all t ∈ [0, x]. The proof is similar to the proof of Theorem 8 in [13]. Theorem 5. Let y(t) be a sufficiently differentiable function. Then h1+α

n X

k α y(x−kh) = J α y(x) +

k=0

y(0)xα h + ζ(−α)y(x)h1+α 2

αxα−1 y(0) − xα y ′(0) 2 + h − y ′ (x)ζ(−1 − α)h2+α 12  y ′′(x) ζ(−2 − α)h3+α + O h4 . + 2

Proof. Let z(t) = (x − t)α y(t). Then

z ′ (t) = −α(x − t)α−1 y(t) + (x − t)α y ′ (t), z ′ (0) = −αxα−1 y(0) + xα y ′ (0).

The function z has a trapezoidal sum 1+α

Th [z] = h

n X k=0

k α y(x − kh) − 15

xα y(0) h. 2

(15)

Denote 1+α

Qh [y] = h Rh [y] = J α y(x)+

n X k=0

k α y(x − kh),

y(0)xα h + ζ(−α)y(x)h1+α 2 αxα−1 y(0) − xα y ′(0) 2 + h − y ′ (x)ζ(−1 − α)h2+α 12 y ′′(x) ζ(−2 − α)h3+α . + 2

Let ǫ > 0 and p(t) be a polynomial which satisfies (15). From Theorem 4  Qh [p] − Rh [p] = O h4 . (16)

From the expansion formula for the sum of powers (6), n X

 n1+α + O (nα ) = O n1+α . 1+α

kα =

k=0

(17)

• Now we estimate Qh [y] − Qh [p]. n n X 1+α X α 1+α kα . k (y(x − kh) − p(x − kh)) ≤ ǫh |Qh [y] − Qh [p]| = h k=0

k=0

Then

1+α

|Qh [y] − Qh [p]| ≤ ǫh

n X

α

1+α

k = ǫh

k=0



 n1+α α + O (n ) , 1+α

x1+α + ǫO (xα h) , 1+α |Qh [y] − Qh [p]| = O (ǫ) .

|Qh [y] − Qh [p]| ≤ ǫ

(18)

• Estimate for J α y(x) − J α p(x). Z x Z x α α α |J y(x) − J p(x)| = (x − t) (y(t) − p(t))dt ≤ (x − t)α |y(t) − p(t)|dt, 0

0

16

x (x − t)1+α , |J y(x) − J p(x)| ≤ ǫ (x − t) dt = −ǫ 1 + α 0 0  1+α  x α α |J y(x) − J p(x)| ≤ ǫ. 1+α • Estimate for Rh [y] − Rh [p]. α

Z

α

x

α

xα h 2 + |y(x) − p(x)|ζ(−α)h1+α + |y ′ (x) − p′ (x)| ζ(−1 − α)h2+α  h2 + αxα−1 |y(0) − p(0)| + xα |y ′(0) − p′ (0)| 12 ζ(−2 − α) + |y ′′(x) − p′′ (x)| h3+α , 2  1+α xα h x + + ζ(−α)h1+α + ζ(−1 − α)h2+α |Rh [y] − Rh [p]| ≤ ǫ 1+α 2  2 2 ζ(−2 − α)h3+α α−1 h αh , + αx +x + 2 12 12

|Rh [y] − Rh [p]| ≤ |J α y(x) − J α p(x)| + |y(0) − p(0)|

|Rh [y] − Rh [p]| = O(ǫ).

(19)

• Estimate for Rh [y] − Qh [y]. |Rh [y] − Qh [y]| ≤ |Rh [y] − Rh [p]| + |Rh [p] − Qh [p]| + |Qh [p] − Qh [y]|. From (16),(18) and (19) we obtain   |Rh [y] − Qh [y]| ≤ O(ǫ) + O h4 + O(ǫ) = O ǫ + h4 .

By letting ǫ → 0 we obtain

 |Rh [y] − Qh [y]| = O h4 .

The Caputo derivative of the function y is expressed (4) as the composition of the fractional integral J 1−α and the second derivative of the function y. The expansion formula (20) for the trapezoidal approximation of the fractional integral J 1−α is a direct consequence of Theorem 5. In Lemma 10 we use (20) to derive the fourth-order expansion of the L1 approximation for the Caputo derivative. 17

Corollary 6. Let y(t) be a sufficiently differentiable function. Then h2−α

n−1 X k=0

k 1−α y(x − kh) = J 1−α y(x) −

y(0)x1−α h + ζ(α − 1)y(x)h2−α 2

(1 − α)x−α y(0) − x1−α y ′(0) 2 h − y ′ (x)ζ(α − 2)h3−α 12  y ′′(x) ζ(α − 3)h4−α + O h4 . (20) + 2 +

4

Expansion of the L1 Approximation for the Caputo Derivative

In [13] we determined the second-order expansion (7) of the L1 approximation for the Caputo derivative. In this section we extend the method of [13] to determine the fourth-order expansion (9) of the L1 approximation and the three-point compact approximation (3) for the Caputo derivative. Denote by Lh [y] the non-constant part of the L1 approximation Lh [y] =

N 1 X (α) σk yN −k . hα k=0

Let ∆1h yn and ∆2h yn be the forward difference and the central difference of the function y(x) at the point xn = nh, ∆1h yn = yn+1 − yn ,

∆2h yn = yn+1 − 2yn + yn−1.

In Lemma 4 and Lemma 5 of [13] we determined the representation of Lh [y], α

h Lh [y] =

N −1 X

k 1−α ∆2h yN −k + N 1−α ∆1h y0 ,

(21)

k=1

and the second-order approximation 2−α

Lh [y] = h

N −1 X k=1

 ′′ 1−α ′ k 1−α yN y0.5 + O h2 . −k + x

From Taylor expansion of the function y(x) at the points x = x0.5 = 0.5h and x = xn = nh we obtain ∆1h y0

= y1 −y0 =

h3 ′′′ ′ hy0.5 + y0.5 +O 24

5

h



18

, ∆2h yn

=

h4 (4) 2 ′′ h yn + yn +O 12

h6



(22)

Lemma 7. Let y(t) be a sufficiently differentiable function. Then 2−α

Lh [y] = h

N −1 X

N −1 h4−α X 1−α (4) ′′ k 1−α yN + k yN −k +x1−α −k 12 k=1 k=1

   h2 ′′′ ′ y0.5 + y0.5 +O h4 . 24

Proof. From (21) and approximations (22) for ∆1h y0 and ∆2h yn α

h Lh [y] =

2−α

Lh [y] = h

N −1 X

k

1−α

k=1

N −1 X

From (17) −1 X N k=1

′′ h2 yN −k

′′ k 1−α yN −k

k=1

O h6−α



  h4 (4) 6 + yN −k + O h 12    h3 ′′′ 5 ′ 1−α , hy0.5 + y0.5 + O h +n 24

n−1 N −1 X h4−α X 1−α (4) 6−α + k 1−α k yN −k + O h 12 k=1  k=1  2  h ′′′ ′ + x1−α O h4 . + y0.5 + x1−α y0.5 24

    k 1−α = O h6−α O N 2−α = O x2−α h4 = O h4 .

Then 2−α

Lh [y] = h

N −1 X k=1

′′ k 1−α yN −k

N −1 h4−α X 1−α (4) + k yN −k 12 k=1    h2 ′′′ ′ 1−α y0.5 + y0.5 + O h4 . +x 24

The fractional differentiation and integration operations on a function are non-commutative. We often consider the fractional integral as a fractional derivative of negative order. In Lemma 8 and Lemma 9 we determine the relations for the composition of the fractional derivative/integral and the second derivative. 19

Lemma 8. Let y(t) be a sufficiently differentiable function. Then d2 α J y(x) = J α y ′′ (x) + αxα−1 y(0) + xα y ′(0). 2 dx

(23)

Proof. By differentiating the fractional integral J α y(x) with respect to x we obtain Z x Z x d d α α (x − t) y(t)dt = α J y(x) = (x − t)α−1 y(t)dt, dx dx 0 0   Z x Z x (x − t)α d α x α = [−(x − t) y(t)]0 + (x−t)α y ′ (t)dt, J y(x) = α y(t)d − dx α 0 0 d α J y(x) = xα y(0) + J α y ′ (x). (24) dx By differentiating (24) with respect to x we obtain d2 α J y(x) = J α y ′′ (x) + αxα−1 y(0) + xα y ′(0). dx2 Lemma 9. Let y(t) be a sufficiently differentiable function. Then y [2+α] (x) = y [α+2] (x) +

y ′′ (0) y ′ (0) + . Γ(−α)x1+α Γ(1 − α)xα

Proof. From (4) and (23) we have that y [2+α] (x) =

y

[2+α]

 d2 (α) 1 d2 y (x) = J 1−α y ′′(x) + x1−α y ′(0) , 2 2 dx Γ(2 − α) dx

 1−α 1 J 1−α y (4) (x)+ α y ′′(0) (x) = Γ(2 − α) x

 α(1 − α) ′ y (0) − y (0) , x1+α

1−α ′′′

+x

y [2+α] (x) =

 1 J 1−α y (4) (x) + x1−α y ′′′ (0) Γ(2 − α) 1−α α(1 − α) + y ′′(0) − y ′(0). α Γ(2 − α)x Γ(2 − α)x1+α 20

The first expression is the Caputo derivative (4) of the function y ′′ (x). Then y [2+α] (x) = y [α+2] (x) +

y ′′ (0) y ′ (0) + . Γ(1 − α)xα Γ(−α)x1+α

Lemma 10. Let y(t) be a sufficiently differentiable function. Then Lh [y] = Γ(2 − α)y (α) (x) + ζ(α − 1)y ′′(x)h2−α − ζ(α − 2)y ′′′ (x)h3−α (25)  1 J 1−α y (4) (x) + (1 − α)x−α y ′′(0) + x1−α y ′′′ (0) h2 + 12    1 ζ(α − 1) + ζ(α − 3) + y (4) (x)h4−α + O h4 . 2 6

Proof. From Corollary 6 and Lemma 7 h2−α

N −1 X k=0

′′ 1−α k 1−α yN y(x) − −k = J

y0′′x1−α h (1 − α)x−α y0′′ − x1−α y0′′′ 2 + h 2 12

+ ζ(α − 1)y(x)h2−α − y ′(x)ζ(α − 2)h3−α +

2−α

h

N −1 X

 y ′′(x) ζ(α − 3)h4−α + O h4 , 2

(4)

(4) k 1−α yN −k

k=0

=J

 y x1−α h y (x) − 0 + ζ(α − 1)y (4) (x)h2−α + O h2 , 2

1−α (4)

and 2−α

Lh [y] = h

N −1 h4−α X 1−α (4) 1−α ′′ k yN −k +x1−α k yN −k + 12 k=1 k=1

N −1 X

   h2 ′′′ ′ y0.5 + y0.5 +O h4 . 24

Then Lh [y] = J 1−α y ′′(x) + J 1−α y (4) (x)

h2 + ζ(α − 1)y ′′(x)h2−α 12

1 − α −α ′′ x y (0)h2 − ζ(α − 2)y ′′′ (x)h3−α (26) 12    1 ζ(α − 1) + ζ(α − 3) + y (4) (x)h4−α + x1−α Sh + O h4 , 2 6 +

21

where

h2 ′′′ h ′′ h2 ′′′ h3 (4) Sh = + y0.5 − y0 − y0 − y0 . 24 2 12 24 By Taylor Expansion at x = 0, ′ y0.5

 h2 h3 (4) h ′ y0.5 = y0′ + y0′′ + y0′′′ + y0 + O h4 , 2 8 48  h (4) ′′′ y0.5 = y0′′′ + y0 + O h4 . 2

Then

 h h2 h3 (4) h2 ′′′ y0.5 = y0′ + y0′′ + y0′′′ + y0 + O h4 , 24 2 6 24 2 2 h h h3 (4) h ′′′ ′ − y0′′ − y0′′′ − y0 , Sh = y0.5 + y0.5 24 2 12 24 2  h Sh = y0′ + y0′′′ + O h4 . 12 By substituting (27) in (26) we obtain ′ y0.5 +

(27)

Lh [y] = J 1−α y ′′ (x) + x1−α y ′ (0) + ζ(α − 1)y ′′(x)h2−α − ζ(α − 2)y ′′′(x)h3−α  1 + J 1−α y (4) (x) + (1 − α)x−α y ′′(0) + x1−α y ′′′ (0) h2 12    ζ(α − 1) 1 ζ(α − 3) + y (4) (x)h4−α + O h4 . + 2 6

From (4) we have that J 1−α y ′′(x) + x1−α y ′(0) = Γ(2 − α)y (α) (x).

Lemma 11. Let y(t) be a sufficiently differentiable function. Then   2 h + ζ(α − 1)y ′′ (x)h2−α Lh [y] = Γ(2 − α) y (α) (x) + y [2+α] (x) 12 2 α(1 − α) ′ h + y (0) − ζ(α − 2)y ′′′ (x)h3−α (28) 1+α x 12    ζ(α − 1) 1 ζ(α − 3) + y (4) (x)h4−α + O h4 . + 2 6

22

Proof. From (4) and Lemma 9, D α y ′′(x) = y [2+α] (x) −

y ′ (0) y ′′ (0) − , Γ(−α)x1+α Γ(1 − α)xα

J 1−α y (4) (x) = Γ(2 − α)D α y ′′(x) − x1−α y ′′′ (0).

(29)

From Lemma 8, J 1−α y (4) (x) = Γ(2−α)y [2+α] (x)−

Γ(2 − α)y ′(0) Γ(2 − α)y ′′(0) − −x1−α y ′′′ (0), Γ(−α)x1+α Γ(1 − α)xα

α(1 − α)y ′(0) (1 − α)y ′′(0) − − x1−α y ′′′ (0). J y (x) = Γ(2 − α)y (x) + 1+α α x x 1−α (4) By substituting the expression (29) for J y (x) in (25) we obtain (28). 1−α (4)

[2+α]

The fourth-order expansion formula (9) of the L1 approximation for the Caputo derivative is obtained from the expansion (28) of Lh [y] by dividing by Γ(2 − α). The error and order of approximation (9) for the functions y(x) = ex and y(x) = sin x are given in Table 3. In Theorem 13 we use the first terms of expansion (9) to derive the formula for the three-point compact approximation (3) for the Caputo derivative. Claim 12. Suppose that y is a sufficiently differentiable function. Then y(x) +

 h2 ′′ 13 1 1 y (x) = y(x) − y(x − h) + y(x − 2h) + O h3 . 12 12 6 12

Proof. From Taylor expansion at the point x

 h2 ′′ y (x) + O h3 , 2  y(x − 2h) = y(x) − 2hy ′(x) + 2h2 y ′′(x) + O h3 . y(x − h) = y(x) − hy ′ (x) +

Then

 13 1 1 h2 ′′ y(x) − y(x − h) + y(x − 2h) = y(x) + y (x) + O h3 . 12 6 12 12

23

Theorem 13. Suppose that the funcyion y is a sufficiently differentiable function on the interval [0, xn ] and y ′ (0) = 0. Then n X  13 (α) 1 (α) 1 (α) 1 (α) 3−α δ y = y − y + y + O h . n−k n n−1 n−2 k Γ(2 − α)hα k=0 12 6 12

Proof. The L1 approximation has expansion of order 3 − α, n 2 X 1 Lh [y] (α) (α) [2+α] h σ y = = y + y n−k n n Γ(2 − α)hα k=0 k Γ(2 − α) 12

+ From Claim 12, yn(α) + yn[2+α]

 ζ(α − 1) ′′ 2−α yn h + O h3−α . Γ(2 − α)

 13 1 (α) 1 (α) h2 = yn(α) − yn−1 + yn−2 + O h3 . 12 12 6 12

The second-order backward difference approximation for the second derivative has first-order accuracy yn′′ =

yn − 2yn−1 + yn−2 + O (h) . h2

Then n X 1 13 1 1 (α) σk yn−k = y (α) (x) − y (α) (x − h) + y (α) (x − 2h) α Γ(2 − α)h k=0 12 6 12    ζ(α − 1) yn − 2yn−1 + yn−2 + h2−α + O h3−α , 2 Γ(2 − α) h n−1 X  13 (α) 1 (α) 1 (α) 1 (α) 3−α δ y = y − y + y + O h . n−k n n−1 n−2 k Γ(2 − α)hα k=0 12 6 12

24

Table 3: Error and order of the expansion (9) of the L1 approximation for the Caputo derivative for the functions y(t) = et and α = 0.4, x = 2 (left) and y(t) = sin t, α = 0.6, x = 1 (right). h Error 0.05 2.21 × 10−6 0.025 1.34 × 10−7 0.0125 8.22 × 10−9 0.00625 5.07 × 10−10 0.003125 3.15 × 10−11 5

Order 4.059140 4.042368 4.029349 4.019796 4.009793

h Error 0.05 2.26 × 10−8 0.025 1.40 × 10−9 0.0125 8.71 × 10−11 0.00625 5.43 × 10−12 0.003125 3.51 × 10−13

Order 4.046316 4.013357 4.008679 4.003960 3.950424

Numerical Experiments

The fractional relaxation and subdiffusion equations are important fractional differential equations. Their analytical and numerical solutions have been studied extensively [3, 9, 12, 13, 14, 17, 20, 31, 38, 42, 44, 54]. In this section we determine the numerical solutions of the fractional relaxation and subdiffusion equations which use the compact modified L1 approximation for the Caputo derivative n X  13 1 (α) 1 (α) 1 (α) δk yn−k = yn(α) − yn−1 + yn−2 + O h3−α . α Γ(2 − α)h k=0 12 6 12

The fractional relaxation equation

y (α) (x) + λy(x) = F (x), y(0) = 1, has the solution α

y(x) = Eα (−λx ) +

Z

x

0

ξ α−1 Eα,α (−λξ α ) F (x − ξ)dξ.

The analytical solution of the subdiffusion equation   ∂ α u(x, t) ∂ 2 u(x, t) = , α 2 ∂t ∂x  u(x, 0) = u (x), u(0, t) = u(π, t) = 0, 0

is determined with the separation of variables method u(x, t) =

∞ X

cn Eα (−n2 tα ) sin(nx),

n=1

25

(30)

where the numbers cn are the coefficients of the Fourier sine series of the initial condition u0 (x), Z 2 π cn = u0 (ξ) sin(nξ)dξ. π 0 N In [13, 14] we derived the numerical solutions {un }N n=0 and {vn }n=0 of the fractional relaxation equation (30) which use the L1 approximation and the modified L1 approximation for the Caputo derivative, ! n X 1 (α) un = (α) σk un−k , (L1) Γ(2 − α)hα Fn − α σ0 + λh Γ(2 − α) k=1 ! n X 1 (α) Γ(2 − α)hα Fn − δk vn−k , (ML1) vn = (α) α δ0 + λh Γ(2 − α) k=1

and initial values u0 = v0 = y(0). We may also need to approximate the value of y1 = y(h). A good choice for approximating y1 is obtained from the recurrence formula of numerical solution (L1), u1 = v1 =

y(0) + Γ(2 − a)ha F (h) . 1 + λΓ(2 − a)ha

In [14] we discuss a method for improving the differentiability class of the solutions of the fractional relaxation and subdiffusion equations. The method is based on a substitution using the fractional Taylor polynomials of the solution. When known in advance that y(0) = y ′ (0) = 0, we may also set u1 = v1 = 0. This choice guarantees that the approximations u1 and v1 for the value of y1 = y(h) have a second-order accuracy O (h2 ). 5.1

Numerical Solution of the Fractional Relaxation Equation

Now we construct the numerical solution of the fractional relaxation equation on the interval [0, 1] using the compact modified L1 approximation for the Caputo derive y (α) (x) + λy(x) = F (x), (31) Let h = 1/N and xk = kh. n X 1 13 1 (α) 1 (α) (α) δk yn−k ≈ yn(α) − yn−1 + yn−2 . α Γ(2 − α)h k=0 12 6 12

26

(α)

From (31) with x = xk we obtain yk = Fk − λyk . Then n X 1 13 1 (α) δk yn−k ≈ (Fn −λyn ) − (Fn−1 − λyn−1 ) α Γ(2 − α)h k=0 12 6

+

1 (Fn−2 − λyn−2) . 12

Let wn be an approximation for the solution yn at the point xn = nh. The numbers wn are computed recursively with w0 = y0 = y(0) and n X 13 1 (α) δk wn−k = (Fn − λwn ) α Γ(2 − α)h k=0 12



wn =

1 (α) 12δ0

+ 13λ(2 − α)hα

1 1 (Fn−1 − λwn−1 ) + (Fn−2 − λwn−2 ) , 6 12

− 12

n X k=1

(α)

δk wn−k + Γ(2 − α)hα (13Fn − !

−2(Fn−1 − λwn−1) + Fn−2 − λwn−2) .

(CML1)

In Table 4 and Table 5 we compute the maximum error and order of numerical solutions (L1),(ML1) and (CML1) for the fractional relaxation equations (32) and (34) on the interval [0, 1]. • The linear ordinary fractional differential equation y (α) + y = x3−α +

Γ(4 − α) 3−2α x , Γ(4 − 2α)

y(0) = 0

(32)

has the solution y(x) = x3−a . Numerical solutions (ML1) and (CML1) are highly accurate approximations for the solution of equation (32), and their graphs are indistinguishable. In Figure 1 and Figure 2 we compare numerical solutions (ML1) and (CML1) with numerical solution (L1) on the interval [0, 1], when h = 0.1. • The fractional relaxation equation y (α) + y = xα , 27

y(0) = 1

(33)

Table 4: Maximum error and order of numerical solutions (L1),(ML1) and (CML1) for relaxation equation (32) on the interval [0, 1], when α = 0.3. h 0.05 0.025 0.0125 0.00625 0.003125

L1

ML1 Error Order

Error

Order

0.00169 0.00055 0.00018 0.00006 0.00002

1.59220 0.0004066 1.61990 0.0001101 1.63900 0.0000288 1.65275 7.4 × 10−6 1.66295 1.9 × 10−6

Figure 1: Graph of the solution of equation (32) and numerical solutions (L1) (red) and (ML1) (gray) for α = 0.75.

CML1 Error Order

1.78691 0.0003071 1.88486 0.0000473 1.93403 7.3 × 10−6 1.96103 1.1 × 10−6 1.97659 1.7 × 10−7

2.7 2.7 2.7 2.7 2.7

Figure 2: Graph of the solution of equation (32) and numerical solutions (L1) (red) and (CML1) (black) for α = 0.95.

has the solution y(x) = Eα (−xa ) + Γ(α + 1)x2α Eα,2α+1 (−xa ). The function Eα (−xa ) has an unbounded first derivative at x = 0. The numerical solutions (L1) and (ML1) of relaxation equation (33) have accuracy O (hα ). In [14] we described a method for improving the accuracy of the numerical solutions of the fractional relaxation and subdiffusion equations. The method uses the fractional Taylor polynomials of the solution Tm(α) (x)

m X y [nα](0) αn = x . Γ(αn + 1) n=0

Now we determine the values of the Miller-Ross derivatives of the solution

28

at the initial point x = 0, y [0] (0) = y(0) = 1,

y [α] (0) = y (α) (0) = −1.

By applying fractional differentiation of order α to both sides of equation (33) we obtain y [2α] (x) + y [α] (x) = Γ(α + 1), y [3α] (x) + y [2α] (x) = 0, y [4α] (x) + y [3α] (x) = 0,

y [2α] (0) = 1 + Γ(α + 1),

y [3α] (0) = −(1 + Γ(α + 1)), y [4α] (0) = 1 + Γ(α + 1).

By induction we can show that y [nα](0) = (−1)n (1 + Γ(α + 1)). The solution of relaxation equation (33) has fractional Taylor polynomials Tm(α) (x)

m X xα (−1)n =1− + (1 + Γ(α + 1)) xnα . Γ(α + 1) Γ(αn + 1) n=2

Now we apply the method from [14]. Substitute

z(x) = y(x) − Tm(α) (x). The function z(x) is a solution of the fractional relaxation equation z (α) + z = (−1)m+1

Γ(a + 1) + 1 am x , Γ(am + 1)

z(0) = 0.

(34)

Equation (34) has the solution z(x) = Eα (−xa ) + Γ(α + 1)x2α Eα,2α+1 (−xa ) − 1

m X xα (−1)n + − (1 + Γ(α + 1)) xnα . Γ(α + 1) Γ(αn + 1) n=2

When α = 0.6 and m = 4 the solution of equation (33) has a continuous third derivative on the interval [0, 1] and z(0) = z ′ (0) = z ′′ (0) = 0. In Table 5 we compute the maximum error and the order of numerical solutions (L1),(ML1) and (CML1) of the fractional relaxation equation (34) on the interval [0, 1]. The error of numerical solution (CML1) is smaller than the errors of (L1) and (ML1) when h ≤ 0.0125. The numerical results from Table 4 and Table 5 are consistent with the expected accuracy O (h2−α ),O (h2 ) and O (h3−α ) of numerical solutions (L1),(ML1),(CML1) for the fractional relaxation equation. 29

Table 5: Maximum error and order of numerical solutions (L1),(ML1) and (CML1) of the fractional relaxation equation (34), when α = 0.6 and m = 4. L1

h 0.05 0.025 0.0125 0.00625 0.003125 5.2

ML1 Error Order

Error

Order

0.00192 0.00075 0.00029 0.00011 0.00004

1.33168 0.0000367 1.36199 0.0000127 1.37706 4.2 × 10−6 1.38564 1.3 × 10−6 1.39085 3.5 × 10−7

CML1 Error Order

2.94874 0.0000910 1.57164 0.0000179 1.57238 3.5 × 10−6 1.73716 6.6 × 10−7 1.82637 1.3 × 10−7

2.29541 2.34716 2.36921 2.38225 2.38973

Numerical Solutions of the Fractional Subdiffusion Equation

M Let GN be a rectangular grid on [0, X] × [0, T ], M GN = {(xn , tm ) = (nh, mτ )|n = 0, · · · , N; m = 0, · · · , M},

where h = X/N, τ = T /M and the numbers N and M are positive integers. In [13, 14] we derived the numerical solutions of the time-fractional subdiffusion equation on the rectangle [0, X] × [0, T ],   ∂αu ∂2u = + F (x, t), (x, t) ∈ [0, X] × [0, T ], α 2 (35) ∂t ∂t  u(x, 0) = u (x), u(0, t) = u (t), u(X, t) = u (t), 0 L R

which use the L1 approximation (1) and the modified L1 approximation (2) for the Caputo derivative. Let Unm be an approximation for the value of the solution of the subdiffusion equation um n = u(nh, mτ ) and n X 1 (α) ρk yn−k ≈ yn(α) , α Γ(2 − α)h k=0

(36)

be an approximation for the Caputo derivative. The finite-difference scheme for the subdiffusion equation which uses approximation (36) is KU m = Rm ,

(37)

where η = Γ(2 − α)τ α /h2 and the matrix K is a tridiagonal square matrix (α) with values ρ0 + 2η on the main diagonal, and −η on the diagonals above 30

and below the main diagonal,   (α) ρ0 + 2η −η 0 0 0 (α)   −η ρ0 + 2η −η 0 0     (α) K5 =  . 0 −η ρ0 + 2η −η 0   (α)  0 0 −η ρ0 + 2η −η  (α) 0 0 0 −η ρ0 + 2η

The vector U m is an (N − 1)-dimensional vector whose elements Unm are M approximations of the solution on the mth layer of the grid GN . The vector m R has elements m X (α) R1m = Γ(2 − α)τ α F1m − ρk U1m−k + ηuL (mτ ), k=1

Rnm = Γ(2 − α)τ α Fnm −

m X

(α)

ρk Unm−k ,

k=1

m α m RN −1 = Γ(2 − α)τ FN −1 −

m X

(2 ≤ n ≤ N − 2),

(α)

ρk UNm−k −1 + ηuR (mτ ).

k=1

We denote by [L1] and [ML1] the  numerical solutions (37) of the subdiffusion  (α) (α) and the modified L1 approxwhich use the L1 approximation ρk = σk   (α) (α) imation ρk = δk . Now we construct a compact finite-difference scheme for numerical solution of the subdiffusion equation using approximation (3) for the Caputo derivative on the three-point stencil {(xn , tm ), (xn , tm−1 ), (xn , tm−2 )}, M of the grid GN .

m X 1 13 ∂ α u(xn , tm ) 1 ∂ α u(xn , tm−1 ) (α) δ u(x , t ) = − n m−k Γ(2 − α)τ α k=0 k 12 ∂tα 6 ∂tα

+ From equation (35) we have

 1 ∂ α u(xn , tm−2 ) 3−α + O τ . 12 ∂tα

∂ 2 ukn ∂ α ukn = + Fnk . α 2 ∂t ∂x 31

Then m

X (α) 1 13 m−k δ u = n k Γ(2 − α)hα k=0 12

Denote



   1 ∂ 2 um−1 ∂ 2 um ) n n m m−1 + Fn − + Fn ∂x2 6 ∂x2    1 ∂ α um−2 n 3−α m−2 + + O τ . + F n 12 ∂x2

13 m 1 m−1 1 Fn − Fn + Fnm−2 . 12 6 12 By approximating the second derivatives in the space direction using the second-order central difference approximation we obtain m X  13η m (α) (α) m α m δk um−k = δ 0 um + un−1 − 2um n n n + un+1 + Γ(2 − α)h Gn 12 k=1    η η m−1 m−2 3−α un−1 − 2um−1 + um−1 um−2 + um−2 + h2 . − n n+1 + n−1 − 2un n+1 + O τ 6 12 The numbers Unm ≈ vnm satisfy the equations ! 13η m 13η 13η m (α) Unm − Un−1 + δ0 + U = Γ(2 − α)τ α Gm − n 12 6 12 n+1 Gm n =

m X

 η m−1 m−1 Un−1 − 2Unm−1 + Un+1 6 k=1  η m−2 m−2 + Un−1 − 2Unm−2 + Un+1 , 12 where 1 ≤ n ≤ N − 1 and 1 ≤ m ≤ M. By considering the boundary conditions we obtain the three-point compact finite-difference scheme for the time fractional subdiffusion equation −

(α)

δk Unm−k −

KU m = Rm ,

(38) (α)

where K is a triangular (N − 1) × (N − 1) matrix with values δ0 + 13η/6 on the main diagonal, and −13η/12 on the diagonals above and below the main diagonal,   (α) δ0 + 13η/6 −13η/12 0 0 0 (α)   −13η/12 δ0 + 13η/6 −13η/12 0 0     (α) K5 =  . 0 −13η/12 δ0 + 13η/6 −13η/12 0   (α)  0 0 −13η/12 δ0 + 13η/6 −13η/12  (α) 0 0 0 −13η/12 δ0 + 13η/6 32

The vector Rm is an (N − 1)-dimensional vector with elements R1m

Gm 1

= Γ(2 − α)τ

α

Gm n

and Rnm



m X



m X

13 1 uL (mτ ) − uL ((m − 1)τ ) 12 6 k=1   1 η η + uL ((m − 2)τ ) − −2U1m−1 + U2m−1 + −2U1m−2 + U2m−2 , 12 6 12

= Γ(2 − α)τ

α

(α)

δk U1m−k +

(α)

δk Unm−k

k=1

  η η m−1 m−1 m−2 m−2 − Un−1 − 2Unm−1 + Un+1 + Un−1 − 2Unm−2 + Un+1 , 6 12

for 2 ≤ n ≤ N − 2 m RN −1

m X

13 1 uR (mτ ) − uR ((m − 1)τ ) 12 6 k=1   η η 1 m−1 m−2 UNm−1 UNm−2 + + uR ((m − 2)τ ) − −2 − 2U1 −2 − 2UN −1 . 12 6 12

=Γ(2 − α)τ

α

Gm N −1



(α)

δk UNm−k −1 +

Denote by [CML1] the three-point compact finite-difference scheme (38) for the time-fractional subdiffusion equation. In Table 6 and Table 7 we compute the order of numerical solutions [L1], [ML1], [CML1] in the directions of space and time. The orders are computed by fixing the value of one of the parameters N = 50 or M = 50 and computing the order of the numerical solution by doubling the value of the other parameter. • The fractional subdiffusion equation   ∂αu ∂2u = + F (x, t) (x, t) ∈ [0, 1] × [0, 1], (39) ∂tα ∂t2  u(x, 3−α 3−α 0) = 0, u(0, t) = uL (t) = t , u(1, t) = uR (t) = 6t , where

F (x, t) =

 Γ(4 − α) 1 + 2x2 + 3x3 t3−2α − (4 − 18x)t3−α , Γ(4 − 2α)

has the solution u(x, t) = (1 + 2x2 + 3x3 ) t3−α . The solution of equation (39) satisfies the condition y ′ (0) = 0. 33

Table 6: Space and time orders of numerical solutions [L1], [ML1] and [CML1] for equation (39) on the interval [0, 1], when α = 0.4. h/τ 0.0125 0.00625 0.003125 0.0015625 0.00078125

L1 Space

T ime

1.99957 1.99990 2.00107 1.99926 2.01012

1.52246 1.55257 1.56733 1.57640 1.58260

ML1 Space T ime 1.99969 1.99951 2.01293 2.09988 2.16357

1.95593 1.93991 1.95242 1.96646 1.97727

CML1 Space T ime 1.9989 1.99972 1.99993 1.99995 2.00010

2.16901 2.42599 2.51445 2.55358 2.57319

• The fractional subdiffusion equation   ∂αu ∂2u = (x, t) ∈ [0, π] × [0, π], α 2 ∂t ∂t  u(x, 0) = sin x, u(0, t) = 0, u(π, t) = 0,

(40)

has the solution u(x, t) = sin xEα (−tα ). In [14] we determined the partial Miller-Ross derivatives of the solution at t = 0, ∂ nα u(x, t) = (−1)n sin x. nα ∂t t=0

The solution of (40) has fractional Taylor polynomials of at t = 0 Tm(α) (x, t)

= sin x

m X

(−1)n

n=0

Substitute v(x, t) = u(x, t) − sin x

m X n=0

tnα . Γ(nα + 1)

(−1)n

tnα . Γ(nα + 1)

The function v(x, t) is a solution of the subdiffusion equation [14]  α ∂ 2 v(x, t) tmα  ∂ v(x, t) m+1 = + (−1) sin x , ∂tα ∂x2 Γ(mα + 1)  v(x, 0) = v(0, t) = v(π, t) = 0. 34

When α = 0.5, m = 4 we obtain the equation   ∂ 0.5 u(x, t) ∂ 2 u(x, t) t2 sin x = − , 0.5 2 ∂t ∂x 2  u(x, 0) = sin x, u(0, t) = u(π, t) = 0,

(41)

When α = 0.5, m = 5 we obtain the equation  √  ∂ 0.5 u(x, t) ∂ 2 u(x, t) 15 πt2.5 sin x = + , 0.5 2 ∂t ∂x 8  u(x, 0) = sin x, u(0, t) = u(π, t) = 0,

(42)

In Table 7 we compute the orders of numerical solutions [L1], [ML1], [CML1] for the subdiffusion equations (41) and (42) in the space and time directions. Table 7: Space and time orders of numerical solutions [L1], [ML1] for equation (41) and numerical solution [CML1] for equation (42) h/τ 0.03926991 0.01963495 0.00981748 0.00490874 0.00245437

6

L1 Space

T ime

2.00023 2.00006 2.00001 2.00000 2.00000

1.3777 1.44914 1.47435 1.48522 1.49071

ML1 Space T ime 2.00015 2.00004 2.00001 2.00000 2.00000

2.43060 2.22449 2.10396 2.04184 2.01288

CML1 Space T ime 2.00022 2.00006 2.00001 2.00000 2.00001

2.14451 2.35878 2.43433 2.46707 2.48269

Conclusions

In the present paper we obtained the compact modified L1 approximation (3) for the Caputo fractional derivative and we computed the numerical solutions of the fractional relaxation and subdiffusion equations. Numerical solution (38) is the first three-point compact finite-difference scheme for the fractional subdiffusion equation which uses the coefficients of the L1 approximation and the value of the Riemann zeta function at the point α − 1. The accuracy of the compact modified L1 approximation is O (h3−α ), while the three-point compact Gr¨ nwald approximation (5) has accuracy O (h3 ). One advantage of 35

compact approximation (3) is that the coefficients on the right-hand side are the same for all values of α, as well as the that the only requirement for the function y is that y ′(0) = 0. An important question for future work is to prove the convergence of the numerical methods discussed in the paper. Another question for future work is to derive higher-order compact approximations based on the the L1 approximation and Gr¨ unwald formula approximation for the Caputo derivative. References [1] M. Abbaszadeh , A. Mohebbi: A fourth-order compact solution of the two-dimensional modified anomalous fractional sub-diffusion equation with a nonlinear source term, Computers & Mathematics with Applications, 66(8) (2013), 1345–1359. [2] M. Abramowitz, I. A. Stegun: Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables, Dover, New York; 1964. [3] A. A. Alikhanov :A new difference scheme for the time fractional diffusion equation, 280 (2015), 424–438. [4] J. Cao, C. Li, Y. Q. Chen: High-order approximation to Caputo derivatives and Caputo-type advection-diffusion equations (II), Fractional Calculus and Applied Analysis, 18(3) (2015), 735–761. [5] L. Blank: Numerical treatment of differential equations of fractional order, Numerical Analysis Report No. 287, The University of Manschester (1996). [6] A. Cartea, D. del Castillo-Negrete: Fractional diffusion models of option prices in markets with jumps, Physica A, 374(2) (2007), 749–763. [7] Minghua Chen, Weihua Deng: Fourth Order Accurate Scheme for the Space Fractional Diffusion Equations, SIAM J. Numer. Anal., 52(3) (2014), 1418–1438. [8] Minghua Chen, Weihua Deng: WSLD operators II: the new fourth order difference approximations for space Riemann-Liouville derivative,, arXiv:1306.5900 (2014). [9] W. Deng, C. Li: Numerical Schemes for Fractional Ordinary Differential Equations, In: Miidla, P. (ed.) Numerical Modelling. InTech, Rijeka (2012), 355–374. [10] K. Diethelm: An algorithm for the numerical solution of differential equations of fractional order, Electronic Transactions on Numerical Analysis, 5 (1997), 1–6. 36

[11] K. Diethelm: The Analysis of Fractional Differential Equations: An Application-Oriented Exposition Using Differential Operators of Caputo Type, Springer; 2010. [12] Y. Dimitrov: Numerical approximations for fractional differential equations, Journal of Fractional Calculus and Applications, 5(3S) (2014), No. 22, 1–45. [13] Y. Dimitrov: A second order approximation for the Caputo fractional derivative, arXiv:1502.00719 (2015). [14] Y. Dimitrov: A new method for numerical solution of the fractional relaxation and subdiffusion equations using fractional Taylor polynomials, arXiv:1503.02958 (2015). [15] A. El-Ajou, O. Arqub, Z. Zhour, S. Momani: New results on fractional power series: theory and applications, Entropy, 15 (2013), 5305-5323. [16] G.-H. Gao, H.-W. Sun: Three-point combined compact difference schemes for time-fractional advection-diffusion equations with smooth solutions, Journal of Computational Physics, 298(1) (2015), 520–538. [17] G.-H. Gao, H.-W. Sun, Z.-Z. Sun: Stability and convergence of finite difference schemes for a class of time-fractional sub-diffusion equations based on certain superconvergence, Journal of Computational Physics, 280 (2015), 510–528. [18] G. Gao, Z. Sun, Y. Zhang: A finite difference scheme for fractional sub-diffusion equations on an unbounded domain using artificial boundary conditions, Journal of Computational Physics 231(7) (2012), 2865– 2879. [19] G. H. Gao, Z. Z. Sun, H. W. Zhang: A new fractional numerical differentiation formula to approximate the Caputo fractional derivative and its applications, J. Comput. Phys., 259 (2014), 33–50. ¨ urk, A. Anapalı: Numerical approach for solving frac[20] M. G¨ ulsu, Y. Ozt¨ tional relaxation-oscillation equation, Applied Mathematical Modelling, 37(8) (2013), 5927–5937. [21] F. Huang, F. Liu: The space-time fractional diffusion equation with Caputo derivatives, Journal of Applied Mathematics and Computing, 19(1) (2005), 179–190. [22] M. Ishteva: Properties and applications of the Caputo fractional operator, Master thesis, University of Karlsurhe (2005). [23] C.-C. Ji, Z.-Z. Sun: High-order compact finite difference scheme for the fractional sub-diffusion equation, Journal of Scientific Computing, 64(3) (2015), 959–985. 37

[24] C.-C. Ji , Z.-Z. Sun: The high-order compact numerical algorithms for the two-dimensional fractional sub-diffusion equation, Applied Mathematics and Computation, 269 (2015), 775–79. [25] B. S. Jovanovi´c, L. G. Vulkov, A. Deli´c: Boundary value problems for fractional PDE and their numerical approximation, Numerical Analysis and Its Applications, Lecture Notes in Computer Science, Springer, 8236 (2013),38–49. [26] T. Kaczorek, K. Rogowski: Fractional Linear Systems and Electrical Circuits, Springer (2015). [27] O. Kouba: Bernoulli Polynomials and Applications, Lecture Notes (2013). [28] K. Krishnaveni, K. Kannan, S. R. Balachandar: Polynomial approximation method for solving composite fractional relaxation/oscillation equations, World Applied Sciences Journal 25(12) (2013) 1789–1796. [29] V. Lampret: The Euler-Maclaurin and Taylor Formulas: Twin, Elementary Derivations, Mathematics Magazine, 74(2) (2001), 109–122. [30] B.Jin, R. Lazarov, Z. Zhou: Two fully discrete schemes for fractional diffusion and diffusion-wave equations, arXiv:1404.3800 (2015). [31] B.Jin, R. Lazarov, Z. Zhou: An analysis of the L1 scheme for the subdiffusion equation with nonsmooth data, arXiv:1501.00253 (2015). [32] C. Li, W. Deng, Y. Wu: Numerical analysis and physical simulations for the time fractional radial diffusion equation, Computers and Mathematics with Applications 62(3) (2011), 1024–1037. [33] C. Li, A. Chen, J. Ye: Numerical approaches to fractional calculus and fractional ordinary differential equation, Journal of Computational Physics 230(9) (2011) 3352–3368. [34] C. Li, H. Ding: Higher order finite difference method for the reaction and anomalous-diffusion equation, 38(1516) (2014), 3802–382. [35] C. Li, R. Wu, H. Ding: High-order approximation to Caputo derivatives and Caputo-type advection-diffusion equations, Communications in Applied and Industrial Mathematics, 6(2) (2015). [36] C. Li, T. Zhao, W. Deng, Y. Wu: Orthogonal spline collocation methods for the subdiffusion equation, Journal of Computational and Applied Mathematics, 255 (2014), 517–528. [37] P. M. Lima, N. J. Ford, P. M. Lumb: Computational methods for a mathematical model of propagation of nerve impulses in myelinated axons, Applied Numerical Mathematics 85 (2014), 38–53. [38] Y. Lin, C. Xu: Finite difference/spectral approximations for the time38

[39] [40] [41] [42]

[43]

[44] [45] [46]

[47] [48]

[49]

[50]

[51]

[52]

fractional diffusion equation, Journal of Computational Physics, 225(2) (2007), 1533–1552. C. Lubich: Discretized fractional calculus, SIAM J. Math. Anal., 17 (1986), 704–719. F, Mainardi: Fractional relaxation-oscillation and fractional diffusionwave phenomena, Chaos, Solitons & Fractals, 7(9) (1996), 1461–1477. K.S. Miller, B. Ross: An Introduction to the Fractional Calculus and Fractional Differential Equations, John Wiley & Sons, New York (1993). D. A. Murio: Implicit finite difference approximation for time fractional diffusion equations , Computers & Mathematics with Applications, 56(4) (2008), 1138–1145. S. I. Muslih, Om P. Agrawal, D. Baleanu: A fractional Schr¨odinger equation and its solution, International Journal of Theoretical Physics, 49(8) (2010), 1746–1752. I. Podlubny: Fractional Differential Equations, Academic Press, San Diego (1999). A. Sidi: Euler-Maclaurin expansions for integrals with endpoint singularities: A new perspective, Numer. Math., 98(2) (2004), 371–387. Z. Wang, S. Vong: Compact difference schemes for the modified anomalous fractional sub-diffusion equation and the fractional diffusion-wave equation, Journal of Computational Physics 277 (2014), 1–15. S. Wei, W. Chen: A Matlab toolbox for fractional relaxation-oscillation equations, arXiv:1302.3384 (2013). ¨ K. Weierstrass: Uber die analytische Darstellbarkeit sogenannter willk¨ urlicher Functionen einer reellen Ver¨anderlichen, Sitzungsberichte der Akademie zu Berlin, (1885), 633–639 and 789–805. E. J. Weniger: Asymptotic approximations to truncation errors of series representations for special functions, in A. Iske and J. Levesley (Eds.), Algorithms for Approximation, (2007), 331–348. R. Wu, H. Ding, C. Li: Determination of coefficients of high-order schemes for Riemann-Liouville derivative, The Scientific World Journal, (2014), Article ID 402373. Y. Yan, K. Pal, N. J. Ford: Higher order numerical methods for solving fractional differential equations, BIT Numer Math 54(2) (2014), 555– 584. H. Ye, F. Liu, V. Anh: Compact difference scheme for distributed-order time-fractional diffusion-wave equation on bounded domains, Journal of Computational Physics 298 (2015), 652–660. 39

[53] F. Zeng, C. Li, F. Liu, I. Turner: The use of finite Difference/element approaches for solving the time-fractional subdiffusion equation, SIAM J. Sci. Comput., 35(6) (2013), A2976–A3000. [54] F. Zeng, C. Li, F. Liu, I. Turner: Numerical Algorithms for TimeFractional Subdiffusion Equation with Second-Order Accuracy, SIAM Journal on Scientific Computing, 37(1) (2015), A55–A78. [55] L. Zhao, W. Deng: A series of high-order quasi-compact schemes for space fractional diffusion equations based on the superconvergent approximations for fractional derivatives, Numerical Methods for Partial Differential Equations, 31(5) (2015), 1345–1381. [56] P. Zhuang, F. Liu: Implicit difference approximation for the time fractional diffusion equation, Journal of Applied Mathematics and Computing, 22(3) (2006), 87–99.

40