1 Introduction

In recent years, it has turned out that many phenomena in engineering, physics, chemistry, and other sciences can be described very successfully by models using mathematical tools from fractional calculus, i.e. the theory of derivatives and integrals of fractional (non-integer) order. There are many applications of the fractional differential equations (FDEs), see [110], and the studied models have received a great deal of attention like in the fields of viscoelastic materials [1], solutes in natural porous or fractured media [3], and anomalous diffusion. Most FDEs do not have exact solutions, so approximate and numerical techniques must be used [1121]. Recently, several numerical methods to solve FDEs have been given such as the variational iteration method [16], the Adomian’s decomposition method [21], the collocation method [2224], and the finite difference method [15, 17, 25]. In this section, we introduce the Riemann-Liouville definitions of the fractional derivative operator \(D^{\alpha}\) [26, 27].

Definition 1

The Riemann-Liouville derivative \(D^{\alpha}\) of order α of the function \(y(x)\) is defined by

$$ D^{\alpha}y(x)= \frac{1}{\Gamma(n-\alpha)} \frac{d^{n}}{dx^{n}} \int_{0}^{x}\frac{y(\tau)}{(x-\tau)^{\alpha -n+1}}\,d\tau,\quad x>0, \alpha>0, $$
(1)

where n is the smallest integer exceeding α and \(\Gamma(\cdot)\) is the Gamma function. If \(\alpha=m\in N\), then the above definition coincides with the classical mth derivative \(y^{(m)}(x)\).

In this paper, we will study the numerical solutions of the following fractional differential wave equation:

$$ D^{\alpha}u(x,t)=u_{xx}(x,t)+f(x,t), \quad 1< \alpha \leq2, $$
(2)

on a finite domain \(0 < x < L\), \(0 \leq t \leq T\), where \(f(x,t)\) is the source term and \(D^{\alpha}\) is the Riemann-Liouville derivative of order α with respect to the time t. Under the zero boundary conditions

$$ u(0,t) = u(L, t) = 0, $$
(3)

and the following initial conditions

$$ u(x,0)=g_{1}(x) \quad\mbox{and}\quad u_{t}(x,0)=g_{2}(x), $$
(4)

here \(g_{1}(x)\) and \(g_{2}(x)\) are given functions.

In the last few years there have appeared many papers studying the proposed model (2)-(4) [15, 17]. In this paper, we study the time fractional case and use an efficient class of finite difference methods based on the Hermite formula to solve this model.

The plan of the paper is as follows. In Section 2, we give some approximate formulas of the fractional derivatives and numerical finite difference scheme. In Section 3, we study the stability and the accuracy of the presented scheme. In Section 4, we introduce numerical solutions of fractional wave equation. The paper ends with some conclusions in Section 5.

2 Finite difference scheme of the fractional wave equation

In this section, we introduce an efficient class of FDM and use it to obtain the discretization finite difference formula of the time fractional wave equation (2). For some positive integer numbers N and M, we use the notations Δx and Δt for the space-step length and the time-step length, respectively. The coordinates of the mesh points are \(x_{j}=j\Delta x\) (\(j=0,1,\ldots,N\)), and \(t_{m}=m \Delta t\) (\(m=0,1,\ldots,M\)) and the values of the solution \(u(x, t)\) on these grid points are \(u(x_{j}, t_{m})\equiv u_{j}^{m}\simeq U_{j}^{m}\), where \(\Delta x =h=\frac{L}{N}\), \(\Delta t=k=\frac{T}{M}\).

For more details as regards discretization in fractional calculus see [9, 25, 28].

In the first step, the ordinary second order differential operators are discretized as follows [15]:

$$ \frac{\partial^{2} u}{\partial t^{2}}\bigg|_{x_{j},t_{m}}=\frac {u^{m+1}_{j}-2u^{m}_{j}+u^{m-1}_{j}}{k^{2}}+O \bigl(k^{2}\bigr). $$
(5)

