1 Introduction

In recent decades, fractional-order partial differential equations have been widely used and developed in physics, engineering, and fluid mechanics. Compared with integer-order partial differential equations, they are more suitable to portray complex phenomena and processes. Therefore, the method to solve fractional partial differential equations is also a relatively important problem. Now, there are methods to solve fractional-order partial differential equations. For example, in [1], the finite-difference methods, the Galerkin finite-element methods, and the spectral methods to solve fractional-order partial differential equations are mentioned; Gepreel uses the Homotopy perturbation method to obtain the solution of the fractional Klein–Gordon equation in [2]; Khalid used the Elzaki transform method to solve the equations [3]; in [4], Ziane used the fractional Elzaki variational iteration method to solve the equations; Jafari introduced the Iterative Laplace transform method in [57]; Tarig used the Sumudutrans form of the variational iteration method to solve linear homogeneous partial differential equations; Thabet [8] introduced a new analytic method to solve partial differential equations with fractional order, and El-Rashidy [9] used the method to obtain new traveling-wave solutions of the equations. Hosseini [10] used the modified Kudryashov method to obtain exact solutions of the coupled sine-Gordon equations. Mohammad Tamsir [11] employed a semianalytical approach to obtain the approximate analytical solution of the Klein–Gordon equations; The Klein–Gordon equation [12, 13] is a crucial equation in the study of relativistic quantum mechanics.

Many authors have solved the generalized Hirota–Satsuma coupled KdV equation utilizing various equations in [1417], including the homotopy analysis approach [18]. This is a significant class of equations in mathematics and physics. In this study, we employ the Elzaki transform [19, 20] in conjunction with an iterative approach [21] to generate approximations to partial differential equations with fractional order. The results demonstrate the method’s validity, further, it also may be applied to other fractional-order partial differential equations.

2 Basic definition

Definition 1

The fractional Riemann–Liouville of operator \(D^{p}\) is as follows

$$ D^{p}w(x)= \textstyle\begin{cases} \frac{\partial ^{m}w(x) }{ \partial x^{m}} ,&p=m, \\ \frac{\partial}{\Gamma (m-p)\partial x^{m}}\int _{0}^{x} \frac{w(x)}{(x-\xi )^{p-m+1}}\,d\xi ,&m-1< p< m, \end{cases} $$
(1)

where \(m\in Z^{+}\), \(p\in R^{+}\) when \(0< p\le 1\),

$$ D^{p}w(x)=\frac{1 }{\Gamma (p)} \int _{0}^{x} \frac{w(x)}{(x-\xi )^{1-p}}\,d\xi . $$

Definition 2

The Riemann–Liouville integral operator with fractional order is defined as follows

$$ I^{p}w(x)=\frac{1}{\Gamma (p)} \int _{0}^{x}(x-\xi )^{p-1}w( \xi )\,d \xi ,\quad p>0,\xi >0. $$
(2)

Definition 3

The Caputo fractional derivative of \(w(x)\) is defined as follows, \(m\in N\)

$$ c_{D^{p}w(x)}= \textstyle\begin{cases} I^{m-p}[\frac{\partial ^{m}w(x)}{\partial x^{m}}] , &m-1< p< m, \\ \frac{\partial ^{m}w(x)}{\partial x^{m}} , &p=m. \end{cases} $$
(3)

Definition 4

The Elzaki [22, 23] transform of \(w(x)\) is defined as follows

$$ E\bigl[w(x)\bigr]=T(v)=v \int _{0}^{\infty}w(x)e^{\frac{-x}{v}}\,dx,\quad x\ge 0, k_{1}\le v\le k_{2}. $$
(4)

Definition 5

The fractional Caputo operator of the Elzaki transform is [24]

$$ E\bigl[D_{x}^{\alpha}w(x)\bigr]=v^{-\alpha}E \bigl[w(x)\bigr]-\sum_{k=0}^{m-1}v^{2- \alpha +k}w^{(k)}(0),\quad \text{where } m-1< \alpha < m. $$
(5)

3 Methodology of the Elzaki transform iterative method

To briefly describe this equation in detail, we consider the following fractional partial differential equations

$$ \frac{\partial ^{\alpha} w(x,t)}{\partial t^{\alpha}}=M\bigl(w_{1}(x,t),w_{2}(x,t), \dots ,w_{n}(x,t)\bigr)+N\bigl(w_{1}(x,t),w_{2}(x,t), \dots ,w_{n}(x,t)\bigr), $$
(6)

where M and N are the nonlinear and linear operators from Banach space B → B, respectively, \(\alpha \in R^{+}\), \(m-1<\alpha \leq m\), \(m=0,1,\dots ,n\),

subject to the initial condition

$$ \frac{\partial ^{k} w(x,0)}{\partial t^{k}}=w_{k}(x,0),\quad k=0,1, \dots ,m-1,m \in N. $$
(7)

Then, the Ezaki transformation acts simultaneously on both sides of the equation, and we obtain

$$ \begin{aligned}[b] E\biggl[\frac{\partial ^{k} w(x,0)}{\partial t^{k}}\biggr]={}&E\bigl[M \bigl(w_{1}(x,t),w_{2}(x,t), \dots ,w_{n}(x,t) \bigr) \\ &{}+N\bigl(w_{1}(x,t),w_{2}(x,t),\dots ,w_{n}(x,t)\bigr)\bigr], \end{aligned} $$
(8)

