1 Introduction

Fractional calculus has several applications in science and engineering [1, 2]. It is extensively used in modeling physical and engineering phenomena in the form of fractional partial differential equations [36]. Many definitions of the fractional derivative have been introduced in the literature, such as the Riemann–Liouville definition [2], the Caputo definition [2], the Riesz definition [2], the the Caputo–Fabrizio definition [7], and Atangana–Baleanu definition [8]. In recent years, a novel fractional derivative has appeared in the literature called the generalized fractional derivative [9, 10]

$$ {}_{0} D_{t}^{\alpha,\rho } f ( t ) = \frac{\rho ^{ \alpha }}{\varGamma ( 1-\alpha )} t^{1-\rho } \frac{d}{dt} \int _{0}^{t} \frac{\tau ^{\rho -1}}{ ( t^{\rho } - \tau ^{\rho } ) ^{\alpha }} f ( \tau ) \,d\tau,\quad 0< \alpha < 1, \rho \text{ is a constant}, $$

which generalizes the Riemann–Liouville fractional derivative. This generalized fractional derivative has attracted the interest of many researchers. Many properties and applications of this generalized fractional derivative can be found in [916]. Some basic properties of the generalized fractional derivative are given in the Appendix.

The invariant subspace method (ISM) is a very effective method that can be used for obtaining exact solutions of fractional partial differential equations. It is widely used in getting exact solutions of fractional differential equations with Riemann–Liouville and Caputo fractional derivatives [1720]. It is also successfully utilized for getting exact solutions of fractional partial differential equations with conformable derivatives [21]. In this paper, we adapt the ISM to be utilized for obtaining exact solutions for some fractional partial differential equations with the generalized fractional Riemann–Liouville derivative. In the next section, we will introduce the ISM.

2 The invariant subspace method

The ISM can be used for solving the following fractional system of PDEs:

$$\begin{aligned} &{}_{0} D_{t}^{\alpha,\rho } u= F_{1} [ u,v ] = H_{1} ( x,v,u, v_{x}, u_{x}, v_{xx}, u_{xx},\dots ),\\ &{}_{0} D _{t}^{\alpha,\rho } v= F_{2} [ u,v ] = H_{2} ( x,v,u, v_{x}, u_{x}, v_{xx}, u_{xx},\dots ). \end{aligned} $$
(1)

The ISM can be summarized in the following steps:

Step 1. Assume the solution of Eq. (1) in the form

$$ u ( x,t ) = \sum_{i=1}^{j} A_{i} ( t ) \boldsymbol{B}_{i} ( x ),\qquad v(x,t)= \sum _{i=1}^{k} C_{i} ( t ) \boldsymbol{D}_{i} ( x ), $$
(2)

where j and k depend upon the dimension of the invariant subspace.

Step 2. Determine the functions \(\boldsymbol{B}_{i} ( x ), \boldsymbol{D}_{i} ( x )\) as follows:

  • Solve the system of determining equations

    $$\begin{aligned} &\biggl( \frac{d^{j}}{d x^{j}} + c_{j-1} ( x ) \frac{d ^{j-1}}{d x^{j-1}} +\cdots + c_{1} ( x ) \frac{d}{dx} + c _{0} ( x ) \biggr) F_{1} \bigl[ y_{1} ( x ), y_{2} (x) \bigr] =0,\\ &\biggl( \frac{d^{k}}{d x^{k}} + r_{k-1} ( x ) \frac{d^{k-1}}{d x^{k-1}} +\cdots + r_{1} ( x ) \frac{d}{dx} + r_{0} ( x ) \biggr) F_{2} \bigl[ y_{1} ( x ), y_{2} (x) \bigr] =0, \end{aligned} $$
    (3)

    to obtain the coefficients \(c_{0} ( x ), \dots, c_{j-1} ( x )\) and \(r_{0} ( x ), \dots, r_{k-1} ( x )\);

  • Solve the system of ordinary differential equations

    $$\begin{aligned} &\biggl( \frac{d^{j}}{d x^{j}} + c_{j-1} ( x ) \frac{d ^{j-1}}{d x^{j-1}} +\cdots + c_{1} ( x ) \frac{d}{dx} + c _{0} ( x ) \biggr) y_{1} ( x ) =0,\\ & \biggl( \frac{d^{k}}{d x^{k}} + r_{k-1} ( x ) \frac{d^{k-1}}{d x ^{k-1}} +\cdots + r_{1} ( x ) \frac{d}{dx} + r_{0} ( x ) \biggr) y_{2} (x)=0, \end{aligned}$$
    (4)

    to obtain the solution

    $$ y_{1} = \sum_{i=1}^{j} h_{i} \boldsymbol{B}_{i} ( x ),\qquad y _{2} = \sum _{i=1}^{k} s_{i} \boldsymbol{D}_{i} ( x ), $$
    (5)

    where \(h_{i}, i=1,\dots,j, s_{i}, i=1,\dots,k\) are arbitrary constants.

Step 3. Substitute Eq. (2) into Eq. (1) to obtain a system of fractional ordinary differential equations in \(A_{i} ( t )\) and \(C_{i} ( t )\).

In the following section, we solve some fractional differential equations using ISM.

3 Numerical examples

Example 3.1

Let us consider the time fractional Hunter–Saxton equation [19, 21]