Now, using equation (5), we can derive an efficient approximate formula of the fractional derivative for \(\frac{\partial^{\alpha} }{\partial t^{\alpha}}u(x,t)\) (\(1<\alpha \leq2\)) at the points \((x_{j},t_{m})\) as follows:

$$\begin{aligned} \frac{\partial^{\alpha}}{\partial t^{\alpha}}u(x_{j},t_{m}) =&\frac{1}{\Gamma(2-\alpha)} \int _{0}^{t_{m}}\frac{\partial^{2}}{\partial t^{2}}u(x_{j},s) (t_{m}-s)^{1-\alpha}\,ds \\ =&\frac{1}{\Gamma(2-\alpha)}\sum_{r=1}^{m} \int_{(r-1)k}^{rk} \biggl[\frac {u^{r+1}_{j}-2u^{r}_{j}+u^{r-1}_{j}}{k^{2}}+O \bigl(k^{2}\bigr) \biggr] (mk-s)^{1-\alpha}\,ds \\ =&\frac{1}{\Gamma(2-\alpha)(2-\alpha)}\sum_{r=1}^{m} \biggl[ \frac {u^{r+1}_{j}-2u^{r}_{j}+u^{r-1}_{j}}{k^{2}}+O\bigl(k^{2}\bigr) \biggr] \\ &{}\times\bigl[(m-r+1)^{2-\alpha}-(m-r)^{2-\alpha}\bigr] \bigl[k^{2-\alpha}\bigr] \\ =&\frac{1}{\Gamma(3-\alpha)k^{\alpha}}\sum_{r=1}^{m} \bigl(u^{r+1}_{j}-2u^{r}_{j}+u^{r-1}_{j} \bigr) \bigl[(m-r+1)^{2-\alpha}-(m-r)^{2-\alpha} \bigr] \\ &{}+\frac{1}{\Gamma(3-\alpha)}\sum_{r=1}^{m} \bigl[(m-r+1)^{2-\alpha}-(m-r)^{2-\alpha} \bigr]O\bigl(k^{4-\alpha} \bigr). \end{aligned}$$
(6)

The above formula can be rewritten as

$$\begin{aligned} \frac{\partial^{\alpha}u(x_{j},t_{m})}{\partial t^{\alpha}} =&A_{\alpha,k}\sum _{r=1}^{m}\omega^{(\alpha )}_{r} \bigl(u^{m-r+2}_{j}-2u^{m-r+1}_{j}+u^{m-r}_{j} \bigr) +\frac{1}{\Gamma(3-\alpha)}m^{2-\alpha}O\bigl(k^{4-\alpha}\bigr) \\ =&A_{\alpha,k}\sum_{r=1}^{m} \omega^{(\alpha)}_{r} \bigl(u^{m-r+2}_{j}-2u^{m-r+1}_{j}+u^{m-r}_{j} \bigr) +O{\bigl(k^{2}\bigr)}, \end{aligned}$$
(7)

where

$$ A_{\alpha,k}=\frac{1}{\Gamma(3-\alpha)k^{\alpha}} \quad\mbox{and}\quad \omega^{(\alpha)}_{r}=r^{2-\alpha}-(r-1)^{2-\alpha}. $$
(8)

We must note that \(\omega^{(\alpha)}_{r}\) satisfies the following facts:

  1. (1)

    \(\omega^{(\alpha)}_{r}> 0\), \(r=1,2,\ldots\) .

  2. (2)

    \(\omega^{(\alpha)}_{r}>\omega^{(\alpha +1)}_{r}\), \(r=1,2,\ldots\) .

Now, we are going to obtain the finite difference scheme of the fractional wave equation (2). To achieve this aim we evaluate this equation at the points of the grid \((x_{j},t_{m})\):

$$ \frac{\partial^{\alpha}}{\partial t^{\alpha}} u(x_{j},t_{m})= \frac{\partial^{2}u(x_{j},t_{m})}{\partial x^{2}}+f(x_{j},t_{m}). $$
(9)