hence,

$$ \begin{aligned}[b] v^{-k}E\bigl[w(x,t)\bigr]-\sum _{n=0}^{m-1}v^{2-k+n}w^{(n)}(x,0)={}&E \bigl[M\bigl(w_{1}(x,t),w_{2}(x,t), \dots ,w_{n}(x,t)\bigr) \\ &{}+N\bigl(w_{1}(x,t),w_{2}(x,t),\dots ,w_{n}(x,t)\bigr)\bigr]. \end{aligned} $$
(9)

Through the use of the inverse Elzaki transform, we obtain

$$ \begin{aligned}[b]w(x,t)= {}&E^{-1}\Biggl[\sum _{n=0}^{m-1}v^{2+n}w^{(n)}(x,0) \Biggr]+E^{-1}\bigl[v^{k}E\bigl[M\bigl(w_{1}(x,t),w_{2}(x,t), \dots ,w_{n}(x,t)\bigr) \\ &{}+N\bigl(w_{1}(x,t),w_{2}(x,t),\dots ,w_{n}(x,t)\bigr)\bigr]\bigr]. \end{aligned} $$
(10)

The following iterative method is utilized

$$ w(x,t)=\sum_{i=1}^{\infty}w_{i}(x,t). $$
(11)

The nonlinear operator M can be decomposed into

$$ \begin{aligned}[b] &M\bigl(w_{1}(x,t),w_{2}(x,t), \dots ,w_{n}(x,t)\bigr)\\ &\quad=M\bigl(w_{10}(x,t),w_{20}(x,t), \dots ,w_{n0}(x,t)\bigr) \\ &\qquad{}+\sum_{m=0}^{\infty}\Biggl[M\Biggl(\sum _{i=0}^{m}w_{1i}(x,t),\sum _{i=0}^{m}w_{2i}(x,t), \dots ,\sum_{i=0}^{m}w_{ni}(x,t) \Biggr) \\ &\qquad{}-M\Biggl(\sum_{i=0}^{m-1}w_{1i}(x,t), \sum_{i=0}^{m-1}w_{2i}(x,t), \dots , \sum_{i=0}^{m-1}w_{ni}(x,t) \Biggr)\Biggr]. \end{aligned} $$
(12)

Then, we can obtain

$$\begin{aligned} \sum_{i=0}^{\infty}w_{i}(x,t)={}&E^{-1} \Biggl[\sum_{n=0}^{m-1}v^{2+n}w^{(n)}(x,0) \Biggr]+ E^{-1}v^{k}\bigl[E\bigl[M\bigl(w_{10}(x,t),w_{20}(x,t), \dots ,w_{n0}(x,t)\bigr) \\ & {}+ N\bigl(w_{10}(x,t),w_{20}(x,t),\dots ,w_{n0}(x,t)\bigr)\bigr]\bigr] \\ & {}+ E^{-1}\Biggl[v^{k}E\Biggl[\sum _{m=0}^{\infty}\Biggl[M\Biggl(\sum _{i=0}^{m}w_{1i}(x,t), \sum _{i=0}^{m}w_{2i}(x,t),\dots ,\sum _{i=0}^{m}w_{ni}(x,t)\Biggr) \\ & {}- M\Biggl(\sum_{i=0}^{m-1}w_{1i}(x,t), \sum_{i=0}^{m-1}w_{2i}(x,t), \dots , \sum_{i=0}^{m-1}w_{ni}(x,t) \Biggr)\Biggr]\Biggr]\Biggr] \\ & {}+ E^{-1}\Biggl[v^{k}E\Biggl[\sum _{m=0}^{\infty}\Biggl[N\Biggl(\sum _{i=0}^{m}w_{1i}(x,t), \sum _{i=0}^{m}w_{2i}(x,t),\dots ,\sum _{i=0}^{m}w_{ni}(x,t)\Biggr) \\ & {}- N\Biggl(\sum_{i=0}^{m-1}w_{1i}(x,t), \sum_{i=0}^{m-1}w_{2i}(x,t), \dots , \sum_{i=0}^{m-1}w_{ni}(x,t) \Biggr)\Biggr]\Biggr]\Biggr]. \end{aligned}$$
(13)

We make the following settings

$$ \textstyle\begin{cases} w_{0}=E^{-1}[\sum_{n=0}^{m-1}v^{2+n}w^{(n)}(x,0)], \\ w_{1}=E^{-1}v^{k}[E[M(w_{10}(x,t),w_{20}(x,t),\dots ,w_{n0}(x,t))\\ \hphantom{w_{1}=}{}+N(w_{10}(x,t),w_{20}(x,t), \dots ,w_{n0}(x,t))]], \\ w_{i}=E^{-1}[v^{k}E[\sum_{i=0}^{\infty}[M(\sum_{i=0}^{m}w_{1i}(x,t), \sum_{i=0}^{m}w_{2i}(x,t),\dots ,\sum_{i=0}^{m}w_{ni}(x,t)) \\ \hphantom{w_{i}=}{}-M(\sum_{i=0}^{m-1}w_{1i}(x,t),\sum_{i=0}^{m-1}w_{2i}(x,t),\dots , \sum_{i=0}^{m-1}w_{ni}(x,t))]]] \\ \hphantom{w_{i}=}{}+E^{-1}[v^{k}E[\sum_{i=0}^{\infty}[N(\sum_{i=0}^{m}w_{1i}(x,t), \sum_{i=0}^{m}w_{2i}(x,t),\dots ,\sum_{i=0}^{m}w_{ni}(x,t)) \\ \hphantom{w_{i}=}{}-N(\sum_{i=0}^{m-1}w_{1i}(x,t),\sum_{i=0}^{m-1}w_{2i}(x,t),\dots , \sum_{i=0}^{m-1}w_{ni}(x,t))]]]. \end{cases} $$
(14)

