1 Introduction

The name fractional calculus stems from the fact that the order of derivatives and integrals are fractions rather than integers. Early work on fractional calculus dates back to the early nineteenth century [1]. Researchers initially concentrated on the proof of the existence and uniqueness of the solution to a fractional model [2,3,4]. Theory of fractional calculus has been discussed by many authors [5,6,7].

Recent research has concentrated on showing the advantages of fractional over classical calculus [4, 8,9,10,11]. In many cases, the fractional calculus has provided better results compared to those obtained via the classical approach. In general, the better performance of the fractional calculus becomes evident based on lower error levels produced during an estimation process [8,9,10, 12, 13]. Computational methods and numerical simulations successfully applied to several works, such as those found in [14,15,16,17,18,19], aimed to show the results proven theoretically or to iteratively compute the solution to problem whose analytic form is not explicit.

Evidence of fractional calculus being applicable to real life problems has gradually been proven by researchers in various branches of science. Such works are for instance found in biology [8, 11, 12, 20, 21], in economy [9], and in physics [8, 10].

It is common in research to define a fractional calculus problem referring to its ordinary calculus counterpart when it exists. Such practice is often used in fractional differential equations. However, the structure of the solution to a fractional differential equation does not always correspond to its classical counterpart when it exists. Hence, an ordinary differential equation might have an exact solution whereas its fractional counterpart does not. The logistic differential equation [22] has an exact solution. However, West [23] proposed a power series referring to it as the exact solution to fractional logistic differential equation (FLDE). Subsequently Area et al. [24] claimed that West’s proposal is valid only when the order of the derivative is one. However, the solution proposed by West was proven valid by D’Ovidio et al. [25], subject to changing the structure of the FLDE for what they called ‘modified fractional logistic equation’. In [26] a numerical solution was proposed for FLDE based on Euler’s method.

In this work the FLDE is investigated. Considering the fact that the FLDE is a non-linear equation whose exact solution does not exist, several numerical methods are used to compute its solution. Finally we compute the solution of FLDE by means of three numerical methods: the power series expansion (PSE) method also known as Letnikov method (LM) [27], the generalized Euler method (GEM) [28], and the Caputo–Fabrizio (CF) method [29]. The error rate of each of the mentioned methods is also computed for performance evaluation purpose. The introduction of the present work is followed by a preliminaries section in which some useful definitions are given, followed by a discussion on various numerical techniques used in the simulations. The fourth section is dedicated to the construction of the FLDE. The two last sections are respectively the simulation section and the concluding remarks.

2 Preliminaries

Some fractional calculus definitions and notation needed in the course of this work are discussed in this section.

Definition 2.1

([30])

The Riemann–Liouville fractional integral of order \(q > 0\) of a function \(g:[ 0, + \infty ) \to \mathbb{R}\) is defined as

$$ \bigl( {}_{RL}I_{0^{ +}}^{q}g \bigr) ( t )= \frac{1}{ \varGamma ( q )} \int _{0}^{t} ( t - s )^{q - 1}g ( s )\,ds, $$

provided that the right-hand side of the integral is pointwise defined on \(( 0, + \infty )\) and Γ is the gamma function \(\varGamma ( \upsilon ) = \int _{0}^{\infty } e^{ - t}t^{ \upsilon - 1}\,dt\), \(\forall \upsilon > 0\).

Definition 2.2

([30])

The Riemann–Liouville fractional derivative of order \(q > 0\) of a function \(g:[ 0, + \infty ) \to \mathbb{R}\) is defined as

$$\begin{aligned}& \bigl( {}_{RL}D_{0^{ +}}^{q}g \bigr) ( t ) = \frac{1}{ \varGamma ( n - q )} \biggl( \frac{d^{n}}{dt^{n}} \biggr) \int _{0}^{t} ( t - s )^{n - q - 1}g ( s )\,ds, \end{aligned}$$