Using equations (7) and (9), we have

$$ \frac{\partial^{2}u(x_{j},t_{m})}{\partial x^{2}}=A_{\alpha,k}\sum _{r=1}^{m}\omega^{(\alpha )}_{r} \bigl(u^{m-r+2}_{j}-2u^{m-r+1}_{j}+u^{m-r}_{j} \bigr)-f(x_{j},t_{m}) +O{\bigl(k^{2}\bigr)}. $$
(10)

In order to get two additional equations, replace j by \(j - 1\) and \(j+ 1\), respectively, in the above equation, so we have

$$ \frac{\partial^{2}u(x_{j-1},t_{m})}{\partial x^{2}}=A_{\alpha,k}\sum _{r=1}^{m}\omega^{(\alpha)}_{r} \bigl(u^{m-r+2}_{j-1} -2u^{m-r+1}_{j-1}+u^{m-r}_{j-1} \bigr)-f(x_{j-1},t_{m}) +O{\bigl(k^{2}\bigr)}, $$
(11)

and

$$ \frac{\partial ^{2}u(x_{j+1},t_{m})}{\partial x^{2}} =A_{\alpha,k}\sum _{r=1}^{m}\omega^{(\alpha )}_{r} \bigl(u^{m-r+2}_{j+1}-2u^{m-r+1}_{j+1}+u^{m-r}_{j+1} \bigr)-f(x_{j+1},t_{m}) +O{\bigl(k^{2}\bigr)}. $$
(12)

The Hermite formula with two-order derivatives at the grid point \((x_{j},t_{m})\) is

$$ \begin{aligned}[b] &\frac{\partial^{2}u(x_{j-1},t_{m})}{\partial x^{2}}+10\frac{\partial^{2}u(x_{j},t_{m})}{\partial x^{2}} +\frac{\partial^{2}u(x_{j+1},t_{m})}{\partial x^{2}}- \frac{12}{h^{2}} \bigl(u(x_{j-1},t_{m}) \\ &\quad{}-2u(x_{j},t_{m})+u(x_{j+1},t_{m}) \bigr) =O \bigl(h^{4} \bigr). \end{aligned} $$
(13)

Substitute from equations (10)-(12) into equation (13), and denote \(u(x_{j},t_{m})\) by \(u_{j}^{m}\), then with neglect the high order terms and under some simplifications, we can obtain the following form:

$$\begin{aligned} &\frac{1}{6} h^{2}A_{\alpha,k}\sum _{r=2}^{m}\omega_{r}^{(\alpha)} \bigl(u_{j-1}^{m-r+2}-2u_{j-1}^{m-r+1}+u_{j-1}^{m-r} \bigr)-2 \biggl(1+\frac{1}{6}h^{2}A_{\alpha,k} \biggr)u_{j-1}^{m} -\frac{h^{2}}{6}f_{j-1}^{m} \\ &\quad{}+\frac{5}{3} h^{2}A_{\alpha,k} \sum _{r=2}^{m}\omega_{r}^{(\alpha)} \bigl(u_{j}^{m-r+2}-2u_{j}^{m-r+1}+u_{j}^{m-r} \bigr) -2 \biggl(\frac{5}{3}h^{2}A_{\alpha,k}-2 \biggr)u_{j}^{m}-\frac {h^{2}}{6}f_{j+1}^{m} \\ &\quad{}+\frac{1}{6} h^{2} A_{\alpha,k} \sum _{r=2}^{m}\omega_{r}^{(\alpha)} \bigl(u_{j+1}^{m-r+2} -2u_{j+1}^{m-r+1}+u_{j+1}^{m-r} \bigr)-2 \biggl(1+\frac{1}{6}h^{2}A_{\alpha,k} \biggr)u_{j+1}^{m} -\frac{5h^{2}}{3}f_{j}^{m} \\ &\quad{}+\frac{1}{6}h^{2}A_{\alpha,k} \bigl(u_{j-1}^{m+1}+u_{j-1}^{m-1}+u_{j+1}^{m+1}+u_{j+1}^{m-1} \bigr) +\frac{5}{3}h^{2}A_{\alpha,k} \bigl(u_{j}^{m+1}+u_{j-1}^{m-1} \bigr)=0. \end{aligned}$$
(14)