Finally, we obtain the approximate solution of the fractional-order partial differential equation

$$ w(x,t)\cong w_{0}(x,t)+ w_{1}(x,t)+\cdots +w_{m}(x,t), \quad m=1,2,\dots .$$
(15)

Theorem

B is the Banach space, if there exists \(0< K<1\), \(\|w_{n}\| \le K\|w_{n-1}\|\), for \(\forall x\in N\), then the approximate solution \(w(x,t)\) converges to A.

Proof

Define the sequence \(A_{i}\), \(i=0,1,\dots ,n\)

$$ \textstyle\begin{cases} A_{0}=w_{0}, \\ A_{1}=w_{0}+w_{1}, \\ A_{2}=w_{0}+w_{1}+w_{2}, \\ \dots, \\ A_{n}=w_{0}+w_{1}+\cdots +w_{n} \end{cases} $$
(16)

and prove that \((A_{i})_{i\ge 0}\) is a Cauchy sequence, and we consider

$$ \Vert A_{n}-A_{n-1} \Vert \le \Vert w_{n} \Vert \le K^{n}w_{0} $$
(17)

for \(m>n>0 \in N\), we have

$$ \textstyle\begin{cases} \Vert A_{n}-A_{m} \Vert = \Vert A_{n}-A_{n-1}+A_{n-1}-A_{n-2}+\cdots +A_{m+1}-A_{m} \Vert \\ \quad \le \Vert A_{n}-A_{n-1} \Vert + \Vert A_{n-1}-A_{n-2} \Vert +\cdots + \Vert A_{m+1}-A{m} \Vert \\ \quad \le (K^{n}+K^{n-1}+\cdots +K^{m+1})A_{0} \\ \quad \le \Vert \frac{K^{m+1}(1-K^{n-m})}{1-K} \Vert A_{0}, \end{cases} $$
(18)

where \(w_{0}\) is bounded, and we have

$$ \lim_{n,m\to \infty} \Vert A_{n}-A_{m} \Vert =0. $$
(19)

Therefore, the sequence \((A_{i})_{i\ge 0}\) is a Cauchy sequence in B, so the solution of Eq. (6) is convergent.

The error estimates are as follows:

$$ \sup \Biggl\vert w(x,t)-\sum_{i=0}^{m}w_{i}(x,t) \Biggr\vert \le \frac{K^{m+1}}{1-K}\sup \bigl\vert w_{0}(x,t) \bigr\vert . $$
(20)

 □

Remark

Similar proofs can be found in [8].

4 Test example

Example 1

Consider the linear fractional Klein–Gordon equation [25]

$$ \frac{\partial ^{\alpha}u}{\partial t^{\alpha}}- \frac{\partial ^{2}u}{\partial x^{2}}-u=0 ,\quad 0< \alpha \le 1 $$
(21)

subject to the initial condition:

$$ u(x,0)=1+\sin x. $$
(22)

The Elzaki transform of the linear fractional Klein–Gordon equation [26] is

$$ v^{-\alpha}E \bigl[u(x,t) \bigr]=v^{2-\alpha}u(x,0)+E \biggl[ \frac{\partial ^{2}u(x,t)}{\partial x^{2}}+u(x,t) \biggr]. $$
(23)

Using the inverse Elzaki transform of the above equation, we obtain

$$ u(x,t)=E^{-1} \bigl[v^{2}u(x,0) \bigr]+E^{-1} \biggl[v^{ \alpha} E \biggl[\frac{\partial ^{2}u(x,t)}{\partial x^{2}}+u(x,t) \biggr] \biggr], $$
(24)

then, we use the iterative method above, and we have