$$ {}_{0} D_{t}^{\alpha,\rho } u- \bigl( {}_{0} D_{t}^{\alpha,\rho } u \bigr)_{xx} =u u_{xxx} +2 u_{x} u_{xx}. $$
(6)

Using the ISM, we have obtained the following:

Four-Dimensional Invariant Subspace Classification of Eq. (6). Here, Eq. (4) is given by

$$ y^{(4)} + a_{3} ( x ) y^{(3)} + a_{2} ( x ) y^{\prime \prime } + a_{1} ( x ) y ' + a_{0} (x)y=0. $$
(7)

Also,

$$ F [ y ] =y y^{\prime \prime \prime } +2 y ' y^{\prime \prime }. $$
(8)

Substituting Eqs. (7) and (8) into Eq. (3) (with \(j=4\)), we obtain determining equations in \(a_{3}, a_{2}, a_{1}, a_{0}\). After solving them, we get

$$ a_{3} = a_{2} = a_{1} = a_{0} =0. $$
(9)

Substituting Eq. (9) into Eq. (7) and solving Eq. (7), we obtain

$$ y= \mathrm{c}_{1} + c_{2} x+ c_{3} x^{2} + c_{4} x^{3}. $$
(10)

The solution of Eq. (6) can be written in the form

$$ u ( x,t ) = A_{1} ( t ) + A_{2} ( t ) x+ A_{3} ( t ) x^{2} + A_{4} ( t ) x^{3}. $$
(11)

Substituting Eq. (11) into Eq. (6), we obtain

$$ \begin{aligned} &{-}42 A_{3} A_{4} + {}_{0} D_{t}^{\alpha,\rho } A_{3} =0,\\ &{ -}8 A_{3}^{2} -18 A_{2} A_{4} + {}_{0} D_{t}^{\alpha,\rho } A_{2} -6 {}_{0} D_{t} ^{\alpha,\rho } A_{4} =0,\\ &{ -}4 A_{2} A_{3} -6 A_{1} A_{4} + {}_{0} D _{t}^{\alpha,\rho } A_{1} -2 {}_{0} D_{t}^{\alpha,\rho } A_{3} =0,\\ &{ -}42 \mathrm{A}_{4}^{2} + {}_{0} D_{t}^{\alpha,\rho } A_{4} =0. \end{aligned} $$
(12)

Assume

$$ A_{1} = s_{1} t^{v_{1}},\qquad A_{2} = s_{2} t^{v_{2}}, \qquad A_{3} = s_{3} t^{v _{3}}, \qquad A_{4} = s_{4} t^{v_{4}}. $$
(12a)

Using relation (A1) in the Appendix, system (12) becomes

$$\begin{aligned} &s_{3} \rho ^{\alpha } \frac{\varGamma ( \frac{v_{3}}{\rho } +1 )}{ \varGamma ( \frac{v_{3}}{\rho } -\alpha +1 )} t^{v_{3} - \alpha \rho } -42 s_{3} s_{4} t^{v_{3} + v_{4}} =0, \end{aligned}$$
(12b)
$$\begin{aligned} &\frac{s_{2} \rho ^{\alpha } \varGamma ( \frac{v_{2}}{\rho } +1 )}{ \varGamma ( \frac{v_{2}}{\rho } -\alpha +1 )} t^{v_{2} - \alpha \rho } -18 s_{2} s_{4} t^{v_{2} + v_{4}} -8 s_{3}^{2} t^{2 v _{3}} - \frac{6 s_{4} \rho ^{\alpha } \varGamma ( \frac{v_{4}}{ \rho } +1 )}{\varGamma ( \frac{v_{4}}{\rho } -\alpha +1 )} t^{v_{4} -\alpha \rho } =0, \end{aligned}$$
(12c)
$$\begin{aligned} &{-}6 s_{1} s_{4} t^{v_{1} + v_{4}} + \frac{s_{1} \rho ^{\alpha } \varGamma ( \frac{v_{1}}{\rho } +1 )}{\varGamma ( \frac{v_{1}}{ \rho } -\alpha +1 )} t^{v_{1} -\alpha \rho } -4 s_{2} s_{3} t ^{v_{2} + v_{3}} - \frac{2 s_{3} \rho ^{\alpha } \varGamma ( \frac{v _{3}}{\rho } +1 )}{\varGamma ( \frac{v_{3}}{\rho } -\alpha +1 )} t^{v_{3} -\alpha \rho } =0, \end{aligned}$$
(12d)
$$\begin{aligned} &s_{4} \rho ^{\alpha } \frac{\varGamma ( \frac{v_{4}}{\rho } +1 )}{ \varGamma ( \frac{v_{4}}{\rho } -\alpha +1 )} t^{v_{4} - \alpha \rho } -42 s_{4}^{2} t^{2 v_{4}} =0. \end{aligned}$$
(12e)

Equation (12e) is satisfied when

$$ v_{4} =-\alpha \rho, \qquad s_{4} = \frac{\rho ^{\alpha } \varGamma ( 1- \alpha )}{42 \varGamma ( 1-2\alpha )}. $$
(12f)

Substituting Eq. (12f) into Eq. (12c), we obtain

$$ \frac{1}{7} s_{2} \rho ^{\alpha } t^{v_{2} -\alpha \rho } \biggl( \frac{7 \varGamma ( \frac{v_{2}}{\rho } +1 )}{\varGamma ( \frac{v _{2}}{\rho } -\alpha +1 )} - \frac{3 \varGamma ( 1-\alpha )}{ \varGamma ( 1-2\alpha )} \biggr) -8 s_{3}^{2} t^{2 v_{3}} - \frac{\rho ^{2\alpha } \varGamma ( 1-\alpha )^{2} t^{-2 \alpha \rho }}{7 \varGamma ( 1-2\alpha )^{2}} =0. $$
(12g)