where \(n - 1 \le q < n\), \(n \in \mathbb{N}\).

Definition 2.3

([30])

The Caputo derivative of order \(q > 0\) for a function \(g: [ 0, + \infty ] \to \mathbb{R}\) is defined as

$$ \bigl( {}_{C}D_{0^{ +}}^{q}g \bigr) ( t ) = \textstyle\begin{cases} \int _{0}^{t}\frac{ ( t - s )^{n - q - 1}g^{ ( n )} ( s )}{\varGamma ( n - q )}\,ds,&n - 1 < q < n \in \mathbb{R}, \\ g^{ ( n )} ( t ),& q \in \mathbb{N}, \end{cases} $$

where \(n = [ q ] + 1, [ q ]\) is the integer part of q.

Definition 2.4

([5])

Let g be a continuous function and \(n = \frac{t - a}{h}\), then the Grunwald–Letnikov (GL) fractional derivative of g is given by

( G L D a + q g ) (t)= lim h 0 1 h q j = 0 [ t a h ] ( 1 ) j ( q j ) g(tjh),

where

( q j ) = q ! j ! ( q j ) ! = Γ ( q + 1 ) Γ ( j + 1 ) Γ ( q j + 1 ) ,and ( q 0 ) =1.

Definition 2.5

([31])

Let \(g \in H^{1} ( a,b )\), \(b > a\), and \(q \in [ 0,1 ]\). Then the new Caputo version of fractional derivative of g is defined as

$$ \bigl( {}_{CF}D_{0}^{q}g \bigr) ( t ) = \frac{M ( q )}{ ( 1 - q )} \int _{a}^{t} g' ( s ) \exp \biggl[ - \frac{q}{1 - q} ( t - s ) \biggr]\,ds, $$

where \(M ( q )\) is the normalization function with \(M ( 0 ) = M ( 1 ) = 1\). If \(g \notin H^{1} ( a,b )\), then a new derivative, called Caputo–Fabrizio fractional derivative [31], is defined as

$$ \bigl( {}_{CF}D_{0}^{q}g \bigr) ( t ) = \frac{M ( q )}{ ( 1 - q )} \int _{0}^{t} g' ( s ) \exp \biggl[ - \frac{q}{1 - q} ( t - s ) \biggr]\,ds. $$

The Caputo–Fabrizio fractional derivative has an advantage over other fractional derivatives of being a fractional derivative with non-singular kernel [31].

Definition 2.6

([32])

The Hadamard fractional integral of order q of a continuous function g is defined as

$$ {}^{H}I^{q}g ( t ) = \frac{1}{\varGamma ( q )} \int _{a}^{t} \biggl( \ln \frac{t}{s} \biggr)^{q - 1}\frac{g ( s )}{s}\,ds,\quad q > 0, $$

provided that the integral exists.

Definition 2.7

([32])

The Hadamard fractional derivative of order \(q > 0\) of a continuous function \(g: [ a, \infty ) \to \mathbb{{R}}\) is defined as

$$ {}^{H}D^{q}g ( t ) = \delta ^{n} \bigl( {}^{H}I^{q}g \bigr) ( t ) = \biggl( t\frac{d}{dt} \biggr)^{n}\frac{1}{ \varGamma ( n - q )} \int _{a}^{t} \biggl( \ln \frac{t}{s} \biggr) ^{n - q - 1}\frac{g ( s )}{s}\,ds, $$

with \(n - 1 < q < n\), \(n = [ q ] + 1\); \(\delta = t ( \frac{d}{dt} )\) and \([ q ]\) denotes the integer part of the real number q.

Lemma 2.8

([32])

Let \(u,x \in C_{\delta }^{n} ( [ a,T ],\mathbb{{R}} )\), where \(C_{\delta }^{n} [ a,T ] = \{ u,x: [ a,T ] \to \mathbb{{R}}: \delta ^{ ( n - 1 )}u \in C [ a,T ] \}\), then

