Introduction

In recent years, many researchers have been interested in the study of initial value problems of some special second-order nonlinear singular ordinary differential equations (ODEs). One of these most important equations is the Emden-Fowler (EF) equation, which has a variety of applications in various fields. Robert Emden [1] and Fowler [2] have studied the EF equation in detail. The general mathematical model of EF is expressed as

$$\begin{aligned} y^{\prime \prime }(t)+\frac{r}{t}y^{\prime }(t)+\gamma g(t)f(y(t))=0,\quad r\ge 1, \end{aligned}$$
(1.1)

with the initial conditions (ICs)

$$\begin{aligned} y(0)=\theta _{1},\quad y^{\prime }(0)=\theta _{2}. \end{aligned}$$
(1.2)

where g(t) and f(y(t)) are functions of t and y(t), respectively, \(r, \gamma ,\theta _{1}\), and \(\theta _{2}\) are constants. Solving differential equations with singularity behavior is a defy. In particular, the current EF equation problem, which involves a singularity at \(t=0\), is crucial in practical applications. Analytically, solving this equation is difficult, so to solve this problem various numerical techniques were used [3, 4]. For \(g(t)=1,\) and \(\gamma =1,\) Eq. (1.1) moderates to the Lane-Emden (LE) equation in its usual form. This equation has appeared in the work of Homer Lane and Robert Emden work. The inner construction of polytrophic stars, the gas cloud model, cluster galaxies, and radiative cooling are all represented by these models. No one can deny the usefulness and importance of these models, which have a wide range of applications in mathematical physics, astrophysics, and celestial mechanics such as isotropic continuous media, isothermal gas sphere models [5], dusty fluid models [6], oscillating magnetic systems [7], catalytic diffusion reactions [8], stellar structure models [9], electromagnetic theory [10], gaseous star density [11], and classical quantum mechanics [12].

The nonlinear singular ODE (1.1) was first developed by Jonathan Homer Lane [13], a U.S. astrophysicist who was interested in estimating both the temperature and the density of mass on the surface and after 37 years was investigated in greater depth by Emden [1]. This ODE in astrophysics is a dimensionless version of Poisson’s equation for a simple stellar model’s gravitational potential [14]. Go back to [15, 16] to get a sufficient explanation of deriving of the classic LE equation for modeling the thermal dynamics of a spherical cloud, which takes the following form:

$$\begin{aligned} y^{\prime \prime }(t)+\frac{2}{t}y^{\prime }(t)+y^{m}(t)=0,\quad t>0, \end{aligned}$$
(1.3)

with the ICs

$$\begin{aligned} y(0)=1,\quad y^{\prime }(0)=0. \end{aligned}$$
(1.4)

In quantum mechanics and astrophysics, the values of m physically lie in the interval [0,5]. In different literatures, the exact solutions of problem (1.31.4) have only been found at \(m = 0, 1, 5\) [16], and for other values of m, several methods have been successfully used to approximate the solution of this problem [17, 18].

One of the most essential significant classes of the differential equations is the delay differential (DD) equations. Due to their contributions significantly to solve the real-life problems. These equations have numerous applications in many biological models, as well as scientific phenomena such as communication system models, dynamical population models, economic systems, engineering systems, and transport models, so they have attracted a lot of attention from the research community [19, 20], and various numerical/analytical techniques are introduced to solve them [21, 22].

Fractional calculus is a new topic that appears as a generalization of integer calculus, in which the order will be non-integer (arbitrary). The dynamic behavior of various phenomena in engineering sciences, physics, and other disciplines of research can be explored more precisely using non-integer order differential equations. So, there are a growing number of applications of fractional-order calculus in different fields as e.g. Long electrical lines, electrochemical processes, dielectric polarization, colored noise, viscoelastic materials, chaos, control theory, and in many other areas. Recently, the VO differential equation in which the order is a function of space and/or time have been demonstrated their ability to accurately describe real world phenomena [23]. In the VO model, the next state is influenced by all of its former states, not only upon its current state as in the case of integer-order derivatives. So, the VO derivative is more realistic and generalized than the standard and fractional ones. VO differential equations have gotten a lot of attention lately as a result of their suitability modeling a wide range of phenomena across many fields of science and engineering, such as anomalous diffusion [24], viscoelastic mechanics [25], control systems [26], petroleum engineering [27], and many other branches of physics and engineering [28].

With this respect, the importance of the VO-EF-DDEs are quite clear, due to their massive applications in mathematical physics and engineering problems. For this significance, obtaining the numerical solutions of this type of equations are required since the exact solutions are usually not easy to claim, because of the kernel of the VO operators have a changing exponent. So, the main objective of the present work is to develop an efficient and accurate numerical technique for solving the following new classes of VO-EF-DDEs:

  • A class of variable order Emden-Fowler delay differential equations (VO-EF-DDEs) of the following form:

    $$\begin{aligned} D_{t}^{\nu (t)}y(at+b)+\frac{\lambda }{t}y^{\prime }(ct+d)+g(t)y(et+f)=F(t), \end{aligned}$$
    (1.5)

    with the ICs

    $$\begin{aligned} y(0)=\gamma _{1}, \, y^{\prime }(0)=\gamma _{2}, \end{aligned}$$
    (1.6)

    where \(\lambda \ge 1,\) \(\nu (t),g(t),\) and F(t) are given functions, the parameters \(a,b,c,d,e,f,\gamma _{1},\) and \(\gamma _{2}\) are known constants also \(D_{t}^{\nu (t)}\) denotes the Caputo fractional derivative of variable order, \(1< \nu (t)\le 2\) and y(t) is an unknown function. By taking \(g(t)=1\) the EF model reduces to the Lane-Emden model. The description of problem (1.5) in the VO operator \(\nu (t)\) has many advantages one of them; it describes the behavior of the system and its properties in a more accurate manner. Also, it’s important to mention that the model (1.51.6) covers the classical and the constant fractional models when \(\nu (t)\) is constant.

  • A system of variable order Emden-Fowler delay of differential equations (VO-EF-DDEs) of the following form

    $$\begin{aligned} \begin{aligned} D_{t}^{\nu (t)}y_{1}(at+b)+\frac{\lambda _{1}}{t}y_{1}^{\prime }(ct+d)+g_{1}(t)y_{1}(et+f)&=F_{1}(t),\\ D_{t}^{\nu (t)}y_{2}(at+b)+\frac{\lambda _{2}}{t}y_{2}^{\prime }(ct+d)+g_{2}(t)y_{2}(et+f)&=F_{2}(t), \end{aligned} \end{aligned}$$
    (1.7)

    with the following ICs

    $$\begin{aligned} \begin{aligned} y_{1}(0)&=\beta _{1}, \, y_{1}^{\prime }(0)=\beta _{2},\\ y_{2}(0)&=\beta _{3}, \, y_{2}^{\prime }(0)=\beta _{4}, \end{aligned} \end{aligned}$$
    (1.8)

    where \(\lambda _{1},\lambda _{2} \ge 1,\) \(a,b,c,d,e,f,\beta _{1},\beta _{2},\beta _{3}\) and \(\beta _{4}\) are known constants, the functions \(\nu (t),g_{1}(t),g_{2}(t),F_{1}(t)\) and \(F_{2}(t)\) are assumed to be known functions, and also \(D_{t}^{\nu (t)}\) is the Caputo fractional derivative of order \(1< \nu (x)\le 2.\) By taking \(g_{1}(t)= g_{2}(t)=1\) , the EF model reduces to the Lane-Emden model.

