1 Introduction

Mathematical models of natural phenomena can be formulated more accurately by utilizing fractional differential equations. Fractional differential equations have many applications in various fields of science, such as physics [7, 11, 17], chemistry [37], biology [49], medicine [18], fluid mechanics [26], continuum mechanics [12], signal processing [40] and propagation of spherical flames [28]. Consequently, much attention has been devoted to find solutions to fractional differential equations. Numerous authors have studied the existence and uniqueness of solutions for fractional differential equations [25, 39]. In recent years, many numerical methods have been presented in the literature to solve these kinds of equations, such as Galerkin method [6], homotopy analysis method [35], differential transformation method [2], collocation method [3, 5], cubic B-spline collocation method [29], hybrid Taylor and block-pulse operational matrix method [45], Euler functions method [30], Chebyshev polynomials method [23, 24], and Chelyshkov functions method [4].

A delay differential equation is a type of differential equation where the derivative of the unknown function at the current time depends not only on the solution at the current time, but also on the solution at previous times. Fractional delay differential equations can be considered as a generalization of delay differential equations of integer orders. They have been used for modeling in different fields of science, such as control [20], biology [9], optics [41] and electrical networks [16]. Many researchers have examined the existence and uniqueness of solutions to fractional delay differential equations [1, 27].

Generally, It is a challenge to find exact solutions for most fractional delay differential equations, hence numerical or approximate methods should be developed to solve these equations. Various techniques have been presented to address this type of problem in recent decades. In [31], a numerical method based on finite differences has been presented to approximate solutions of fractional delay differential equations. The development of a predictor-corrector method with error analysis has been introduced in [14]. The Bernoulli wavelet operational matrix of fractional integration together with the collocation method has been employed in [42] to provide an approximate solution of fractional delay differential equations. In [21], the collocation method, optimization techniques and generalized Laguerre polynomials are applied to approximate a solution of delay fractional differential equations. A numerical technique based on hybrid functions of block-pulse and fractional-order Fibonacci polynomials has been given in [43]. They used Riemann–Liouville fractional integral operational matrix and delay operational matrix of the hybrid functions together with the collocation method to reduce the problem to a system of algebraic equations.

In [15], a computational technique based on the combination of fractional Bessel functions with block-pulse functions to produce a sparse operational matrix to reduce the problem to a system of algebraic equations. A spectral operational matrices-based algorithm has been presented in [48]. These matrices have been generated by using shifted Gegenbauer polynomials. Instead of using the operational matrix of fractional integration, which requires some approximation, a numerical method based on the explicit formula of Riemann–Liouville fractional integral of Legendre wavelets functions has been given in [50]. A numerical method based on applying the exact formula for the Riemann–Liouville fractional integral of Taylor wavelet functions together with the collocation method has been proposed in [47]. Recently, Avci [10] has introduced a numerical spectral technique depending on the operational matrix of fractional integration for fractional-order Taylor basis.

Approximation by orthogonal functions has grown significantly as a useful tool for solving fractional differential equations. They convert the fractional problem into a set of algebraic problems. Some popular orthogonal families are Chebyshev polynomials, Legendre polynomials, Laguerre polynomials, Taylor polynomials, Chelyshkov polynomials and block–pulse functions. Chelyshkov polynomials were presented in [13] and have been used successfully for solving different kinds of fractional differential equations. Solving fractional differential equations with basis functions of integer-order may lead to some issues when the solutions contain terms with fractional powers [19]. The major weaknesses are that the rate of convergence is weak and a large number of basis functions are required to provide accurate results. These drawbacks can be avoided by approximating the solutions using orthogonal functions of fractional order.

Based on the above considerations, the motivation of this paper is to extend the application of FCHFs to present a new numerical method for solving fractional delay differential equations. In order to accomplish this goal, the operational matrix of fractional integral for FCHFs is derived and used together with the collection method to convert the fractional delay problem into a set of algebraic equations. To the best of our knowledge, this is the first time that the operational matrix of fractional integration for FCHFs is applied to solve fractional delay differential equations

The main advantages of the presented technique are:

  • FCHFs are fractional-order orthogonal functions. This feature leads to a good rate of convergence and reduces the number of basis functions required to get satisfactory results.

  • The solution procedure is simple since the fractional delay problem is reduced to a set of algebraic equations.

  • The computational errors are less than in the conventional methods where the obtained numerical results in some cases are the exact solutions and in others are in good agreement with the exact solutions.

The structure of the paper is as follows. Section 2 presents some fundamental concepts of fractional calculus that will be used in our subsequent development. In Sect. 3, the FCHFs are described, and the operational matrix of fractional integration is also constructed. The convergence of FCHFs is demonstrated in Sect. 4. Section 5 describes our new numerical method for solving fractional delay differential equations. Section 6 considers some numerical examples and reports our numerical results as well as some comparisons with other methods. The paper is finally summarized in Sect. 7.

2 Preliminaries on fractional calculus

Here, we review some definitions and properties of fractional integration and differentiation that will be used in the next sections [36, 39].

Definition 2.1

The Riemann–Liouville fractional integration of order \(\nu \geq 0 \) of a function \(g(t)\) is defined as

$$\begin{aligned} I^{\nu}g(t) & = \cfrac{1}{\Gamma (\nu )}\displaystyle \int _{0}^{t}(t- \tau )^{\nu -1}g(\tau )d\tau =\cfrac{1}{\Gamma (\nu )}t^{\nu -1}\ast g(t), \quad \nu >0, t>0, \\ I^{0}g(t)& = g(t), \end{aligned}$$
(2.1)

where \(t^{\nu -1}\ast g(t)\) is the convolution of \(t^{\nu -1}\) and \(g(t)\).

Definition 2.2

The Caputo fractional derivative of order \(\nu >0\) of a function \(g(t)\) is defined as

$$ D^{\nu}g(t)=\dfrac{1}{\Gamma (\lceil \nu \rceil -\nu )}\int _{0}^{t} \! (t-\tau )^{\lceil \nu \rceil -\nu -1}g^{(\lceil \nu \rceil )}( \tau )d\tau ,\quad \lceil \nu \rceil -1< \nu \leq \lceil \nu \rceil , t>0, $$
(2.2)

where \(\lceil \nu \rceil \) denotes the smallest integer greater than or equal to ν.

The following properties are satisfied for Riemann–Liouville fractional integral and Caputo fractional derivative:

$$\begin{aligned}& \bullet\quad I^{\nu}t^{\beta}=\cfrac{\Gamma (\beta +1)}{\Gamma (\beta +\nu +1)}t^{\beta +\nu},\quad \beta >-1. \end{aligned}$$
(2.3)
$$\begin{aligned}& \bullet\quad I^{\nu _{1}}I^{\nu _{2}}g(t)=I^{\nu _{1}+\nu _{2}}g(t)=I^{\nu _{2}}I^{\nu _{1}}g(t) ,\quad \nu _{1},~\nu _{2}\geq 0. \end{aligned}$$
(2.4)
$$\begin{aligned}& \bullet\quad D^{\nu}K=0,\quad \text{K is constant}. \end{aligned}$$
(2.5)
$$\begin{aligned}& \bullet\quad D^{\nu}t^{\beta} = \textstyle\begin{cases} 0, &\beta \in N_{0}~and~\beta < \lceil \nu \rceil ,\\ \cfrac{\Gamma (\beta +1)}{\Gamma (\beta -\nu +1)}t^{\beta -\nu}, & \beta \in N_{0}~and~\beta \geq \lceil \nu \rceil \text{\quad or\quad} \beta \notin N~and~\beta >\lfloor \nu \rfloor . \end{cases}\displaystyle \end{aligned}$$
(2.6)
$$\begin{aligned}& \bullet\quad D^{\nu}I^{\nu}g(t)=g(t). \end{aligned}$$
(2.7)
$$\begin{aligned}& \bullet\quad I^{\nu}D^{\nu}g(t)=g(t)-\sum _{r=0}^{\lceil \nu \rceil -1}\cfrac{g^{(r)}(0^{+})}{r!}t^{r}, \quad t>0. \end{aligned}$$
(2.8)
$$\begin{aligned}& \begin{gathered} \bullet\quad D^{\nu}\left (\alpha _{1}g_{1}(t)+\alpha _{2}g_{2}(t)\right )=\alpha _{1}D^{\nu}g_{1}(t)+\alpha _{2}D^{\nu}g_{2}(t),\\ \hphantom{\bullet\quad} I^{\nu}\left (\alpha _{1}g_{1}(t)+\alpha _{2}g_{2}(t)\right )=\alpha _{1}I^{\nu}g_{1}(t)+\alpha _{2}I^{\nu}g_{2}(t), \end{gathered} \end{aligned}$$
(2.9)