$$ {}^{H}I^{q} \bigl( {}^{H}D^{q}u \bigr) ( t ) = u ( t ) - \sum_{j = 1}^{n} c_{j} \biggl( \ln \frac{t}{a} \biggr) ^{q - j}. $$

3 Numerical techniques for solving non-linear differential equations

We discuss in this section some general numerical methods often used to find the numerical solution to non-linear fractional differential equations. These methods are later applied to the FLDE.

3.1 The generalized Euler’s method (GEM)

GEM is discussed here. The method was introduced by Odibat et al. [28]. It is derived from the known Euler’s method for solving differential equations. Consider the fractional order non-linear differential equation given by

$$ \bigl( {}_{C}D_{0^{ +}}^{q}x \bigr) ( t ) = g \bigl( t,x ( t ) \bigr),\quad x ( 0 ) = 0, $$
(3.1)

where the fractional order of derivative \(q \in ( 0, 1 ] \) and \(t > 0\). Moreover, we assume that the following functions \(x ( t )\), \({}_{C}D_{0^{ +}}^{q}x ( t )\), and \({}_{C}D_{0^{ +}}^{2q}x ( t )\) are continuous on the closed interval \([ 0,T ]\). In order to find the numerical solution to the problem defined by Eq. (3.1) over the interval \([ 0,T ]\), a discretization of \([ 0,T ]\) into k sub-intervals \([ t_{j},t_{j + 1} ]\) of equal width \(h = T/k\) is required. The set of points \(\{ t_{j}, x ( t_{j} ) \} \) is also used in the approximation process. The GEM approximated solution is given by

$$ x ( t_{j + 1} ) = x ( t_{j} ) + \frac{h^{q}}{ \varGamma ( q + 1 )}g \bigl( t_{j},x ( t_{j} ) \bigr),\quad j = 0,1, \ldots, k - 1, $$
(3.2)

where the node \(t_{j} = jh\), \(j = 1,2, \ldots ,k\).

3.2 The Grünwald–Letnikov method (GL) or power series expansion (PSE)

Grünwald provided a numerical approach for solving non-linear differential equation. This approach is discussed in detail in [27].

Definition 3.1

([27])

The explicit fractional numerical approximation formula of qth derivative at the points kh (\(k = 1,2,\ldots\)) in the Grünwald–Letnikov sense has the following form:

( G L D t k q g ) ( k L m / h ) (t) 1 h q j = 0 k ( 1 ) j ( q j ) g( t k j ),
(3.3)

where \(L_{m}\) is the memory length; \(t_{k} = kh\); the time-space step of iteration is h and ( 1 ) j ( q j ) are referred to as binomial coefficients. For computational issue, the binomial coefficients are usually denoted by \(c_{j}^{ ( q )}\) (\(j = 0,1,\ldots \)) and computed as follows:

$$\begin{aligned}& \textstyle\begin{cases} c_{0}^{ ( q )} = 1, \\ c_{j}^{ ( q )} = ( 1 - \frac{1 + q}{j} )c _{j - 1}^{ ( q )}. \end{cases}\displaystyle \end{aligned}$$

Consider a non-linear fractional differential equation, where the fractional derivative is taken in the Grünwald–Letnikov sense, with initial condition, defined by

$$ \bigl( {}_{GL}D_{a^{ +}}^{q}u \bigr) ( t ) = g \bigl( u(t),t \bigr), $$
(3.4)

the numerical solution to the problem stated by Eq. (3.4) is given by

$$ u(t_{k}) = g\bigl(u(t_{k}),t_{k} \bigr)h^{q} - \sum_{j = 1}^{k} c_{j}^{ ( q )}u ( t_{k - j} ). $$
(3.5)

3.3 The Caputo–Fabrizio method (CF)

Consider a non-linear fractional differential equation with initial condition, where the fractional derivative is taken in the Caputo–Fabrizio sense, defined by