$$\begin{aligned}& u_{0}(x,t)=E^{-1} \bigl[v^{2}(1+\sin x) \bigr], \end{aligned}$$
(25)
$$\begin{aligned}& u_{0}(x,t)=1+\sin x, \end{aligned}$$
(26)
$$\begin{aligned}& u_{1}(x,t)=E^{-1} \biggl[v^{\alpha}E \biggl[ \frac{\partial ^{2}u_{0}(x,t)}{\partial x^{2}}+u_{0}(x,t) \biggr] \biggr], \end{aligned}$$
(27)
$$\begin{aligned}& u_{1}(x,t)=\frac{t^{\alpha}}{\Gamma (1+\alpha )}, \end{aligned}$$
(28)
$$\begin{aligned}& \begin{aligned}[b]u_{2}(x,t)={}&v^{\alpha}E \biggl[ \frac{\partial ^{2}u_{1}(x,t)+u_{0}(x,t)}{\partial x^{2}}+u_{1}(x,t)+u_{0}(x,t) \biggr]\\ &{}-v^{\alpha}E \biggl[ \frac{\partial ^{2}u_{0}(x,t)}{\partial x^{2}}+u_{0}(x,t) \biggr], \end{aligned} \end{aligned}$$
(29)
$$\begin{aligned}& u_{2}(x,t)=\frac{t^{2\alpha}}{\Gamma (2\alpha +1)}, \end{aligned}$$
(30)
$$\begin{aligned}& \begin{aligned}[b]u_{3}(x,t)={}&v^{\alpha}E \biggl[ \frac{\partial ^{2} (u_{2}(x,t)+u_{1}(x,t)+u_{0}(x,t) )}{\partial x^{2}}+u_{2}(x,t)+u_{1}(x,t)+u_{0}(x,t) \biggr] \\ &{}-v^{\alpha}E \biggl[ \frac{\partial ^{2} (u_{1}(x,t)+u_{0}(x,t) )}{\partial x^{2}}+u_{1}(x,t)+u_{0}(x,t) \biggr] \end{aligned} \end{aligned}$$
(31)
$$\begin{aligned}& u_{3}(x,t)=\frac{t^{3\alpha}}{\Gamma (3\alpha +1)}, \end{aligned}$$
(32)
$$\begin{aligned}& \dots \\& u_{n}(x,t)=\frac{t^{n\alpha}}{\Gamma (n\alpha +1)}. \end{aligned}$$
(33)

The result is

$$ u(x,t)=1+\sin x+\frac{t^{\alpha}}{\Gamma (1+\alpha )}+ \frac{t^{2\alpha}}{\Gamma (1+2\alpha )}+ \frac{t^{3\alpha}}{\Gamma (1+3\alpha )}+\cdots + \frac{t^{n\alpha}}{\Gamma (1+n\alpha )}+\cdots .$$
(34)

When \(\alpha =1\), the exact solution of the linear fractional Klein–Gordon equation is as follows:

$$ u(x,t)=e^{t}+\sin x. $$
(35)

In Fig. 1, the approximate solution of u is depicted for the case where the value of α is 0.01, 0.002, and 0.1.

Figure 1
figure 1

Graph of \(u(x,t)\) at \(\alpha =0.01\), 0.02, and 0.1 of Example 1

Example 2

Consider the new generalized fractional Hirota–Satsuma coupled KdV equation

$$ \begin{aligned} &\frac{\partial ^{\alpha} u}{\partial t^{\alpha}}= \frac{1}{2}u_{xxx}-3uu_{x}+3(vw)_{x}, \\ &\frac{\partial ^{\alpha} v}{\partial t^{\alpha}}=-v_{xxx}+3uv_{x}, \quad 0< \alpha \le 1, \\ &\frac{\partial ^{\alpha}w}{\partial t^{\alpha}}=-w_{xxx}+3uw_{x} \end{aligned} $$
(36)

subject to the initial condition

$$ \begin{aligned} &u(x,0)=\frac{1}{3}\bigl(\beta -2k^{2}\bigr)+2k^{2}\tanh^{2}(kx), \\ &v(x,0)=-\frac{4k^{2}c_{0}(\beta +k^{2})}{3c_{1}^{2}}+ \frac{4k^{2}(\beta +k^{2})}{3c_{1}}\tanh(kx), \\ &w(x,0)=c_{0}+c_{1}\tanh(kx). \end{aligned} $$
(37)

When \(\alpha =1\), the exact results of the new generalized Hirota–Satsuma coupled KdV equation is as follows:

$$ \begin{aligned} &u(x,t)=\frac{1}{3}\bigl(\beta -2k^{2}\bigr)+2k^{2}\tanh^{2}\bigl(k(x+ \beta t)\bigr), \\ &v(x,t)=-\frac{4k^{2}c_{0}(\beta +k^{2})}{3c_{1}^{2}}+ \frac{4k^{2}(\beta +k^{2})}{3c_{1}}\tanh\bigl(k(x+\beta t) \bigr), \\ &w(x,t)=c_{0}+c_{1}\tanh\bigl(k(x+\beta t)\bigr). \end{aligned} $$
(38)

The Elzaki transform of the new generalized fractional Hirota–Satsuma coupled KdV equation is

$$ \begin{aligned} &v^{-\alpha}E\bigl[u(x,t)\bigr]=v^{2-\alpha}u(x,0)+E \biggl[\frac{1}{2}u_{xxx}-3uu_{x}+3(vw)_{x} \biggr], \\ &v^{-\alpha}E\bigl[v(x,t)\bigr]=v^{2-\alpha}v(x,0)+E[-v_{xxx}+3uv_{x}], \\ &v^{-\alpha}E\bigl[w(x,t)\bigr]=v^{2-\alpha}w(x,0)+E[-w_{xxx}+3uw_{x}]. \end{aligned} $$
(39)

Using the inverse Elzaki transform, we obtain

$$ \begin{aligned} &u(x,t)=E^{-1}\bigl[v^{2}u(x,0) \bigr]+E^{-1}\biggl[v^{\alpha}E\biggl[ \frac{1}{2}u_{xxx}-3uu_{x}+3(vw)_{x} \biggr]\biggr], \\ &v(x,t)=E^{-1}\bigl[v^{2}v(x,0)\bigr]+E^{-1} \bigl[v^{\alpha}E[-v_{xxx}+3uv_{x}]\bigr], \\ &w(x,t)=E^{-1}\bigl[v^{2}w(x,0)\bigr]+E^{-1} \bigl[v^{\alpha}E[-w_{xxx}+3uw_{x}]\bigr]. \end{aligned} $$
(40)