The suggested technique is based on the spectral collocation method with the OMs of variable/integer order differentiation of the SFGPs. To the best of our knowledge, the numerical treatments of VO-EF-DDEs and the system of VO-EF-DDEs have not been established by using SFGPs yet.

Spectral collocation methods are known to be one of the powerful numerical techniques for solving different kinds of differential equations due to their applicability in bounded and unbounded domains. The convergence speed is one of the major advantages of the spectral method. In general, spectral methods are promising candidates for solving fractional differential equations since their global nature fits well with the non-local definition of fractional operators [29, 30]. Spectral collocation methods have been widely used for solving problems with smooth solutions because of their efficiency, exponential rate of convergence, low computational cost, and high order of accuracy achieved using a minimal number of grid points. It is known that the accuracy of spectral methods increases with an increase in grid points but beyond a certain number of grid points, the accuracy rapidly deteriorates. Also, the limitation of spectral methods is that their accuracy deteriorates for complicated domains. OMs were restructured for solving numerous types of fractional differential equations (FDEs). The procedure of numerical methods in combining with OMs of some orthogonal polynomials for solving FDEs created extremely precise solutions for such equations. The essential step in the proposed technique is to represent the numerical solution of the problem as a finite sum using SFGPs as basis functions, then the OMs corresponding to VO/ integer order derivatives are derived. By using these OM in Eq. (1.5), and applying the collocation method which requires that the residual of VO-EF-DDEs is vanishing at N points that correspond to the Gauss quadrature nodes. When the obtained system of algebraic equations is completed with the initial conditions, \((N+1)\) algebraic equations are produced, which can be solved by utilizing any appropriate iterative technique.

The SFGPs have a number of characteristics that make them an ideal candidate for our suggested technique, like:

  • Due to the unique behavior of fractional differential and/or integral equations, the direct use of spectral methods using traditional orthogonal polynomials such as Legendre, Chebyshev, and Jacobi has low convergence rates. To remedy this difficulty, we employ SFGPs (see [31]), in which the variable t in the SCPs is replaced by \(t^{\mu }, 0<\mu \le 1, t\in [0, L].\) One of the benefits of fractional-order polynomials is in dealing with problems with smooth solutions, where any choice of the fractional factor \(\mu\) yields a highly accurate approximate solution. The fractional-order polynomials can lessen the loss of the order of convergence of the non-smoothness problems by suitably chosen of the factor μ.

  • For \(\mu =1,\) the SFGPS reduced to the SGPs. Numerous studies have shown that the Gegenbauer polynomials (GPs) are very effective in solving a wide range of issues [32,33,34].

  • The parameter \(\alpha >-0.5\) distributes the Gegenbauer polynomials (GPs). Every time this parameter was altered, a new polynomial was formed. As a result, they involve a limitless number of orthogonal polynomials like the Chebyshev polynomials (CPs) of the first kind with the parameter \(\alpha =0,\) the CPs of the second kind with the parameter \(\alpha =1,\) and the shifted Legendre polynomials (LPs) with the parameter \(\alpha =\frac{1}{2}\). The same results are assumed for the SFGPs.

The main advantages of the proposed scheme are the low-cost computing, small CPU time, and the simple implementation. Also the present method has the ability to convert the given problem into a system of algebraic equations, which is easy to solve. Many numerical experiments are presented to measure the quality of the presented scheme. The obtained numerical results are compared with other methods in the existing literature.

The following is the contents of this paper: The preliminaries of VO-fractional calculus and SFGPs are presented in Sect. 2. The various types of shifted fractional Gegenbauer operational matrices (SFGOMs) are deduced in Sect. 3. In Sect. 4, the methodology of the proposed technique is explained. In Sect. 5, some applications of the proposed algorithm to some numerical problems are offered to demonstrate the effectiveness of the proposed algorithm. At last, a conclusion is given in Sect. 6.

Preliminaries and definitions

Variable-order fractional derivative definition [35]

The Caputo fractional derivative of order \(\nu (t)\) for a continuously differentiable function \(y:[0,\infty ]\rightarrow R\) is defined as

$$\begin{aligned} D_{t}^{\nu (t)}y(t)=\frac{1}{\Gamma {(m-\nu (t))}}\int _{0}^{t}(t-\xi )^{m-\nu (t)-1}y^{(m)}(\xi )d\xi {,} \end{aligned}$$
(2.1)

where \(\nu (t)\) is a positive continuous bounded function and \(m-1< \nu (t)\le m.\)