where \(\lfloor \nu \rfloor \) denotes the largest integer less than or equal to ν, \(N_{0}=\{0,1,2,\ldots \} \), \(N=\{1,2,3,\ldots \} \) and \(\alpha _{1}\), \(\alpha _{2}\) are constants.

Definition 2.3

(Generalized Taylor’s formula). Suppose that \(D^{l\beta}g(t)\in C(0,1] \) for \(l= 0, 1, \ldots , m+1 \) and \(0<\beta \leq 1\), then [36]

$$ g(t)=\sum _{r=0}^{m}\cfrac{t^{r\beta}}{\Gamma (r\beta +1)} D^{r\beta}g(0^{+})+ \cfrac{t^{(m+1)\beta}}{\Gamma \left ((m+1)\beta +1\right )} D^{(m+1) \beta}g(\xi ), \quad 0< \xi \leq t, \quad \forall t \in (0,1], $$
(2.10)

where \(D^{r\beta}=\underbrace{D^{\beta}D^{\beta}\ldots D^{\beta}}_{r~times}\).

If \(\beta =1 \), then the generalized Taylor’s formula converts to the classical Taylor’s formula.

3 Fractional-order Chelyshkov functions properties

3.1 Fractional-order Chelyshkov functions

The fractional-order Chelyshkov functions (FCHFs) can be defined by using Chelyshkov polynomials in the following form [5]:

$$ \varphi ^{\beta}_{mr}(t)=\sum _{j=r}^{m} (-1)^{j-r} \begin{pmatrix} m-r \\ j-r \end{pmatrix} \begin{pmatrix} m+j+1 \\ m-r \end{pmatrix} t^{j\beta},\quad r=0,1,\ldots m,\quad \beta >0. $$
(3.1)

The set \(\{\varphi^{\beta} _{mr}\}_{r=0}^{m}\) of FCHFs is a family of orthogonal functions over the interval \(\rho =[0,1]\) with respect to the weight function \(w_{\beta}(t) =t^{\beta -1}\). The orthogonality property for these functions is

$$ \int _{0}^{1}\varphi ^{\beta}_{ms}(t)\varphi ^{\beta}_{mi}(t)w_{\beta}(t)dt= \dfrac{\delta _{si}}{(s+i+1)\beta} ,\quad \delta _{si}= \textstyle\begin{cases} 1, & s=i, \\ 0, & s\neq i, \end{cases}\displaystyle ,\quad s,i=0,1,\ldots ,m. $$
(3.2)

It is clear from Equation (3.1) that every member of the set \(\{\varphi^{\beta} _{mr}\}_{r=0}^{m}\) is of degree βm. This is the key distinction between the Chelyshkov polynomials and the other sets of orthogonal polynomials. Figures 1 and 2 provide graphs of FCHFs for different values of r and β, respectively. Let the weighted space \(L^{2}_{w_{\beta}}(\rho )\) be the set of all real-valued measurable functions \(u(t)\) on ρ that satisfy

$$ \int _{0}^{1}\lvert u(t)\rvert ^{2}w_{\beta}(t)dt< \infty , $$
(3.3)

with inner product and norm given by

$$\begin{aligned} & \langle u(t),\mu (t)\rangle _{w_{\beta}}=\int _{0}^{1}u(t)\mu (t)w_{ \beta}(t)dt, \\ & \lVert u(t)\rVert _{w_{\beta}}=\langle u(t),u(t)\rangle ^{ \frac{1}{2}}_{w_{\beta}}. \end{aligned}$$
(3.4)

Suppose that \(\left \{\varphi ^{\beta}_{m0}(t),\varphi ^{\beta}_{m1}(t),\ldots , \varphi ^{\beta}_{mm}(t)\right \}\) is a set of FCHFs and \(\mathbb{A}_{m}=\text{span} \{\varphi ^{\beta}_{m0}(t),\varphi ^{ \beta}_{m1}(t), \ldots ,\varphi ^{\beta}_{mm}(t) \}\). Also, assume that \(g(t)\) is an arbitrary function in \(L^{2}_{w_{\beta}}(\rho ) \). Since \(\mathbb{A}_{m}\) is a closed finite-dimensional subspace of \(L^{2}_{w_{\beta}}(\rho )\), then for any function \(g(t)\) there exists a unique best approximation \(g_{m}(t) \in \mathbb{A}_{m}\) that minimizing the distance to \(g(t)\), that is

$$ \lVert g(t)-g_{m}(t)\rVert _{w_{\beta}}\leq \lVert g(t)-\theta (t) \rVert _{w_{\beta}}, \quad \forall \theta (t) \in \mathbb{A}_{m}. $$
(3.5)

Since \(g_{m}(t) \in \mathbb{A}_{m}\), then there are unique coefficients \(\ell _{0},\ell _{1},\ldots ,\ell _{m}\) such that

$$ g(t)\simeq g_{m}(t)=\sum _{k=0}^{m}\ell _{k}\varphi ^{\beta}_{mk}(t)=L^{T} \Phi _{\beta}(t), $$
(3.6)

where L and \(\Phi _{\beta}(t)\) are given by

$$ L= \begin{pmatrix} \ell _{0},\ell _{1},\ldots ,\ell _{m} \end{pmatrix} ^{T}, \quad \ell _{k}=\beta (2k+1)\int _{0}^{1}\! g(t)\varphi _{mk}^{ \beta}(t)w_{\beta}(t)dt,\quad k=0,1,\ldots ,m, $$
(3.7)

and

$$ \Phi _{\beta}(t)= \begin{pmatrix} \varphi ^{\beta}_{m0}(t),\varphi ^{\beta}_{m1}(t),\ldots ,\varphi ^{ \beta}_{mm}(t) \end{pmatrix} ^{T}. $$
(3.8)
Figure 1
figure 1

The graph of \(\varphi ^{\beta}_{mr}(t)\) at \(m=5\), \(r=0,1, \ldots ,5\) and \(\beta =1/3 \)

Figure 2
figure 2

The graph of \(\varphi ^{\beta}_{mr}(t)\) for various values of β at \(m=5\) and \(r=0\)

3.2 The operational matrix of fractional integration

This subsection is devoted to construct the fractional integration operational matrix of the FCHFs, which will be used to reduce the fractional delay differential equations into a set of algebraic equations.

Theorem 3.1

Let \(\Phi _{\beta}(t)\) be a \((m+1) \times 1\) vector of FCHFs. The Riemann–Liouville fractional integral of order \(\nu >0\) of the vector \(\Phi _{\beta}(t)\) can be given by

$$ I^{\nu}\Phi _{\beta}(t)\simeq \Lambda ^{(\nu )}\Phi _{\beta}(t), $$
(3.9)

where \(\Lambda ^{(\nu )}=\left (\lambda _{rk}\right )_{r,k=0}^{m}\) is the \((m+1)\times (m+1)\) operational matrix of fractional integral of order ν for FCHFs and its elements can be obtained by

$$\begin{aligned} \lambda _{rk}={}&\sum _{j=r}^{m}\sum _{l=k}^{m}(-1)^{j+l-r-k} \dfrac{\beta (2k+1)}{\beta (j+l+1)+\nu} \dfrac{\Gamma (j\beta +1)}{\Gamma (j\beta +\nu +1)} \begin{pmatrix} m-r \\ j-r \end{pmatrix} \\ &{}\times \begin{pmatrix} m+j+1 \\ m-r \end{pmatrix} \begin{pmatrix} m-k \\ l-k \end{pmatrix} \begin{pmatrix} m+l+1 \\ m-k \end{pmatrix} . \end{aligned}$$
(3.10)

Proof

Using Equation (2.1) to integrate Equation (3.1), yields

$$ I^{\nu}\varphi ^{\beta}_{mr}(t)=\cfrac{1}{\Gamma (\nu )}t^{\nu -1} \ast \varphi ^{\beta}_{mr}(t),\quad r=0,1,\dots ,m. $$
(3.11)

By taking the Laplace transform of Equation (3.11), we get

$$ \mathcal{L}\left \{ I^{\nu}\varphi ^{\beta}_{mr}(t)\right \}= \mathcal{L}\left \{\cfrac{1}{\Gamma (\nu )}t^{\nu -1}\right \} \mathcal{L}\left \{\varphi ^{\beta}_{mr}(t)\right \},\quad r=0,1, \dots ,m. $$
(3.12)