$$ \bigl( {}_{CF}D_{0}^{q}u \bigr) ( t ) = g \bigl( t,u ( t ) \bigr),\quad u ( 0 ) = u_{0}. $$
(3.6)

The numerical solution to the problem defined by Eq. (3.6) is built based on the Adam–Basforth method as follows (see [29, 33]):

$$ u_{n + 1} = u_{n} + \biggl( \frac{1 - q}{M ( q )} + \frac{3qh}{2M ( q )} \biggr)g ( t_{n},u_{n} ) + \biggl( \frac{1 - q}{M ( q )} + \frac{qh}{2M ( q )} \biggr)g ( t_{n - 1},u_{n - 1} ). $$
(3.7)

4 Fractional logistic differential equation

In this section, the general form of the numerical solution of FLDE is discussed. The logistic model is used for population growth modeling. Given a population with proliferation capability, with an initial size of \(P _{0}\), one would obviously think that the size of the population will infinitely increase when the time approaches infinity. However, it has been proven by Malthus (see [34]) that a population size tends to stabilize when the time approaches infinity. The growth trend obtained from the Malthusian theory is what we call the logistic growth model. The model is defined classically by the following differential equation:

$$ \frac{dN ( t )}{dt} = rN ( t ) \biggl( 1 - \frac{N ( t )}{K} \biggr), $$
(4.1)

where the initial population size is \(N ( 0 ) = N_{0}\), r is called the growth rate; K is called the carrying capacity. It is the maximum value that the population size can reach. \(N ( t )\) is the population size at time t.

The exact solution of the classical logistic differential equation defined by Eq. (4.1) is given by

$$ N_{c}(t) = \frac{K}{1 + ( \frac{K - N_{0}}{N_{0}} )e^{ - rt}}. $$
(4.2)

Without loss of generality, Eq. (4.1) can be converted to FLDE based on the Hadamard fractional derivative as follows:

$$ \bigl( {}^{H}D_{0}^{q}N \bigr) ( t ) = rN ( t ) ( 1 - \frac{N ( t )}{K} ),\qquad N ( a ) = N_{a} < \infty . $$
(4.3)

4.1 Existence and uniqueness of the solution of fractional logistic equation

In this section we prove the existence and uniqueness of the solution of the FLDE. Without loss of generality, the Hadamard fractional derivative and integral symbols are used.

Applying the operator \({}^{H}I^{r}\) to Eq. (4.3), we obtain the following:

$$ N ( t ) - c_{1} \biggl( \ln \frac{t}{a} \biggr)^{q - 1} = {}^{H}I^{q} \biggl( rN \biggl( 1 - \frac{N}{K} \biggr) \biggr). $$

For simplicity, the following kernel function is chosen:

$$ Q \bigl( t,N ( t ) \bigr) = rN \biggl( 1 - \frac{N}{K} \biggr). $$

Note that the initial value condition implies \(c_{1} = N_{a}\).

Let \(H = C ( [ a,T ],\mathbb{R} )\) denote the Banach space of all continuous functions from \([ a,T ]\) to \(\mathbb{R}\), we identify the operator \(E:H \to H\) endowed with the norm \(\Vert N \Vert = \sup_{a \le t \le T} \vert N ( t ) \vert \), then

$$ ( EN ) ( t ) = N_{a} \biggl( \ln \frac{t}{a} \biggr) ^{q - 1} + \frac{1}{\varGamma ( q )} \int _{a}^{t} \biggl( \ln \frac{t}{s} \biggr)^{q - 1} \frac{Q ( s,N ( s ) )}{s}\,ds. $$

4.1.1 Existence of solution

Using the setting above, the existence of the solution is stated and proven by Theorem 4.1 as follows.

Theorem 4.1

Let \(Q: [ a,T ] \times \mathbb{R} \to \mathbb{R}\) be a continuous function such that the following assumptions hold:

(\(A_{1}\)):

\(\exists N_{Q} > 0\) such that \(\vert Q ( t,N_{1} ) - Q ( t,N_{2} ) \vert \le N_{Q} \vert N_{1} - N_{2} \vert \), \(\forall t \in [ a,T ]\), \(\forall N_{1},N_{2} \in \mathbb{{R}}\).

(\(A_{2}\)):

\(\vert Q ( t,N ) \vert \le y ( t )\), \(\forall ( t,N ) \in [ 0,T ] \times \mathbb{{R}}\), where, \(y \in C ( [ a,T ], \mathbb{{R}}^{ +} )\) with \(\sup_{a \le t \le T} \vert y ( t ) \vert = \Vert y \Vert \).

In addition, it is assumed that \(\frac{N_{Q}}{\varGamma ( q + 1 )} ( \ln \frac{T}{a} ) ^{q - 1} < 1\), then there is at least one solution for the initial value problem given by Eq. (4.3).

Proof of Theorem 4.1

Consider the close set \(B_{\lambda } = \{ N \in H, \Vert N \Vert \le \lambda \}\) with

$$ \lambda \ge N_{a} \biggl( \ln \frac{T}{a} \biggr)^{q - 1} + \frac{1}{ \varGamma ( q + 1 )} \biggl( \ln \frac{T}{a} \biggr)^{q} \Vert y \Vert . $$

We define the operators \(E_{1}\) and \(E_{2}\) on \(B_{\lambda } \) as

$$ ( E_{1}N ) ( t ) = N_{a} \biggl( \ln \frac{t}{a} \biggr)^{q - 1};\qquad ( E_{2}N ) ( t ) = \frac{1}{\varGamma ( q )} \int _{a}^{t} \biggl( \ln \frac{t}{s} \biggr)^{q - 1} \frac{Q ( s,N ( s ) )}{s}\,ds. $$

For \(N_{1},N_{2} \in B_{\lambda }\), then \(\Vert E_{1}N_{1} + E_{2}N _{2} \Vert \le N_{a} ( \ln \frac{T}{a} )^{q - 1} + \frac{1}{ \varGamma ( q + 1 )} ( \ln \frac{T}{a} )^{q} \Vert y \Vert \le \lambda \), thus \(E_{1}N_{1} + E_{2}N_{2} \in B_{\lambda }\).

Next, we show that \(E_{2}\) is a contraction, \(\forall t \in [ a,T ]\), \(\forall N_{1},N_{2} \in B_{\lambda }\), we have

$$\begin{aligned} \bigl\vert E_{2}N_{1} ( t ) - E_{2}N_{2} ( t ) \bigr\vert =& \biggl\vert \int _{a}^{t} \biggl( \ln \frac{t}{s} \biggr)^{q - 1}\frac{Q ( s,N_{1} ( s ) )}{s}\,ds - \int _{a} ^{t} \biggl( \ln \frac{t}{s} \biggr)^{q - 1}\frac{Q ( s,N_{2} ( s ) )}{s}\,ds \biggr\vert \\ \le& \frac{1}{\varGamma ( q )} \int _{a}^{t} \biggl( \ln \frac{t}{s} \biggr)^{q - 1} \bigl\vert Q \bigl( s,N_{1} ( s ) \bigr) - Q \bigl( s,N_{2} ( s ) \bigr) \bigr\vert \frac{ds}{s}, \end{aligned}$$

then

$$\begin{aligned} \Vert E_{2}N_{1} + E_{2}N_{2} \Vert \le& \frac{1}{\varGamma ( q + 1 )}N_{Q} \biggl( \ln \frac{T}{a} \biggr)^{q - 1} \Vert N _{1} - N_{2} \Vert \\ \le& \Vert N_{1} - N_{2} \Vert , \end{aligned}$$

which implies that \(E_{2}\) is a contraction.