Equation (12g) is satisfied when

$$ v_{3} = v_{2} =-\alpha \rho,\qquad s_{2} = \frac{\rho ^{\alpha } \varGamma ( 1-\alpha )}{4 \varGamma ( 1-2\alpha )} + \frac{14 s_{3}^{2} \rho ^{-\alpha } \varGamma ( 1-2\alpha )}{ \varGamma ( 1-\alpha )}. $$
(12h)

Substituting Eq. (12f) and Eq. (12h) into Eq. (12d), we get

$$\begin{aligned} &t^{-2\alpha \rho } \biggl( - \frac{56 s_{3}^{3} \rho ^{-\alpha } \varGamma ( 1-2\alpha )}{\varGamma ( 1-\alpha )} - \frac{3 s_{3} \rho ^{\alpha } \varGamma ( 1-\alpha )}{\varGamma ( 1-2\alpha )} \biggr) \\ &\quad{} + \frac{1}{7} s_{1} \rho ^{\alpha } t^{v_{1} -\alpha \rho } \biggl( \frac{7 \varGamma ( \frac{v_{1}}{ \rho } +1 )}{\varGamma ( \frac{v_{1}}{\rho } -\alpha +1 )} - \frac{\varGamma ( 1-\alpha )}{\varGamma ( 1-2 \alpha )} \biggr) =0. \end{aligned}$$
(12i)

Equation (12i) is satisfied when

$$ v_{1} =-\alpha \rho,\qquad s_{1} = \frac{196}{3} s_{3}^{3} \rho ^{-2\alpha } \biggl( \frac{\varGamma ( 1-2\alpha )}{\varGamma ( 1- \alpha )} \biggr)^{2} + \frac{7 s_{3}}{2}. $$
(12j)

When substituting Eq. (12f), Eq. (12h) and Eq. (12j) into Eq. (12b), we can see that Eq. (12b) is satisfied identically. Hence, the solution of the system (12) is given by

$$ \begin{aligned} &A_{1} = t^{-\alpha \rho } \biggl( \frac{196}{3} s_{3}^{3} \rho ^{-2 \alpha } \biggl[ \frac{\varGamma ( 1-2\alpha )}{\varGamma ( 1-\alpha )} \biggr]^{2} + \frac{7 s_{3}}{2} \biggr),\quad \alpha \neq 1,\\ &A_{2} = \biggl( \frac{\rho ^{\alpha } \varGamma ( 1- \alpha )}{4 \varGamma ( 1-2\alpha )} + \frac{14 s _{3}^{2} \rho ^{-\alpha } \varGamma ( 1-2\alpha )}{\varGamma ( 1-\alpha )} \biggr) t^{-\alpha \rho },\quad \alpha \neq \frac{1}{2}, \\ &\mathrm{A}_{3} = s_{3} t^{-\alpha \rho },\\ & A_{4} = \frac{ \rho ^{\alpha } \varGamma (1-\alpha )}{42\varGamma (1-2\alpha )} t^{-\alpha \rho }, \end{aligned} $$
(13)

where \(s_{3}\) is a constant. Finally, the solution of Eq. (6) is given by

$$\begin{aligned} u ( x,t ) ={}& \biggl( \frac{196}{3} s_{3}^{3} \rho ^{-2 \alpha } \biggl[ \frac{\varGamma ( 1-2\alpha )}{\varGamma ( 1-\alpha )} \biggr]^{2} + \frac{7 s_{3}}{2} \biggr) t ^{-\alpha \rho } \\ &{}+ \biggl( \frac{\rho ^{\alpha } \varGamma ( 1- \alpha )}{4 \varGamma ( 1-2\alpha )} + \frac{14 s _{3}^{2} \rho ^{-\alpha } \varGamma ( 1-2\alpha )}{\varGamma ( 1-\alpha )} \biggr) t^{-\alpha \rho } x+ s_{3} t^{- \alpha \rho } x^{2} \\ &{}+ \frac{\rho ^{\alpha } \varGamma (1-\alpha )}{42 \varGamma (1-2\alpha )} t^{-\alpha \rho } x^{3}. \end{aligned}$$
(14)

Example 3.2

Let us consider the time fractional nonlinear diffusion equation [22]

$$ {}_{0} D_{t}^{\alpha,\rho } u=k u_{xx} - \frac{1}{2} ( u_{x} ) ^{2}. $$
(15)

Using the same technique used in Example 3.1, we obtain the following case for Eq. (15):

Three-Dimensional Invariant Subspace of Eq. (15). It is easy to show that Eq. (15) admits the invariant subspace [22] \(L\{1,x, x^{2} \}\). The solution of Eq. (15) can be formulated as

$$ u= A_{5} ( t ) + A_{6} ( t ) x+ A_{7} ( t ) x^{2}. $$
(16)

Substituting Eq. (16) into Eq. (15) and comparing both sides of Eq. (15), we get