Since

$$ \mathcal{L}\left \{\cfrac{1}{\Gamma (\nu )}t^{\nu -1}\right \}= \frac{1}{s^{\nu}}, $$
(3.13)

and

$$\begin{aligned} \mathcal{L}\left \{\varphi ^{\beta}_{mr}(t)\right \} &=\sum _{j=r}^{m} (-1)^{j-r} \begin{pmatrix} m-r \\ j-r \end{pmatrix} \begin{pmatrix} m+j+1 \\ m-r \end{pmatrix} \mathcal{L}\left \{t^{j\beta}\right \} \\ &=\sum _{j=r}^{m} (-1)^{j-r} \begin{pmatrix} m-r \\ j-r \end{pmatrix} \begin{pmatrix} m+j+1 \\ m-r \end{pmatrix} \frac{\Gamma (j\beta +1)}{s^{j\beta +1}} ,\quad r=0,1, \dots ,m. \end{aligned}$$
(3.14)

Then Equation (3.12) becomes

$$ \mathcal{L}\left \{ I^{\nu}\varphi ^{\beta}_{mr}(t)\right \}= \sum _{j=r}^{m} (-1)^{j-r} \begin{pmatrix} m-r \\ j-r \end{pmatrix} \begin{pmatrix} m+j+1 \\ m-r \end{pmatrix} \frac{\Gamma (j\beta +1)}{s^{j\beta +\nu +1}} ,\quad r=0,1,\dots ,m. $$
(3.15)

Now, by utilizing the inverse Laplace transform of Equation (3.15), we obtain

$$ I^{\nu}\varphi ^{\beta}_{mr}(t)=\sum _{j=r}^{m} (-1)^{j-r} \begin{pmatrix} m-r \\ j-r \end{pmatrix} \begin{pmatrix} m+j+1 \\ m-r \end{pmatrix} \frac{\Gamma (j\beta +1)}{\Gamma (j\beta +\nu +1)}t^{j\beta +\nu}, \quad r=0,1,\dots ,m. $$
(3.16)

Approximating \(t^{j\beta +\nu} \) in terms of FCHFs, we get

$$ t^{j\beta +\nu}\simeq \sum _{k=0}^{m}\ell _{jk}\varphi ^{\beta}_{mk} \left (t\right ),\quad j=0,1,\ldots ,m, $$
(3.17)

where \(\ell _{jk}\) can be determined from Equations (3.1) and (3.7) as follows

$$\begin{aligned} \ell _{jk} & =\beta (2k+1)\int _{0}^{1}t^{j\beta +\nu}\varphi ^{\beta}_{mk}(t)w_{ \beta}(t)dt \\ & =\beta (2k+1)\sum _{l=k}^{m}\dfrac{(-1)^{l-k}}{\beta (j+l+1)+\nu} \begin{pmatrix} m-k \\ l-k \end{pmatrix} \begin{pmatrix} m+l+1 \\ m-k \end{pmatrix} . \end{aligned}$$
(3.18)

From Equations (3.16), (3.17) and (3.18), we can write

$$\begin{aligned} I^{\nu}\varphi ^{\beta}_{mr}(t) \simeq {}& \sum _{k=0}^{m}\left (\sum _{j=r}^{m} \sum _{l=k}^{m}(-1)^{j+l-r-k}\dfrac{\beta (2k+1)}{\beta (j+l+1)+\nu} \dfrac{\Gamma (j\beta +1)}{\Gamma (j\beta +\nu +1)} \begin{pmatrix} m-r \\ j-r \end{pmatrix}\right. \\ &{}\times \left. \begin{pmatrix} m+j+1 \\ m-r \end{pmatrix} \begin{pmatrix} m-k \\ l-k \end{pmatrix} \begin{pmatrix} m+l+1 \\ m-k \end{pmatrix}\right ) \varphi ^{\beta}_{mk}(t) \\ ={}& \sum _{k=0}^{m}\lambda _{rk}\varphi ^{\beta}_{mk}(t),\quad r=0,1, \dots ,m , \end{aligned}$$
(3.19)

which leads to the desired result. □

4 Convergence analysis

In this section, we discuss the convergence of the best approximation and show that by increasing the number of the FCHFs, the error in calculating the operational matrix of fractional integration tends to zero.

Theorem 4.1

Let \(g(t) \in L^{2}_{w_{\beta}}(\rho )\) such that \(D^{l\beta}g(t)\in C(0,1] \) for \(l= 0, 1, \ldots , m+1 \). Suppose that \(L^{T}\Phi _{\beta}(t)\) is the best estimation of \(g(t)\) in \(\mathbb{A}_{m}\), then

$$ \lim _{m\longrightarrow \infty}\left \lVert g(t)-L^{T}\Phi _{\beta}(t) \right \rVert _{w_{\beta}}=0. $$
(4.1)

Proof

Assume the generalized Taylor’s formula of \(g(t)\) is denoted by \(\psi (t)\), then from Definition 2.3 the error bound is

$$\begin{aligned} \left |g(t)-\psi (t)\right | & =\left | \frac{t^{(m+1)\beta}}{\Gamma \left ((m+1)\beta +1\right )} D^{(m+1) \beta}g(\xi )\right | \\ & \leq \frac{H_{\beta}t^{(m+1)\beta}}{\Gamma \left ((m+1)\beta +1\right )}, \quad 0< \xi \leq t, \quad t \in (0,1], \end{aligned}$$
(4.2)

where

$$ H_{\beta}=\sup _{t \in (0,1]}\left \{| D^{(m+1)\beta}g(t)|\right \} . $$

Since \(L^{T}\Phi _{\beta}(t)\) is the best estimation of \(g(t)\) in \(\mathbb{A}_{m}\) and \(\psi (t)\in \mathbb{A}_{m}\) then by using Equation (4.2), we get

$$\begin{aligned} \left \lVert g(t)-L^{T}\Phi _{\beta}(t) \right \rVert ^{2}_{w_{{ \beta}}} &\leq \left \lVert g(t)-\psi (t)\right \rVert ^{2}_{w_{\beta}} \\ &=\int _{0}^{1}\left (g(t)-\psi (t)\right )^{2}w_{\beta}(t)dt \\ &\leq \left (\frac{H_{\beta}}{\Gamma \left ((m+1)\beta +1\right )} \right )^{2}\int _{0}^{1}t^{(2m+3)\beta -1}dt \\ &=\left (\frac{H_{\beta}}{\Gamma \left ((m+1)\beta +1\right )}\right )^{2} \dfrac{1}{(2m+3)\beta}, \end{aligned}$$
(4.3)

The right-hand side of inequality (4.3) depends on both m and β, so for a fixed β, we have

$$ \lim _{m\longrightarrow \infty} \cfrac{H_{\beta}}{\Gamma \left ((m+1)\beta +1\right )} \cfrac{1}{\sqrt{(2m+3)\beta}}=0, $$
(4.4)

therefore

$$ \lim _{m\longrightarrow \infty}\left \lVert g(t)-L^{T}\Phi _{\beta}(t) \right \rVert _{w_{\beta}}=0. $$
(4.5)

 □

Theorem 4.2

Let the error vector \(E_{\nu}\) of the operational matrix of fractional integration \(\Lambda ^{(\nu )}\) be given by

$$ E_{\nu}(t)=I^{\nu}\Phi _{\beta}(t)-\Lambda ^{(\nu )}\Phi _{\beta}(t). $$
(4.6)

Then

$$ \lim _{m\longrightarrow \infty}\left \lVert E_{\nu}(t) \right \rVert _{w_{ \beta}}=0. $$
(4.7)

Proof

Suppose that \(E_{\nu}= \begin{pmatrix} \epsilon _{0},\epsilon _{1},\ldots ,\epsilon _{m}\end{pmatrix} ^{T}\), then by using Equations (3.10), (3.16) and (3.18), we get