Next, in terms of the iterative method above, we have

$$\begin{aligned}& u_{0}(x,t)=E^{-1} \bigl[v^{2}u(x,0)\bigr], \\& v_{0}(x,t)=E^{-1}\bigl[v^{2}u(x,0)\bigr], \end{aligned}$$
(41)
$$\begin{aligned}& w_{0}(x,t)=E^{-1}\bigl[v^{2}u(x,0)\bigr], \\& u_{0}(x,t)=\frac{1}{3}\bigl( \beta -2k^{2}\bigr)+2k^{2}\tanh^{2}(kx), \\& v_{0}(x,t)=-\frac{4k^{2}c_{0}(\beta +k^{2})}{3c_{1}^{2}}+ \frac{4k^{2}(\beta +k^{2})}{3c_{1}}\tanh(kx), \end{aligned}$$
(42)
$$\begin{aligned}& w_{0}(x,t)=c_{0}+c_{1}\tanh(kx), \\& u_{1}(x,t)=E^{-1} \biggl[v^{\alpha}E\biggl[\frac{1}{2}{u_{0}}_{xxx}-3u_{0}{u_{0}}_{x}+3(v_{0}w_{0})_{x} \biggr]\biggr], \\& v_{1}(x,t)=E^{-1}\bigl[v^{\alpha}E[-{v_{0}}_{xxx}+3{u_{0}} {v_{0}}_{x}]\bigr], \end{aligned}$$
(43)
$$\begin{aligned}& w_{1}(x,t)=E^{-1}\bigl[v^{\alpha}E[-{w_{0}}_{xxx}+3u_{0}{w_{0}}_{x}] \bigr], \\& u_{1}(x.t)=4k^{3}\beta \operatorname{sech}^{2}(kx)\tanh(kx) \frac{t^{t^{\alpha}}}{\Gamma (1+\alpha )}, \\& v_{1}(x,t)=4k^{3}\beta \bigl(\beta +k^{2}\bigr)\operatorname{sech}^{2}(kx) \frac{t^{\alpha}}{\Gamma (1+\alpha )}, \end{aligned}$$
(44)
$$\begin{aligned}& w_{1}(x,t)=c_{1}k\beta \operatorname{sech}^{2}(kx) \frac{t^{\alpha}}{\Gamma (1+\alpha )}, \\& u_{2}(x,t)=E^{-1} \biggl[v^{\alpha}E\biggl[\frac{1}{2}{(u_{0}+u_{1})}_{xxx}-3u_{0}{(u_{0}+u_{1})}_{x}+3 \bigl((v_{0}+v_{1}) (w_{0}+w_{1}) \bigr)_{x}\biggr]\biggr], \\& v_{2}(x,t)=E^{-1}\bigl[v^{\alpha}E \bigl[-{(v_{0}+v_{1})}_{xxx}+3{(u_{0}+u_{1})} {(v_{0}+v_{1})}_{x}\bigr]\bigr], \end{aligned}$$
(45)
$$\begin{aligned}& w_{2}(x,t)=E^{-1}\bigl[v^{\alpha}E \bigl[-{(w_{0}+w_{1})}_{xxx}+3(u_{0}+u_{1}){(w_{0}+w_{1})}_{x} \bigr]\bigr] , \\& \begin{aligned}[b]u_{2}(x,t)={}&\bigl[96k^{7} \beta \operatorname{sech}^{4}(kx)\tanh(kx)-144k^{7} \beta ^{2}\tanh(kx)\operatorname{sech}^{6}(kx) \\ & {}- 16c_{1}k^{7}\beta ^{2} \operatorname{sech}^{4}(kx)\tanh(kx)-16c_{1}k^{5} \beta ^{3}\operatorname{sech}^{4}(kx)\tanh(kx)\bigr] \\ & {}\times \frac{\Gamma (2\alpha +1)t^{3\alpha}}{\Gamma (3\alpha +1)\Gamma (1+\alpha )\Gamma (1+\alpha )}\\ & {}+\biggl[-48k^{6} \beta \operatorname{sech}^{4}(kx)+ \biggl(\frac{c_{0}}{3c_{1}}-8c_{0}\biggr)k^{6}\beta \tanh(kx)\operatorname{sech}^{2}(kx) \\ & {}+ (12c_{1}+72)k^{6}\operatorname{sech}^{4}(kx)+ \biggl(\frac{-116}{3}+8C_{1}\biggr)k^{6}\beta \operatorname{sech}^{6}(kx)\\ & {}+8 \beta ^{2}k^{4} \operatorname{sech}^{4}(kx) (c_{1}-1) \\ & {}+ 8\biggl(\frac{c_{0}k^{4}\beta ^{2}}{3c^{1}}+\frac{k^{2}\beta c_{1}}{3}-c_{0}k^{4} \beta ^{2}\biggr)\operatorname{sech}^{2}(kx)\tanh(kx)\\ & {}-8 \operatorname{sech}^{2}(kx) \biggl( \frac{4k^{4}\beta ^{2}+\beta ^{2}}{3}+\beta ^{2}k^{4}c_{1}\biggr)\biggr] \\ & {}\times \frac{t^{2\alpha}}{\Gamma (1+2\alpha )}+ \biggl[\frac{68}{3}k^{5}\tanh(kx) \operatorname{sech}^{2}(kx)-16k^{5}\tanh(kx) \\ & {}-4k^{3} \beta \tanh(kx)- 4k^{3}\beta \operatorname{sech}^{2}(kx)\tanh(kx)\biggr] \frac{t^{\alpha}}{\Gamma (1+\alpha )}, \end{aligned} \end{aligned}$$
(46)
$$\begin{aligned}& \begin{aligned}[b]v_{2}(x,t)={}&\bigl(-96k^{9} \beta ^{2}\operatorname{sech}^{2}(kx)\tanh^{2}(kx)-96k^{7} \beta ^{3}\operatorname{sech}^{4}(kx)\tanh^{2}(kx) \bigr) \\ & {}\times \frac{\Gamma (2\alpha +1)t^{3\alpha}}{\Gamma (3\alpha +1)\Gamma (1+\alpha )\Gamma (1+\alpha )} \\ & {}+\biggl[\frac{16k^{8}}{c_{1}}\beta \operatorname{sech}^{4}(kx) \tanh(kx)-144k^{8}\beta \operatorname{sech}^{4}(kx)\tanh(kx) \\ & {}- 152k^{6}\beta ^{2}\operatorname{sech}^{2}(kx) \tanh(kx)-96k^{6}\beta ^{2}\operatorname{sech}^{4}(kx) \tanh(kx) \\ & {}+ \frac{16k^{6}\beta ^{2}}{c_{1}}\operatorname{sech}^{4}(kx)\tanh(kx)-8k^{4} \beta ^{3}\operatorname{sech}^{2}(kx)\tanh(kx)\biggr] \frac{t^{2\alpha}}{\Gamma (2\alpha +1)} \\ & {}\times \biggl[\frac{24k^{7}}{c_{1}}-\frac{24k^{7}}{c_{1}}\operatorname{sech}^{4}(kx)+ \frac{8k^{5}\beta \operatorname{sech}^{4}(kx)}{3c_{1}}- \frac{8k^{5}\beta \operatorname{sech}^{2}(kx)}{3c_{1}} \\ & {}+ \frac{32k^{5}\beta}{c_{1}}\operatorname{sech}^{2}(kx)\tanh^{2}(kx)+ \frac{4k^{3}\beta ^{2}}{3c_{1}}\operatorname{sech}^{2}(kx)\\ & {}-4k^{3}\beta \bigl(\beta +k^{2}\bigr)\operatorname{sech}^{2}(kx)\biggr] \frac{t^{\alpha}}{\Gamma (1+\alpha )}, \end{aligned} \end{aligned}$$
(47)
$$\begin{aligned}& \begin{aligned}[b]w_{2}(x,t)={}&\bigl(-96k^{7} \beta ^{2}\operatorname{sech}^{4}(kx)\tanh(kx)+144k^{7} \beta ^{2}\operatorname{sech}^{6}(kx)\tanh(kx)\bigr) \\ & {}\times \frac{\Gamma (2\alpha +1)}{\Gamma (3\alpha +1)\Gamma (1+\alpha )\Gamma (1+\alpha )}t^{3 \alpha}+ \bigl(16k^{6}\beta \operatorname{sech}^{3}(kx)-24k^{6}\operatorname{sech}^{4}(kx) \\ &{}+72k^{6}\operatorname{sech}^{4}(kx)\tanh^{2}(kx)-8c_{1}k^{4} \beta \operatorname{sech}^{2}(kx)\tanh(kx)\\ & {}-24c_{1}k^{4} \beta \operatorname{sech}^{4}(kx)\tanh(kx) \\ & {}- 8\beta ^{2}k^{4}\operatorname{sech}^{2}(kx)+12 \beta ^{2}k^{4}\operatorname{sech}^{4}(kx)\bigr) \frac{t^{2\alpha}}{\Gamma (2\alpha +1)} \\ & {}\times \bigl[-8k^{5}\tanh(kx)+8c_{1}k^{3} \operatorname{sech}^{4}(kx)-4c_{1}k^{3} \operatorname{sech}^{2}(kx)+k^{3} \beta \tanh(kx) \\ & {}- 24k^{3}\tanh(kx)\operatorname{sech}^{2}(kx)-c_{1}k \beta \operatorname{sech}^{2}(kx)\bigr] \frac{t^{\alpha}}{\Gamma (1+\alpha )}, \end{aligned} \end{aligned}$$
(48)
$$\begin{aligned}& \dots \\ & \begin{aligned}[b]u_{n}(x,t)={}&E^{-1} \biggl[v^{\alpha}E\biggl[\frac{1}{2}{(u_{0}+u_{1}+ \cdots +u_{n})}_{xxx}-3u_{0}{(u_{0}+u_{1}+ \cdots +u_{n})}_{x} \\ & {}+ 3\bigl((v_{0}+v_{1}+\cdots +v_{n}) (w_{0}+w_{1}+\cdots +w_{n}) \bigr)_{x}\biggr]\biggr]\\ & {}-E^{-1}\biggl[v^{ \alpha}E \biggl[\frac{1}{2}{(u_{0}+u_{1}+\cdots +u_{n-1})}_{xxx} - 3u_{0}{(u_{0}+u_{1}+\cdots +u_{n-1})}_{x}\\ & {}+ 3\bigl((v_{0}+v_{1}+ \cdots +v_{n-1}) (w_{0}+w_{1}+ \cdots +w_{n-1})\bigr)_{x}\biggr]\biggr], \end{aligned} \end{aligned}$$
(49)
$$\begin{aligned}& \begin{aligned}[b]v_{n}(x,t)={}&E^{-1} \bigl[v^{\alpha}E\bigl[-{(v_{0}+v_{1}+\cdots +v_{n})}_{xxx}\\ &{}+3{(u_{0}+u_{1}+ \cdots +u_{n})} {(v_{0}+v_{1}+\cdots +v_{n})}_{x}\bigr]\bigr] \\ &{}-E^{-1}\bigl[v^{\alpha}E\bigl[-{(v_{0}+v_{1}+ \cdots +v_{n-1})}_{xxx}\\ &{}+3{(u_{0}+u_{1}+ \cdots +u_{n-1})} {(v_{0}+v_{1}+\cdots +v_{n-1})}_{x}\bigr]\bigr], \end{aligned} \end{aligned}$$
(50)
$$\begin{aligned}& \begin{aligned}[b]w_{n}(x,t)={}&E^{-1} \bigl[v^{\alpha}E\bigl[-{(w_{0}+w_{1}+\cdots +w_{n})}_{xxx}\\ &{}+3(u_{0}+u_{1}+ \cdots +u_{n}){(w_{0}+w_{1}+\cdots +w_{n})}_{x}\bigr]\bigr] \\ &{}-E^{-1}\bigl[v^{\alpha}E\bigl[-{(w_{0}+w_{1}+ \cdots +w_{n-1})}_{xxx}\\ &{}+3(u_{0}+u_{1}+ \cdots +u_{n-1}){(w_{0}+w_{1}+\cdots +w_{n-1})}_{x}\bigr]\bigr]. \end{aligned} \end{aligned}$$
(51)