$$\begin{aligned} &\frac{A_{6}^{2}}{2} -2k A_{7} + {}_{0} D_{t}^{\alpha,\rho } A_{5} =0,\\ & 2 A_{6} A_{7} + {}_{0} D_{t}^{\alpha,\rho } A_{6} =0, \\ &2 A_{7}^{2} + {}_{0} D_{t}^{\alpha,\rho } A_{7} =0. \end{aligned} $$
(17)

We now solve system (17), to get

$$\begin{aligned} &A_{5} =- \frac{k ( \varGamma ( 1-\alpha ) ) ^{2}}{\varGamma ( 1-2a )} - \frac{\mathrm{b}_{2}^{2} \rho ^{- \alpha } \varGamma ( 1-2\alpha )}{2 \varGamma ( 1- \alpha )} t^{-\alpha \rho },\\ &A_{6} = b_{2} t^{-\alpha \rho },\\ & A _{7} =- \frac{\rho ^{\alpha } \varGamma ( 1-\alpha )}{2 \varGamma ( 1-2\alpha )} t^{-\alpha \rho }, \end{aligned} $$
(18)

where \(b_{2}\) is a constant. Finally, the exact solution of Eq. (15) is given by

$$ u=- \frac{k ( \varGamma ( 1-\alpha ) )^{2}}{ \varGamma ( 1-2a )} - \frac{\mathrm{b}_{2}^{2} \rho ^{- \alpha } \varGamma ( 1-2\alpha )}{2 \varGamma ( 1-\alpha )} t^{-\alpha \rho } + b_{2} x t^{-\alpha \rho } - \frac{ \rho ^{\alpha } \varGamma ( 1-\alpha )}{2 \varGamma ( 1-2 \alpha )} x^{2} t^{-\alpha \rho }. $$

Example 3.3

Let us consider the time fractional thin-film equation [19, 21]

$$ {}_{0} D_{t}^{\alpha,\rho } u=-u u_{xxxx} +\beta u_{x} u_{xxx} + \gamma ( u_{xx} )^{2}. $$
(19)

Using the same technique used in Example 3.1, we obtain the following cases for Eq. (19):

Case 1: Two-Dimensional Invariant Subspace Classification of Eq. (19). The two-dimensional invariant subspace admitted by Eq. (19) is {\(1, ( b_{3} +x)^{4}\)}, where \(b_{3} \) is a constant. Therefore, the solution of Eq. (19) can be written in the form

$$ u ( x,t ) = A_{8} ( t ) + A_{9} ( t ) ( b_{3} +x )^{4}. $$
(20)

Substituting Eq. (20) into Eq. (19), we get

$$\begin{aligned} &{-}24(-1+4\beta +6\gamma )A_{9}^{2} + {}_{0} D_{t}^{\alpha,\rho } A _{9} =0,\\ & 24 A_{8} A_{9} + {}_{0} D_{t}^{\alpha,\rho } A_{8} =0. \end{aligned} $$
(21)

Upon solving Eq. (21), we get

$$ \begin{aligned} &A_{9} = \frac{\rho ^{\alpha } \varGamma (1-\alpha )}{24\varGamma (1-2\alpha )(4\beta +6\gamma -1)} t^{-\alpha \rho },\quad \alpha \neq \frac{1}{2}, 4 \beta +6\gamma -1\neq 0,\\ & A_{8} = b_{4} t^{s_{1}}, \end{aligned}$$
(22)

where \(s_{1}\) satisfies the equation

$$ ( 4\beta +6\gamma -1 ) \frac{\varGamma ( \frac{s_{1}}{ \rho } +1 )}{\varGamma ( \frac{\mathrm{s}_{1}}{\rho } - \alpha +1 )} + \frac{\varGamma (1-\alpha )}{\varGamma (1-2\alpha )} =0, $$
(23)

and \(b_{4}\) is a constant.

The solution of Eq. (19), in this case, is given by

$$ u ( x,t ) = b_{4} t^{s_{1}} + \frac{\rho ^{\alpha } \varGamma (1-\alpha )}{24\varGamma (1-2\alpha )(4\beta +6\gamma -1)} ( b_{3} +x )^{4} t^{-\alpha \rho }. $$
(24)

Case 2: Three-Dimensional Invariant Subspace Classification of Eq. (19). The first three-dimensional invariant subspace admitted by Eq. (19) is {\(1, \sin ( b_{5} x ), \cos ( b_{5} x )\)} with \(\beta =1-\gamma \) and \(b_{5}\) being a constant. Therefore, the solution of Eq. (19) can be written in the form

$$ u ( x,t ) = A_{10} ( t ) + A_{11} ( t ) \cos ( b_{5} x ) + A_{12} ( t ) \sin ( b_{5} x). $$
(25)

Substituting Eq. (25) into Eq. (19), we get

$$\begin{aligned} &{-} b_{5}^{4} ( -1+\gamma ) \bigl( A_{11}^{2} + A_{12} ^{2} \bigr) + {}_{0} D_{t}^{\alpha,\rho } A_{10} =0,\\ & b_{5}^{4} A _{10} A_{11} + {}_{0} D_{t}^{\alpha,\rho } A_{11} =0,\\ & b_{5}^{4} A _{10} A_{12} + {}_{0} D_{t}^{\alpha,\rho } A_{12} =0. \end{aligned} $$
(26)

Upon solving Eq. (26), we get