$$\begin{aligned} \left \lVert \epsilon _{r}\right \rVert _{w_{\beta}} ={}&\left \lVert I^{ \nu}\varphi ^{\beta}_{mr}(t)- \sum _{k=0}^{m}\lambda _{rk}\varphi ^{ \beta}_{mk}(t)\right \rVert _{w_{\beta}} \\ \leq{}& \sum _{j=r}^{m} \left \lvert (-1)^{j-r} \begin{pmatrix} m-r \\ j-r \end{pmatrix} \begin{pmatrix} m+j+1 \\ m-r \end{pmatrix} \frac{\Gamma (j\beta +1)}{\Gamma (j\beta +\nu +1)} \right \rvert \\ &{}\times \left \lVert t^{j\beta +\nu}-\sum _{k=0}^{m}\sum _{l=k}^{m}(-1)^{l-k} \dfrac{\beta (2k+1)}{\beta (j+l+1)+\nu} \begin{pmatrix} m-k \\ l-k \end{pmatrix} \begin{pmatrix} m+l+1 \\ m-k \end{pmatrix} \varphi ^{\beta}_{mk}(t)\right \rVert _{w^{\beta}} \\ ={}&\sum _{j=r}^{m} \left \lvert (-1)^{j-r} \begin{pmatrix} m-r \\ j-r \end{pmatrix} \begin{pmatrix} m+j+1 \\ m-r \end{pmatrix} \frac{\Gamma (j\beta +1)}{\Gamma (j\beta +\nu +1)} \right \rvert \\ &{}\times \left \lVert t^{j\beta +\nu}-\sum _{k=0}^{m}\ell _{jk} \varphi ^{\beta}_{mk}(t)\right \rVert _{w^{\beta}},\quad r=0,1,\dots ,m. \end{aligned}$$
(4.8)

But \(\sum \limits _{k=0}^{m}\ell _{jk}\varphi ^{\beta}_{mk}(t)\) is the approximation of \(t^{j\beta +\nu}\), so from Equation (4.3) we can write

$$\begin{aligned}& \left \lVert t^{j\beta +\nu}-\sum _{k=0}^{m}\ell _{jk}\varphi ^{\beta}_{mk}(t) \right \rVert _{w^{\beta}}\leq \frac{\hat{H}_{\beta}}{\Gamma \left ((m+1)\beta +1\right )} \frac{1}{\sqrt{(2m+3)\beta}}, \\& \quad \hat{H}_{\beta}=\sup _{t \in (0,1]} \left \{| D^{(m+1)\beta}t^{j\beta +\nu}|\right \}. \end{aligned}$$
(4.9)

Hence, Equation (4.8) becomes

$$\begin{aligned} \left \lVert \epsilon _{r}\right \rVert _{w_{\beta}}\leq{}& \frac{\bar{H}_{\beta}}{\Gamma \left ((m+1)\beta +1\right )} \frac{1}{\sqrt{(2m+3)\beta}} \\ &{}\times \sum _{j=r}^{m} \left \lvert (-1)^{j-r} \begin{pmatrix} m-r \\ j-r \end{pmatrix} \begin{pmatrix} m+j+1 \\ m-r \end{pmatrix} \frac{\Gamma (j\beta +1)}{\Gamma (j\beta +\nu +1)}\right \rvert , \quad r=0,1,\dots ,m. \end{aligned}$$
(4.10)

Therefore

$$ \lim _{m\longrightarrow \infty}\left \lVert E_{\nu}(t) \right \rVert _{w_{ \beta}}=0. $$
(4.11)

 □

5 Numerical method

The aim of this section is to present a new numerical method for solving fractional delay differential equations by using FCHFs and their operational matrix of fractional integration.

Consider the following two problems:

$$\begin{aligned}& \textstyle\begin{cases} D^{\nu}y(t)=f\left (t,\; y(t),\; y(t-\tau )\right ),& t\in [0,1], \quad \tau \in (0,1],\quad \nu >0, \\ y^{(i)}(0)=\eta _{i},& i=0,1,\ldots,\lceil \nu \rceil -1, \\ y(t)=\rho (t),& t< 0. \end{cases}\displaystyle \end{aligned}$$
(5.1)
$$\begin{aligned}& \textstyle\begin{cases} D^{\nu}y(t)=f\left (t,\; y(t),\; y(\tau t)\right ),& t\in [0,1], \quad \tau \in (0,1],\quad \nu >0, \\ y^{(i)}(0)=\eta _{i},& i=0,1,\ldots,\lceil \nu \rceil -1, \end{cases}\displaystyle \end{aligned}$$
(5.2)

where f and ρ are known analytical functions, τ is delay, \(\eta _{i},\; i=0,1,\ldots,\lceil \nu \rceil -1\) are real constants, y is the unknown function and \(D^{\nu}\) is the Caputo fractional derivative of order ν. To find approximate solutions of Problems (5.1) and (5.2), we approximate \(D^{\nu}y(t) \) by FCHFs as

$$ D^{\nu}y(t)\simeq \sum _{k=0}^{m}\ell _{k}\varphi ^{\beta}_{mk}(t) =L^{T} \Phi _{\beta}(t). $$
(5.3)

By applying the Riemann–Liouville integration to Equation (5.3) and using Equations (2.8) and (3.9), we get

$$\begin{aligned} y(t)&\simeq I^{\nu}\left (L^{T}\Phi _{\beta}(t)\right )+\sum _{i=0}^{ \lceil \nu \rceil -1}\dfrac{\eta _{i}}{i!}t^{i} \\ &\simeq L^{T}\Lambda ^{(\nu )}\Phi _{\beta}(t)+P^{T}\Phi _{\beta}(t), \end{aligned}$$
(5.4)

where P is the fractional-order Chelyshkov coefficient vector of the polynomial \(\sum \limits _{i=0}^{\lceil \nu \rceil -1}\dfrac{\eta _{i}}{i!}t^{i}\) and is given by

$$ \begin{gathered} P= \begin{pmatrix} p_{0},p_{1},\ldots,p_{m} \end{pmatrix} ^{T}, \\ p_{z}=\beta (2z+1)\sum _{i=0}^{\lceil \nu \rceil -1}\sum _{j=z}^{m} \dfrac{(-1)^{j-z}\eta _{i}}{\left (\beta (j+1)+i\right )\Gamma (i+1)} \begin{pmatrix} m-z \\ j-z \end{pmatrix} \begin{pmatrix} m+j+1 \\ m-z \end{pmatrix} ,\\ z=0,1,\ldots ,m. \end{gathered} $$
(5.5)

Then for Problems (5.1) and (5.2), \(y(t)\) take the form

$$\begin{aligned}& y(t)\simeq \textstyle\begin{cases} L^{T}\Lambda ^{(\nu )}\Phi _{\beta}(t)+P^{T}\Phi _{\beta}(t),& t\in [0,1] \\ \rho (t),& t< 0, \end{cases}\displaystyle \end{aligned}$$
(5.6)
$$\begin{aligned}& y(t)\simeq L^{T}\Lambda ^{(\nu )}\Phi _{\beta}(t)+P^{T}\Phi _{\beta}(t), \quad t\in [0,1]. \end{aligned}$$
(5.7)

Making use of Equations (5.6) and (5.7), we get

$$\begin{aligned}& y(t-\tau )\simeq \textstyle\begin{cases} L^{T}\Lambda ^{(\nu )}\Phi _{\beta}(t-\tau )+P^{T}\Phi _{\beta}(t- \tau ),& t\in [\tau ,1], \\ \rho (t-\tau ),& t< \tau , \end{cases}\displaystyle \end{aligned}$$
(5.8)
$$\begin{aligned}& y(\tau t)\simeq L^{T}\Lambda ^{(\nu )}\Phi _{\beta}(\tau t)+P^{T} \Phi _{\beta}(\tau t),\quad t\in [0,1]. \end{aligned}$$
(5.9)

By substituting Equations (5.3), (5.6)–(5.9) in Problems (5.1) and (5.2), we obtain the following algebraic equations

$$\begin{aligned}& \textstyle\begin{cases} L^{T}\Phi _{\beta}(t)\simeq f\left (t,\; L^{T}\Lambda ^{(\nu )}\Phi _{ \beta}(t)+P^{T}\Phi _{\beta}(t),\; \rho (t-\tau )\right ),& t\in [0, \tau ), \\ L^{T}\Phi _{\beta}(t) \simeq f\bigl(t,\; L^{T}\Lambda ^{(\nu )}\Phi _{ \beta}(t)+P^{T}\Phi _{\beta}(t),\\ \hphantom{L^{T}\Phi _{\beta}(t) \simeq} L^{T}\Lambda ^{(\nu )}\Phi _{\beta}(t- \tau )+P^{T}\Phi _{\beta}(t-\tau )\bigr),& t\in [\tau ,1], \end{cases}\displaystyle \end{aligned}$$
(5.10)
$$\begin{aligned}& L^{T}\Phi _{\beta}(t)\simeq f\left (t, \; L^{T}\Lambda ^{(\nu )}\Phi _{ \beta}(t)+P^{T}\Phi _{\beta}(t),\; L^{T}\Lambda ^{(\nu )}\Phi _{\beta}( \tau t)+P^{T}\Phi _{\beta}(\tau t)\right ), \\& \quad t\in [0,1]. \end{aligned}$$
(5.11)