Let \(U_{j}^{m}\) be the approximate solution, and let \(T_{j}^{m}=u_{j}^{m}-U_{j}^{m}\), \(j=1,2,\ldots,N\), \(m=1,2,\ldots,M\) be the error, then we have the error formula

$$\begin{aligned} &\frac{1}{6} h^{2} A_{\alpha,k} \sum _{r=2}^{m}\omega_{r}^{(\alpha)} \bigl(T_{j-1}^{m-r+2}-2T_{j-1}^{m-r+1}+T_{j-1}^{m-r} \bigr) + \frac{5}{3} h^{2}A_{\alpha,k}\sum _{r=2}^{m}\omega_{r}^{(\alpha)} \\ &\quad{}\times\bigl(T_{j}^{m-r+2}-2T_{j}^{m-r+1}+T_{j}^{m-r} \bigr) +\frac{1}{6}h^{2}A_{\alpha,k}\sum _{r=2}^{m}\omega_{r}^{(\alpha)} \bigl(T_{j+1}^{m-r+2}-2T_{j+1}^{m-r+1}+T_{j+1}^{m-r} \bigr) \\ &\quad{}-2 \biggl(1+\frac{1}{6}h^{2}A_{\alpha,k} \biggr)T_{j-1}^{m}-2 \biggl(\frac{5}{3}h^{2}A_{\alpha,k}-2 \biggr)T_{j}^{m}-2 \biggl(1+\frac {1}{6}h^{2}A_{\alpha,k} \biggr)T_{j+1}^{m} \\ &\quad{}+\frac{1}{6}h^{2}A_{\alpha,k} \bigl(T_{j-1}^{m+1}+T_{j-1}^{m-1}+T_{j+1}^{m+1}+T_{j+1}^{m-1} \bigr) +\frac{5}{3}h^{2}A_{\alpha,k} \bigl(T_{j}^{m+1}+T_{j-1}^{m-1} \bigr)=0, \end{aligned}$$
(15)

with

$$ T_{0}^{m}=T_{N}^{m}=0, \quad m=1,2,\ldots,M. $$
(16)

Proposition 1

Assuming that the solution of (15) has the form \(T_{j}^{m}=\xi_{m}e^{\mathrm{i}\beta j h}\), then

$$\begin{aligned} \xi_{m} =&\frac{\frac{1}{6}h^{2}A_{\alpha,k} (5+\cos(\beta h))}{2 (1+\frac{1}{6}h^{2}A_{\alpha,k} )\cos(\beta h)+\frac{5}{3}h^{2}A_{\alpha,k}-2} \\ &{}\times\Biggl[\xi_{m+1}+\xi_{m-1}+ \sum _{r=2}^{m}\omega_{r}^{(\alpha)} ( \xi_{m-r+2}-2\xi_{m-r+1}+\xi_{m-r} )\Biggr], \end{aligned}$$
(17)

where \(\beta= 2\pi m\).

Proof

Substitute in (15) by \(T_{j}^{m}=\xi_{m}e^{\mathrm{i} \beta j h}\) and divide by \(e^{\mathrm{i} \beta j h}\), we get

