# The Fractional Complex Step Method

Authors: Rabha W. Ibrahim; Hamid A. Jalab
Journal: Discrete Dynamics in Nature and Society
 (2013)

---

## Abstract

It is well known that the complex step method is a tool that calculates derivatives by imposing a complex step in a strict sense. We extended the method by employing the fractional calculus differential operator in this paper. The fractional calculus can be taken in the sense of the Caputo operator, Riemann-Liouville operator, and so forth. Furthermore, we derived several approximations for computing the fractional order derivatives. Stability of the generalized fractional complex step approximations is demonstrated for an analytic test function.


---

## Body

## 1. Introduction

The concept of derivative is one of the most important concepts in science and engineering. It can be described from two equally valid points of view: the geometrical point of view and the physical one. From the geometrical point of view, the derivative can be seen as the tangent line to a function in a certain evaluation point. From the physical point of view, the derivative can be seen as a measure of the rate of change of the function in this point. Further method of computing the derivative of a function comes from its expansion in a Taylor series. Most naturally, derivatives of real functions are evaluated using real numbers, but the less intuitive idea of using an imaginary number in real functions differentiation has been shown capable of overcoming the term cancellation inherent to the ordinary FD method, as well as reducing the associated approximation error. The utilize of complex variables in numerical differentiation was imposed by Lyness and Moler [1], describing a method for calculating the derivatives of any analytic function. Lai and Crassidis [2] used the complex representation of the Taylor series to avoid using the real part for computing the second derivative. Cerviño and Bewley [3] extended the method with an application to pseudospectral simulation codes. Kim et al. [4, 5] employed the complex step perturbation in nonlinear robust performance analysis. Recently, the complex set method has been applied by many authors [6–10].Fractional calculus (real and complex) is a rapidly growing subject of interest for physicists and mathematicians. The reason for this is that problems may be discussed in a much more stringent and elegant way than using traditional methods. Fractional differential equations have emerged as a new branch of applied mathematics which has been used for many mathematical models in science and engineering. In fact, fractional differential equations are considered as an alternative model to nonlinear differential equations. Varieties of them play important roles and tools not only in mathematics but also in physics, dynamical systems, control systems, and engineering to create the mathematical modeling of many physical phenomena. Furthermore, they are employed in social science such as food supplement, climate, and economics. Several different derivatives were introduced: Riemann Liouville, Hadamard, Grunwald Letnikov, Riesz, and Erdelyi-Kober operators and Caputo [11–17]. It is well known that the physical interpretation of the fractional derivative is an open problem today. There is no formal interpretation of the physical meaning of the fractional derivative. Since the appearance of the idea of differentiation and integration of arbitrary order, there was not any acceptable geometric and physical interpretation of these operations for more than 300 year. Recently, the physical interpretation is an open problem. In [18], it is shown that geometric interpretation of fractional integration is “Shadows on the walls” and its Physical interpretation is “Shadows of the past.”In this work, we extended the complex step method by employing the fractional calculus differential operator. Furthermore, we derived several approximations for computing the fractional order derivatives. Stability of the generalized fractional complex step approximations is demonstrated for an analytic test function. Moreover, examples are illustrated.


## 2. Fractional Calculus

The concept of the fractional calculus (i.e., calculus of integrals and derivatives of any arbitrary real or complex order) was performed over 300 years ago. Abel in 1823 studied the generalized tautochrone problem and for the first time applied fractional calculus techniques in a physical problem. Later Liouville considered fractional calculus to problems in potential theory. Since that time, the fractional calculus has haggard the attention of many researchers in all areas of sciences.This section concerns some basic preliminaries and notations regarding the fractional calculus.Definition 1.
The fractional (arbitrary) order integral of the functionf of order α>0 is defined by
(1)Iaαf(t)=∫at‍(t-τ)α-1Γ(α)f(τ)dτ.
When a=0, we write Iaαf(t)=f(t)*ϕα(t), where (*) denoted the convolution product (see [12]), ϕα(t)=tα-1/(Γ(α)), t>0 and ϕα(t)=0, t≤0 and ϕα→δ(t) as α→0 where δ(t) is the delta function.Definition 2.
The fractional (arbitrary) order derivative of the functionf of order 0≤α<1 is defined by
(2)Daαf(t)=ddt∫at‍(t-τ)-αΓ(1-α)f(τ)dτ=ddtIa1-αf(t).Remark 3 (see [12]).
Consider the functionf(t)=tμ, we have
(3)Dαtμ=Γ(μ+1)Γ(μ-α+1)tμ-α,μ>-1;0<α<1,Iαtμ=Γ(μ+1)Γ(μ+α+1)tμ+α,μ>-1;α>0.
The Leibniz rule is
(4)Daα[f(t)g(t)]=∑k=0∞‍(αk)Daα-kf(t)Dakg(t)=∑k=0∞‍(αk)Daα-kg(t)Dakf(t).