$$ \begin{aligned} &A_{10} =- \frac{\rho ^{\alpha } \varGamma (1-\alpha )}{b_{5}^{4} \varGamma (1-2 \alpha )} t^{-\alpha \rho }, \quad \alpha \neq \frac{1}{2},\\ & A_{11} =\pm \sqrt{\frac{ \rho ^{2\alpha } \varGamma (1-\alpha )^{2}}{b_{5}^{8} (1-\gamma ) \varGamma (1-2\alpha )^{2}} - b_{6}^{2}} t^{-\alpha \rho },\quad \gamma \neq 1, \\ &A _{12} = b_{6} t^{-\alpha \rho }, \end{aligned} $$
(27)

where \(b_{6}\) is a constant.

The solution of Eq. (19), in this case, is given by

$$ u= t^{-\alpha \rho } \biggl( - \frac{\rho ^{\alpha } \varGamma ( 1- \alpha )}{b_{5}^{2} \varGamma ( 1-2\alpha )} \pm \sqrt{ \frac{ \rho ^{2\alpha } \varGamma (1-\alpha )^{2}}{\mathrm{b}_{5}^{8} (1-\gamma ) \varGamma (1-2\alpha )^{2}} - b_{6}^{2}} \cos ( b_{5} x ) + b_{6} \sin ( b_{5} x ) \biggr). $$
(28)

The second three-dimensional invariant subspace admitted by Eq. (19) is {\(1,x, ( b_{7} +x )^{4}\)} with \(\beta =1-\gamma \) and \(b_{7}\) being a constant. Therefore, the solution of Eq. (19) can be written in the form

$$ u ( x,t ) = A_{13} ( t ) + A_{14} ( t ) x+ A_{15} ( t ) ( b_{7} +x )^{4}. $$
(29)

Substituting Eq. (29) into Eq. (19), we get

$$\begin{aligned} &24 A_{15} \bigl( A_{13} + b_{7} ( -1+\gamma ) A_{14} - b _{7}^{4} ( 3+2\gamma ) A_{15} \bigr) + {}_{0} D_{t} ^{\alpha,\rho } A_{13} ( t ) + b_{7}^{4} {}_{0} D_{t} ^{\alpha,\rho } A_{15} ( t ) =0,\\ & 24\gamma A_{14} A_{15} + {}_{0} D_{t}^{\alpha,\rho } A_{14} ( t ) =0, \\ &24 ( 3+2\gamma ) A_{15}^{2} - {}_{0} D_{t}^{\alpha,\rho } A_{15} ( t ) =0. \end{aligned} $$
(30)

Upon solving Eq. (30), we get

$$\begin{aligned} &A_{13} =- \frac{b_{7} b_{8} ( -1+\gamma ) \varGamma ( 1-\alpha ) \varGamma ( 1-\alpha + \frac{s_{2}}{\rho } )}{ \varGamma ( 1-\alpha ) \varGamma ( 1-\alpha + \frac{s _{2}}{\rho } ) +3\varGamma ( 1-2\alpha ) \varGamma ( \frac{s_{2}}{\rho } +1 ) +2\gamma \varGamma (1-2\alpha ) \varGamma ( \frac{s_{2}}{\rho } +1 )} t^{s_{2}}, \\ & A_{14} = b _{8} t^{s_{2}},\\ & A_{15} = \frac{\rho ^{\alpha } \varGamma (1-\alpha )}{24(3+2 \gamma ) \varGamma (1-2\alpha )} t^{-\alpha \rho }, \end{aligned}$$
(31)

where \(b_{8}\) is a constant and \(s_{2}\) is the root of the equation

$$ \frac{\gamma \varGamma (1-\alpha )}{(3+2\gamma )\varGamma (1-2\alpha )} + \frac{ \varGamma ( \frac{\mathrm{s}_{2}}{\rho } +1 )}{\varGamma ( 1-a+ \frac{\mathrm{s}_{2}}{\rho } )} =0, $$

and \(\gamma \neq \{ 1,- \frac{3}{2} \}, \alpha \neq \frac{1}{2}, 1-\alpha + \frac{\mathrm{s}_{2}}{\rho } \neq 0, \frac{ \mathrm{s}_{2}}{\rho } \neq -1 \).

The solution of Eq. (19), in this case, is given by

$$\begin{aligned} u={}&{-} \frac{b_{7} b_{8} ( -1+\gamma ) \varGamma ( 1- \alpha ) \varGamma ( 1-\alpha + \frac{s_{2}}{\rho } )}{ \varGamma ( 1-\alpha ) \varGamma ( 1-\alpha + \frac{s _{2}}{\rho } ) +3\varGamma ( 1-2\alpha ) \varGamma ( \frac{s_{2}}{\rho } +1 ) +2\gamma \varGamma ( 1-2 \alpha ) \varGamma ( \frac{s_{2}}{\rho } +1 )} t^{s _{2}} \\ &{}+ b_{8} t^{s_{2}} x+ \frac{\rho ^{\alpha } \varGamma ( 1- \alpha )}{24 ( 3+2\gamma ) \varGamma ( 1-2 \alpha )} t^{-\alpha \rho } ( b_{7} +x )^{4}. \end{aligned}$$
(32)

Example 3.4

Let us consider the fractional Whitman–Broer–Kaup-type equation [19, 21]

$$\begin{aligned} &{}_{0} D_{t}^{\alpha,\rho } u=f u_{xx} -g u_{xxx} - \frac{1}{2} v u _{x} - \frac{1}{2} u v_{x},\\ & {}_{0} D_{t}^{\alpha,\rho } v=-f u_{xx} -v v_{x} - u_{x}. \end{aligned} $$
(33)