$$\begin{aligned} &\frac{1}{6} h^{2} A_{\alpha,k} \sum _{r=2}^{m}\omega_{r}^{(\alpha)} ( \xi_{m-r+2}-2\xi_{m-r+1}+\xi_{m-r} )e^{-\mathrm{i}\beta h}-2 \biggl(1+\frac{1}{6}h^{2}A_{\alpha,k} \biggr) \xi_{m}e^{-\mathrm{i}\beta h} \\ &\quad{}+\frac{5}{3} h^{2}A_{\alpha,k} \sum _{r=2}^{m}\omega_{r}^{(\alpha)} ( \xi_{m-r+2}-2\xi_{m-r+1}+\xi_{m-r} )-2 \biggl( \frac{5}{3}h^{2}A_{\alpha,k}-2 \biggr)\xi_{m} \\ &\quad{}+\frac{1}{6} h^{2} A_{\alpha,k} \sum _{r=2}^{m}\omega_{r}^{(\alpha)} ( \xi_{m-r+2}-2\xi_{m-r+1}+\xi_{m-r} )e^{\mathrm{i}\beta h} -2 \biggl(1+\frac{1}{6}h^{2}A_{\alpha,k} \biggr) \xi_{m}e^{\mathrm{i}\beta h} \\ &\quad{}+\frac{1}{6}h^{2}A_{\alpha,k} \bigl( \xi_{m+1}e^{-\mathrm{i}\beta h}+\xi_{m-1}e^{-\mathrm{i}\beta h}+ \xi_{m+1}e^{\mathrm{i}\beta h}+\xi_{m-1}e^{\mathrm{i}\beta h} \bigr) \\ &\quad{}+\frac{5}{3}h^{2}A_{\alpha,k} \bigl( \xi_{m+1}+\xi_{m-1}e^{-\mathrm{i}\beta h} \bigr)=0. \end{aligned}$$
(18)

Using some trigonometric formulas and some simplifications we can obtain

$$\begin{aligned} &\frac{1}{3} h^{2} A_{\alpha,k} \bigl(5+\cos( \beta h)\bigr)\sum_{r=2}^{m} \omega_{r}^{(\alpha)} (\xi_{m-r+2}-2\xi_{m-r+1}+ \xi_{m-r} ) \\ &\quad{}-2 \biggl[ 2\biggl(1+\frac{1}{6} h^{2} A_{\alpha,k}\biggr)\cos(\beta h) +\frac{5}{3} h^{2} A_{\alpha,k}-2 \biggr] \xi_{m} +\frac{1}{3} h^{2} A_{\alpha,k}\bigl(5+ \cos(\beta h)\bigr)\xi_{m+1} \\ &\quad{}+\frac{1}{3} h^{2} A_{\alpha,k}\bigl(5+\cos(\beta h)\bigr)\xi_{m-1} =0, \end{aligned}$$
(19)
$$\begin{aligned} &\frac{1}{3} h^{2} A_{\alpha,k} \bigl(5+\cos( \beta h)\bigr)\sum_{r=2}^{m} \omega_{r}^{(\alpha)} (\xi_{m-r+2}-2\xi_{m-r+1}+ \xi_{m-r} ) \\ &\quad{}-2 \biggl[ 2\biggl(1+\frac{1}{6} h^{2} A_{\alpha,k}\biggr)\cos(\beta h) +\frac{5}{3} h^{2} A_{\alpha,k}-2 \biggr] \xi_{m} +\frac{1}{3} h^{2} A_{\alpha,k}\bigl(5+ \cos(\beta h)\bigr)\xi_{m+1} \\ &\quad{}+\frac{1}{3} h^{2} A_{\alpha,k}\bigl(5+\cos(\beta h)\bigr)\xi_{m-1} =0, \end{aligned}$$
(20)

from which we can obtain the required formula and this completes the proof. □

3 Stability analysis

In this section, we use the von Neumann method to study the stability analysis of the finite difference scheme (14) for the force free case (i.e., \(f(x,t)=0\)).

Proposition 2

Assume that \(k^{\alpha} < \frac{h^{2}}{6\Gamma(3-\alpha)}\), then