Because of the ICs for fractional differential equations with Caputo derivatives are the same as for integer order differential equations; the Caputo type definition is particularly useful in a wide range of applications. The results stated in definition (2.1) have the following characteristics:

  • Linearity property:

    $$\begin{aligned} D_{t}^{\nu (t)}\left( a f(t)+b g(t)\right) =a D_{t}^{\nu (t)}f(t)+b D_{t}^{\nu (t)}g(t),\quad a,b\in \Re . \end{aligned}$$
  • \(D_{t}^{\nu (t)} a=0,\) a is constant.

  • \(D_{t}^{\nu (t)}t^{k}=\left\{ \begin{array}{ll} \frac{\Gamma {(k+1)}}{\Gamma {(k+1-\nu (t))}}t^{k-\nu (t)},\quad \hbox {for} \, k\in N_{0}\, \hbox {and}\, k\ge m \hbox {,}\\ \\ 0,\quad \hbox {for} \, k\in N_{0} \, \hbox {and} \, k<m,\, \hbox {where} \, N_{0}=N\cup \{0\} \hbox {.} \end{array} \right.\)

Shifted fractional Gegenbauer polynomials and some of their properties

Gegenbauer polynomials

The Gegenbauer polynomials \(C_{j}^{(\alpha )}(x),\) of degree \(j\in Z^{+},\) and associated with the parameter \(\alpha >\frac{-1}{2}\) are a sequence of real polynomials in the finite domain \([-1,1].\) They are a family of orthogonal polynomials which has many applications [32].

  • A suitable standardization of the Gegenbauer polynomials \(C_{j}^{(\alpha )}(x)\) of degree j and associated with the parameter \(\alpha > \frac{-1}{2}\) dates back to Doha [34], where the Gegenbauer polynomials can be represented by

    $$\begin{aligned} C_{j}^{(\alpha )}(x)=\frac{j!\Gamma {\left( \alpha +\frac{1}{2}\right) }}{\Gamma {\left( j+\alpha +\frac{1}{2}\right) }}P_{j}^{\left( \alpha -\frac{1}{2}, \alpha -\frac{1}{2}\right) }(x),\quad j=0,1,2,\ldots , \end{aligned}$$

    or equivalently

    $$\begin{aligned} C_{j}^{(\alpha )}(1)=1,\quad j=0,1,2,\cdots , \end{aligned}$$

    where \(P_{j}^{(\alpha -\frac{1}{2}, \alpha -\frac{1}{2})}(x)\) is the Jacobi polynomial of degree j.

  • As a result of this standardized \(C_{j}^{(0)}(x)\) becomes identical with the Chebyshev polynomials (CPs) of the first kind \(T_{j}(x).\) \(C_{j}^{(\frac{1}{2})}(x)\) is the Legendre polynomials (LPs) \(L_{j}(x).\) \(C_{j}^{(1)}(x)\) is equal to \(\frac{1}{(j+1)}U_{j}(x),\) where \(U_{j}(x)\) is the CPs of the second type [34].

  • The analytical form of the GPs is given by,

    $$\begin{aligned} C_{j}^{(\alpha )}(x)=\sum _{k=0}^{j}(-1)^{j-k}\frac{j!\Gamma {(\alpha +\frac{1}{2})}\Gamma {(j+k+2\alpha )}}{\Gamma {(k+\alpha +\frac{1}{2})}\Gamma {(j+2\alpha )}(j-k)!k!}\left( \frac{x+1}{2}\right) ^{k}. \end{aligned}$$
    (2.2)
  • The Gegenbauer polynomials can be generated using the following useful recurrence equation

    $$\begin{aligned} (j+2\alpha )C_{j+1}^{(\alpha )}(x)=2(j+\alpha )xC_{j}^{(\alpha )}(x)-jC_{j-1}^{(\alpha )}(x),\quad j\ge 1. \end{aligned}$$
    (2.3)
  • The Gegenbauer polynomials satisfy the following orthogonality relation

    $$\begin{aligned} \left<C_{i}^{(\alpha )}(x),C_{j}^{(\alpha )}(x)\right>=\int _{-1}^{1}C_{i}^{(\alpha )}(x)C_{j}^{(\alpha )}(x)\omega ^{(\alpha )}(x)dx=\lambda _{j}^{(\alpha )}\delta _{i,j}, \end{aligned}$$

    where \(\omega ^{(\alpha )}(t)\) is the weight function, and it is an even function given by the relation

    $$\begin{aligned} \omega ^{(\alpha )}(x)=\left( 1-x^{2}\right) ^{\alpha -\frac{1}{2}}, \end{aligned}$$

    and

    $$\begin{aligned} \lambda _{j}^{(\alpha )}=\Vert C_{j}^{(\alpha )}(x)\Vert ^{2}=\frac{2^{2\alpha -1}j!\Gamma ^{2}{\left( \alpha +\frac{1}{2}\right) }}{(j+\alpha )\Gamma {\left( j+2\alpha \right) }}, \end{aligned}$$

    is the normalization factor, and \(\delta _{i,j}\) is the Kronecker delta function.

  • We denote the zeros of the Gegenbauer polynomials (Gegenbauer-Gauss nodes) \(C_{N+1}^{(\alpha )}(x)\) by \(x_{N,j}^{(\alpha )}, j=0,\cdots ,N.\)

Shifted Gegenbauer polynomials

  • For using Gegenbauer polynomials in the interval [0, L],  the shifted Gegenbauer polynomials (SGPs) are formed by replacing the variable x with \(z=\frac{2x}{L}-1,\quad 0\le z\le L.\) So, we can write SGPs as

    $$\begin{aligned} C_{S,j}^{(\alpha )}(z)=C_{j}^{(\alpha )}\left( \frac{2x}{L}-1\right) . \end{aligned}$$
  • The explicit analytical form of the SGPs is given as

    $$\begin{aligned} C_{S,j}^{(\alpha )}(z)=\sum _{k=0}^{j}(-1)^{j-k}\frac{j!\Gamma {\left( \alpha +\frac{1}{2}\right) }\Gamma {\left( j+k+2\alpha \right) }}{\Gamma {\left( k+\alpha +\frac{1}{2}\right) }\Gamma {\left( j+2\alpha \right) }(j-k)!k!L^{k}}z^{k}, \end{aligned}$$
    (2.4)
  • These polynomials recover the shifted CPs of the first kind \(T_{S,j}(z)\equiv C_{S,j}^{(0)}(z),\) the shifted LPs \(L_{S,j}(z)\equiv C_{S,j}^{(\frac{1}{2})}(z),\) and the shifted CPs of the second kind \(C_{S,j}^{(1)}(z)\equiv \frac{1}{j+1}U_{S,j}(z).\)

  • The orthogonal relation of SGPs is getting from

    $$\begin{aligned} \left<C_{S,i}^{(\alpha )}(z),C_{S,j}^{(\alpha )}(z)\right>=\int _{0}^{L}C_{S,i}^{(\alpha )}(z)C_{S,j}^{(\alpha )}(z)\omega _{S}^{(\alpha )}(z)dz=\lambda _{S,j}^{(\alpha )}\delta _{i,j}, \end{aligned}$$
    (2.5)

    where \(\omega _{S}^{(\alpha )}(z)\) is the weight function, it is an even function given by the relation

    $$\begin{aligned} \omega _{S}^{(\alpha )}(z)=\left( zL-z^{2}\right) ^{\alpha -\frac{1}{2}}, \end{aligned}$$
    (2.6)

    and

    $$\begin{aligned} \lambda _{S,j}^{(\alpha )}=\left( \frac{L}{2}\right) ^{2\alpha }\lambda _{j}^{(\alpha )}. \end{aligned}$$
    (2.7)
  • We denote the zeros of the shifted Gegenbauer polynomial (shifted Gegenbauer-Gauss polynomial) \(C_{S,N+1}^{(\alpha )}(z)\) by \(z_{S,N,j}^{(\alpha )},j=0,\ldots ,N.\)

    $$\begin{aligned} z_{S,N,j}^{(\alpha )}= \frac{L}{2}\left( x_{N,j}^{(\alpha )}+1\right) , j=0,\ldots ,N. \end{aligned}$$
  • The q-th derivative of \(C_{S,i}^{(\alpha )}(z),\) is obtained by

    $$\begin{aligned} D^{q}C_{S,i}^{(\alpha )}(z)=\sum _{k=0}^{i-q}(-1)^{i-q-k}\frac{i!\Gamma {\left( \alpha +\frac{1}{2}\right) }\Gamma {\left( k+i+2\alpha +q\right) }}{\Gamma {\left( k+\alpha +q+\frac{1}{2}\right) \Gamma {\left( i+2\alpha \right) }}(i-q-k)!k!L^{q+k}}z^{k}, \end{aligned}$$
    (2.8)
    $$\begin{aligned}&DC_{S,i}^{(\alpha )}(0)=(-1)^{i-1}\frac{i!\Gamma {\left( \alpha +\frac{1}{2}\right) }\Gamma {\left( i+2\alpha +1\right) }}{\Gamma {\left( \alpha +\frac{3}{2}\right) \Gamma {\left( i+2\alpha \right) }}(i-1)!L^{k+1}},\\&D^{2}C_{S,i}^{(\alpha )}(0)=(-1)^{i-2}\frac{i!\Gamma {\left( \alpha +\frac{1}{2}\right) }\Gamma {\left( i+2\alpha +2\right) }}{\Gamma {\left( \alpha +\frac{5}{2}\right) \Gamma {\left( i+2\alpha \right) }}(i-2)!L^{k+2}}. \end{aligned}$$

Shifted fractional Gegenbauer polynomials

  • The SFGPs can be defined for \(t\in [0,L]\) by introducing the change of variable \(z=t^{\mu }\) and \(\mu >0\) on SGPs. Let the SFGPs be denoted by \(C_{S,i}^{(\alpha ,\mu )}(t).\)

  • The explicit analytic form of SFGPs is given as

    $$\begin{aligned} \begin{aligned} C_{S,j}^{(\alpha ,\mu )}(t)&=\sum _{k=0}^{j}(-1)^{j-k}\frac{j!\Gamma {\left( \alpha +\frac{1}{2}\right) }\Gamma {\left( j+k+2\alpha \right) }}{\Gamma {\left( k+\alpha +\frac{1}{2}\right) }\Gamma {(j+2\alpha )}(j-k)!k!L^{k}}t^{\mu k},\\&=\sum _{k=0}^{j}\Omega _{j,k}t^{\mu k}. \end{aligned} \end{aligned}$$
    (2.9)
  • Also, the orthogonal relation of SFGPs

    $$\begin{aligned} \int _{0}^{L}C_{S,i}^{(\alpha ,\mu )}(t)C_{S,j}^{(\alpha ,\mu )}(t)\omega _{S}^{(\alpha ,\mu )}(t)dt=\lambda _{S,j}^{(\alpha )}\delta _{i,j}, \end{aligned}$$
    (2.10)

    where

    $$\begin{aligned} \omega _{S}^{(\alpha ,\mu )}(t)=\mu t^{\mu \left( \alpha +\frac{1}{2}\right) -1}(1-t^{\mu })^{\alpha -\frac{1}{2}}, \end{aligned}$$
    (2.11)

    and \(\lambda _{S,j}^{(\alpha )}\) are defined by Eq. (2.7).

  • The SFGPs comprise unlimited number of orthogonal polynomials, among them the shifted fractional-order CPs of the first kind \(T_{S,j}^{(\mu )}(t)\equiv C_{S,j}^{(0,\mu )}(t),\) the shifted fractional-order CPs of the second kind \(U_{S,j}^{(\mu )}(t)\equiv (j+1)C_{S,j}^{(1,\mu )}(t),\) and the shifted fractional-order LPs \(L_{S,j}^{(\mu )}(t)\equiv C_{S,j}^{(\frac{1}{2},\mu )}(t).\)

  • We denote the zeros of the SFGPs (shifted fractional Gegenbauer-Gauss polynomial) \(C_{S,N+1}^{(\alpha ,\mu )}(t)\) by \(t_{S,N,j}^{(\mu )},j=0,\ldots ,N.\)

    $$\begin{aligned} t_{S,N,j}^{(\mu )}=\left(\frac{t_{N,j}+1}{2}\right)^{\frac{1}{\mu }}. \end{aligned}$$

    The fractional Gegenbauer-Gauss quadrature rule. Due to the property of the standard Gegenbauer-Gauss quadrature, it follows that for any \(f((\frac{t+1}{2})^{\frac{1}{\mu }})\in P_{2N+1}(0,L)\)

    $$\begin{aligned} \int _{0}^{L}w_{S}^{(\alpha ,\mu )}(t)f(t)dt&=\left(\frac{L}{2}\right)^{2\alpha }\int _{-1}^{1}w^{(\alpha )}(t)f\left( \left(\frac{t+1}{2}\right)^{\frac{1}{\mu }}\right) dt, \\ &=\left(\frac{L}{2}\right)^{2\alpha }\sum _{j=0}^{N}\varpi _{N,j}^{(\alpha )}f\left( \left(\frac{t_{N,j}+1}{2}\right)^{\frac{1}{\mu }}\right) ,\\ &=\sum _{j=0}^{N}\varpi _{S,N,j}^{(\alpha ,\mu )}f\left( t_{S,N,j}^{(\mu )}\right) , \end{aligned}$$

    where \(\varpi _{S,N,j}^{(\alpha ,\mu )}\) are the Christoffel numbers of the SFGPs that are given by

    $$\begin{aligned} \varpi _{S,N,j}^{(\alpha ,\mu )}=\left(\frac{L}{2}\right)^{2\alpha } \varpi _{N,j}^{(\alpha )},j=0,\ldots ,N. \end{aligned}$$
  • The square integrable function \(y(t)\in [0,L]\) can be approximated by SFGPs as

    $$\begin{aligned} y(t)=\sum _{j=0}^{\infty }\tilde{y}_{S,j}C_{S,j}^{(\alpha ,\mu )}(t), \end{aligned}$$

    where the coefficients \(\tilde{y}_{S,j}\) are computed by

    $$\begin{aligned} \tilde{y}_{S,j}=(\lambda _{S,j}^{(\alpha ,\mu )})^{-1}\int _{0}^{L}y(t)\omega _{S}^{(\alpha ,\mu )}(t)C_{S,j}^{(\alpha ,\mu )}(t)dt,\quad j=0,1,\cdots {.} \end{aligned}$$
    (2.12)

    If we approximate y(t) by the first (N+1)-terms as follows

    $$\begin{aligned} y(t)=\sum _{j=0}^{N}\tilde{y}_{S,j}C_{S,j}^{(\alpha ,\mu )}(t). \end{aligned}$$
    (2.13)

    The approximation of the function y(t) can be written in the vector form as

    $$\begin{aligned} y(t)=Y^{T}\Phi _{\mu }(t), \end{aligned}$$
    (2.14)

    where \(Y^{T}=[Y_{0},Y_{1},...,Y_{N}]\) is the shifted fractional Gegenbauer (SFG) coefficient vector, and

    $$\begin{aligned} \Phi _{\mu }(t)=\left[ C_{S,0}^{(\alpha ,\mu )}(t),C_{S,1}^{(\alpha ,\mu )}(t),\ldots ,C_{S,N}^{(\alpha ,\mu )}(t)\right] ^{T}=AT_{N,\mu }(t), \end{aligned}$$
    (2.15)

    is the SFG vector and A is a lower triangular matrix of order \((N+1)\times (N+1)\)

    $$\begin{aligned} A =\left( \begin{array}{ccccc} \tilde{a}_{S,0,0}^{(\alpha )} &{}\quad 0 &{}\quad \cdots &{}\quad 0\\ \tilde{a}_{S,1,0}^{(\alpha )} &{}\quad \tilde{a}_{S,1,1}^{(\alpha )} &{}\quad \cdots &{}\quad 0 \\ \vdots &{}\quad \vdots &{}\quad \ddots &{}\quad \vdots \\ \tilde{a}_{S,N,0}^{(\alpha )} &{}\quad \tilde{a}_{S,N,1}^{(\alpha )} &{}\quad \cdots &{}\quad \tilde{a}_{S,N,N}^{(\alpha )} \\ \end{array} \right) , \end{aligned}$$
    (2.16)

    where

    $$\begin{aligned} \tilde{a}_{S,j,k}^{(\alpha )}=(-1)^{j-k}\frac{j!\Gamma {\left( \alpha +\frac{1}{2}\right) }\Gamma {\left( j+k+2\alpha \right) }}{\Gamma {\left( k+\alpha +\frac{1}{2}\right) }\Gamma {(j+2\alpha )}(j-k)!k!L^{k}}, \end{aligned}$$

    and

    $$\begin{aligned} T_{N,\mu }(t)=\left( \begin{array}{c} 1 \\ t^{\mu } \\ t^{2\mu } \\ \vdots \\ t^{N\mu } \\ \end{array} \right) . \end{aligned}$$

Error estimation and convergence

Let \(\mathbf {C}_{S,N}^{(\alpha ,\mu )}=\hbox {Span}\{C_{S,0}^{(\alpha ,\mu )}(t),C_{S,1}^{(\alpha ,\mu )}(t),\cdots ,C_{S,N}^{(\alpha ,\mu )}(t)\}\) and y(t) be an arbitrary element in \(L_{\omega _{S}^{(\alpha ,\mu )}}^{2}[0,L].\) Since \(\mathbf {C}_{S,N}^{(\alpha ,\mu )}\) is a finite dimensional vector space, y(t) has the unique best approximation out of \(\mathbf {C}_{S,N}^{(\alpha ,\mu )}\) like \(y_{N}(t)\in \mathbf {C}_{S,N}^{(\alpha ,\mu )},\) such that

$$\begin{aligned} \forall g(t)\in \mathbf {C}_{S,N}^{(\alpha ,\mu )},\quad \Vert y(t)-y_{N}(t)\Vert _{2}\le \Vert y(t)-g(t)\Vert _{2}, \end{aligned}$$

where \(\Vert y(t)\Vert =\sqrt{<y(t),y(t)>}.\)

Theorem 2.1

Suppose that the function \(D^{k\mu }y(t)\in C[0,1]\), for \(k=0,1,\ldots ,N-1,\) \({Re(\mu )> 0,}\quad {\alpha >\frac{-1}{2},}\)    \({Re(\alpha +2N+\frac{5}{2})\mu >0.}\) If \(y_{N}(t)\) is the best approximation to y(t) from \(\mathbf {C}_{S,N}^{(\alpha ,\mu )},\) then the error bound is presented as

$$\begin{aligned} \Vert y(t)-y_{N}(t)\Vert _{2}\le \frac{H_{\mu }}{\Gamma {\left( (N+1)\mu +1\right) }}\sqrt{\frac{\Gamma {\left( \alpha +\frac{1}{2}\right) }\Gamma {\left( \alpha +2N+\frac{5}{2}\right) }}{\Gamma {\left( 2\alpha +2N+3\right) }}}, \end{aligned}$$
(2.17)

where \(\Vert D^{(N+1)\mu }y(t)\Vert \le H_{\mu }, t\in [0,1].\)

Proof

Consider the generalized Taylor formula [36]

$$\begin{aligned} y(t)=\sum _{i=0}^{N}\frac{t^{i\mu }}{\Gamma {(i\mu +1)}}D^{i\mu }y(0)+\frac{D^{(N+1)\mu }y(\xi )}{\Gamma {((N+1)\mu +1)}}t^{(N+1)\mu }, \end{aligned}$$

with \(\xi \in [0,t], \forall t\in [0,1].\) Let

$$\begin{aligned} P_{N}(t)=\sum _{i=0}^{N}\frac{t^{i\mu }}{\Gamma {(i\mu +1)}}D^{i\mu }y(0). \end{aligned}$$

Then,

$$\begin{aligned} |y(t)-P_{N}(t)|=|\frac{D^{(N+1)\mu }y(\xi )}{\Gamma {((N+1)\mu +1)}}t^{(N+1)\mu }|. \end{aligned}$$

Since \(y_{N}(t)\) is the best square approximation function of y(t),  then

$$\begin{aligned} \begin{aligned} \bigg \Vert y(t)-y_{N}(t)\bigg \Vert _{2}^{2}&\le \bigg \Vert y(t)-P_{N}(t)\bigg \Vert _{2}^{2},\\&=\int _{0}^{1}\omega _{S}^{(\alpha ,\mu )}(t)(y(t)-p_{N}(t))^{2}dt,\\&=\int _{0}^{1}\omega _{S}^{(\alpha ,\mu )}(t)\bigg (\frac{D^{(N+1)\mu }y(\xi )}{\Gamma {((N+1)\mu +1)}}t^{(N+1)\mu }\bigg )^{2}dt,\\&=\frac{\left( D^{(N+1)\mu }y(\xi )\right) ^{2}}{\Gamma ^{2}{\left( (N+1)\mu +1\right) }}\int _{0}^{1}\mu t^{\mu \left( \alpha +\frac{1}{2}\right) -1}\left( 1-t^{\mu }\right) ^{\alpha -\frac{1}{2}}t^{2(N+1)\mu }dt,\\&\le \frac{H_{\mu }^{2}}{\Gamma ^{2}{\left( (N+1)\mu +1\right) }}\frac{\Gamma {\left( \alpha +\frac{1}{2}\right) }\Gamma {(\alpha +2N+\frac{5}{2})}}{\Gamma {(2\alpha +2N+3)}}.\\ \end{aligned} \end{aligned}$$

By taking the square roots, the proof is completed. \(\square\)

SFGOMs of VO fractional differentiation

Theorem 3.1

The first order derivative of the SFG vector \(\Phi _{\mu }(at+b)\) is approximated as

$$\begin{aligned} \frac{d}{dt}\Phi _{\mu }(at+b)\simeq \Psi \Phi _{1}(t), \end{aligned}$$
(3.1)

where the OM \(\Psi\) is a square matrix of order \((N+1)\times (N+1)\) that takes the following form,

$$\begin{aligned} \Psi \simeq A \Upsilon _{N} \Theta _{N} A^{-1}, \end{aligned}$$

where A is defined in (2.16), \(\Upsilon _{N}\) and \(\Theta _{N}\) are \((N+1)\times (N+1)\) matrices, and their elements \(\upsilon _{ij},\) and \(\theta _{ij}, 0\le i,j \le N\) are given, respectively, as follows

$$\begin{aligned}&\upsilon _{ij}=\left( {\begin{array}{c}\mu i\\ j\end{array}}\right) a^{j}b^{\mu i-j},\quad i,j=0,1,\ldots ,N,\\&\theta _{ij}=\left\{ \begin{array}{ll} j+1, \hbox {for} \quad i=j+1,\quad j=0,1, \ldots ,N \hbox {,} \\ \\ 0,\quad o.w. &{} \hbox {.} \end{array} \right. \end{aligned}$$

Proof

From Eq. (2.15), we can write

$$\begin{aligned} \frac{d}{dt}\Phi _{\mu }(at+b)&= {} \frac{d}{dt}\bigg [C_{S,0}^{(\alpha ,\mu )}(at+b),C_{S,1}^{(\alpha ,\mu )}(at+b),\ldots ,C_{S,N}^{(\alpha ,\mu )}(at+b)\bigg ]^{T} \\ &=\frac{d}{dt}(AT_{N,\mu }(at+b)),\nonumber \\&= {} A\frac{d}{dt}T_{N,\mu }(at+b). \end{aligned}$$
(3.2)

Since

$$\begin{aligned} \frac{d}{dt}T_{N,\mu }(at+b)=\frac{d}{dt}\left( \begin{array}{c} 1 \\ (at+b)^{\mu } \\ (at+b)^{2\mu } \\ \vdots \\ (at+b)^{N\mu } \\ \end{array} \right) . \end{aligned}$$
(3.3)

By using Newton’s generalized binomial theorem, we can write

$$\begin{aligned} \begin{aligned} {(at+b)^{i \mu }}&{=\sum _{k=0}^{\infty } \left( {\begin{array}{c}\mu i\\ k\end{array}}\right) a^{k}b^{\mu i-k} t^{k},}\\&{=\sum _{k=0}^{\infty }\frac{(i \mu )(i \mu -1)\cdots (i \mu -k+1)}{k!}a^{k}b^{\mu i-k} t^{k},\quad i=0,1,\ldots ,N,} \end{aligned} \end{aligned}$$
(3.4)

this series converges for \(i \mu \in Z^{+}\) or \(|\frac{at}{b}|<1.\) \(\square\)

By approximating the series (3.4) by using the first (N+1) terms, the relation (3.3) can be written as

$$\begin{aligned} \frac{d}{dt}T_{N,\mu }(at+b)=\frac{d}{dt}\left( \begin{array}{c} 1 \\ (at+b)^{\mu } \\ (at+b)^{2\mu } \\ \vdots \\ (at+b)^{N\mu } \\ \end{array} \right) =\Upsilon _{N,\mu }\frac{d}{dt}\left( \begin{array}{c} 1 \\ t \\ t^{2} \\ \vdots \\ t^{N} \\ \end{array} \right) \simeq \Upsilon _{N,\mu }\left( \begin{array}{c} 0 \\ 1 \\ 2t \\ \vdots \\ N t^{N-1} \end{array}\right) \simeq \Upsilon _{N,\mu } \Theta _{N}T_{N,1}(t), \end{aligned}$$
(3.5)

where \(\Upsilon _{N,\mu }, \Theta _{N}\) are \((N+1)\times (N+1)\) matrices, and their elements have the following forms, respectively,

$$\begin{aligned}&\upsilon _{ij}=\left( {\begin{array}{c}\mu i\\ j\end{array}}\right) a^{j}b^{\mu i-j},\quad i,j=0,1,\ldots ,N,\\&\theta _{ij}=\left\{ \begin{array}{ll} j+1,for \quad i=j+1,\quad j=0,1,\ldots ,N \hbox {,} \\ \\ 0,\quad o.w. &{} \hbox {.} \end{array} \right. \end{aligned}$$

By substituting Eq. (3.5) into Eq. (3.2), the following relation is obtained

$$\begin{aligned} \frac{d}{dt}\Phi _{\mu }(at+b)\simeq A\Upsilon _{N,\mu } \Theta _{N}T_{N,1}(t). \end{aligned}$$

Since A is invertible, then

$$\begin{aligned} \frac{d}{dt}\Phi _{\mu }(at+b)\simeq A\Upsilon _{N,\mu } \Theta _{N}A^{-1}\Phi _{1}(t)\simeq \Psi \Phi _{1}(t), \end{aligned}$$
(3.6)

where \(\Psi\) is a square matrix, and this finishes the proof.

Theorem 3.2

The VO Caputo fractional derivative of the SFG vector \(\Phi _{\mu }(at+b)\) can be approximated as

$$\begin{aligned} D_{t}^{\nu (t)}\Phi _{\mu }(at+b)\simeq \Xi \Phi _{1}(t),\quad \nu (t)>0, \end{aligned}$$
(3.7)

where the OM \(\Xi\) is a square matrix of order \((N+1)\times (N+1)\) takes the following form,

$$\begin{aligned} \Xi \simeq A \Upsilon _{N} \Lambda _{N} A^{-1}, \end{aligned}$$

where A is defined in (2.16), \(\Upsilon _{N}\) and \(\Lambda _{N}\) are \((N+1)\times (N+1)\) matrices, and their elements \(\upsilon _{ij},\) and \(\lambda _{ij}, 0\le i,j \le N\) , respectively, are given as follows

$$\begin{aligned}&\upsilon _{ij}=\left( {\begin{array}{c}\mu i\\ j\end{array}}\right) a^{j}b^{\mu i-j},\quad i,j=0,1,\ldots ,N,\\&\lambda _{ij}=\left\{ \begin{array}{ll} \frac{\Gamma {(i+1)}}{\Gamma {(i+1-\nu (t))}}t^{-\nu (t)}, \quad for \quad i=j,\quad j=n,n+1,\ldots ,N \hbox {,} \\ \\ 0,\quad o.w. &{} \hbox {.} \end{array} \right. \end{aligned}$$

Proof

From Eq. (2.15), we can write

$$\begin{aligned}D_{t}^{\nu (t)}\Phi _{\mu }(at+b)&=D_{t}^{\nu (t)}\bigg [C_{S,0}^{(\alpha ,\mu )}(at+b),C_{S,1}^{(\alpha ,\mu )}(at+b),\ldots ,C_{S,N}^{(\alpha ,\mu )}(at+b)\bigg ]^{T}=D_{t}^{\nu (t)}(AT_{N,\mu }(at+b)),\nonumber \\& =AD_{t}^{\nu (t)}T_{N,\mu }(at+b). \end{aligned}$$
(3.8)

Since

$$\begin{aligned} D_{t}^{\nu (t)}T_{N,\mu }(at+b)=D_{t}^{\nu (t)}\left( \begin{array}{c} 1 \\ (at+b)^{\mu } \\ (at+b)^{2\mu } \\ \vdots \\ (at+b)^{N\mu } \\ \end{array} \right) . \end{aligned}$$
(3.9)

By using Newton\('\)s generalized binomial theorem, we can write

$$\begin{aligned} \begin{aligned} {(at+b)^{i \mu }}&{=\sum _{k=0}^{\infty } \left( {\begin{array}{c}\mu i\\ k\end{array}}\right) a^{k}b^{\mu i-k} t^{k},}\\&{=\sum _{k=0}^{\infty }\frac{(i \mu )(i \mu -1)\cdots (i \mu -k+1)}{k!}a^{k}b^{\mu i-k} t^{k},\quad i=0,1,\ldots ,N,} \end{aligned} \end{aligned}$$
(3.10)

this series converges for \(i \mu \in Z^{+}\) or \(|\frac{at}{b}|<1.\)

By approximating the series (3.10) by using the first (N+1) terms, the relation (3.9) can be written as

$$\begin{aligned} D_{t}^{\nu (t)}T_{N,\mu }(at+b)=D_{t}^{\nu (t)}\left( \begin{array}{c} 1 \\ (at+b)^{\mu } \\ (at+b)^{2\mu } \\ \vdots \\ (at+b)^{N\mu } \\ \end{array} \right) \simeq \Upsilon _{N,\mu }D_{t}^{\nu (t)}\left( \begin{array}{c} 1 \\ t \\ t^{2} \\ \vdots \\ t^{N} \\ \end{array} \right) . \end{aligned}$$
(3.11)

By using the definition (2.1) of the VO fractional derivative in the Caputo sense, then Eq. (3.11) can be obtained as the below form:

$$\begin{aligned} D_{t}^{\nu (t)}T_{N,\mu }(at+b)\simeq \Upsilon _{N,\mu }\left( \begin{array}{c} 0 \\ \vdots \\ \frac{\Gamma {(n+1)}}{\Gamma {(n+1-\nu (t))}}t^{n-\nu (t)} \\ \frac{\Gamma {(n+2)}}{\Gamma {(n+2-\nu (t))}}t^{n+1-\nu (t)} \\ \vdots \\ \frac{\Gamma {(N+1)}}{\Gamma {(N+1-\nu (t))}}t^{N-\nu (t)} \end{array}\right) \simeq \Upsilon _{N,\mu } \Lambda _{N}T_{N,1}(t), \end{aligned}$$
(3.12)

where \(\Upsilon _{N,\mu }, \Theta _{N}\) are \((N+1)\times (N+1)\) matrices, and their elements have the following forms, respectively,

$$\begin{aligned}&\upsilon _{ij}=\left( {\begin{array}{c}\mu i\\ j\end{array}}\right) a^{j}b^{\mu i-j},\quad i,j=0,1,\ldots ,N,\\&\quad \lambda _{ij}=\left\{ \begin{array}{ll} \frac{\Gamma {(i+1)}}{\Gamma {(i+1-\nu (t))}}t^{-\nu (t)},\quad for \quad i=j,\quad j=n,n+1,\ldots ,N \hbox {,} \\ \\ 0,\quad o.w. &{} \hbox {.} \end{array} \right. \end{aligned}$$

By substituting from Eq. (3.12) into Eq. (3.8), the following relation is obtained

$$\begin{aligned} D_{t}^{\nu (t)}\Phi _{\mu }(at+b)\simeq A\Upsilon _{N,\mu } \Lambda _{N}T_{N,1}(t). \end{aligned}$$

Since A is invertible, then

$$\begin{aligned} D_{t}^{\nu (t)}\Phi _{\mu }(at+b)\simeq A\Upsilon _{N,\mu } \Lambda _{N} A^{-1}\Phi (t)\simeq \Xi \Phi _{1}(t), \end{aligned}$$
(3.13)

where \(\Xi\) is a square matrix, and this finishes the proof. \(\square\)

The methodology

In this section, we will discuss how to use the SFG-OMs to solve the problem Eqs. (1.51.6) numerically. As a result, the problem will be converted into an algebraic system of equations that can be solved easily by any iteration method. By using the properties of the SFGPs which are mentioned in the definition (2.2), the solution can be approximated as

$$\begin{aligned} y_{N}(at+b)=\sum _{j=0}^{N}\tilde{y}_{S,j}C_{S,j}^{(\alpha ,\mu )}(at+b)=Y^{T}\Phi _{\mu }(at+b), \end{aligned}$$
(4.1)

by the same way, the terms \(y(ct+d),\quad y(et+f)\) are approximated.

Moreover, the Caputo fractional derivative of order \(\nu (t)\) of \(y_{N}(at+b)\) is estimated as

$$\begin{aligned}&D_{t}^{(\nu (t))}y_{N}(at+b)=D_{t}^{(\nu (t))}\bigg (\sum _{j=0}^{N}\tilde{y}_{S,j}C_{S,j}^{(\alpha ,\mu )}(at+b)\bigg )\\&\quad =Y^{T}D_{t}^{(\nu (t))}\bigg (\Phi _{\mu }(at+b)\bigg ). \end{aligned}$$

By using Theorem (3.2)

$$\begin{aligned} D_{t}^{(\nu (t))}y_{N}(at+b)\simeq Y^{T}\Xi \Phi _{1}(t), \end{aligned}$$
(4.2)

and by using Theorem (3.1)

$$\begin{aligned} D_{t}^{(1)}y_{N}(ct+d)\simeq Y^{T}\Psi \Phi _{1}(t). \end{aligned}$$
(4.3)

Substitute from Eqs. (4.1)–(4.3) into Eqs. (1.51.6), we get

$$\begin{aligned} Y^{T}\Xi \Phi _{1}(t)+\frac{\lambda }{t}Y^{T}\Psi \Phi _{1}(t)+g(t)Y^{T}\Phi _{\mu }(t)=F(t), \end{aligned}$$
(4.4)

and the ICs will be

$$\begin{aligned} Y^{T}\Phi _{\mu }(0)=\gamma _{1},\quad Y^{T}\Psi \Phi _{\mu }(0)=\gamma _{2}. \end{aligned}$$
(4.5)

Suppose the nodes \(t_{k}\) which are the roots of the SFGPs. By substituting these nodes in Eqs. (4.4)–(4.5); therefore the collocation scheme can be written as

$$\begin{aligned} Y^{T}\Xi \Phi _{1}(t_{k})+\frac{\lambda }{t_{k}}Y^{T}\Psi \Phi _{1}(t_{k})+g(t_{k})Y^{T}\Phi _{\mu }(t_{k})=F(t_{k}), \end{aligned}$$
(4.6)

with the ICs

$$\begin{aligned} Y^{T}\Phi _{\mu }(0)=\gamma _{1},\quad Y^{T}\Psi \Phi _{\mu }(0)=\gamma _{2}. \end{aligned}$$
(4.7)

This yields a set of (N+1) algebraic equations with the required SFG coefficients \(\tilde{y}_{S,j},\quad j=0,1,\ldots ,N,\) which may be solved using an appropriate iterative procedure. As a result, the approximate solution \(y_{N}(t)\) of the system (1.71.8) can be obtained.

Numerical applications

In this section, we’ll introduce four applications to evaluate the applicability of our approach. By using a Dell laptop with an Intel(R) Core(TM) i3 CPU M 370@ 2.40 GHz and 3.00GB RAM configuration, the software was written in Mathematica version 12. The results obtained by our approach are compared to those obtained in literature using other numerical methods. The results constructed in this paper are measured by means of:

  • The absolute errors (AEs) given by

    $$\begin{aligned} E(t_{i})=|y(t_{i})-y_{N}(t_{i})|,\quad 1\le i\le N{,} \end{aligned}$$

    where \(y(t_{i})\) and \(y_{N}(t_{i})\) are the exact solution (ES) and the approximate solution (AS), respectively.

  • The maximum absolute errors (MAEs)

    $$\begin{aligned} L_{\infty }=\max _{1\le i\le N}\{E(t_{i}):\forall t_{i}\in [0,L]\}. \end{aligned}$$
  • The order of convergence (OC)

    $$\begin{aligned} {OC=\frac{\log {(\frac{error(N1)}{error(N2)})}}{\log {(\frac{N2}{N1})}},} \end{aligned}$$

    where error(N) denotes the error corresponding to polynomial degree N.

Applications of EF-DDEs-VO


Application (1)

Consider the following VO-EF-DDEs [37],

$$\begin{aligned} D_{t}^{\nu (t)}y(2t-1)+\frac{2}{t}\frac{d}{dt}y(3t)+ty(t+1)=4e^{2t-1}+\frac{6}{t}e^{3t}+te^{t+1}, \end{aligned}$$

with the ICs

$$\begin{aligned} y(0)=1,\quad \frac{d}{dt}y(0)=1{,} \end{aligned}$$

where the ES at \(\nu (t)=2\) is \(y(t)=e^{t}.\)

Fig. 1
figure 1

The numerical results of SFGOM technique on application (1) at \(N=14,\quad \mu =1\) and \(\alpha =0.5.\) a The AEs graph of y(t). b The graphs of the ASs at different values of \(\nu (t).\)

In Figure 1a, the AE function with \(N=14, \mu =1, \alpha =0.5\) displays highly accuracy, and the numerical outcomes at different values of VOs are shown in Fig. 1b.


Application (2)

Consider the following VO-EF-DDEs- [37],

$$\begin{aligned} D_{t}^{\nu (t)}y(3t-1)+\frac{2}{t}\frac{d}{dt}y(2t)+ty(t+1)=F(t),\quad 1< \nu (t)\le 2, \end{aligned}$$

with the ICs

$$\begin{aligned} y(0)=1,\quad \frac{d}{dt}y(0)=0{,} \end{aligned}$$

where

$$\begin{aligned} F(t)=\frac{27\Gamma {(4)}t^{3-\nu (t)}}{\Gamma {(4-\nu (t))}}-\frac{27\Gamma {(3)}t^{2-\nu (t)}}{\Gamma {(3-\nu (t))}}+48t+t(1+(t+1)^{3}), \end{aligned}$$

and the ES is \(y(t)=t^{3}+1.\)

Fig. 2
figure 2

The numerical results of SFGOM technique on application (2) at \(N=3,\quad \mu =1,\quad \alpha =0.5\) and \(\nu (t)=1+\frac{t}{2}.\) a The AEs graph of y(t). b The graph of ES and AS in [0,1]

Table 1 The MAEs of application (2) at \(\alpha =0.5, \nu (t)=1+\frac{t}{2}\) and different values of \(N,\mu\) and CPU time (second) at \(\mu =1\)
Table 2 The AEs of application (2) at \(N=3, \nu (t)=1+\frac{t}{2}\) and different values of \(\alpha\)

The numerical results of application (2) are given in Tables  1 and 2 and are plotted in Fig. 2a–b. Table 1 introduces the computational time at \(\mu =1,\) the MAEs at different values of \(N,\mu,\) and the order of convergence at \(\mu =1.\) Additionally, Table 2 presents the AEs at \(N=3,\quad \mu =1,\) and different values of \(\alpha.\) In Fig. 2a the AEs graph is displayed, while Fig. 2b depicts the agreement between the ES and the AS graphs of y(t) for \(N=3,\mu =1,\alpha =0.5\) at \(\nu (t)=1+\frac{t}{2}.\)


Application (3)

Consider the following VO-EF-DDEs [38],

$$\begin{aligned} \frac{1}{2}D_{t}^{\nu (t)}y\left(\frac{t}{2}\right)+\frac{3}{t}\frac{d}{dt}y\left(\frac{t}{2}\right)+y^{2}(t)=F(t),\quad 1<\nu (t)\le 2{,} \end{aligned}$$

with the ICs

$$\begin{aligned} y(0)=1,\quad \frac{d}{dt}y(0)=0{,} \end{aligned}$$

where

$$\begin{aligned} F(t)=\frac{\Gamma {(5)}t^{4-\nu (t)}}{32\Gamma {(5-\nu (t))}}+\frac{3t^{2}}{4}+(1+t^{4})^{2}, \end{aligned}$$

and the ES is \(y(t)=t^{4}+1.\)

Fig. 3
figure 3

The numerical results of SFGOM technique on application (3) at \(N=4,\quad \mu =1,\quad \alpha =0.5,\) and \(\nu (t)=1+\frac{\sin {(t)}}{2}.\) a The AEs graph of y(t). b The graph of ES and AS in [0,1]

Table 3 The MAEs of application (3) at \(\alpha =0.5, \nu (t)=1+\frac{\sin {(t)}}{2}\) and different values of \(N,\mu\) and the CPU time (second) at \(\mu =1\)
Table 4 The AEs of application (3) at \(N=4, \nu (t)=1+\frac{\sin {(t)}}{2}\) and different values of \(\alpha\)
Table 5 Comparison of the AEs for \(\mu =1,\quad \nu (t)=2\) of application (3)

The numerical results of application (3) are given in Tables 3, 4, and 5 and are plotted in Fig. 3a–b. Table 3 introduces the computational time at \(\mu =1,\) the MAEs at \(\alpha =0.5,\) and different values of \(N,\mu,\) and the order of convergence at \(\mu =1.\) Additionally, Table 4 presents the AEs at \(N=4,\quad \mu =1,\) and different values of \(\alpha.\) Table 5 displays the efficiency and effectiveness of our method by comparing it to the method in Ref. [38] at \(\nu (t)=2\). In Fig. 3a we describe the AEs graph, while Fig. 3b plots the ES and the AS graphs of y(t) for \(N=4,\mu =1,\alpha =0.5\) at \(\nu (t)=1+\frac{\sin {(t)}}{2}.\)


Application (4)

Consider the following system of EF-DDEs-VO [39],

$$\begin{aligned} \begin{aligned} D_{t}^{\nu (t)}y_{1}(2t-1)+\frac{3}{t}\frac{d}{dt}y_{1}(3t)+y_{2}(t)y_{1}(t+1)&=F_{1}(t),\\ D_{t}^{\nu (t)}y_{2}(2t-1)+\frac{2}{t}\frac{d}{dt}y_{2}(3t)+y_{1}(t)y_{2}(t+1)&=F_{2}(t),\quad 1<\nu (t)\le 2, \end{aligned} \end{aligned}$$

with the initial conditions,

$$\begin{aligned} y_{1}(1)=2,\quad \frac{d}{dt}y_{1}(0)=0,\quad y_{2}(1)=0,\quad \frac{d}{dt}y_{2}(0)=0, \end{aligned}$$

where

$$\begin{aligned} F_{1}(t)&=\frac{8\Gamma {(4)}t^{3-\nu (t)}}{\Gamma {(4-\nu (t))}}-\frac{12\Gamma {(3)}t^{2-\nu (t)}}{\Gamma {(3-\nu (t))}}+243t+(1-t^{3})(1+(t+1)^{3}){,} \\ F_{2}(t)&=\frac{12\Gamma {(3)}t^{2-\nu (t)}}{\Gamma {(3-\nu (t))}}-\frac{8\Gamma {(4)}t^{3-\nu (t)}}{\Gamma {(4-\nu (t))}}-162t+(1+t^{3})(1-(t+1)^{3}) , \end{aligned}$$

and the ESs are \(y_{1}(t)=1+t^{3},\quad y_{2}(t)=1-t^{3}.\)

Fig. 4
figure 4

The numerical behavior of the proposed method on application (4). a shows the AEs of \(y_{1}(t)\) at \(N=3\) and \(\alpha =0.5,\quad \nu (t)=1+\frac{t}{2}.\) b shows the graph of the ES and AS \(y_{1}(t)\) on [0,1]. c shows the AEs of \(y_{2}(t)\) at \(N=3\) and \(\alpha =0.5,\quad \nu (t)=1+\frac{t}{2}.\) (d) shows the graph of the ES and AS \(y_{2}(t)\) on [0,1]

Table 6 MAEs of application (4) for \(\alpha =0.5,\quad \nu (t)=1+\frac{t}{2}\) and different values of \(N,\mu\) and CPU time (seconds) at \(\mu =1\)
Table 7 The AEs of application (4) at \(N=3\) and different values of \(\alpha\)
Table 8 Comparison of the AEs for \(N=3,\quad \mu =1,\quad \nu (t)=2\) of application (4)

The numerical results of application (4) are listed in Tables 6, 7, and 8 and graphically illustrated in Fig. 4a–d. We tabulate the computational time at \(\mu =1,\) and the MAEs in Table 6 using the SFGOMs method with different choices of \(\mu\) at different values of N. In addition, Table 7 lists the AEs for various values of \(\alpha.\) The author of Ref. [39] estimated the AS of \(y_{1}(t)\) and \(y_{2}(t)\), and at Table 8, we calculated the AEs from these results and compared them with the AEs of our technique to demonstrate the effective and precise of our method. To illustrate the convergence of the proposed technique, we plot the AEs between the ES and the AS of \(y_{1}(t)\) and \(y_{2}(t)\) with \(N=3, \mu =1\) and \(\alpha =0.5\) in Fig. 4a and c, respectively. The agreement between the ES and AS of \(y_{1}(t)\) and \(y_{2}(t)\) is depicted in Fig. 4b and d.

Conclusion

In this article, an effective and accurate numerical technique was used to find the approximate solutions of the VO-EF-DDEs and the system of VO-EF-DDEs. The numerical technique depended on the OMs of variable and integer-order derivatives of SFGPs in conjunction with the spectral collocation method. The used technique has the ability to transform the aforementioned problems into systems of algebraic equations which are easy to solve. Numerical studies for four applications are provided to demonstrate the accuracy, efficiency, and applicability of the used technique. The obtained numerical results indicated that satisfactory results are obtained by using a few terms of the SFGPs, also the efficiency of the estimated technique is increased by using more terms of SFGPs. The SFGPs are simple to compute, as well as they have a fast convergence rate. Another benefit of SFGPs is that for every choice of the SFG parameters \(\alpha\) a good numerical solution is obtained. Also the computational results of Sect. 5 showed that the value of the parameter \(\mu\) affected on the numerical solutions as follows; when \(\mu =1\), good solutions are obtained by using few terms of SFGPs while for non-integer values of \(\mu\) more terms of SFGPs are needed to obtain good results. So, we can conclude that the SGPs which are considered as a special case of SFGPs are more flexible and effective than SFGPs in the solved applications. Also, the obtained solutions do not require much CPU time. Finally, the material studied in this paper is novel, and the proposed technique can be extended to solve other fractional delay-differential equations.