For a two-dimensional invariant subspace, we can assume the solution of (33) in the form

$$ \begin{aligned} &u= \mathrm{A}_{16} ( t ) + A_{17} ( t ) x,\\ & v= A_{18} ( t ) + A_{19} ( t ) x. \end{aligned} $$
(34)

Substituting (34) into (33), we obtain

$$\begin{aligned} &A_{19} A_{16} + A_{18} A_{17} +2 {}_{0} D_{t}^{\alpha,\rho } A_{16} +2x \bigl( A_{19} A_{17} + {}_{0} D_{t}^{\alpha,\rho } A_{17} \bigr) =0,\\ & A_{18} A_{19} + A_{17} + {}_{0} D_{t}^{\alpha,\rho } A_{18} +x \bigl( A_{19}^{2} + {}_{0} D_{t}^{\alpha,\rho } A_{19} \bigr) =0. \end{aligned} $$
(35)

Equating the coefficients of x with \(zero\), we obtain

$$ \begin{aligned} &A_{19} A_{16} + A_{18} A_{17} +2 {}_{0} D_{t}^{\alpha,\rho } A_{16} =0,\\ & A_{19} A_{17} + {}_{0} D_{t}^{\alpha,\rho } A_{17} =0, \\ &A_{18} A_{19} + A_{17} + {}_{0} D_{t}^{\alpha,\rho } A_{18} =0,\\ &A_{19}^{2} + {} _{0} D_{t}^{\alpha,\rho } A_{19} =0. \end{aligned} $$
(36)

The determining equations (36) have the solution

$$\begin{aligned} & A_{16} = \frac{b_{9}^{2} \varGamma ( \frac{2\mathrm{s}_{3}}{ \rho } -\alpha +1 ) ( \varGamma ( \frac{\mathrm{s} _{3}}{\rho } -\alpha +1 )^{2} - \varGamma ( \frac{ \mathrm{s}_{3}}{\rho } +1 ) \varGamma ( \frac{\mathrm{s} _{3}}{\rho } -2\alpha +1 ) )}{\varGamma ( \frac{ \mathrm{s}_{3}}{\rho } -\alpha +1 ) ( \varGamma ( \frac{ \mathrm{s}_{3}}{\rho } -\alpha +1 ) \varGamma ( \frac{2 \mathrm{s}_{3}}{\rho } -\alpha +1 ) -2 \varGamma ( \frac{2 \mathrm{s}_{3}}{\rho } +1 ) \varGamma ( \frac{\mathrm{s} _{3}}{\rho } -2\alpha +1 ) )} t^{2 \mathrm{s}_{3}}, \\ \begin{aligned} & A _{17} = \frac{b_{9} \rho ^{\alpha }}{\varGamma ( \frac{s_{3}}{ \rho } -\alpha +1 )} \biggl( \frac{\varGamma ( \frac{ \mathrm{s}_{3}}{\rho } -\alpha +1 )^{2}}{\varGamma ( \frac{ \mathrm{s}_{3}}{\rho } -2\alpha +1 )} - \varGamma \biggl( \frac{ \mathrm{s}_{3}}{\rho } +1 \biggr) \biggr) t^{\mathrm{s}_{3} - \alpha \rho },\\ & A_{18} = b_{9} t^{\mathrm{s}_{3}}, \end{aligned}\\ &A_{19} =- \frac{ \rho ^{\alpha } \varGamma ( \frac{\mathrm{s}_{3}}{\rho } -\alpha +1 )}{\varGamma ( \frac{\mathrm{s}_{3}}{\rho } -2\alpha +1 )} t^{-\alpha \rho }, \end{aligned}$$
(37)

where \(b_{9}\) is a constant and \(s_{3}\) satisfies the equation

$$\frac{\varGamma ( \frac{\mathrm{s}_{3}}{\rho } -\alpha +1 )}{ \varGamma ( \frac{\mathrm{s}_{3}}{\rho } -2\alpha +1 )} - \frac{ \varGamma ( 1-\alpha )}{\varGamma ( 1-2\alpha )} =0.$$

Substituting (37) into (34), we obtain

$$\begin{aligned} u={}& \frac{b_{9}^{2} \varGamma ( \frac{2\mathrm{s}_{3}}{\rho } - \alpha +1 ) ( \varGamma ( \frac{\mathrm{s}_{3}}{ \rho } -\alpha +1 )^{2} - \varGamma ( \frac{\mathrm{s}_{3}}{ \rho } +1 ) \varGamma ( \frac{\mathrm{s}_{3}}{\rho } -2 \alpha +1 ) )}{\varGamma ( \frac{\mathrm{s}_{3}}{ \rho } -\alpha +1 ) ( \varGamma ( \frac{\mathrm{s} _{3}}{\rho } -\alpha +1 ) \varGamma ( \frac{2\mathrm{s}_{3}}{ \rho } -\alpha +1 ) -2 \varGamma ( \frac{2\mathrm{s}_{3}}{ \rho } +1 ) \varGamma ( \frac{\mathrm{s}_{3}}{\rho } -2 \alpha +1 ) )} t^{2 \mathrm{s}_{3}} \\ &{}+ \frac{b_{9} \rho ^{\alpha }}{\varGamma ( \frac{s_{3}}{\rho } -\alpha +1 )} \biggl( \frac{\varGamma ( \frac{\mathrm{s}_{3}}{\rho } -\alpha +1 ) ^{2}}{\varGamma ( \frac{\mathrm{s}_{3}}{\rho } -2\alpha +1 )} - \varGamma \biggl( \frac{\mathrm{s}_{3}}{\rho } +1 \biggr) \biggr) t ^{\mathrm{s}_{3} -\alpha \rho } x,\\ v={}& b_{9} t^{s_{3}} - \frac{ \rho ^{\alpha } \varGamma ( \frac{\mathrm{s}_{3}}{\rho } -\alpha +1 )}{\varGamma ( \frac{\mathrm{s}_{3}}{\rho } -2\alpha +1 )} x t^{-\alpha \rho }. \end{aligned}$$
(38)