In addition, the operator \(E_{1}\) is continuous as a result of the continuity of N. Moreover, \(E_{1}\) is uniformly bounded as

$$ \Vert E_{1}N \Vert \le N_{a} \biggl( \ln \frac{T}{a} \biggr) ^{q - 1}. $$

Now it will be shown that the operator \(E_{1}\) is compact for \(t_{1},t _{2} \in [ a,T ]\) (\(t_{1} < t_{2} \)), then

$$ \bigl\Vert ( E_{1}N ) ( t_{2} ) - ( E _{1}N ) ( t_{1} ) \bigr\Vert \le N_{a} \biggl( \biggl\vert \biggl( \ln \frac{t_{2}}{a} \biggr)^{q - 1} - \biggl( \ln \frac{t _{1}}{a} \biggr)^{q - 1} \biggr\vert \biggr). $$

The right-hand side of the above inequality approaches zero as \(t_{1} \to t_{2}\). Note that \(\Vert ( E_{1}N ) ( t_{2} ) - ( E_{1}N ) ( t_{1} ) \Vert \) is independent of N implies that \(E_{1}\) is relatively compact, by Arzela–Ascoli theorem we conclude that \(E_{1}\) is compact on \(B_{\lambda } \). Hence, the existence of the solution of the initial value problem given by Eq. (4.3) holds by Krasnoselskii’s fixed point theorem. □

4.1.2 Uniqueness of solution

Theorem 4.2

Let \(Q: [ a,T ] \times \mathbb{R} \to \mathbb{R}\) be a continuous function satisfying \(( A_{1} )\) and assume that \(( \frac{1}{\varGamma ( q + 1 )} ( \ln \frac{T}{a} )^{q} )N_{Q} < 1\), then the initial value problem given by Eq. (4.3) has a unique solution.

Proof Theorem 4.2

Consider the close set \(B_{\lambda } = \{ N \in H, \Vert N \Vert \le \lambda \}\) with

$$ \lambda \ge \frac{N_{a} ( \ln \frac{T}{a} )^{q - 1} + M ( \frac{1}{\varGamma ( q + 1 )} ( \ln \frac{T}{a} )^{q} )}{ 1 - N_{Q} ( \frac{1}{\varGamma ( q + 1 )} ( \ln \frac{T}{a} )^{q} )}, \quad \text{where } M = \sup _{a \le t \le T} \bigl\vert Q ( t,0 ) \bigr\vert . $$

First we show that \(EB_{\lambda } \subset B_{\lambda } \). For any \(N \in B_{\lambda }\), \(\forall t \in [ a,T ]\),

$$\begin{aligned}& \bigl\vert ( EN ) ( t ) \bigr\vert \le N_{a} \biggl( \ln \frac{t}{a} \biggr)^{q - 1} + \frac{1}{\varGamma ( q )} \int _{a}^{t} \biggl( \ln \frac{t}{s} \biggr)^{q - 1}\frac{ \vert Q ( s,N ( s ) ) \vert }{s}\,ds, \end{aligned}$$

but

$$\begin{aligned} \bigl\vert Q \bigl( t,N ( t ) \bigr) \bigr\vert =& \bigl\vert Q \bigl( t,N ( t ) \bigr) - Q ( t,0 ) + Q ( t,0 ) \bigr\vert \\ \le& \bigl\vert Q \bigl( t,N ( t ) \bigr) - Q ( t,0 ) \bigr\vert + \bigl\vert Q ( t,0 ) \bigr\vert \\ \le& N_{Q} \Vert N \Vert + M \\ \le& N_{Q}\lambda + M, \end{aligned}$$

then

$$\begin{aligned} \Vert EN \Vert \le& N_{a} \biggl( \ln \frac{T}{a} \biggr)^{q - 1} + \biggl( \frac{1}{\varGamma ( q + 1 )} \biggl( \ln \frac{T}{a} \biggr)^{q} \biggr) ( N_{Q}\lambda + M ) \\ \le& \lambda , \end{aligned}$$