Now, by collocate Equations (5.10) and (5.11) at the points \(t_{s}=\cfrac{s}{m}\), \(s= 0, 1, \dots , m\), we obtain the following two systems of \(m+1\) algebraic equations,

$$\begin{aligned}& \textstyle\begin{cases} L^{T}\Phi _{\beta}(t_{s})-f\left (t_{s},\; L^{T}\Lambda ^{(\nu )} \Phi _{\beta}(t_{s})+P^{T}\Phi _{\beta}(t_{s}),\; \rho (t_{s}-\tau ) \right )\simeq 0,& t_{s}\in [0,\tau ), \\ L^{T}\Phi _{\beta}(t_{s})-f\bigl(t_{s},\; L^{T}\Lambda ^{(\nu )} \Phi _{\beta}(t_{s})+P^{T}\Phi _{\beta}(t_{s}),\\ \quad L^{T}\Lambda ^{( \nu )}\Phi _{\beta}(t_{s}-\tau )+P^{T}\Phi _{\beta}(t_{s}-\tau ) \bigr)\simeq 0,& t_{s}\in [\tau ,1], \end{cases}\displaystyle \end{aligned}$$
(5.12)
$$\begin{aligned}& L^{T}\Phi _{\beta}(t_{s})-f\left (t_{s},\; L^{T}\Lambda ^{(\nu )} \Phi _{\beta}(t_{s})+P^{T}\Phi _{\beta}(t_{s}),\; L^{T}\Lambda ^{( \nu )}\Phi _{\beta}(\tau t_{s})+P^{T}\Phi _{\beta}(\tau t_{s})\right ) \simeq 0, \\& \quad t_{s}\in [0,1]. \end{aligned}$$
(5.13)

These systems can be solved to find \(m+1\) unknown constants \(\ell _{0},\ell _{1},\ldots\ell _{m}\) and hence, an approximate solutions of Problems (5.1) and (5.2) can be determined from Equations (5.6) and (5.7) respectively.

Based on the above, we present an algorithm for solving Problems (5.1) and (5.2) as follows

Algorithm 5.1

Input::

The numbers ν, \(\eta _{i}, i=0,1,\ldots,\lceil \nu \rceil -1 \) and the functions f, ρ

Step 1::

Choose \(m\in N\), \(\beta >0\) and construct the fractional-order Chelyshkov vector \(\Phi _{\beta}(t)\) using Equations (3.1) and (3.8).

Step 2::

Compute the operational matrix \(\Lambda ^{(\nu )}\) and the vector P using Equations (3.10) and (5.5).

Step 3::

Define the unknown vector \(L= \begin{pmatrix} \ell _{0},\ell _{1},\ldots ,\ell _{m}\end{pmatrix} ^{T}\).

Step 4::

Compute the algebraic equation (5.10) or (5.11).

Step 5::

Construct the nonlinear system of algebraic equations (5.12) or (5.13) by using the points \(t_{s}=\cfrac{s}{m}\), \(s= 0, 1, \dots , m\).

Step 6::

Find the unknowns of the algebraic system obtained in Step 5.

Output::

An approximate solution given by equation (5.6) or (5.7).

6 Numerical results

To demonstrate the applicability and effectiveness of the introduced method, we use it to solve some examples, and we compare the numerical results it generates with those reported in the literature. All numerical results have been obtained using Mathematica 11 software and a laptop with Intel(R) Core(TM) i7-4600M 2.90 GHz CPU and 8.0 GB RAM.

Example 1

Consider the following fractional delay differential equation [10, 47, 50]:

$$ \textstyle\begin{cases} D^{\nu}y(t)=y(t-\tau )-y(t)+\frac{2t^{2-\nu}}{\Gamma (3-\nu )}\\ \hphantom{D^{\nu}y(t)=}{}- \frac{t^{1-\nu}}{\Gamma (2-\nu )}+ 2\tau t-\tau ^{2}-\tau , & t \in [0,1],\quad \nu \in (0,1],\quad \tau \in (0,1], \\ y(0)=0, \\ y(t)=t^{2}-t, & t< 0. \end{cases} $$
(6.1)

The exact solution to this problem is \(y(t)=t^{2}-t\). By using the technique described in Sect. 5, we get

$$\begin{aligned} &D^{\nu}y(t)= L^{T}\Phi _{\beta}(t), \\ &y(t)\simeq \textstyle\begin{cases} L^{T}\Lambda ^{(\nu )}\Phi _{\beta}(t)+P^{T}\Phi _{\beta}(t),& t\in [0,1], \\ t^{2}-t,& t< 0, \end{cases}\displaystyle \\ &y(t-\tau )\simeq \textstyle\begin{cases} L^{T}\Lambda ^{(\nu )}\Phi _{\beta}(t-\tau )+P^{T}\Phi _{\beta}(t- \tau ),& t\in [\tau ,1], \\ (t-\tau )^{2}-(t-\tau ),& t< \tau , \end{cases}\displaystyle \end{aligned}$$
(6.2)

where \(L= \begin{pmatrix} \ell _{0},\ell _{1},\ldots ,\ell _{m}\end{pmatrix} ^{T}\) is the vector of unknown constants that we must identify and P can be calculated from Equation (5.5). By substituting Equations (6.2) into the fractional delay differential equation (6.1), we get the following matrix equations

$$ \textstyle\begin{cases} L^{T}\Phi _{\beta}(t) -\left ((t-\tau )^{2}-(t-\tau )\right ) +L^{T} \Lambda ^{(\nu )}\Phi _{\beta}(t)+P^{T}\Phi _{\beta}(t)\\ \quad {} - \frac{2t^{2-\nu}}{\Gamma (3-\nu )} +\frac{t^{1-\nu}}{\Gamma (2-\nu )} -2 \tau t+\tau ^{2}+\tau \simeq 0 ,& t\in [0,\tau ), \\ L^{T}\Phi _{\beta}(t) -\left (L^{T}\Lambda ^{(\nu )}\Phi _{\beta}(t- \tau )+P^{T}\Phi _{\beta}(t-\tau )\right )+L^{T}\Lambda ^{(\nu )} \Phi _{\beta}(t) \\ \quad {}+P^{T}\Phi _{\beta}(t) - \frac{2t^{2-\nu}}{\Gamma (3-\nu )} +\frac{t^{1-\nu}}{\Gamma (2-\nu )} -2\tau t+\tau ^{2}+\tau \simeq 0 ,& t\in [\tau ,1]. \end{cases} $$
(6.3)

By considering \(\nu =1\), we take \(m =2\), \(\beta = 1 \) and hence

$$ \Lambda ^{(1)}= \begin{pmatrix} \cfrac{1}{18} & \cfrac{5}{12} & \cfrac{19}{36} \\ -\cfrac{1}{36} & \cfrac{1}{6} & \cfrac{11}{18} \\ \cfrac{1}{180} & -\cfrac{1}{30} & \cfrac{5}{18} \end{pmatrix} ,\quad P= \begin{pmatrix} 0,0,0 \end{pmatrix} ^{T}. $$
(6.4)

In case \(\tau \in \left (0,0.5\right ]\), making use of Equation (6.4) and collocate Equations (6.3) at the points 0, \(\frac{1}{2}\), 1, we obtain the following system

$$\begin{aligned} & 190\ell _{0}-5\ell _{1}+\ell _{2}+60=0, \\ &\left (20\tau ^{2}-10\right )\ell _{0}+\left (10\tau ^{2}+10\tau +15 \right )\ell _{1}+\left (-10\tau ^{2}+6\tau +5\right )\ell _{2} +20 \tau ^{2}=0, \\ &\left (\tau ^{2}-\tau +1\right )\ell _{0}+\left (\frac{1}{2}\tau ^{2}-1 \right )\ell _{1}+\left (-\frac{1}{2}\tau ^{2} +\frac{4}{5}\tau +1 \right )\ell _{2}+\tau ^{2}-\tau -1=0. \end{aligned}$$
(6.5)

Solving system (6.5) for the unknowns \(\ell _{0}\), \(\ell _{1}\), \(\ell _{2}\) gives the solution

$$ \ell _{0}=-\cfrac{1}{3},\quad \ell _{1}=-\cfrac{1}{2},\quad \ell _{2}= \cfrac{5}{6}, $$
(6.6)

thus