Example 3.5

Let us consider the following system of time fractional diffusion equations [20]:

$$\begin{aligned} &{}_{0} D_{t}^{\alpha,\rho } u= u_{xx} + \rho _{1} ( v v_{x} ) _{x} +\mu v^{2},\\ &{}_{0} D_{t}^{\alpha,\rho } v= v_{xx} +\beta u_{xx} +\gamma u+\delta v. \end{aligned} $$
(39)

It is easy to show that Eq. (39) admits the invariant subspace [20] \(L\{ \cos ( \sqrt{a_{0}} x ), \sin ( \sqrt{a _{0}} x ) \}\times L\{ e^{- b_{0} x} \}\). The solution of Eq. (39) can be formulated as

$$\begin{aligned} &u= \mathrm{A}_{20} ( t ) \cos ( \sqrt{a_{0}} x ) + A_{21} ( t ) \sin ( \sqrt{a_{0}} x ),\\ & v= A_{22} ( t ) e^{- b_{0} x}, \end{aligned}$$
(40)

where \(\gamma =\beta a_{0}\) and \(\mu =-2 \rho _{1} b_{0}^{2}\). We now substitute Eq. (40) into Eq. (39) and compare both sides of Eq. (39) to get

$$\begin{aligned} &{}_{0} D_{t}^{\alpha,\rho } A_{20} =- a_{0} A_{20}, \\ &{}_{0} D_{t}^{ \alpha,\rho } A_{21} =- a_{0} A_{21},\\ & {}_{0} D_{t}^{\alpha,\rho } A _{22} = \bigl( \delta + b_{0}^{2} \bigr) A_{22}. \end{aligned} $$
(41)

The determining equations (41) have the solution [11]

$$\begin{aligned} &A_{20} = b_{10} \biggl( \frac{t^{\rho }}{\rho } \biggr)^{\alpha -1} E _{\alpha,\alpha } \biggl( - a_{0} \biggl( \frac{t^{\rho }}{\rho } \biggr) ^{\alpha } \biggr), \\ &A_{21} = b_{11} \biggl( \frac{t^{\rho }}{\rho } \biggr)^{\alpha -1} E _{\alpha,\alpha } \biggl( - a_{0} \biggl( \frac{t^{\rho }}{\rho } \biggr) ^{\alpha } \biggr), \\ &A_{22} = b_{12} \biggl( \frac{t^{\rho }}{\rho } \biggr)^{\alpha -1} E _{\alpha,\alpha } \biggl( \bigl( \delta + b_{0}^{2} \bigr) \biggl( \frac{t^{\rho }}{\rho } \biggr)^{\alpha } \biggr), \end{aligned}$$

where \(b_{10}, b_{11}\) and \(b_{12} \) are constants. In this case, the solution of Eq. (39) is given by

$$ \begin{aligned} &u= \biggl( \frac{t^{\rho }}{\rho } \biggr)^{\alpha -1} E_{\alpha, \alpha } \biggl( - a_{0} \biggl( \frac{t^{\rho }}{\rho } \biggr)^{ \alpha } \biggr) \bigl( b_{10} \cos ( \sqrt{a_{0}} x ) + b_{11} \sin ( \sqrt{a_{0}} x ) \bigr),\\ & v= b_{12} \biggl( \frac{t^{\rho }}{\rho } \biggr)^{\alpha -1} E_{\alpha, \alpha } \biggl( \bigl( \delta + b_{0}^{2} \bigr) \biggl( \frac{t ^{\rho }}{\rho } \biggr)^{\alpha } \biggr) e^{- b_{0} x}, \end{aligned} $$
(42)

where \(E_{\alpha,\beta } ( t )\) is the Mittag-Leffler function defined by [2]

$$ E_{\alpha,\beta } ( t ) = \sum_{k=0}^{\infty } \frac{t ^{k}}{\varGamma ( k\alpha +\beta )}. $$

Also, Eq. (39) admits the invariant subspace [20] \(L\{1, e^{- b_{13} x}, e^{-2 b_{13} x} \}\times L\{1, e^{- b_{13} x} \}\). The solution of Eq. (39) can be formulated as

$$ \begin{aligned} &u= \mathrm{A}_{23} ( t ) + A_{24} ( t ) e ^{- b_{13} x} + A_{25} (t) e^{- 2b_{13} x},\\ & v= A_{26} (t)+ A_{27} ( t ) e^{- b_{13} x}, \end{aligned} $$
(43)

where \(\gamma =-4\beta b_{13}^{2}\). We now substitute Eq. (43) into Eq. (39) and compare both sides of Eq. (39) to get