which implies that \(EN \in B_{\lambda }\), \(\forall N \in B_{\lambda } \), that is, \(EB_{\lambda } \subset B_{\lambda } \). Then it is sufficient to show that the operator E is a contraction.

$$\begin{aligned}& \forall N_{1},N_{2} \in H, \\& \bigl\vert EN_{1} ( t ) - EN_{2} ( t ) \bigr\vert \le \frac{1}{\varGamma ( q )} \int _{a}^{t} \biggl( \ln \frac{t}{s} \biggr)^{q - 1} \bigl\vert Q \bigl( s,N_{1} ( s ) \bigr) - Q \bigl( s,N_{2} ( s ) \bigr) \bigr\vert \frac{ds}{s}, \end{aligned}$$

which implies that

$$\begin{aligned} \Vert EN_{1} - EN_{2} \Vert \le& \biggl( \frac{1}{\varGamma ( q + 1 )} \biggl( \ln \frac{T}{a} \biggr)^{q} \biggr)N_{Q} \Vert N_{1} - N_{2} \Vert \\ \le& \Vert N_{1} - N_{2} \Vert . \end{aligned}$$

So E is a contraction. By Banach’s contraction mapping theorem, the initial value problem given by Eq. (4.3) has a unique solution on \([ a,T ]\). □

5 Simulation studies

In the literature review it has become evident that no one has so far proposed a valid exact form of solution to FLDE. In Sect. 4 the existence and uniqueness of the solution of FLDE is proven. Since there is no exact solution to the FLDE problem, approximate solutions are found using the GEM, PSE, and CF methods.

Let \(q \in ( 0,1 ) \cup ( 1,2 )\) be the fractional order of derivative, the numerical solutions of the FLDE using GEM, PSE, and CF are respectively given by

$$\begin{aligned}& N_{GEM} ( t_{j + 1} ) = N ( t_{j} ) + \frac{h ^{q}}{\varGamma ( q + 1 )}rN ( t_{j} ) \biggl( 1 - \frac{N ( t_{j} )}{K} \biggr), \quad j = 0,1, \ldots k - 1, \end{aligned}$$
(5.1)
$$\begin{aligned}& N_{PSE}(t_{k}) = rN ( t_{k} ) \biggl( 1 - \frac{N ( t _{k} )}{K} \biggr)h^{q} - \sum_{j = 1}^{k} c_{j}^{ ( q )}N ( t_{k - j} ), \end{aligned}$$
(5.2)
$$\begin{aligned}& N_{CF} ( t_{n + 1} ) = N ( t_{n} ) + \biggl( \frac{1 - q}{M ( q )} + \frac{3qh}{2M ( q )} \biggr)N ( t_{n} ) \biggl( 1 - \frac{N ( t_{n} )}{K} \biggr) \\& \hphantom{N_{CF} ( t_{n + 1} ) =}{}+ \biggl( \frac{1 - q}{M ( q )} + \frac{qh}{2M ( q )} \biggr)N ( t_{n - 1} ) \biggl( 1 - \frac{N ( t_{n - 1} )}{K} \biggr). \end{aligned}$$
(5.3)

In order to evaluate the performance of these methods, the error rate between the true data values and the values computed using fractional differential equations is computed using the formula below [35]:

$$ ER = \sqrt{\frac{\sum_{i = 0}^{n} ( y_{i} ( t ) - \hat{y}_{i} ( t ) )^{2}}{n}} \Big/ \sqrt{\frac{ \sum_{i = 0}^{n} ( y_{i} ( t ) )^{2}}{n}}, $$
(5.4)

where \(y_{i} ( t )\) is the true value at time t; \(\hat{y}_{i} ( t )\) is the estimate value at time t; n is the sample datasize.