$$ \begin{aligned}[b] &y(t)=L^{T}\Lambda ^{(1)}\Phi _{1}(t)= \begin{pmatrix} -\cfrac{1}{3},-\cfrac{1}{2},\cfrac{5}{6} \end{pmatrix} \begin{pmatrix} \cfrac{1}{18} & \cfrac{5}{12} & \cfrac{19}{36} \\ -\cfrac{1}{36} & \cfrac{1}{6} & \cfrac{11}{18} \\ \cfrac{1}{180} & -\cfrac{1}{30} & \cfrac{5}{18} \end{pmatrix} \begin{pmatrix} 10t^{2}-12t+3 \\ -5t^{2}+4t \\ t^{2} \end{pmatrix}=t^{2}-t, \\ &\quad t\in [0,1], \end{aligned} $$
(6.7)

which is the exact solution. For \(\tau \in \left (0.5,1\right ]\), we use Equation (6.4) and collocate Equations (6.3) at the points 0, \(\frac{1}{2}\), 1, then we get the following system

$$\begin{aligned} & 190\ell _{0}-5\ell _{1}+\ell _{2}+60=0, \\ & 2\ell _{0}-25\ell _{1}-7\ell _{2}-6=0, \\ &\left (\tau ^{2}-\tau +1\right )\ell _{0}+\left (\frac{1}{2}\tau ^{2}-1 \right )\ell _{1}+\left (-\frac{1}{2}\tau ^{2} +\frac{4}{5}\tau +1 \right )\ell _{2}+\tau ^{2}-\tau -1=0. \end{aligned}$$
(6.8)

Solving system (6.8) for the unknowns \(\ell _{0}\), \(\ell _{1}\), \(\ell _{2}\) gives the same solution

$$ \ell _{0}=-\cfrac{1}{3},\quad \ell _{1}=-\cfrac{1}{2},\quad \ell _{2}= \cfrac{5}{6}, $$
(6.9)

which leads to the exact solution. Further, the total CPU time required to find the solution using the proposed method for the two cases of τ in this example is 0.0156 seconds. Thus, the proposed method is accurate and time-efficient.

For \(\nu =\dfrac{1}{2}\), we take \(m=4 \), \(\beta =\dfrac{1}{2} \), and again we can obtain the exact solution, where

$$ \begin{gathered} \Lambda ^{(\frac{1}{2})}=\cfrac{1}{\sqrt{\pi}} \begin{pmatrix} \cfrac{8}{75 } & \cfrac{1}{50 } & \cfrac{131}{30 }-\cfrac{10 \pi}{7} & \cfrac{2366}{75 }-10 \pi & \cfrac{11274}{25 }-\cfrac{1005 \pi}{7} \\ -\cfrac{16}{225 } & \cfrac{8}{25 } & \cfrac{10 \pi}{21}- \cfrac{56}{45 } & \cfrac{10 \pi}{3}-\cfrac{4739}{450 } & \cfrac{531 \pi}{7}-\cfrac{11907}{50} \\ \cfrac{16}{525 } & -\cfrac{24}{175 } & \cfrac{8}{15 } & \cfrac{77}{150 } & \cfrac{3303}{50 }-21 \pi \\ -\cfrac{4}{525 } & \cfrac{6}{175 } & -\cfrac{2}{15 } & \cfrac{56}{75 } & 3 \pi -\cfrac{216}{25 } \\ \cfrac{4}{4725 } & -\cfrac{2}{525 } & \cfrac{2}{135 } & - \cfrac{56}{675 } & \cfrac{24}{25 } \end{pmatrix} ,\\ P= \begin{pmatrix} 0,0,0,0,0 \end{pmatrix} ^{T}. \end{gathered} $$
(6.10)

Similarly, by using Equation (6.10), subdivide the interval \((0,1]\) into four subintervals and consider the following cases of τ

$$ \tau \in \left (0,\frac{1}{4}\right ], \quad \tau \in \left ( \frac{1}{4},\frac{1}{2}\right ] , \quad \tau \in \left (\frac{1}{2}, \frac{3}{4}\right ], \quad \tau \in \left (\frac{3}{4},1\right ], $$
(6.11)

then collocate Equations (6.3) at the points \(t_{s}=\dfrac{s}{4}\), \(s=0,1,\ldots ,4\), for each case of τ and solving the resulting systems for the unknowns \(\ell _{0}\), \(\ell _{1}\), \(\ell _{2}\), \(\ell _{3}\), \(\ell _{4}\), we get the same solution

$$ \ell _{0}=0,\quad \ell _{1}=-\cfrac{1}{10\sqrt{\pi }},\quad \ell _{2}=- \cfrac{1}{2\sqrt{\pi}},\quad \ell _{3}=-\cfrac{16}{15\sqrt{\pi}}, \quad \ell _{4}=0, $$
(6.12)

for all cases of τ, thus

$$ \begin{aligned} y(t)=L^{T}\Lambda ^{(\frac{1}{2})}\Phi _{\frac{1}{2}}(t) =t^{2}-t, \qquad t\in [0,1], \end{aligned} $$
(6.13)

which is the exact solution. Additionally, the total CPU time needed to find this solution using the proposed method for the four cases of τ in Equation (6.11) is 24.0608 seconds. Problem (6.1) has been solved in [10, 47, 50]. By comparing the obtained solution with those in [10, 47, 50], it can be observed that the introduced method is more accurate because we get the exact solution for \(\nu =1 \) and for any value of τ with three terms of FCHFs, whereas they used four terms of Legendre wavelets, six terms of Taylor wavelets and eight terms of fractional-order Taylor functions in [47, 50] and [10] respectively to obtain only approximate solutions.

Example 2

Consider the following fractional delay differential equation [8, 10]:

$$ \textstyle\begin{cases} D^{\frac{1}{2}}y(t)=y(t-1)-y(t)+\dfrac{\Gamma (3)}{\Gamma (2.5)}t^{ \frac{3}{2}}+2t-1,& t\in [0,1], \\ y(0)=0, \\ y(t)=t^{2},& t< 0. \end{cases} $$
(6.14)

The exact solution is given by \(y(t)=t^{2} \). By applying the method proposed in Sect. 5, we obtain

$$\begin{aligned} & D^{\frac{1}{2}}y(t)= L^{T}\Phi _{\beta}(t), \\ & y(t)= \textstyle\begin{cases} L^{T}\Lambda ^{(\frac{1}{2})} \Phi _{\beta}(t)+P^{T}\Phi _{\beta}(t), & t\in [0,1], \\ t^{2}, & t< 0, \end{cases}\displaystyle \\ & y(t-1)= \textstyle\begin{cases} L^{T}\Lambda ^{(\frac{1}{2})} \Phi _{\beta}(t-1)+P^{T}\Phi _{\beta}(t-1), & t=1, \\ (t-1)^{2}, & t< 1. \end{cases}\displaystyle \end{aligned}$$
(6.15)

Equations (6.15) transform Equation (6.14) to

$$ \textstyle\begin{cases} L^{T}\Phi _{\beta}(t)- (t-1)^{2}+\left (L^{T}\Lambda ^{(\frac{1}{2})} \Phi _{\beta}(t)+P^{T}\Phi _{\beta}(t)\right )\\ \quad {}- \dfrac{\Gamma (3)}{\Gamma (2.5)}t^{\frac{3}{2}}-2t+1\simeq 0,& t\in [0,1), \\ L^{T}\Phi _{\beta}(t)- \left (L^{T}\Lambda ^{(\frac{1}{2})}\Phi _{ \beta}(t-1)+P^{T}\Phi _{\beta}(t-1)\right )\\ \quad {}+\left (L^{T}\Lambda ^{( \frac{1}{2})}\Phi _{\beta}(t)+P^{T}\Phi _{\beta}(t)\right ) - \dfrac{\Gamma (3)}{\Gamma (2.5)}t^{\frac{3}{2}} -2t+1\simeq 0,& t=1. \end{cases} $$
(6.16)

By considering \(m=4\) and \(\beta =\dfrac{1}{2}\) and collocating Equation (6.16) at the nodes \(t_{s}=\dfrac{s}{4}\), \(s=0,1,\ldots ,4\), and solving the resulting system, we obtain the solution

$$ \ell _{0}=0,\quad \ell _{1}=0,\quad \ell _{2}=0,\quad \ell _{3}= \dfrac{1}{3\sqrt{\pi}},\quad \ell _{4}=\dfrac{3}{\sqrt{\pi}}, $$
(6.17)

