A Numerical Method for Solving Fractional Differential Equations by Using Neural Network

. We present a new method for solving the fractional differential equations of initial value problems by using neural networks which are constructed from cosine basis functions with adjustable parameters. By training the neural networks repeatedly the numericalsolutionsforthefractionaldifferentialequationswereobtained.Moreover,thetechniqueisstillapplicableforthecoupled differentialequationsoffractionalorder.Thecomputergraphicsandnumericalsolutionsshowthattheproposedmethodisvery effective.


Introduction
Recently, fractional differential equations have gained considerable importance due to their frequent appearance applications in fluid flow, rheology, dynamical processes in selfsimilar and porous structures, diffusive transport akin to diffusion, electrical networks, probability and statistics, control theory of dynamical systems, viscoelasticity, electrochemistry of corrosion, chemical physics, optics and signal processing [1][2][3][4][5][6][7], and so on.These applications in interdisciplinary sciences motivate us to try to find out the analytic or numerical solutions for the fractional differential equations.But for most ones it is difficult to find out or even have exact solutions.Thus, necessarily, the numerical techniques are applied to the fractional differential equations.Now, many effective methods for solving fractional differential equations have been presented, such as nonlinear functional analysis method including monotone iterative technique [8,9], topological degree theory [10], and fixed point theorems [11][12][13].Also, numerical solutions are obtained by the following methods: random walk [2], matrix approach [14], the Adomian decomposition method and variational iteration method [15], HAM [16][17][18][19], homotopy perturbation method (HPM) [20], and so forth.Not long ago, in [21], Raja et al. by applying Particle Swarm Optimization (PSO) algorithm along with feedforward ANN obtained the numerical solutions for fractional differential equations.But the convergence of the algorithm has not been proven, and this method is only applied to the single fractional differential equations.In this paper, we construct two different neural networks based on cosine functions and obtain the conditions of algorithm convergence.
The first neural network (NU) is applied to linear and nonlinear fractional differential equations of the form   0+  () =  (,  ()) , 0 <  ≤ 1, 0 <  ≤ 1 (1) with initial condition as follows: where   0+ is the Caputo fractional derivatives of order .The second neural network (NU) is applied to the fractional coupled differential equations of the form   0+  () =  (,  () ,  ()) , 0 <  ≤ 1, 0 <  ≤ 1, Advances in Mathematical Physics with initial conditions as follows: where   0+ is the Caputo fractional derivatives of order .The solutions for the above two problems are written as cosine basis functions, whose parameters can be adjusted to minimize an appropriate error function.So we need to compute the gradient of the error with respect to the network parameters.By adjusting the parameters repeatedly, we obtain the numerical solutions when the error values are less than the required accuracy or the training times reach maximum.

The First Neural Network.
To describe the method, we consider (1) with initial condition (0) = .The th trial solution satisfying the initial condition is written as where M represents the number of neurons and  , are unknown weights of the network determined in training procedures to reduce the error function: where N represents the number of sample points, ‖ ⋅ ‖ 2 is Euclidean norm, and where  = 1, 2, . . ., N; then we can adjust the weights  , by the following equation: where

Example 1.
We first consider the following linear fractional differential equation: with condition (0) = 0.The exact solution is () =  2 .This equation also can be solved by the following methods: Genetic Algorithm (GA) [21], Grünwald-Letnikov classical numerical technique (GL) [23], and Particle Swarm Optimization (PSO) algorithm [23].We set the parameters  = 0.001, M = 7, and N = 10 and train the neural network 4500 times, and the weights of the network for Example 1 are given in Table 1. Figure 1 shows that sample points are on the exact solution curve after training is completed.
Then we check whether the other points also match well with the exact solution (see Figure 2).From Figure 3  are done by using Lenovo T400, Intel Core 2 Duo CPU P8700, 2.53 GHz, and Matlab version R2010b.The neural networks with cosine basis functions have taken about 850 s, but the other algorithms mentioned above need to run about 2,240 s.

Example 2.
We secondly consider the following linear fractional differential equation: with condition (0) = 1.The exact solution is () = cos().We set the parameters  = 0.001, M = 7, and N = 10 and train the neural network 1000 times, and the weights of the network for Example 2 are given in Table 1.Figures 4, 5, and 6 show that the neural network is still applicable when  ̸ = 0. Table 3 shows the exact solution, approximate solution, and accuracy for Example 2.

Example 3.
We thirdly consider the following nonlinear fractional differential equation: with condition (0) = 0.The exact solution is () =  5/2 .We set the parameters  = 0.001, M = 7, and N = 10 and train the neural network 1000 times, and the weights of the network for Example 2 are given in Table 1.

The Second Neural Network.
To describe the method, we consider (3) with initial conditions (0) =  1 and (0) =  2 .The th trial solutions for the problem are written as  where N represents the number of sample points and  , and  , are unknown weights of the network determined in training procedures to reduce error function: Then we adjust the weights  , and  , by the following two equations: where  +   ( 0,1 −  0,1 1 cos ((M + 1) )) +   ( 1,0 −  1,0 1 cos ((M + 1) )) −   ( 0,1 − where A = This completes the proof.

Example
3.6.1.Example 4. We first consider the following linear coupled fractional differential equations: with initial condition as follows: The exact solution is () =  2 and () =  3 .We set the parameters  = 0.9,  = 0.001, M = 7, and N = 10 and train the neural network 2000 times, and the weights of the network for Example 4 are given in Table 5. Figures 7 and  8 show that the sample points and checkpoints are in well agreement with the exact solutions for the problem.Figure 9 shows that the error of the numerical solutions decreases rapidly within the first 50 training times.Table 6 shows the exact solution, approximate solution, and accuracy for Example 4.
with initial conditions as follows: The exact solution is () =  3 and () = cos().We set the parameters  = 0.9,  = 0.001, M = 7, and N = 10.Numerical solutions in Table 7 show that this network can also be applied to the nonlinear fractional coupled differential equations but we need more time to train the network.

Conclusion
In this paper, by using the neural network, we obtained the numerical solutions for single fractional differential equations and the systems of coupled differential equations of fractional order.The computer graphics demonstrates that numerical results are in well agreement with the exact solutions.In (1), suppose that (, ()) = () + ()+ ()

Figure 1 :
Figure 1: The learning curve for Example 1.

Figure 2 :
Figure 2: The inspection curve for Example 1.

and z = x 3
Exact solution y(x)Sample point for y(x) Exact solution z(x) Sample point for z(x)

Figure 7 :
Figure 7: The learning curve for Example 4.

Table 4
shows the exact solution, approximate solution, and accuracy for Example 3.

Table 3 :
Exact solution, approximate solution, and accuracy for Example 2.

Table 4 :
Exact solution, approximate solution, and accuracy for Example 3.

Table 5 :
Weights obtained along with the solution of Examples 4 and 5.