Experimental data comes from the study of the annual growth rate of helianthus plant. The data is retrieved from [36]. The height of the plants measured at a constant spacing time of 7 days is given in centimeters. Twelve measurements were considered, ranging from the seventh day to the eighty-fourth day of the plant life. The mean values of the heights are considered.

Considering Eq. (4.2) that gives the solution of the classical approach, the growth rate \(r=0.0760\) and the carrying capacity \(K=267.5301\) for this data set are obtained through a non-linear optimization tool. The ‘lsqcurvefit’ Matlab command was used in this case. The classical approach Eq. (4.2) produced an error rate \(ER=0.0320\) that is 3.2%. The graph of the classical solution alongside the true data is given in Fig. 1.

Figure 1
figure 1

Classical Method

Recalling Eq. (5.1) and Eq. (5.2) for the GEM and PSE numerical solutions respectively, it was decided to determine the value of the fractional order of derivative q for which the error rate ER is minimized. The interval \([0.9, 1.2]\) was iteratively covered by all the possible q values using 10−3 steps. Both GEM and PSE minimized ER for \(q=1\) as shown in Fig. 2.

Figure 2
figure 2

GEM and PSE error rate versus q values

ER is minimized at \(q=1\) for both GEM and PSE, that is, when both methods coincide with the classical method. At \(q=1\), both methods have \(ER=0.0320\) or 3.2%, which is the same as the error rate obtained for the classical approach. The graphs in Fig. 3 show the PSE and GEM data for \(q=1\).

Figure 3
figure 3

Graphs of (a) PSE with \(q=1\) and (b) GEM for \(q=1\)

In order to show the behavior of the results produced by GEM and PSE for different values of q, let \(q=0.9\). Then the GEM method produced \(ER=0.2954\), that is, 29.54%, whereas the PSE produced \(ER=0.4146\) or 41.46%. Figure 2 clearly illustrates variation of the error rate ER with respect to q values. The graphs obtained for GEM and PSE methods when \(q=0.9\) are shown in Fig. 4. In conformity with Fig. 2, where error rates for GEM and Letnikov are about 0.29 and 0.41, respectively, deviation of the estimated values from the true ones is greater in the Letnikov case as seen in Fig. 4.

Figure 4
figure 4

Graphs of (a) PSE with \(q=0.9\) and (b) GEM for \(q=0.9\)

To find the value of q for which the CF method, Eq. (5.3), minimizes the error rate ER, q values ranging between 0.9 and 1.2 with increments 10−3 were used. Minimum error (\(ER=0.0321\) or 3.21%) was obtained when \(q=1.005\) as seen in Fig. 5.

Figure 5
figure 5

CF’s error rate versus q values

The graphs of the simulation obtained for the optimal value of \(q=1.005\), for the value of \(q=1\) together with the original data are shown in Fig. 6. The CF method produced \(ER=0.3824\) that is 38.24% for the value of \(q=1\), and much lower error (\(ER=0.0321\) or 3.21%) when \(q=1.005\).

Figure 6
figure 6

CF ‘s graph (a) for \(q=1.005\) and (b) for \(q=1\)

6 Conclusion

The FLDE is studied, the existence and uniqueness of a solution are proposed and proved by means of the Hadamard fractional derivative and integral formula. The proposed solution is shown to be applicable in practice by using a data set and employing three numerical approaches, namely the GEM, PSE, and CF.

The values of the fractional derivative of order q, for which each of the method produces a minimum error rate ER, were found iteratively. It appeared that the GEM and PSE methods produce a common minimum error rate of \(ER=3.2\)% for a value of \(q=1\). The CF method produces the same minimum error rate of \(ER=3.2\)% for a value of \(q=1.005\).

It is worth mentioning that the fractional derivative of order \(q=1\) coincides with the classical approach of the solution. Through the application problem it has become evident that the CF method has performed better in solving the FLDE, by producing a minimum error rate for q value different from 1.