## 3. The Fractional Complex Step Method

The local fractional Taylor formula has been generalized by many authors [19–22]. This expansion takes the following formula:
(5)f(x+Δx)=f(x)+Dxαf(x)(Δx)αΓ(α+1)+DxαDxαf(x)(Δx)2αΓ(2α+1)+⋯+Dxnαf(x)(Δx)nαΓ(nα+1),
where Dxα is the Riemann-Liouville differential operator and Dxnα:=DxαDxα⋯Dxα︸n-times.The fractional complex step method (FCSM) can be expressed from the Taylor series expansion off(x+iαΔx), α∈(0,1) as follows:
(6)f(x+iαΔx)=f(x)+Dxαf(x)i(Δx)αΓ(α+1)+DxαDxαf(x)i2(Δx)2αΓ(2α+1)+⋯.Taking the imaginary part on both sides and reordering (6), we obtain the FCSM expression for the fractional derivative
(7)Dxαf(x)=Γ(α+1)ℑ[f(x+iαΔx)](Δx)α+Θ(Δx2α),
where Θ(Δx2α) is the error. In the same way, we can consider the second fractional derivative D2α using the real term of (6) as follows:
(8)Dx2αf(x)=-Γ(2α+1)ℜ[f(x+iαΔx)-f(x)](Δx)2α+Θ(Δx2α).Whenα→1, (7) and (8) reduce to the results obtained by Squire and Trapp [23].As a generalization of the above approximate method, we letf(x+u+iαv), the corresponding fractional Taylor series expansion, become
(9)f(x+u+iαv)=f(x)+Dxαf(x)(u+iαv)αΓ(α+1)+DxαDxαf(x)(u+iαv)2αΓ(2α+1)+⋯,
where u and v are real numbers related to the real and imaginary differential steps. It is clear that when u=0, (9) reduses to (7). The first approximation that can be found by using (9) is
(10)Dxαf(x)=Γ(α+1)ℑ[f(x+u+iαv)]vα+Θ(uα,v),(11)Dx2αf(x)=Γ(2α+1)ℑ[f(x+u+iαv)]v2α+Θ(u2α,v).
When α→1, (10) reduces to the results obtained by Abreu et al. [10]. Moreover, we have the following approximate fractional derivatives, which can be considered as applications of the work in [10]:
(12)Dxαf(x)=-Γ(α+1)ℑ[f(x+u-iαv)]vα+Θ(uα,v),(13)Dxαf(x)=Γ(α+1)ℑ[f(x-(u+iαv))](-1)αvα+Θ((-1)2αuα,v),(14)Dxαf(x)=Γ(α+1)ℑ[f(x-(u-iαv))](-1)α+1vα+Θ((-1)2α+1uα,v),(15)Dxαf(x)=Γ(α+1)ℑ[f(x+u+iαv)-f(x+u-iαv)]vα+Θ(uα,v),(16)Dxαf(x)=Γ(α+1)ℑ[f(x-(u+iαv))-f(x-(u-iαv))]2(-1)αvα+Θ((-1)2αuα,v),(17)Dxαf(x)=Γ(α+1)ℑ[(-1)αf(x+u+iαv)+f(x-(u+iαv))]2(-1)αvα+Θ(((-1)2α+1)uα,v),(18)Dxαf(x)=Γ(α+1)ℑ[(-1)αf(x+u+iαv)-f(x-(u-iαv))]2(-1)αvα+Θ(((-1)2α+1)uα,v),(19)Dxαf(x)=Γ(α+1)ℑ[f(x-(u+iαv))-(-1)αf(x+u-iαv)]2(-1)αvα+Θ(((-1)2α+1)uα,v),(20)Dxαf(x)=-Γ(α+1)ℑ[f(x-(u-iαv))+(-1)αf(x+u-iαv)]2(-1)αvα+Θ(((-1)2α+1)uα,v).