$$ \frac{\frac{1}{6}h^{2}A_{\alpha ,k}(5+\cos(\beta h))}{2 (1+\frac{1}{6}h^{2}A_{\alpha,k} )\cos(\beta h)+ \frac{5}{3}h^{2}A_{\alpha,k}-2}\leq2 . $$
(21)

Proof

Since \(A_{\alpha,k}=\frac{k^{-\alpha}}{\Gamma(3-\alpha)}\), \(k^{\alpha}=\frac{1}{A_{\alpha,k}\Gamma(3-\alpha)}\) and, by using the assumption that \(k ^{\alpha}< \frac{h^{2}}{6\Gamma(3-\alpha)}\), we can obtain

$$ \frac{1}{A_{\alpha,k}} < \frac{h^{2}}{6}, $$
(22)

so,

$$ 2 \biggl(1+\frac{1}{6}h^{2}A_{\alpha,k} \biggr) < \frac{5}{6}h^{2}A_{\alpha,k}-1, $$
(23)

and since \(1-\cos(\beta h)\leq2\), we have

$$ 2 \biggl(1+\frac{1}{6}h^{2}A_{\alpha,k} \biggr) \bigl(1- \cos(\beta h)\bigr) < 2 \biggl(\frac{5}{6}h^{2}A_{\alpha,k}-1 \biggr), $$
(24)

which implies that

$$ 2 \biggl(1+\frac{1}{6}h^{2}A_{\alpha,k} \biggr)\cos(\beta h)+\frac{5}{3}h^{2}A_{\alpha,k}-2> 0. $$
(25)

Now, since \(-3h^{2}A_{\alpha,k}<15h^{2}A_{\alpha,k}\), \(h^{2}A_{\alpha,k}-4h^{2}A_{\alpha,k}-24<20h^{2}A_{\alpha ,k}-5h^{2}A_{\alpha,k}-24\), and since \(\cos(\beta h)\leq1\), we have

$$ \bigl[h^{2}A_{\alpha,k}-4h^{2}A_{\alpha,k}-24 \bigr]\cos(\beta h)< 20h^{2}A_{\alpha,k}-5h^{2}A_{\alpha,k}-24, $$
(26)

i.e.,

$$ 5h^{2}A_{\alpha,k}+h^{2}A_{\alpha,k}\cos(\beta h)< 24 \cos(\beta h) + 4h^{2}A_{\alpha,k}\cos(\beta h)+20h^{2}A_{\alpha,k}-24, $$
(27)

so

$$ h^{2}A_{\alpha,k}\bigl(5+ \cos(\beta h)\bigr)< 2\bigl[ \bigl(12+2h^{2}A_{\alpha,k}\bigr)\cos(\beta h)+10h^{2}A_{\alpha,k}-12 \bigr], $$
(28)

i.e.,

$$ h^{2}A_{\alpha,k}\bigl(5+ \cos(\beta h)\bigr)< (2) (6)\biggl[2 \biggl(1+\frac{1}{6}h^{2}A_{\alpha,k}\biggr)\cos(\beta h)+ \frac{5}{3}h^{2}A_{\alpha,k}-2\biggr], $$
(29)

which together with (25) completes the proof of the proposition. □

Proposition 3

Assume that \(\xi_{m}\) (\(m=1,2,\ldots,M\)) is the solution of (17), with the condition \(k^{\alpha} < \frac{h^{2}}{6\Gamma(3-\alpha)}\), then \(|\xi_{m}|\leq|\xi_{0}|\) (\(m=1,2,\ldots,M\)).

Proof

It is easy to prove it by the mathematical induction together with Proposition 2. □

We know that

$$ \bigl\| T^{m}\bigr\| _{2}^{2}=\sum _{N=-\infty}^{\infty}\bigl|\xi_{m}(N)\bigr|^{2}. $$
(30)

Theorem 1

The finite difference scheme (14) is stable under the condition

$$ k^{\alpha} < \frac{h^{2}}{6\Gamma(3-\alpha)}. $$
(31)

