We now consider the applications of the modified VIM to both ODEs and FDEs.

### 4.1 Ordinary differential equations

**Example 1**

Consider the following simple line differential equation:

\frac{du}{dt}+u=0,\phantom{\rule{2em}{0ex}}u(0)={u}_{0},

(12)

which has the exact solution u(t)={u}_{0}{e}^{-t}.

We can obtain the successive approximate solutions as

For n\to \mathrm{\infty}, {u}_{n}(t) tends to the exact solution {u}_{0}{e}^{-t}.

**Example 2** The logistic differential equation [26]

\frac{du}{dt}=u(1-u),\phantom{\rule{2em}{0ex}}u(0)=\frac{1}{2}

(14)

has the exact solution u(t)=\frac{{e}^{t}}{1+{e}^{t}}. By the present VIM, we have the following solutions:

\begin{array}{r}{u}_{0}(t)=\frac{1}{2},\\ {u}_{1}(t)={L}^{-1}(\frac{1}{2s}+\frac{1}{4{s}^{2}})=\frac{1}{2}+\frac{1}{4}t,\\ {u}_{2}(t)={L}^{-1}(\frac{1}{2s}+\frac{1}{4{s}^{2}}-\frac{1}{8{s}^{4}})=\frac{1}{2}+\frac{1}{4}t-\frac{1}{48}{t}^{3},\\ \phantom{{u}_{2}(t)={L}^{-1}(\frac{1}{2s}+\frac{1}{4{s}^{2}}-}\vdots \end{array}

(15)

The same solutions using the classical VIM can be found in [26].

On the other hand, if we use du/dt and the linear term *u* when determining the Lagrange multiplier, we can derive a Lagrange multiplier explicitly

\delta {U}_{n+1}(s)=\delta {U}_{n}(s)+\delta \lambda [s{U}_{n}(s)-u(0)-{U}_{n}(s)]=\delta {U}_{n}(s)+\lambda (s)(s-1)\delta {U}_{n}(s)

(16)

and

\lambda (s)=-\frac{1}{s-1}.

(17)

There can be various choices of {u}_{0}(t) and \lambda (s) which affect the speed of the convergence. We note that the integration by parts is not used and the calculation of the Lagrange multiplier here is much simpler. Furthermore, the VIM can be easily extended to FDEs and this is the main purpose of our work.

### 4.2 Fractional differential equations

In the early application of VIM [2] to FDEs, the term {}_{0}{}^{C}D_{t}^{\alpha}u is considered as a restricted variation, *i.e.*,

\frac{du}{dt}{+}_{0}^{C}{D}_{t}^{\alpha}u=g(t,u),\phantom{\rule{1em}{0ex}}0<t,0<\alpha <1,

and the variational iteration formula is given as

{u}_{n+1}={u}_{n}+{\int}_{0}^{t}\lambda (t,\tau )(\frac{d{u}_{n}}{d\tau}{+}_{0}^{C}{D}_{\tau}^{\alpha}u-g(\tau ,u))\phantom{\rule{0.2em}{0ex}}d\tau ,

where {}_{0}{}^{C}D_{t}^{\alpha} is the Caputo derivative [27] and g(\tau ,{u}_{n}) is a nonlinear term.

But for the following FDEs, the above popular applications of the VIM were not successful:

\begin{array}{r}{}_{0}{}^{C}D_{t}^{\alpha}u+R[u]+N[u]=g(t),\\ {u}^{(k)}\left({0}^{+}\right)={a}_{k},\phantom{\rule{1em}{0ex}}0<t,0<\alpha ,m=[\alpha ]+1,k=0,\dots ,m-1.\end{array}

(18)

Now, we consider the application of the modified VIM.

The following Laplace transform [27–29] of the term {}_{0}{}^{C}D_{t}^{\alpha}u holds:

L{[}_{0}^{C}{D}_{t}^{\alpha}u]={s}^{\alpha}U(s)-\sum _{k=0}^{m-1}{u}^{(k)}\left({0}^{+}\right){s}^{\alpha -1-k},\phantom{\rule{1em}{0ex}}m-1<\alpha \le m.

(19)

Taking the above Laplace transform to both sides of (18), the iteration formula of Eq. (18) can be constructed as

{U}_{n+1}(s)={U}_{n}(s)+\lambda (s)[{s}^{\alpha}{U}_{n}(s)-\sum _{k=0}^{m-1}{u}^{(k)}(0){s}^{\alpha -k-1}+L(R[{u}_{n}]+N[{u}_{n}]-g(t))].

As a result, after the identification of a Lagrange multiplier \lambda =-\frac{1}{{s}^{\alpha}}, one can derive

\begin{array}{rcl}{u}_{n+1}(t)& =& {u}_{n}(t)-{L}^{-1}\left[\frac{1}{{s}^{\alpha}}[{s}^{\alpha}{U}_{n}(s)-\sum _{k=0}^{m-1}{u}^{(k)}(0){s}^{\alpha -k-1}+L(R[{u}_{n}]+N[{u}_{n}]-g(t))]\right]\\ =& {L}^{-1}(\sum _{k=0}^{m-1}{u}^{(k)}(0){s}^{-k-1}-\frac{1}{{s}^{\alpha}}L(R[{u}_{n}]+N[{u}_{n}]-g(t))),\phantom{\rule{1em}{0ex}}m-1<\alpha \le m\end{array}

(20)

and

{u}_{0}(t)={L}^{-1}(\sum _{k=0}^{m-1}{u}^{(k)}(0){s}^{-k-1})=u(0)+{u}^{\prime}(0)t+\cdots +\frac{{u}^{(m-1)}(0){t}^{m-1}}{(m-1)!}.

(21)

Let us apply the above VIM to solve FDEs of Caputo type.

**Example 3**

Consider the relaxation oscillator equation

{}_{0}{}^{C}D_{t}u+{\omega}^{\alpha}u=0,\phantom{\rule{2em}{0ex}}u(0)=1,\phantom{\rule{2em}{0ex}}{u}^{\prime}(0)=0,\phantom{\rule{1em}{0ex}}t>0,0<\alpha <2,\omega >0,

(22)

with the exact solution {E}_{\alpha}({(-\omega t)}^{\alpha}) [30], where {E}_{\alpha}({(-\omega t)}^{\alpha}) denotes the Mittag-Leffler function.

After taking the Laplace transform to both sides of Eq. (22), we get the following iteration formula:

{U}_{n+1}(s)={U}_{n}(s)+\lambda (s)[{s}^{\alpha}{U}_{n}(s)-u(0){s}^{\alpha -1}-{u}^{{(}^{\prime})}\left({0}^{+}\right){s}^{\alpha -2}+{\omega}^{\alpha}L[{u}_{n}]].

(23)

Setting L[{u}_{n}(t)] as a restricted variation, \lambda (s) can be identified as

\lambda (s)=-\frac{1}{{s}^{\alpha}}.

(24)

The approximate solution of Eq. (22) can be given as

\begin{array}{rcl}{u}_{n+1}(t)& =& {u}_{n}(t)-{L}^{-1}\left[\frac{1}{{s}^{\alpha}}[{s}^{\alpha}{U}_{n}(s)-u(0){s}^{\alpha -1}-{u}^{{(}^{\prime})}\left({0}^{+}\right){s}^{\alpha -2}+{\omega}^{\alpha}L[{u}_{n}]]\right]\\ =& {L}^{-1}\left[\frac{1}{{s}^{\alpha}}(u(0){s}^{\alpha -1}+{u}^{{(}^{\prime})}\left({0}^{+}\right){s}^{\alpha -2}-{\omega}^{\alpha}L[{u}_{n}])\right],\end{array}

which reads

{u}_{n}(t) rapidly tends to the exact solution of Eq. (24) for n\to \mathrm{\infty}.

**Example 4**

Consider the fourth example, the time-fractional diffusion equation

{}_{0}{}^{C}D_{t}^{\alpha}u=\frac{{\partial}^{2}u(x,t)}{\partial {x}^{2}}+\frac{\partial (xu(x,t))}{\partial x},\phantom{\rule{1em}{0ex}}0<\alpha <1,\phantom{\rule{2em}{0ex}}u(x,0)={x}^{2}.

(25)

The VIM solution of the fractional semi-derivative equation was developed by Das [31]. Other methods applied to this equation are available in [32] and the monographs [33, 34] in the fractional calculus.

We can have the following iteration formula for Eq. (25):

\{\begin{array}{c}{u}_{n+1}(t)={L}^{-1}(\frac{{x}^{2}}{s}+\frac{1}{{s}^{\alpha}}L(\frac{{\partial}^{2}{u}_{n}(x,t)}{\partial {x}^{2}}+\frac{\partial (x{u}_{n}(x,t))}{\partial x})),\hfill \\ {u}_{0}(t)={x}^{2}\hfill \end{array}

(26)

and \lambda (s)=-\frac{1}{{s}^{\alpha}} is used as earlier.

As a result, the successive approximation can be obtained as follows:

The exact solution can be given in a compact form

u(x,t)=\underset{n\to \mathrm{\infty}}{lim}{u}_{n}(x,t)=\underset{n\to \mathrm{\infty}}{lim}\sum _{i=0}^{n}\frac{{k}^{i}{t}^{i\alpha}}{\mathrm{\Gamma}(1+i\alpha )}={E}_{\alpha}\left(k{t}^{\alpha}\right),

(28)

where {k}^{i}={x}^{2}+(1+{x}^{2})({3}^{i}-1).

The method’s efficiency for a nonlinear differential equation with variable coefficients is illustrated in [35]. For other applications of a new modified VIM to ODEs and FDEs, readers are also referred to [36–38].

**Remarks**

(a) The conceived modification of the VIM is a universal approach to both ODEs and FDEs. As a result, it becomes possible to design a ‘universal’ software package in future work.

(b) Now one can consider implementing other linearized techniques, *i.e.*, the Adomian series and the homotopy series to handle the nonlinear terms and improve the accuracy of the approximate solutions.

(c) This modified VIM can also be used to solve the FDEs of RL type.