## 4. Numerical Tests

In this section, we illustrate examples to examine our abstract results. We compute the fractional derivative of the functionf(x)=x2 for α=1/5, by applying (7) and (10)–(20). Moreover, the mean square error (MSE) is determined for x=0.5, x=1, and x=1.5.


## 5. Discussion

Numerical approximations for the fractional derivative, of order1/5, based on the imaginary part of the function f(x)=x2 are computed and compared with the exact value. Table 1 shows the approximate method of the fractional derivative D1/5x2 using (7). The mean square error is determined for the cases x=0.5,1, and 1.5, where the exact values are 0.39,1.3, and 2.6, respectively, for D1/5x2. Figure 1 shows the decreasing of this error with respect to Δ(x). Tables 2, 3, 4, 5, and 6 indicate the fractional derivative D1/5x2, using (10)–(20), where u=v. In addition, Figures 2, 3, 4, 5, and 6 view the decreasing of MSE with respect to u∈(0,0.5) for (10), (13), and (17)–(20), while u∈(0,0.3) for (15). Note that (17)–(20) are equivalence. The results are computed with the help of MATLAB 2010 [24].Table 1
Equation (7): D1/5x2=1.8*x*(Δx)4/5.
Δ
x
Equation (7), x=0.5
MES (x=0.5)
Equation (7), x=1
MES (x=1)
Equation (7), x=1.5
MES (x=1.5)
0.01
0.350714
0.123
1.021427
1.043313
2.282141
5.208166
0.04
0.289158
0.103306
0.898315
0.925142
2.097473
4.803779
0.07
0.24246
0.088466
0.80492
0.832727
1.957381
4.479632
0.1
0.201963
0.076547
0.723927
0.755563
1.83589
4.202347
0.13
0.165237
0.066698
0.650475
0.689074
1.725712
3.957494
0.16
0.131152
0.058449
0.582305
0.630741
1.623457
3.737181
0.19
0.099066
0.051501
0.518131
0.578987
1.527197
3.536488
0.22
0.068567
0.045651
0.457135
0.532735
1.435702
3.352082
0.25
0.039376
0.040751
0.398752
0.491209
1.348128
3.181567
0.28
0.011287
0.036689
0.342574
0.453824
1.263862
3.023145
0.31
−0.01585
0.033376
0.288295
0.420123
1.182442
2.87542
0.34
−0.04216
0.030743
0.235673
0.389741
1.103509
2.737279
0.37
−0.06774
0.028731
0.184518
0.36238
1.026777
2.607817
0.4
−0.09266
0.027292
0.134676
0.337791
0.952013
2.486282
0.43
−0.11699
0.026385
0.086016
0.315765
0.879024
2.372043
0.46
−0.14078
0.025975
0.038432
0.296122
0.807648
2.264558
0.49
−0.16408
0.026031
−0.00817
0.278707
0.737747
2.163365Table 2
Equation (10): D1/5x2=1.8*u4/5*(x+u).
u
Equation (10), x=0.5
MES (x=0.5)
Equation (10), x=1
MES (x=1)
Equation (10), x=1.5
MES (x=1.5)
0.01
0.366941
0.134646
1.254334
1.573354
2.531727
6.409641
0.04
0.315986
0.117246
1.157454
1.339701
2.388923
6.058297
0.07
0.267756
0.102062
1.070525
1.146025
2.263294
5.746365
0.1
0.218832
0.088518
0.986191
0.972573
2.143551
5.458476
0.13
0.168299
0.07648
0.902346
0.814228
2.026393
5.188034
0.16
0.115772
0.065967
0.818023
0.669161
1.910274
4.931553
0.19
0.061054
0.057076
0.732688
0.536831
1.794321
4.686986
0.22
0.004039
0.049943
0.646011
0.41733
1.677983
4.453066
0.25
−0.05533
0.044734
0.557777
0.311115
1.560888
4.228989
0.28
−0.1171
0.041632
0.467836
0.218871
1.442772
4.014249
0.31
−0.18128
0.040835
0.376083
0.141438
1.323442
3.808545
0.34
−0.24787
0.042552
0.282439
0.079772
1.202752
3.611717
0.37
−0.31689
0.047003
0.186848
0.034912
1.080588
3.423713
0.4
−0.38833
0.054417
0.089267
0.007969
0.956862
3.244561
0.43
−0.46218
0.06503
−0.01034
0.000107
0.831502
3.07435
0.46
−0.53843
0.079085
−0.11199
0.012542
0.704452
2.913219
0.49
−0.61708
0.096832
−0.21571
0.04653
0.575665
2.761347Table 3
Equations (13) and (16): D1/5x2=1.8*u4/5*(x-u).
u
Equation (13), x=0.5
MES (x=0.5)
Equation (13), x=1
MES (x=1)
Equation (13), x=1.5
MES (x=1.5)
0.01
0.367845
0.13531
1.255238
1.575623
2.532631
6.414221
0.04
0.326951
0.121104
1.168419
1.470413
2.399888
6.086841
0.07
0.297781
0.110294
1.10055
1.384012
2.293319
5.810998
0.1
0.275888
0.101749
1.043247
1.310101
2.200607
5.568916
0.13
0.259795
0.094898
0.993841
1.245625
2.117888
5.352223
0.16
0.248731
0.089392
0.950982
1.188748
2.043233
5.155986
0.19
0.242213
0.085003
0.913846
1.138229
1.97548
4.97692
0.22
0.239904
0.081572
0.881876
1.093164
1.913848
4.812656
0.25
0.241555
0.078992
0.854666
1.052863
1.857777
4.661398
0.28
0.246972
0.077192
0.831908
1.016783
1.806844
4.521727
0.31
0.255997
0.076132
0.813356
0.984489
1.760716
4.39249
0.34
0.2685
0.075796
0.798813
0.955624
1.719126
4.272732
0.37
0.284372
0.076186
0.788113
0.929893
1.681853
4.161647
0.4
0.303519
0.077324
0.781114
0.907053
1.648709
4.058547
0.43
0.325858
0.079248
0.777697
0.886904
1.619537
3.962837
0.46
0.351315
0.082009
0.777757
0.869279
1.594199
3.874002
0.49
0.379827
0.085671
0.781201
0.854044
1.572574
3.791589Table 4
Equation (14): D1/5x2=3.6*u4/5*(x-u).
u
Equation (14), x=0.5
MES (x=0.5)
Equation (14), x=1
MES (x=1)
Equation (14), x=1.5
MES (x=1.5)
0.01
0.34569
0.119502
1.210476
1.465253
2.465262
6.077519
0.04
0.263902
0.094573
1.036839
1.270144
2.199776
5.458266
0.07
0.205562
0.077134
0.9011
1.117423
1.986638
4.954421
0.1
0.161775
0.064393
0.786495
0.992711
1.801214
4.526908
0.13
0.129589
0.054873
0.687683
0.88875
1.635776
4.15668
0.16
0.107462
0.047652
0.601964
0.801019
1.486467
3.832163
0.19
0.094425
0.042119
0.527692
0.726367
1.350959
3.545439
0.22
0.089808
0.037862
0.463752
0.662455
1.227695
3.290663
0.25
0.093111
0.034618
0.409332
0.607465
1.115554
3.063307
0.28
0.103944
0.032237
0.363816
0.559955
1.013687
2.859733
0.31
0.121993
0.030659
0.326713
0.518754
0.921432
2.676942
0.34
0.147
0.029905
0.297627
0.482906
0.838253
2.512419
0.37
0.178745
0.030062
0.276225
0.451629
0.763706
2.364022
0.4
0.217038
0.03128
0.262228
0.424281
0.697419
2.229905
0.43
0.261715
0.033761
0.255395
0.400344
0.639075
2.108473
0.46
0.312631
0.037759
0.255514
0.379403
0.588398
1.998331
0.49
0.369655
0.043576
0.262401
0.361136
0.545147
1.898264Table 5
Equation (15): D1/5x2=3.6*u4/5*(x+u).
u
Equation (15), x=0.5
MES (x=0.5)
Equation (15), x=1
MES (x=1)
Equation (15), x=1.5
MES (x=1.5)
0.01
0.343882
0.118255
1.208668
1.460878
2.463454
6.068605
0.04
0.241972
0.088403
1.014909
1.245459
2.177846
5.405808
0.07
0.145513
0.065993
0.841051
1.066095
1.926588
4.84112
0.1
0.047663
0.050063
0.672382
0.912595
1.687102
4.342418
0.13
−0.0534
0.040621
0.504691
0.781019
1.452785
3.896051
0.16
−0.15846
0.038035
0.336046
0.66967
1.220548
3.494999
0.19
−0.26789
0.042854
0.165375
0.57791
0.988642
3.135344
0.22
−0.38192
0.05573
−0.00798
0.505679
0.755965
2.814861
0.25
−0.50067
0.07739
−0.18445
0.453273
0.521775
2.532349
0.28
−0.6242
0.108613
−0.36433
0.421219
0.285544
2.287267
0.31
−0.75255
0.150225
−0.54783
0.41021
0.046885
2.079534
0.34
−0.88575
0.203085
−0.73512
0.42106
−0.1945
1.909392
0.37
−1.02378
0.268089
−0.9263
0.454674
−0.43882
1.777328
0.4
−1.16666
0.34616
−1.12147
0.512032
−0.68628
1.684017
0.43
−1.31436
0.438252
−1.32068
0.594175
−0.937
1.63028
0.46
−1.46686
0.545342
−1.52398
0.702196
−1.1911
1.617057
0.49
−1.62416
0.668434
−1.73142
0.837232
−1.44867
1.645386Table 6
Equations (17)–(20): D1/5x2=1.8*u4/5*x.
u
Equations (17)–(20), x=0.5
MES (x=0.5)
Equations (17)–(20), x=1
MES (x=1)
Equations (17)–(20), x=1.5
MES (x=1.5)
0.01
0.367393
0.134978
1.254786
1.574488
2.532179
6.411931
0.04
0.321468
0.11916
1.162937
1.463455
2.394405
6.072554
0.07
0.282769
0.106093
1.085538
1.368434
2.278307
5.778596
0.1
0.24736
0.094866
1.014719
1.283739
2.172079
5.513429
0.13
0.214047
0.085056
0.948094
1.206768
2.07214
5.269496
0.16
0.182251
0.076416
0.884502
1.136031
1.976754
5.042506
0.19
0.151633
0.068784
0.823267
1.070565
1.8849
4.829698
0.22
0.121972
0.062046
0.763943
1.009695
1.795915
4.629149
0.25
0.093111
0.056115
0.706221
0.952923
1.709332
4.439446
0.28
0.064936
0.050925
0.649872
0.899864
1.624808
4.259501
0.31
0.03736
0.046423
0.59472
0.850212
1.542079
4.088456
0.34
0.010313
0.042563
0.540626
0.803718
1.460939
3.925614
0.37
−0.01626
0.039309
0.48748
0.760173
1.38122
3.770395
0.4
−0.0424
0.03663
0.43519
0.719403
1.302786
3.622313
0.43
−0.06816
0.034498
0.38368
0.681257
1.22552
3.480952
0.46
−0.09356
0.032888
0.332884
0.645604
1.149325
3.345952
0.49
−0.11863
0.031782
0.282746
0.61233
1.074119
3.216998Figure 1
MSE of (7) at x=0.5,  x=1, and x=1.5.Figure 2
MSE of (10) at x=0.5,  x=1, and x=1.5.Figure 3
MSE of (13) at x=0.5,  x=1, and x=1.5.Figure 4
MSE of (14) at x=0.5,  x=1, and x=1.5.Figure 5
MSE of (15) at x=0.5,  x=1, and x=1.5.Figure 6
MSE of (17) at x=0.5,  x=1, and x=1.5.


## 6. Conclusion

We extended the complex step method by employing the fractional calculus differential operator (the fractional complex step). The approximation is provided forα∈(0,1), and in the same manner, we can consider the approximation for all α∈(n-1,n). This derivative concept imposes improving many different approximations for the fractional derivatives of any complex valued analytic function utilizing its real and imaginary parts. We provided different approximations for the operator Dα. Moreover, D2α is approximated in (8). This work can be applied in physics and computer sciences such as image processing and signal processing.



---

*Source: 515973-2013-04-10.xml*