Proof

From Proposition 3 and (30), \(\| T^{m}\|_{2} \leq \| T^{0}\|_{2}\), \(m=1,2,\ldots,M\), which means that the difference scheme is stable. □

By the Lax equivalence theorem [28] we can show that the numerical solution converges to the exact solution as \(h, k\rightarrow0\).

4 Numerical results

In this section, we will test the proposed method by considering the following numerical example. Consider the fractional wave equation (2) in the interval \([0,1]\) with the following source term:

$$ f(x,t)=\biggl[\frac{t^{1-\alpha}(2t+\alpha-3)}{\Gamma(3-\alpha)}+\pi^{2}\biggr]\sin (\pi x), $$
(32)

and the initial conditions \(u(x,0)=0\), \(u_{t}(x,0)=-\sin(\pi x)\).

The exact solution of equation (2) in this case is \(u(x,t)=\sin (\pi x)(t^{2}-t)\).

In Figures 1-3, the behavior of the exact solution and the numerical solution of the fractional wave equation (2) by means of the fractional finite difference method based on the Hermite formula with different values of α, Δx, Δt and the final time T is given.

Figure 1
figure 1

The behavior of the exact solution and the numerical solution of the fractional wave equation ( 2 ) by means of the proposed method for \(\pmb{\alpha=1.73}\) , \(\pmb{\Delta x= \frac{1}{60}}\) , \(\pmb{\Delta t= \frac{1}{1{,}000}}\) , and \(\pmb{T=0.75}\) .

Figure 2
figure 2

The behavior of the exact solution and the numerical solution of the fractional wave equation ( 2 ) by means of the proposed method for \(\pmb{\alpha=1.75}\) , \(\pmb{\Delta x= \frac{1}{200}}\) , \(\pmb{\Delta t= \frac{1}{200}}\) , and \(\pmb{T=2}\) .

Figure 3
figure 3

The behavior of the exact solution and the numerical solution of the fractional wave equation ( 2 ) by means of the proposed method for \(\pmb{\alpha=1.66}\) , \(\pmb{\Delta x= \frac{1}{100}}\) , \(\pmb{\Delta t= \frac{1}{150}}\) , and \(\pmb{T=4}\) .

From these figures, we can conclude that the numerical solution of the proposed method are in excellent agreement with the exact solution. Tables 1 and 2 show the magnitude of the maximum error between the exact solution and the numerical solution obtained by using the fractional FDM based on the Hermite formula discussed above with different values of α, Δx, Δt, and the final time T.

Table 1 The maximum error with different values of Δ x and Δ t for \(\pmb{\alpha=1.5}\) and \(\pmb{T=0.2}\)
Table 2 The maximum error with different values of Δ x , Δ t for \(\pmb{\alpha=1.7}\) and \(\pmb{T=0.4}\)

From Figure 4, we can see that the numerical solution is unstable, since the stability condition (31) is not satisfied.

Figure 4
figure 4

The behavior of the numerical solution of the fractional wave equation ( 2 ) by means of the proposed method for \(\pmb{\alpha=1.5}\) , \(\pmb{\Delta x= \frac{1}{150}}\) , \(\pmb{\Delta t= \frac{1}{120}}\) , and \(\pmb{T=2}\) .

5 Conclusion and remarks

This paper presents a class of numerical methods for solving the fractional wave equations. This class of methods depends on the finite difference method based on the Hermite formula. Special attention is given to the study of the stability and the convergence of the fractional finite difference scheme. To execute this aim we have resorted to a kind of fractional von Neumann stability analysis. From the theoretical study we can conclude that this procedure is suitable for the proposed fractional finite difference scheme and leads to very good predictions for the stability bounds. Numerical solutions and exact solutions of the proposed problem are compared and the derived stability condition is checked numerically. From this comparison, we can conclude that the numerical solutions are in excellent agreement with the exact solutions. All computations in this paper were run with the Matlab programming package.