1 Introduction

Recently, q-fractional calculus has been paid much attention to [17], i.e., q-factional modeling, linear q-fractional systems, q-special functions etc. As is well known, both fractional calculus (FC) and q-calculus (QC) are not new as they appeared in 1695 and about 1920s, respectively. Fractional q-calculus (FQC) serves as a bridge between FC and QC. The early developments of q-fractional calculus can be found in [810]. Now, various q-fractional initial value problems are proposed in [3, 1116].

The variational iteration method (VIM) [1720] has been one of the often used nonlinear methods in initial boundary value problems of differential equations. In this study, the extension of the method into FQC is undertaken and the Caputo q-fractional initial value problems are investigated. Our study is organized as follows. In Section 2, the basic idea of the VIM is illustrated. In Section 3, the VIM is extended to q-difference equations, and the Lagrange multipliers of the method are presented for the equations of high-order q-derivatives. In Section 4, recent development of the method in fractional calculus is introduced. Following Section 4, the application of the VIM in q-fractional calculus is considered. Then the method is applied to the Caputo q-fractional initial value problem.

2 The VIM in ordinary calculus

We illustrate its basic idea through the following nonlinear system:

d m u d t m +R[u]+N[u]=g(t),
(1)

where u=u(t), R is a linear operator, N is a nonlinear operator, g(t) is a given continuous function and d m u/d t m is the term of the highest-order derivative.

Then we construct the following correction function for Eq. (1):

u n + 1 = u n + t 0 t λ(t,τ) ( d m u n d τ m + R [ u n ] + N [ u n ] g ( τ ) ) dτ,
(2)

where λ=λ(t,τ) is called the Lagrange multiplier which can be identified optimally by variational calculus and u n is the n th term approximate solution.

It is well known that Eq. (1) has the Lagrange multiplier [20]

λ= ( 1 ) m ( τ t ) m 1 ( m 1 ) ! .
(3)

The interpretations and determination of various Lagrange multipliers can be found in the review article [19, 20].

Following the above steps, we can design a Maple-program which contains three parameters: ICs, Eqs and n. ICs reads the value of initial points. Eqs contains information of the linear terms, the nonlinear terms and the interval functions. n means the approximate solution’s truncated order.

Example 2.1 Consider the following Riccati equations [21]:

d u d t =1+2u(t) u 2 (t),u(0)=0.
(4)

We input ICs:=[0,[0]], Eqs:=[[u(t)2u(t),u(t) u 2 (t),t1]], n can be set as 1,2,,10 and so on. We set n=2 and n=9, respectively. Since u 9 here is very tedious, we only give the analytical approximate solutions u 1 , u 2 , u 3 and u 4 as follows:

The comparisons between u 2 , u 9 and the exact solution are listed in Table 1.

Table 1 Comparisons between u 2 , u 9 and the exact solution

Example 2.2 The second example is a system representing a nonlinear reaction [22]:

{ d u d t = u , u ( 0 ) = 1 , d v d t = u v 2 , v ( 0 ) = 0 , d w d t = v 2 , w ( 0 ) = 0 .
(5)

The information of the system (5) reads

The fourth-order approximation can be presented as

We can calculate [ u 100 , v 100 , w 100 ], [ u 200 , v 200 , w 200 ], [ u 300 , v 300 , w 300 ] even higher-order approximation. Noting that u n tends to e t for n, we only compare [ v 4 , w 4 ] and [ v 8 , w 8 ] with the numerical results from the Runge-Kutta method (RKM) in Figure 1 and Figure 2, respectively. Obviously, v 8 and w 8 have higher accuracies than v 4 and w 4 . With symbolic computation, if the computer is excellent enough, higher accuracies can be obtained.

Figure 1
figure 1

Comparisons between the RKM solution, v[4] and v[8] .

Figure 2
figure 2

Comparisons between the RKM solution, w[4] and w[8] .

3 The VIM in q-calculus

The q-derivative is a deformation of the classical derivative and it has played a crucial role in statistical physics and quantum mechanics. Let us revisit some properties of q-calculus [2325].

Definition 3.1 (q-calculus)

Let f(x) be a real continuous function. The q-derivative is defined by

d q d q x f(x)= f ( q x ) f ( x ) ( q 1 ) x ,x0,0<q<1,
(6)

and

d q d q x f(x) | x = 0 = lim n f ( q n ) f ( 0 ) q n .

The partial q-derivative is defined as

q q x f(x;y;)= f ( q x ; y ; ) f ( x ; y ; ) ( q 1 ) x .

Jackson’s q-integral [26, 27] is given as

0 x f(t) d q t=(1q)x 0 q n f ( q n x ) .
(7)

Property 3.2 q-Leibniz product law is

d q d q x [ g ( x ) f ( x ) ] =g(qx) d q d q x f(x)+f(x) d q d q x g(x).
(8)

Property 3.3 q-integration by parts holds

a b g(qt) d q d q t f(t) d q t= [ f ( t ) g ( t ) ] | a b a b f(t) d q d q t g(t) d q t.
(9)

The properties above are needed in the construction of the correction functional for q-difference equations. For more results and properties in q-calculus, readers are referred to monographs [2325].

Lemma 3.4 ([28])

For the first-order q-difference equation,

d q x d q t +f(t,x)=0,
(10)

one of the Lagrange multipliers is λ(t,τ)=1.

Lemma 3.5 ([29])

For the q-difference equation of second order,

d q 2 x d q t 2 +f(t,x)=0,
(11)

one of the Lagrange multipliers can be identified as

λ(t,τ)= q 1 (τtq).

Proof We revisit the proof in [29]. First, establish the correctional functional for Eq. (11) as

x n + 1 = x n + 0 t λ ( t , q 2 τ ) ( d q 2 x n d q τ 2 + f ( τ , x n ) ) d q τ.
(12)

We only use the leading term d q 2 x d q t 2 , while other terms are restricted variations

x n + 1 = x n + 0 t λ ( t , q 2 τ ) ( d q 2 x n d q τ 2 + f ( τ , x n ) ) d q τ.
(13)

Through the integration by parts (9), we can have

δ x n + 1 = ( 1 q q q τ λ ( t , τ ) | τ = t ) δ x n +λ(t,qτ) | τ = t δ x n q 0 t q 2 λ ( t , τ ) q τ 2 δ x n d q τ,
(14)

where δ is the variation operator and ‘′’ denotes the q-derivative with respect to t. As a result, the system of the Lagrange multiplier can be obtained:

the coefficient of  δ x n 1 q q λ ( t , τ ) q τ | τ = t = 0 , the coefficient of  δ x n ( x , τ ) λ ( t , q τ ) | τ = t = 0 , and the coefficient of  δ x n  in the  q -integral:  q q 2 λ ( t , τ ) q τ 2 = 0 ,

from which we can get

λ(t,τ)= q 1 (τtq).
(15)

 □

Furthermore, Kong [30] gave the Lagrange multiplier for the q-difference equations of third order,

λ(t,τ)= q 3 ( τ t q ) ( τ t q 2 ) [ 2 ] q ! ,
(16)

where [ k ] q ! denotes the q-factorial and [ k ] q !=1(1+q)(1+q+ q 2 )(1+q++ q k 1 ) for the integer k.

More generally, one can derive the following Theorem 3.6.

Theorem 3.6 For the q-difference equation of mth order,

d q m x d q t m +f(t,x)=0,
(17)

establish the correctional functional for Eq. (17) as

x n + 1 = x n + 0 t λ ( t , q m τ ) ( d q m x n d q τ m + f ( τ , x n ) ) d q τ.
(18)

If f(τ, x n ) is considered as a restricted variation, one can derive a q-analogue Lagrange multiplier

λ(t,τ)= q m ( m 1 ) 2 ( 1 ) m ( τ t q ) ( m 1 ) [ m 1 ] q !
(19)

or

λ ( t , q m τ ) = ( t τ q ) ( m 1 ) [ m 1 ] q ! ,
(20)

where ( t a ) ( m 1 ) =(ta)(tqa)(t q m 1 a) for the integer m.

Substituting (20) into (18), one can obtain a q-variational iteration formula

x n + 1 = x n 0 t ( t τ q ) ( m 1 ) [ m 1 ] q ! ( d q m d q τ m x n + f ( τ , x n ) ) d q τ.
(21)

Here the initial iteration value can be determined via the q-Taylor series [23].

Example 3.7 Consider the simple linear q-difference equation of second order [29]

d q 2 u ( t ) d q t 2 u(t)=0
(22)

subject to the initial conditions

u(0)=1and d q u ( 0 ) d q t =1.

The iteration formula and the initial iteration can be determined as

{ u n + 1 = u n + 1 q 0 t ( q 2 τ q t ) [ d q 2 u n ( τ ) d q τ 2 u n ( τ ) ] d q τ , u 0 = 1 + t [ 1 ] q ! .

The successive solution can be given as

Recall that the limit u= lim t u n = e q (t) is an exact solution of (22). Here e q (t) is one of the q-exponential functions.

4 The VIM in fractional calculus

Let u(t) be a real-valued function defined on a closed interval [a,b].

Definition 4.1 The R-L integration of α order is defined as

I t α 0 u(t)= 1 Γ ( α ) a t ( t τ ) α 1 u(τ)dτ,0<t,0<α.
(23)

Definition 4.2

The left Caputo derivative is defined by

D t α 0 C u(t)= 1 Γ ( m α ) 0 t 1 ( t τ ) α m + 1 d m u ( τ ) d τ m dτ,0<t,0<α,m=[α]+1.
(24)

Definition 4.3 The α th Riemann-Liouville (R-L) derivative of a function u(t) is defined by

D t α 0 RL u= 1 Γ ( m α ) d m d t m 0 t 1 ( t τ ) α m + 1 u(τ)dτ,0<t,0<α,m=[α]+1.
(25)

More results and properties can be found in [31, 32].

In Sections 2 and 3, we note that the integration by parts plays an important role and is often used in the derivation of the Lagrange multipliers in ordinary calculus. But in FC, the similar integration by parts cannot hold. That’s the main reason why the applications of the VIM were not very successful for fractional differential equations (FDEs). The popular iteration formulae of the VIM directly employed the so-called Lagrange multiplier λ(t,τ)=1. For the generalized FDE

D t α 0 C u+R[u]+N[u]=f(t),

the variational iteration formula was suggested

u n + 1 = u n + 0 t (1) ( 0 C D τ α u n +R[ u n ]+N[ u n ]f(τ))dτ.
(26)

One can check the formula (26) results in a poor convergence even for a linear FDE. Such difficulty can be overcome by the Laplace transform [3133]. The following iteration formula is initially proposed in [34, 35]. Let us revisit the proof.

Theorem 4.4 For the generalized FDE, one can have the variational iteration formula

u n + 1 = u n + 0 t λ(t,τ) ( 0 C D τ α u n +R[ u n ]+N[ u n ]f(τ))dτ,0<α,
(27)

where the function λ(t,τ)= ( 1 ) α ( τ t ) α 1 /Γ(α) is a Lagrange multiplier for any order α.

Proof

We can construct a correction functional through the R-L integration

u n + 1 = u n + 0 I t α λ(t,τ) [ 0 C D τ α u n +R[ u n ]+N[ u n ]f(τ)].
(28)

Take the Laplace transform L to both sides of (28)

u ¯ n + 1 (s)= u ¯ n (s)+L [ 0 I t α λ(t,τ) ( 0 C D τ α u n +R[ u n ]+N[ u n ]f(τ))],
(29)

where u ¯ n (s)=L[ u n (t)].

Assuming the terms R[ u n ] and N[ u n ] are restricted variations, respectively, we only need to consider the term

I t α 0 λ 0 C D t α u n = 1 Γ ( α ) 0 t ( t τ ) α 1 λ ( t , τ ) 0 C D τ α u n (τ)dτ.
(30)

Setting the Lagrange multiplier λ(t,τ)=λ(X) | X = t τ , Eq. (30) can be considered as a convolution of the function a(t)=λ(t) t α 1 /Γ(α) and the term D t α 0 C u n (t).

Making the correction functional of Eq. (29) stationary, we can get

δ u ¯ n + 1 (s)=δ u ¯ n (s)+δ [ a ¯ ( s ) s α u ¯ n ( s ) k = 0 m 1 u ( k ) ( 0 + ) s α 1 k ] = ( 1 + a ¯ ( s ) s α ) δ u ¯ n (s).
(31)

From Eq. (16), with the inverse Laplace transform L 1 , we can have

a(t)= L 1 [ a ¯ ( s ) ] = t α 1 Γ ( α ) ,0<α.
(32)

For a(t)=λ(t) t α 1 /Γ(α), the Lagrange multiplier can be explicitly identified as

λ(t,τ)=1.
(33)

As a result, the iteration formula is given as

u n + 1 = u n 0 I t α [ 0 C D τ u n +R[ u n ]+N[ u n ]f(τ)],0<α.
(34)

This completes the proof. □

We only derive the simplest Lagrange multiplier λ(t,τ)=1 here. In fact, more explicit Lagrange multipliers can be identified if more terms in R[ u n ] (if they exist) are used. For example, we can derive a variational iteration formula

u n + 1 = u n 0 t ( t τ ) γ 1 E γ β , γ ( ( t τ ) γ β ) × [ 0 C D τ γ u n + 0 C D τ β u n + f ( τ , u n ) ] d τ , 0 < β < γ
(35)

for a multi-order FDE

D t γ 0 C u + 0 C D t β u+f(t,u)=0,0<t,0<β<γ.
(36)

For γ=1, β=0 and γ=2, β=0, Eq. (35) reduces to the formulae (see the iteration formulae (19a) and (21a) in [20])

{ u n + 1 = u n + 0 t λ ( t , τ ) ( u n + u n + f ( τ , u n ) ) d τ , λ ( t , τ ) = ( t τ ) γ 1 E γ β , γ ( ( t τ ) γ β ) | γ = 1 , β = 0 = e ( t τ )
(37)

and

{ u n + 1 = u n + 0 t λ ( t , τ ) ( u n ( 2 ) + u n + f ( τ , u n ) ) d τ , λ = ( t τ ) γ 1 E γ β , γ ( ( t τ ) γ β ) | γ = 2 , β = 0 = sin ( τ t ) .
(38)

We conclude the following useful Lagrange multipliers for FDEs

(39a)
(39b)
(39c)

and

I V . { D t γ 0 RL u + 0 C D t β u + f ( t , u ) = 0 , 0 < β < γ , λ ( t , τ ) = ( t τ ) γ 1 E γ β , γ ( ( t τ ) γ β ) .
(39d)

Example 4.5 Let us consider the linear fractional Schrodinger equation [36]

i 0 C D t α u+ 1 2 2 u x 2 =0,u(x,0)= e i x .
(40)

The variational iteration formula for (40) reads

u n + 1 = u n 0 I t α ( i 0 C D τ α u n + 1 2 2 u n x 2 ) .
(41)

Starting from the initial iteration u 0 =u(x,0)= e i x , the successive approximate solutions can be given as

For n, u n tends to e i x E α (i t α /2) which is an exact solution of (41).

Example 4.6 As the second example, consider the nonlinear fractional Schrodinger equation [36]

i 0 C D t α u+ 1 2 2 u x 2 + | u | 2 u=0,u(x,0)= e i x .
(42)

The corresponding iteration formula reads

u n + 1 = u n 0 I t α ( i 0 C D τ α u n + 1 2 2 u n x 2 + | u n | 2 u n ) .

As a result, the approximate solutions can be obtained

Remarks Our simplest iteration formula (34) can reduce to the Volterra integral equation. See the analysis of the convergence and existence in [37] and the references therein. However, regarding Eq. (36), the VIM transforms it into a more general Volterra integral equation from which one can obtain approximate solutions of higher accuracies.

FDEs have been proven to be a useful tool to describe the nonlocal behaviors or long range interactions of dynamical systems. The previous applications of the VIM just ‘guessed’ the Lagrange multipliers or directly used the one in ordinary differential equations. In this study, various Lagrange multipliers are identified more explicitly and the variational approach for FDEs is systematically developed now.

5 The Caputo q-fractional initial value problem

We employ some notations of the q-fractional derivative and integral in [38]. For 0<q<1, let T q be the time scale

T q = { q m : m Z } {0},
(43)

where Z is the set of integers.

Definition 5.1 More generally, if α is a nonnegative real number, then we define the time scale as follows:

T q α = { q m + α : m Z } {0}.
(44)

The q-fractional derivative and integral have been defined in earlier work [810].

Definition 5.2 The q-fractional integral of α order is defined by

I 0 α q f(t)= 1 Γ q ( α ) 0 t ( t q τ ) ( α 1 ) f(τ) d q τ,t T q α
(45)

and the left Caputo q-fractional derivative is defined as

D 0 α q C u(t)= 1 Γ ( m α ) 0 t 1 ( t τ ) ( α m + 1 ) d m d τ m u(τ)dτ,0<α,m=[α]+1,t T q α .
(46)

When v is not a positive integer, the q-factorial function is defined by

( t τ ) ( v ) = t v n = 0 1 q n τ t 1 q v + n τ t .
(47)

The fractional q-derivative of the q-factorial function with respect to t is

D a α q C ( t a ) ( v ) = Γ q ( v + 1 ) Γ q ( v α + 1 ) ( t a ) ( v α )
(48)

and

I a α q ( t a ) ( v ) = Γ q ( v + 1 ) Γ q ( α + v + 1 ) ( t a ) ( α + v ) ,a<t,
(49)

where α R + and v(1,).

Now, we introduce the q-Laplace transform and some properties.

Definition 5.3 The q-Laplace transform was defined by Hahn [39] in 1949 as follows:

L q [ h ( t ) ] = 1 1 q 0 1 / s h(t) e 2 , q (qst) d q t,
(50)

where e 2 , q (t)= n = 0 (1 q n t), e 2 , q (0)=1.

Lemma 5.4 ([38])

Let g(t) be an analytic function and assume g(t)= t v 1 on T q {0}, where vR{,2,1,0}. Then the following convolution theorem can hold:

L q [ h ( t ) g ( t ) ] = L q [ h ( t ) ] L q [ g ( t ) ] ,
(51a)

where the convolution is defined as

(hg)(s)= 1 1 q 0 s h(τ)g[sqτ] d q τandg[sqτ]= ( s q τ ) ( v 1 ) .
(51b)

Lemma 5.5 For the Caputo q-derivative of g(t), the following Laplace transform holds:

L q [ q C D 0 α g(t)]= s α ( 1 q ) α L q [ g ( t ) ] i = 0 m 1 d q i g ( 0 ) d q t i s α i 1 ( 1 q ) α i ,0<α,m=[α]+1
(52a)

and

L q [ q I 0 α g(t)](s)= ( 1 q ) α s α L q [ g ( t ) ] (s).
(52b)

Lemma 5.6 ([38])

( t τ ) ( β + γ ) = ( t τ ) ( β ) ( t q β τ ) ( γ ) , β,γR.

The existence and uniqueness of the solutions of the Caputo q-initial value problems have been discussed in [40].

Lemma 5.7 Considering the initial value problems of the Caputo q-fractional equations,

D 0 α q C u(t)+f(t,u)=0, d q d q t u i (0)= a i ,m=[α]+1,i=0,,m1,
(53)

we construct a q-fractional correction functional

u n + 1 = u n + q I 0 α λ(t,τ) [ q C D 0 α u n +f(τ, u n )].
(54)

One of the Lagrange multipliers can be identified as λ(t,τ)=1.

Proof Take the Laplace transform of both sides of (54)

L q [ u n + 1 ] = L q [ u n ] + ( 1 q ) L q [ 1 ( 1 q ) 0 t ( t q τ ) ( α 1 ) Γ q ( α ) λ ( t , τ ) × [ q C D 0 α u n + f ( τ , u n ) ] ] d q τ .
(55)

From Lemma 5.6, we set λ(t,τ)= i = 0 a i [ t q α τ ] ( β i ) , where β i 0. Then the Lagrange multiplier is ‘good’ enough so that the product of ( t q τ ) ( α 1 ) Γ q ( α ) and λ(t,τ) is similar as the function g[sqτ] in (51b) and 1 ( 1 q ) 0 t ( t q τ ) ( α 1 ) Γ q ( α ) λ(t,τ) [ q C D 0 α u n +f(τ, u n )] becomes a convolution (51b).

Then we get the following equation:

L q [ u n + 1 ] = L q [ u n ] + ( 1 q ) a ¯ ( s ) ( s α ( 1 q ) α L q [ u n ] i = 0 m 1 d q i u n ( 0 ) d q t i s α i 1 ( 1 q ) α i + L q [ f ( t , u n ) ] ) ,
(56)

where a ¯ (s) is the Laplace transform of some function.

Considering L q [f(t, u n )] as a restricted variation so that after taking the classical variational derivative to both sides of (56), we can obtain

δ L q [ u n + 1 ]=δ L q [ u n ]+ a ¯ (s) s α ( 1 q ) α 1 δ L q [ u n ],
(57)

from which we can derive

a ¯ (s)= ( 1 q ) α 1 s α .
(58)

The inverse Laplace transform of a ¯ (s) is

a(t)= t α 1 Γ q ( α ) .
(59)

As a result, we can get

λ(t,τ)=1.
(60)

Substituting λ(t,τ)=1 into (54), the variational iteration formula is determined as

u n + 1 = u n q I 0 α [ q C D 0 α u n +f(τ, u n )],0<α.
(61)

 □

Example 5.8 Now consider the application in the initial value problems of the Caputo q-fractional difference equations [12],

D a α q C u=ωu+f(t),u(a)=c,t T q α ,0<α<1.
(62)

We have the following variational iteration formula:

u n + 1 = u n a t ( t q τ ) ( α 1 ) Γ q ( α ) ( q C D a α u n ω u n f(τ)) d q τ.
(63)

Starting from the initial iteration

u 0 =u(a)=c,

the successive solutions can be given as

For n, u n tends to the exact solution

u= c q E α ( ω , ( t a ) ) + a t ( t q τ ) ( α 1 ) q E α , α ( ω , t q α τ ) f(τ) d q τ,

where E α , β q (ω,(t q α τ)) is the discrete Mittag-Leffler function defined by [12]

E α , β q ( ω , t q α τ ) = k = 0 ω k ( t q α τ ) ( k α ) Γ q ( k α + β )
(64)

and

E α , 1 q ( ω , ( t a ) ) = q E α (ω,ta).
(65)

Readers are referred to the recent development in the application of the VIM for solving fuzzy equations [4143] and the calculus of variations on time scales [4448]. Since this study only concentrates on the applications of the VIM, other numerical methods in FC can be found in [4951].

6 Conclusions

We aim at some new applications of the VIM from differential equations to q-fractional difference equations, and the following main contributions of this study are obtained:

(a) Designing a maple program of the VIM for differential equations. Now, there is no need for one to obtain approximate solutions of high order by hand. The efficiency and accuracy are improved;

(b) Correcting the popularly used variational iteration formulae in FC and explicitly identifying some new Lagrange multipliers from the Laplace transform. The FDEs are transformed into generalized Volterra integral equations;

(c) Applying the VIM in q-difference equations and identifying a Lagrange multiplier of q-difference equations of m th order;

(d) Extending the VIM to FQC and investigating the initial value problems analytically. The obtained variational iteration formula in FQC can reduce to those in FC and QC.

Due to the rapid development of advanced applied sciences, non-classical tools of calculus, i.e., fractional calculus, q-calculus, etc., have been becoming more active and have been found useful in describing important physical phenomena. This study discusses some new applications of the VIM and provides a potential tool to analytically investigate such models. There is still some other work needed to consider, i.e., maple-packages or the symbolic computation of the VIM in FC even in FQC, other numerical methods based on the VIM, etc. The authors believe, in not far future, the VIM can play the same crucial role as that in ordinary calculus.