The series-form solution is given as

$$\begin{aligned}& \begin{aligned} &u(x,t)=u_{1}(x,t)+u_{2}(x,t)+u_{3}(x,t)+ \cdots +u_{n}(x,t), \\ &v(x,t)=v_{1}(x,t)+v_{2}(x,t)+v_{3}(x,t)+ \cdots +v_{n}(x,t), \\ &w(x,t)=w_{1}(x,t)+w_{2}(x,t)+w_{3}(x,t)+ \cdots +w_{n}(x,t), \end{aligned} \end{aligned}$$
(52)
$$\begin{aligned}& \begin{aligned}[b]u(x,t)={}&\frac{1}{3}\bigl(\beta -2k^{2}\bigr)+2k^{2}\tanh^{2}(kx)+ \bigl[96k^{7} \beta \operatorname{sech}^{4}(kx)\tanh(kx) \\ &{}-144k^{7}\beta ^{2}\tanh(kx)\operatorname{sech}^{6}(kx) -16c_{1}k^{7}\beta ^{2} \operatorname{sech}^{4}(kx)\tanh(kx)\\ &{}-16c_{1}k^{5} \beta ^{3}\operatorname{sech}^{4}(kx)\tanh(kx)\bigr] \\ &{}\times \frac{\Gamma (2\alpha +1)t^{3\alpha}}{\Gamma (3\alpha +1)\Gamma (1+\alpha )\Gamma (1+\alpha )}+\biggl[-48k^{6} \beta \operatorname{sech}^{4}(kx)\\ &{}+ \biggl(\frac{c_{0}}{3c_{1}}-8c_{0}\biggr)k^{6}\beta \tanh(kx)\operatorname{sech}^{2}(kx) \\ & {}+ (12c_{1}+72)k^{6}\operatorname{sech}^{4}(kx)+ \biggl(\frac{-116}{3}+8C_{1}\biggr)k^{6}\beta \operatorname{sech}^{6}(kx)\\ &{}+8 \beta ^{2}k^{4} \operatorname{sech}^{4}(kx) (c_{1}-1) \\ & {}+ 8\biggl(\frac{c_{0}k^{4}\beta ^{2}}{3c^{1}}+\frac{k^{2}\beta c_{1}}{3}-c_{0}k^{4} \beta ^{2}\biggr)\operatorname{sech}^{2}(kx)\tanh(kx)\\ &{}-8 \operatorname{sech}^{2}(kx) \biggl( \frac{4k^{4}\beta ^{2}+\beta ^{2}}{3}+\beta ^{2}k^{4}c_{1}\biggr)\biggr]\frac{t^{2\alpha}}{\Gamma (1+2\alpha )} \\ &{}+ \biggl[\frac{68}{3}k^{5}\tanh(kx) \operatorname{sech}^{2}(kx)-16k^{5}\tanh(kx)\\ &{}-4k^{3} \beta \tanh(kx)\biggr] \frac{t^{\alpha}}{\Gamma (1+\alpha )}+\cdots, \end{aligned} \end{aligned}$$
(53)
$$\begin{aligned}& \begin{aligned}[b]v(x,t)={}&{-}\frac{4k^{2}c_{0}(\beta +k^{2})}{3c_{1}^{2}}+ \frac{4k^{2}(\beta +k^{2})}{3c_{1}} \tanh(kx) \\ &{}\times \bigl(-96k^{9}\beta ^{2}\operatorname{sech}^{2}(kx) \tanh^{2}(kx)-96k^{7}\beta ^{3} \operatorname{sech}^{4}(kx)\tanh^{2}(kx)\bigr) \\ & {}\times \frac{\Gamma (2\alpha +1)t^{3\alpha}}{\Gamma (3\alpha +1)\Gamma (1+\alpha )\Gamma (1+\alpha )}\\ & {} +\biggl[\frac{16k^{8}}{c_{1}}\beta \operatorname{sech}^{4}(kx) \tanh(kx)-144k^{8}\beta \operatorname{sech}^{4}(kx)\tanh(kx) \\ & {}- 152k^{6}\beta ^{2}\operatorname{sech}^{2}(kx) \tanh(kx)-96k^{6}\beta ^{2}\operatorname{sech}^{4}(kx) \tanh(kx) \\ & {}+ \frac{16k^{6}\beta ^{2}}{c_{1}}\operatorname{sech}^{4}(kx)\tanh(kx)-8k^{4} \beta ^{3}\operatorname{sech}^{2}(kx)\tanh(kx)\biggr] \frac{t^{2\alpha}}{\Gamma (2\alpha +1)} \\ &{}\times \biggl[\frac{24k^{7}}{c_{1}}-\frac{24k^{7}}{c_{1}}\operatorname{sech}^{4}(kx)+ \frac{8k^{5}\beta \operatorname{sech}^{4}(kx)}{3c_{1}}- \frac{8k^{5}\beta \operatorname{sech}^{2}(kx)}{3c_{1}} \\ & {}+ \frac{32k^{5}\beta}{c_{1}}\operatorname{sech}^{2}(kx)\tanh^{2}(kx)+ \frac{4k^{3}\beta ^{2}}{3c_{1}}\operatorname{sech}^{2}(kx)\biggr] \frac{t^{\alpha}}{\Gamma (1+\alpha )}+\cdots, \end{aligned} \end{aligned}$$
(54)
$$\begin{aligned}& w(x,t)=c_{0}+c_{1}\tanh(kx)+ \bigl(-96k^{7}\beta ^{2}\operatorname{sech}^{4}(kx) \tanh(kx) \\& \hphantom{w(x,t)=} {}+ 144k^{7}\beta ^{2}\operatorname{sech}^{6}(kx) \tanh(kx)\bigr) \frac{\Gamma (2\alpha +1)}{\Gamma (3\alpha +1)\Gamma (1+\alpha )\Gamma (1+\alpha )}t^{3 \alpha} \\& \hphantom{w(x,t)=} {}+ \bigl(16k^{6}\beta \operatorname{sech}^{3}(kx)-24k^{6} \operatorname{sech}^{4}(kx)+72k^{6}\operatorname{sech}^{4}(kx) \tanh^{2}(kx) \\& \hphantom{w(x,t)=}{}- 8c_{1}k^{4}\beta \operatorname{sech}^{2}(kx) \tanh(kx)-24c_{1}k^{4}\beta \operatorname{sech}^{4}(kx) \tanh(kx) \\& \hphantom{w(x,t)=}{}- 8\beta ^{2}k^{4}\operatorname{sech}^{2}(kx)+12 \beta ^{2}k^{4}\operatorname{sech}^{4}(kx)\bigr) \frac{t^{2\alpha}}{\Gamma (2\alpha +1)} \\& \hphantom{w(x,t)=}{}\times \bigl[-8k^{5}\tanh(kx)+8c_{1}k^{3} \operatorname{sech}^{4}(kx)-4c_{1}k^{3} \operatorname{sech}^{2}(kx)+k^{3} \beta \tanh(kx) \\& \hphantom{w(x,t)=} {}- 24k^{3}\tanh(kx)\operatorname{sech}^{2}(kx)\bigr] \frac{t^{\alpha}}{\Gamma (1+\alpha )}+ \cdots . \end{aligned}$$
(55)

Figure 2 shows the analytic solution of \(u(x,t)\), \(v(x,t)\), and \(w(x,t)\) where \(\alpha =c_{1}=c_{0}=1\), \(k=0.01\), and \(\beta =1\). We can see the exact solution and the approximate solution of the Elzaki iterative method for the case of \(\alpha =1\) from Table 1.

Figure 2
figure 2

The graph of \(u(x,t)\), \(v(x,t)\), \(and w(x,t)\) when \(\alpha =c_{1}=c_{0}=1\), \(k=0.01\) and \(\beta =1\)

Table 1 Approximate solutions, exact solutions, and error estimates for the Elzaki iterative transformation method when α is 1 for Example 2

Remark

The reasons for the complexity of the solution are as follows:

1. Selection of initial values; 2. More parameters.

5 Conclusion

In this article, we use the Elzaki transform with an iterative method to solve fractional partial differential equations. We find that the results using the homotopy perturbation method and the method in this article to the Klein–Gordon problem are the same. We see that the errors were not significant by picking specific values. Therefore, employing the Elzaki transform and the iterative method to solve fractional partial differential equations is effective.