which leads to the exact solution. Also, the total CPU time required to find the solution using the presented method in this example is 0.2969 seconds. This problem has been solved by using the fractional-order Taylor method [10], the Haar wavelet collocation technique [8] and the fractional backward difference method [32]. Their solutions were approximate solutions. By comparing with these methods, it is clear that the proposed method is more effective, more accurate and less time-consuming than these methods.

Example 3

Consider the following fractional delay differential equation [50]:

$$ \textstyle\begin{cases} D^{0.2}y(t)=-y(t-1)+\cfrac{\Gamma (3)}{\Gamma (2.8)}t^{1.8}- \cfrac{\Gamma (2)}{\Gamma (1.8)}t^{0.8}+t^{2}-3t+1,& t\geq 0, \\ y(0)=-1, \\ y(t)=t^{2}-t-1,& t< 0. \end{cases} $$
(6.18)

The exact solution to this problem is \(y(t)=t^{2}-t-1 \). Figure 3 displays the approximate solution obtained for various values of β at \(m=10\) with the exact solution, while Fig. 4 plots the absolute error function at \(\beta =0.2\) and \(m=10\). It can be observed that our numerical solutions agree with the exact solution for all choices of β and high-accuracy numerical solutions can be obtained with some terms of FCHFs. Table 1 shows a comparison between the results obtained by the present method and those reported in [50] in terms of absolute errors, where M denotes the number of basis functions used in [50] for solving the problem. From Table 1, it can be seen that the absolute errors achieved by the introduced method are less than those in [50] for all corresponding cases which shows the advantage of using basis functions of fractional-order. In addition, we have used only eleven basis functions, while they used more than a hundred basis functions in [50]. This demonstrates that the introduced method is in more agreement with the exact solution than [50] for this problem and can identify high-precision solutions at reasonable computational costs.

Figure 3
figure 3

The graph of the approximate solution for various choices of β at \(m=10 \) and the exact solution for Example 3

Figure 4
figure 4

The graph of the absolute error function at \(m=10 \) and \(\beta =0.2 \) for Example 3

Table 1 Comparison of the absolute errors for Example 3

Example 4

Consider the following fractional delay differential equation [15, 50]:

$$ \textstyle\begin{cases} D^{\nu}y(t)=-y(t)-y(t-0.3)+e^{-t+0.3},& t\in [0,1],\quad \nu \in (2,3], \\ y(0)=1,\quad y'(0)=-1, \quad y''(0)=1, \\ y(t)=e^{-t},& t< 0. \end{cases} $$
(6.19)

This problem has the exact solution \(y(t)=e^{-t}\) when \(\nu =3 \). Figures 5 and 6 present graphically the obtained results for the approximate solution for various values of ν with the exact solution for \(\nu =3\) and the absolute error at \(\nu =3 \), respectively. From Fig. 5, it can be seen that as ν approaches 3, the approximate solution converges to the exact solution for \(\nu =3\) and from Fig. 6, we can see that the absolute error is at most of order 10−14, which means that the present method has good accuracy using a reasonable number of basis functions. Table 2 compares the results obtained by the present method with the collected results in [15] in terms of absolute errors. It can be observed that the results obtained by the present method are less than those in [15, 22, 38, 46] for most of the listed values in that table by using a fewer number of basis functions for each case. Also, Problem (6.19) has been solved using the Legendre wavelet method [50] by selecting \(M=14\). The maximum absolute error achieved by this method is approximately \(8.78 \times 10^{-12}\) while our maximum absolute error is approximately \(1.74 \times 10^{-15}\) at \(m=10\). This means that the introduced method outperforms the method in [50] with respect to accuracy. These comparisons show that the presented method is more accurate, efficient, and coincidental with the exact solution than [15, 22, 38, 46, 50].

Figure 5
figure 5

The graph of the approximate solution for various values of ν at \(m=10\), \(\beta =1 \) and the exact solution for Example 4

Figure 6
figure 6

The graph of the absolute error function at \(m=10\), \(\beta =1 \) and \(\nu =3\) for Example 4

Table 2 Comparison of the absolute errors at \(\beta =1\) and \(\nu =3\) for Example 4

Example 5

Consider the following fractional delay differential equation [21]:

$$ \textstyle\begin{cases} D^{\nu}y(t)=\dfrac{3}{4}y(t)+y\left (\dfrac{1}{2}t\right )+ \cfrac{\Gamma (q+1)}{\Gamma (q+1-\nu )}t^{q-\nu} -\left ( \dfrac{1}{2^{q}}+\dfrac{3}{4}\right )t^{q},\\ \quad t\in [0,1],\quad \nu \in (1,2],\quad q>1, \\ y(0)=y'(0)=0. \end{cases} $$
(6.20)

We have \(y(t)=t^{q} \) as the exact solution for this problem. By using the technique described in Sect. 5, we get

$$\begin{aligned} & D^{\nu}y(t)= L^{T}\Phi _{\beta}(t), \\ & y(t)\simeq L^{T}\Lambda ^{(\nu )}\Phi _{\beta}(t)+P^{T}\Phi _{\beta}(t), \\ & y\left (\frac{1}{2} t\right )\simeq L^{T}\Lambda ^{(\nu )}\Phi _{ \beta}\left (\frac{1}{2} t\right )+P^{T}\Phi _{\beta}\left ( \frac{1}{2} t\right ). \end{aligned}$$
(6.21)

The fractional delay differential equation (6.20) can be written after using Equations (6.21) in the form

$$\begin{aligned} &L^{T}\Phi _{\beta}(t)-\dfrac{3}{4}\left (L^{T}\Lambda ^{(\nu )}\Phi _{ \beta}(t)+P^{T}\Phi _{\beta}(t)\right ) -\left (L^{T}\Lambda ^{(\nu )} \Phi _{\beta}\left (\frac{1}{2} t\right )+P^{T}\Phi _{\beta}\left ( \frac{1}{2} t\right )\right ) \\ &\quad {}-\cfrac{\Gamma (q+1)}{\Gamma (q+1-\nu )}t^{q- \nu}+\left (\dfrac{1}{2^{q}}+\dfrac{3}{4}\right )t^{q} \simeq 0. \end{aligned}$$
(6.22)

Consider \(\nu =2\) and \(q=2 \) with the exact solution \(y(x)=t^{2} \). In order to solve this case, we take \(m=2\), and \(\beta =1\), hence

$$ \Lambda ^{(2)}= \begin{pmatrix} -\cfrac{1}{105} & \cfrac{17}{210} & \cfrac{3}{7} \\ -\cfrac{1}{1260} & -\cfrac{1}{140} & \cfrac{65}{252} \\ \cfrac{1}{420} & -\cfrac{1}{84} & \cfrac{5}{84} \end{pmatrix} ,\quad P= \begin{pmatrix} 0,0,0 \end{pmatrix} ^{T}. $$
(6.23)

By using Equation (6.23) and collocate Equation (6.22) at the points 0, \(\frac{1}{2}\), 1, we get the following system

$$\begin{aligned} & 732\ell _{0}+\ell _{1}-3\ell _{2}-480=0, \\ & 1186\ell _{0}-1167\ell _{1}-419\ell _{2}+2940=0, \\ &964\ell _{0}-2113\ell _{1}+1579\ell _{2}-1680=0. \end{aligned}$$
(6.24)

Solving Equations (6.24) gives the solution

$$ \ell _{0}=\dfrac{2}{3},\quad \ell _{1}=2,\quad \ell _{2}= \dfrac{10}{3}, $$
(6.25)

hence

$$ \begin{aligned} y(t)=L^{T}\Lambda ^{(2)}\Phi _{1}(t)= \begin{pmatrix} \dfrac{2}{3},2,\dfrac{10}{3} \end{pmatrix} \begin{pmatrix} -\cfrac{1}{105} & \cfrac{17}{210} & \cfrac{3}{7} \\ -\cfrac{1}{1260} & -\cfrac{1}{140} & \cfrac{65}{252} \\ \cfrac{1}{420} & -\cfrac{1}{84} & \cfrac{5}{84} \end{pmatrix} \begin{pmatrix} 10t^{2}-12t+3 \\ -5t^{2}+4t \\ t^{2} \end{pmatrix} =t^{2}, \end{aligned} $$
(6.26)