$$ \begin{aligned} &{}_{0} D_{t}^{\alpha,\rho } A_{23} =\mu A_{26}^{2},\\ & {}_{0} D_{t}^{ \alpha,\rho } A_{24} = \bigl( \rho _{1} b_{13}^{2} +2\mu \bigr) A _{26} A_{27} + b_{13}^{2} A_{24},\\ & {}_{0} D_{t}^{\alpha,\rho } A_{25} =4 b_{13}^{2} A_{25} + \bigl( 2 \rho _{1} b_{13}^{2} +\mu \bigr) A _{27}^{2},\\ & {}_{0} D_{t}^{\alpha,\rho } A_{26} =\delta A_{26} -4 \beta b_{13}^{2} A_{23},\\ & {}_{0} D_{t}^{\alpha,\rho } A_{27} = \bigl( \delta + b_{13}^{2} \bigr) A_{27} -3\beta b_{13}^{2} A_{24}. \end{aligned} $$
(44)

The exact solution of the system (44) can’t be obtained, in general. A special solution of the system (44) when \(\mu =-2 \rho _{1} b_{13}^{2}\) is given by

$$\begin{aligned} &A_{23} = A_{26} =0, \\ &A_{24} = b_{14} \biggl( \frac{t^{\rho }}{\rho } \biggr)^{\alpha -1} E _{\alpha,\alpha } \biggl( b_{13}^{2} \biggl( \frac{t^{\rho }}{\rho } \biggr)^{\alpha } \biggr), \\ &A_{25} = b_{15} \biggl( \frac{t^{\rho }}{\rho } \biggr)^{\alpha -1} E _{\alpha,\alpha } \biggl( 4 b_{13}^{2} \biggl( \frac{t^{\rho }}{ \rho } \biggr)^{\alpha } \biggr), \\ &A_{27} = b_{16} \biggl( \frac{t^{\rho }}{\rho } \biggr)^{\alpha -1} E _{\alpha,\alpha } \biggl( \bigl( \delta + b_{13}^{2} \bigr) \biggl( \frac{t^{\rho }}{\rho } \biggr)^{\alpha } \biggr)\\ &\phantom{A_{27} =}{} - 3 b_{14} \beta b_{13}^{2} \int _{0}^{t} \biggl( \frac{t^{\rho } - \tau ^{\rho }}{ \rho } \biggr)^{\alpha -1} \\ &\phantom{A_{27} =}{}\times E_{\alpha,\alpha } \biggl( \bigl( \delta + b_{13}^{2} \bigr) \biggl( \frac{t^{\rho } - \tau ^{\rho }}{ \rho } \biggr)^{\alpha } \biggr) \biggl( \frac{\tau ^{\rho }}{\rho } \biggr)^{\alpha -1} \frac{E_{\alpha,\alpha } ( b_{13}^{2} ( \frac{\tau ^{\rho }}{\rho } )^{\alpha } )}{ \tau ^{\rho -1}} \,d\tau. \end{aligned}$$

In this case, the solution of Eq. (39) is given by

$$\begin{aligned} &u= b_{14} \biggl( \frac{t^{\rho }}{\rho } \biggr)^{\alpha -1} E_{ \alpha,\alpha } \biggl( b_{13}^{2} \biggl( \frac{t^{\rho }}{\rho } \biggr) ^{\alpha } \biggr) e^{- b_{13} x} + b_{15} \biggl( \frac{t^{\rho }}{ \rho } \biggr)^{\alpha -1} E_{\alpha,\alpha } \biggl( 4 b_{13}^{2} \biggl( \frac{t^{\rho }}{\rho } \biggr)^{\alpha } \biggr) e^{- 2b _{13} x}, \\ &v= \biggl( b_{16} \biggl( \frac{t^{\rho }}{\rho } \biggr) ^{\alpha -1} E_{\alpha,\alpha } \biggl( \bigl( \delta + b_{13}^{2} \bigr) \biggl( \frac{t^{\rho }}{\rho } \biggr)^{\alpha } \biggr) \\ &\phantom{v=}{}- 3 b_{14} \beta b_{13}^{2} \int _{0}^{t} \biggl( \frac{t^{\rho } - \tau ^{\rho }}{\rho } \biggr)^{\alpha -1} E_{\alpha,\alpha } \biggl( \bigl( \delta + b_{13}^{2} \bigr) \biggl( \frac{t^{\rho } - \tau ^{\rho }}{\rho } \biggr)^{\alpha } \biggr)\\ &\phantom{v=}{}\times \biggl( \frac{ \tau ^{\rho }}{\rho } \biggr)^{\alpha -1} \frac{E_{\alpha,\alpha } ( b_{13}^{2} ( \frac{\tau ^{\rho }}{\rho } )^{ \alpha } )}{\tau ^{\rho -1}} \,d\tau \biggr) e^{- b_{13} x}, \end{aligned} $$
(45)

where, \(b_{13}, b_{14}, b_{15}, b_{16}\) are constants.

4 Conclusions

In this paper, we have utilized the ISM for getting exact solutions for some nonlinear fractional partial differential equations with generalized fractional derivatives. The obtained solutions in this paper are given in generalized forms which depend upon the parameter ρ. We can retrieve the obtained solutions in [19, 20, 22] by putting \(\rho =1\) in our obtained solutions. The ISM is a very powerful method that can be used to solve various fractional PDEs. In our future work, we will use the ISM for getting exact solutions of some fractional PDEs with Hilfer–Katugampola fractional derivatives [23].