which is the exact solution. Moreover, the total CPU time required to find this solution using the introduced method in this example is 0.0156 seconds. Therefore, the presented method is accurate and time-efficient. Additionally, in case \(\nu =\dfrac{3}{2}\) and \(q=\dfrac{3}{2} \), we can again obtain the exact solution \(y(x)=t^{\frac{3}{2}}\). By employing \(m=2\) and \(\beta =\dfrac{3}{4} \), computing \(\Lambda ^{(\frac{3}{2})}\), collocate Equation (6.22) at the nodes 0, \(\frac{1}{2}\), 1, and solving the generated system, we obtain the solution

$$ \ell _{0}=\dfrac{\sqrt{\pi}}{4},\quad \ell _{1}= \dfrac{3\sqrt{\pi}}{4} ,\quad \ell _{2}=\dfrac{5\sqrt{\pi}}{4}, $$
(6.27)

which leads to the exact solution for this case. Also, the total CPU time needed to find the solution using the proposed method for this case is 0.0937 seconds. The collocation Laguerre operational matrix technique [21] has been used to solve Problem (6.20). By comparing with our solution, it is clear that our method is more efficient than [21], because we utilized three terms of FCHFs to get the exact solution for \(\nu =2\), while they used six terms of the generalized Laguerre polynomials to obtain only approximate solution.

Example 6

Consider the following fractional delay differential equation [33, 42]:

$$ \textstyle\begin{cases} D^{\nu}y(t)=-y(t)+\dfrac{\tau}{2}y\left (\tau t\right )- \dfrac{\tau}{2}e^{-\tau t},& t\in [0,1],~\nu \in (0,1],~ \tau \in (0,1], \\ y(0)=1. \end{cases} $$
(6.28)

The exact solution to this problem at \(\nu =1 \) is \(y(t)=e^{-t} \). Figures 7 and 8 display the approximate solution obtained for several values of ν and τ together with the exact solution for \(\nu =1\), respectively. Figure 7 shows that as ν approaches 1, the approximate solution converges to that of the integer-order delay differential equation. From Fig. 8, it can be seen that the approximate solution obtained by our method coincides with the exact solution for all the used values of the delay τ. The absolute error of the presented method is plotted in Fig. 9. This figure shows that the proposed method is accurate because the error is at most of order 10−13. Table 3 presents the absolute errors for different values of m. It is obvious that the absolute errors decrease when the value of m increases, which demonstrates the convergence of the introduced method to the exact solution. Table 4 compares the absolute errors obtained by the introduced method with the collected results in [42]. From Table 4, we can note that the presented technique is more accurate and efficient in comparison to the methods [33, 42].

Figure 7
figure 7

The graph of the approximate solution for different values of ν at \(m=10\), \(\beta =\nu \), \(\tau =0.2\) and the exact solution for Example 6

Figure 8
figure 8

The graph of the approximate solution for various values of τ at \(m=10 \), \(\beta =\nu =1 \) and the exact solution for Example 6

Figure 9
figure 9

The graph of the absolute error function at \(m=10\), \(\beta =\nu =1 \) and \(\tau =0.2 \) for Example 6

Table 3 The absolute errors for different values of m at \(\beta =\nu =1\) and \(\tau =0.2 \) for Example 6
Table 4 Comparison of the absolute errors at \(\beta =\nu =1\) and \(\tau =0.2 \) for Example 6

Example 7

Consider the following fractional delay differential equation [34, 42, 50]:

$$ \textstyle\begin{cases} D^{\nu}y(t)=-y(t)+\dfrac{1}{2}y\left (\dfrac{1}{2}t\right )+\cos (t)+ \sin (t)- \dfrac{1}{2}\sin \left (\dfrac{1}{2}t\right ),\\ \quad t\in [0,1], \quad \nu \in (0,1], \\ y(0)=0. \end{cases} $$
(6.29)

The exact solution for this problem is \(y(t)=\sin (t) \) when \(\nu =1 \). The approximate solution obtained for different values of ν together with the known exact solution at \(\nu =1\) is plotted in Fig. 10. It can be noted that as ν tends to 1, the approximate solution converges to the exact solution for \(\nu =1\). The absolute error function for \(\nu =1 \) is presented in Fig. 11. This figure shows that even if the exact solution is not a polynomial, an accurate approximation can be achieved using a sufficient number of FCHFs. In Table 5, we compare the absolute errors of the present method with those collected in [50] for the Bernoulli wavelet method [42], the spectral method based on a modification of hat functions [34] and the Legendre wavelet method [50]. These results show that the proposed method is superior to the methods in [34, 42, 50] for most of the listed values of absolute errors by using a smaller number of basis functions than they have been used in [34, 42, 50]. This example shows that the present method provides high efficiency regardless of the type of the exact solution for the problem.

Figure 10
figure 10

The graph of the approximate solution for several choices of ν at \(m=10\), \(\beta =\nu \) and the exact solution for Example 7

Figure 11
figure 11

The graph of the absolute error function at \(m=10\) and \(\beta =\nu =1 \) for Example 7

Table 5 Comparison of the absolute errors at \(\beta =\nu =1\) for Example 7

Example 8

Consider the following fractional delay differential equation [42]:

$$ \textstyle\begin{cases} D^{\nu}y(t)=1-2y^{2}\left (\dfrac{1}{2}t\right ),& t\in [0,1],\quad \nu \in (1,2], \\ y(0)=1,\quad y'(0)=0. \end{cases} $$
(6.30)

The exact solution for this problem is \(y(t)=\cos (t) \) when \(\nu =2 \). Figure 12 shows the obtained approximate solution for various choices of ν with the exact solution for \(\nu =2\). It can be seen that as ν converges to 2, the approximate solution approaches the exact solution for \(\nu =2\). Figure 13 displays the absolute error function for \(\nu =2\). This graph shows that the presented method has a good convergence rate and its solutions are accurate. Table 6 presents a comparison between the obtained results and those reported in [42] in terms of absolute errors. It can be noted that our method outperforms the method in [42] since the absolute errors achieved by the introduced method are less than those in [42] for all corresponding cases by using a fewer number of basis functions for each case. This demonstrates the agreement of our method with the exact solution with reasonable computational costs.

Figure 12
figure 12

The graph of the approximate solution for various values of ν at \(m=10\), \(\beta =1 \) and the exact solution for Example 8

Figure 13
figure 13

The graph of the absolute error function at \(m=10\), \(\beta =1 \) and \(\nu =2\) for Example 8

Table 6 Comparison of the absolute errors at \(\beta =1\) and \(\nu =2 \) for Example 8

Example 9

Consider the following fractional delay differential equation [44]:

$$ \textstyle\begin{cases} D^{\nu}y(t)=\dfrac{1}{2}y(t)+\dfrac{1}{2}y\left (\dfrac{1}{2}t\right )D^{ \nu}y\left (\dfrac{1}{2}t\right ),& t\in [0,1],\quad \nu \in (0,1], \\ y(0)=1. \end{cases} $$
(6.31)

This problem has the exact solution \(y(t)=e^{t} \) when \(\nu =1 \). The approximate solution for different values of ν is plotted in Fig. 14 along with the exact solution for \(\nu =1\). The absolute error of the presented method is drawn in Fig. 15. These graphs demonstrate the convergence of the obtained approximate solutions to the exact solution. Table 7 compares the results obtained by the present method with the those in [44]. It can be seen that our results are in agreement with the results in [44] for \(m=8\) and slightly better for \(m=9\). This means that the presented method is compatible with the method in [44] for this problem.

Figure 14
figure 14

The graph of the approximate solution for various values of ν at \(m=9\), \(\beta =\nu \) and the exact solution for Example 9

Figure 15
figure 15

The graph of the absolute error function at \(m=9 \) and \(\beta =\nu =1\) for Example 9

Table 7 Comparison of the absolute errors at \(\beta =\nu =1\) for Example 9

For all tested examples, the presented method has found the solutions with high accuracy within acceptable computation costs. We can observe that using fractional values of β leads to a good rate of convergence and a low number of basis functions is required to obtain satisfactory results when the solutions of fractional delay differential equations contain terms with fractional powers or when the fractional derivative ν is a proper fraction.

7 Conclusion

This paper has used FCHFs and their properties to provide an accurate numerical method for solving fractional delay differential equations. The fractional derivative was considered in the Caputo sense. The problem of finding a solution to a fractional delay differential equation was transformed into the problem of solving a system of algebraic equations. The convergence of the presented approximation has been discussed. The introduced method has been applied to solve many problems and the obtained results were compared with exact solutions and some other published numerical methods. It can be observed that the presented method has high accuracy by using a smaller number of basis functions than other methods used in the comparisons. This reveals that the presented method is efficient, accurate and its performance is quite satisfactory, which establishes the significance of the present method for solving fractional delay differential equations.