# An Accurate Spectral Galerkin Method for Solving Multiterm Fractional Differential Equations

Authors: A. H. Bhrawy; A. S. Alofi
Journal: Mathematical Problems in Engineering
 (2014)

---

## Abstract

This paper reports a new formula expressing the Caputo fractional derivatives for any order of shifted generalized Jacobi polynomials of any degree in terms of shifted generalized Jacobi polynomials themselves. A direct solution technique is presented for solving multiterm fractional differential equations (FDEs) subject to nonhomogeneous initial conditions using spectral shifted generalized Jacobi Galerkin method. The homogeneous initial conditions are satisfied exactly by using a class of shifted generalized Jacobi polynomials as a polynomial basis of the truncated expansion for the approximate solution. The approximation of the spatial Caputo fractional order derivatives is expanded in terms of a class of shifted generalized Jacobi polynomialsJ
n
α
,
−
β
(
x
) with x
∈
(
0
,
1
), and  n is the polynomial degree. Several numerical examples with comparisons with the exact solutions are given to confirm the reliability of the proposed method for multiterm FDEs.


---

## Body

## 1. Introduction

Fractional differential equations (FDEs), as generalizations of classical integer order differential equations, are increasingly used to model several real phenomena emerging in engineering and science fields. Owing to the increasing applications, there has been important interest in developing analytical and numerical methods for the solution of fractional differential equations (see e.g., [1–7] and the references therein). These methods include variational iteration method [8, 9], Adomian decomposition method [10, 11], generalized differential transform method [12], Laplace decomposition method [13], homotopy analysis method [14], spectral method [15–19], finite difference method [20–22], and wavelet methods [23–25].Spectral method is one of the principal methods of discretization for the numerical solution of most types of differential equations. The three most widely used spectral versions are the Galerkin, Tau, and collocation methods (see, for instance [26–32]). Recently, spectral method is a class of important tools for obtaining the numerical solutions of fractional differential equations. They have excellent error properties and they offer exponential rates of convergence for smooth problems. In the present paper we intend to extend the application of Galerkin method based on generalized Jacobi polynomials form solving linear problems to solve multiterm FDEs. To the best of our knowledge, there are not so many results on using this technique to solve such problems arising in mathematical physics. This partially motivated our interest in such a method.Spectral Galerkin method for the numerical solution of fractional differential equations is characterized by expanding the solution by a truncated series of the trial functions. The unknown coefficients of this expansion will be determined by minimizing the error between the exact and numerical solutions in appropriate weighted space. This method provides exponential rates of convergence. An explicit expression for the derivatives of an infinitely differentiable function of any degree and for any fractional order in terms of the function itself is needed. Doha et al. [16] have obtained such a relation in the case of the basis functions of expansion that are shifted Jacobi polynomials. Another formula for shifted Legendre coefficients is obtained by Bhrawy et al. [17]. Moreover, in [33] the authors expressed explicitly the Caputo fractional derivatives of generalized Laguerre polynomials of any degree in terms of the generalized Laguerre polynomials themselves to solve fractional initial value problems on the half line.An explicit expression for any Caputo fractional order derivative of the shifted generalized Jacobi polynomials of any degree in terms of the shifted generalized Jacobi polynomials themselves is the first goal of this paper. The fundamental goal of this paper is to develop a direct solution technique based on shifted generalized Jacobi-Galerkin method (SGJG) for solving multiterm FDEs with homogeneous and nonhomogeneous initial conditions. Finally, we present some numerical results exhibiting the accuracy and efficiency of our numerical algorithm.The next section of this paper is for fractional preliminaries. Section3 is devoted to proving a formula that expresses the Caputo fractional order derivative of the shifted generalized Jacobi polynomials. In Section 4, we construct and develop algorithms for solving linear FDEs by using shifted generalized Jacobi Galerkin spectral method. In Section 5, several examples are presented. Finally, some concluding remarks are given in the last section.


## 2. Preliminaries and Notations

In this section, we present some basic knowledge of fractional calculus, orthogonal shifted Jacobi polynomials, and generalized Jacobi polynomials these are most relevant to spectral approximations.


### 2.1. The Fractional Derivative in the Caputo Sense

In this section, we state the definition and preliminaries of fractional calculus.Definition 1.
Form to be the smallest integer that exceeds ν, Caputo’s fractional derivative operator of order ν
>
0 is defined as
(1)
D
ν
f
(
x
)
=
{
J
m
-
ν
D
m
f
(
x
)
,
if
m
-
1
<
ν
<
m
,
D
m
f
(
x
)
,
if
ν
=
m
,
m
∈
N
,
where
(2)
J
ν
f
(
x
)
=
1
Γ
(
ν
)
∫
0
x
‍
(
x
-
t
)
ν
-
1
f
(
t
)
d
t
,
ν
>
0
,
x
>
0
.
For the Caputo derivative we have
(3)
D
ν
x
β
=
{
0
,
for
β
∈
N
0
,
β
<
⌈
ν
⌉
,
Γ
(
β
+
1
)
Γ
(
β
+
1
-
ν
)
x
β
-
ν
,
for
β
∈
N
0
,
β
≥
⌈
ν
⌉
or
β
∉
N
,
β
>
⌊
ν
⌋
.
Similar to the integer-order differentiation, the Caputo’s fractional differentiation is a linear operation; that is,(4)
D
ν
(
λ
f
(
x
)
+
μ
g
(
x
)
)
=
λ
D
ν
f
(
x
)
+
μ
D
ν
g
(
x
)
,
where λ and μ are constants.


### 2.2. Classical Jacobi Polynomials

The Jacobi polynomials with the real parameters(
α
>
-
1
,
β
>
-
1
) are a sequence of polynomials P
n
α
,
β
(
x
)
(
n
=
0,1
,
2
,
…
), satisfying the orthogonality relation
(5)
∫
-
1
1
‍
(
1
-
x
)
α
(
1
+
x
)
β
P
m
α
,
β
(
x
)
P
n
α
,
β
(
x
)
d
x
=
{
0
,
m
≠
n
,
h
n
α
,
β
,
m
=
n
,
where
(6)
h
n
α
,
β
=
2
α
+
β
+
1
Γ
(
n
+
α
+
1
)
Γ
(
n
+
β
+
1
)
(
2
n
+
α
+
β
+
1
)
n
!
Γ
(
n
+
α
+
β
+
1
)
.
It is convenient to standardize the Jacobi polynomials so that
(7)
P
n
α
,
β
(
1
)
=
(
α
+
1
)
n
n
!
,
P
n
α
,
β
(
-
1
)
=
(
-
1
)
n
(
β
+
1
)
n
n
!
,
where (
a
)
k
=
Γ
(
a
+
k
)
/
Γ
(
a
). In this form the polynomials may be generated using the standard recurrence relation of Jacobi polynomials starting from P
0
α
,
β
(
x
)
=
1 and P
1
α
,
β
(
x
)
=
(
1
/
2
)
[
α
-
β
+
(
λ
+
1
)
x
], or obtained from Rodrigue’s formula
(8)
P
n
α
,
β
(
x
)
=
(
-
1
)
n
2
n
n
!
(
1
-
x
)
-
α
(
1
+
x
)
-
β
D
n
[
(
1
-
x
)
α
+
n
(
1
+
x
)
β
+
n
]
,
where λ
=
α
+
β
+
1.The shifted Jacobi polynomials [34, 35] R
n
α
,
β
(
x
)
,
α
,
β
>
-
1 are orthogonal polynomials on [
0
,
1
] with respect to the weight function ω
(
x
)
=
(
1
-
x
)
α
x
β
,
α
,
β
>
-
1. Note that the shifted Jacobi polynomials satisfy the orthogonality relation
(9)
∫
0
1
‍
(
1
-
x
)
α
x
β
R
m
α
,
β
(
x
)
R
n
α
,
β
(
x
)
d
x
=
{
0
,
m
≠
n
,
k
n
α
,
β
,
m
=
n
,
where
(10)
k
n
α
,
β
=
Γ
(
n
+
α
+
1
)
Γ
(
n
+
β
+
1
)
(
2
n
+
α
+
β
+
1
)
n
!
Γ
(
n
+
α
+
β
+
1
)
.If we denote byx
N
,
j
(
x
j
N
)
,
0
⩽
j
⩽
N, and ϖ
N
,
j
(
ϖ
j
N
)
,
(
0
≤
i
≤
N
), to the nodes and Christoffel numbers of the standard (shifted) Legendre-Gauss-Lobatto quadratures on the intervals (
-
1,1
)
,
(
0,1
), respectively, then one can easily show that
(11)
x
j
N
=
1
2
(
x
N
,
j
+
1
)
,
ϖ
j
N
=
1
2
ϖ
N
,
j
,
0
≤
j
≤
N
,
and if S
N
(
0,1
) denotes the set of all polynomials of degree at most N, then it follows that for any ϕ
∈
S
2
N
+
1
(
0,1
),
(12)
∫
0
1
w
*
(
x
)
ϕ
(
x
)
d
x
=
1
2
∫
-
1
1
w
(
x
)
ϕ
(
1
2
(
x
+
1
)
)
d
x
aaaaaaaaaaaaiaaiia
=
1
2
∑
j
=
0
N
‍
ϖ
N
,
j
ϕ
(
1
2
(
x
N
,
j
+
1
)
)
aaaaaaaaaaaaiaiaia
=
∑
j
=
0
N
‍
ϖ
j
N
ϕ
(
x
j
N
)
.According to Legendre-Gauss quadratures(13)
x
N
,
j
are
the
zeros
of
L
N
+
1
(
x
)
,
ϖ
N
,
j
=
2
(
1
-
(
x
N
,
j
)
2
)
1
(
L
N
+
1
′
(
x
N
,
j
)
)
2
,
kkkkkikkkkkkkkkkkkk
kk
0
≤
j
≤
N
.We define the discrete inner product and norm as follows:(14)
(
u
,
v
)
w
*
,
N
=
∑
k
=
0
N
‍
u
(
x
k
N
)
v
(
x
k
N
)
ϖ
k
N
,
∥
u
∥
w
*
,
N
=
(
u
,
u
)
w
*
,
N
.Obviously,(15)
(
u
,
v
)
w
*
,
N
=
(
u
,
v
)
w
*
∀
u
,
v
∈
S
2
N
-
1
.


### 2.3. Generalized Jacobi Polynomials

Recently, Guo et al. [36] presented and developed the generalized Jacobi approximation, in which the parameters α and β considered in the generalized Jacobi polynomials J
^
n
α
,
β
(
x
) might be any real numbers. In this section, we give some properties of such polynomials. Let I
^
=
(
-
1,1
) and ω
^
α
,
β
(
x
)
=
(
1
-
x
)
α
(
1
+
x
)
β. We denote the set of integers by Z. For any α
,
β
∈
Z, the generalized Jacobi polynomials are defined by (see [36, 37])
(16)
J
^
n
α
,
β
(
x
)
=
{
(
1
-
x
)
-
α
(
1
+
x
)
-
β
P
n
+
n
0
-
α
,
-
β
(
x
)
,
if
α
,
β
≤
1
,
n
0
=
α
+
β
,
(
1
-
x
)
-
α
P
n
+
n
0
-
α
,
β
(
x
)
,
if
α
≤
1
,
β
>
-
1
,
n
0
=
α
,
(
1
+
x
)
-
β
P
n
+
n
0
α
,
-
β
(
x
)
,
if
β
≤
1
,
α
>
-
1
,
n
0
=
β
,
P
n
+
n
0
α
,
β
(
x
)
,
if
α
,
β
>
-
1
,
n
0
=
0
.
For our present purposes it is convenient to use the shifted Jacobi polynomials R
n
α
,
β
(
x
); let I
=
(
0,1
) and ω
α
,
β
(
x
)
=
(
1
-
x
)
α
x
β. We define the shifted GJPs and separate them into four cases as follows.Case 1.
(17)
J
n
α
,
β
(
x
)
=
R
n
+
n
0
α
,
β
(
x
)
,
n
0
=
0
.Case 2.
(18)
J
n
-
α
,
β
(
x
)
=
(
1
-
x
)
α
R
n
+
n
0
α
,
β
(
x
)
,
n
0
=
-
α
.Case 3.
(19)
J
n
α
,
-
β
(
x
)
=
x
β
R
n
+
n
0
α
,
β
(
x
)
,
n
0
=
-
β
.Case 4.
(20)
J
n
-
α
,
-
β
(
x
)
=
(
1
-
x
)
α
x
β
R
n
+
n
0
α
,
β
(
x
)
,
n
0
=
-
α
-
β
,
where α
,
β
>
-
1, α
,
β
∈
Z.Lemma 2.
Each of GJPsJ
n
α
,
β
(
x
)
,
J
n
-
α
,
β
(
x
)
,
J
n
α
,
-
β
(
x
) and J
n
-
α
,
-
β
(
x
)
:
n
>
n
0 forms a complete orthogonal system in L
ω
α
,
β
2
(
I
)
,
L
ω
-
α
,
β
2
(
I
)
,
L
ω
α
,
-
β
2
(
I
)
a
n
d
L
ω
-
α
,
-
β
2
(
I
), respectively. And the square of the norm of each of the four GJPs cases is defined as k
n
+
n
0
α
,
β where k
n
α
,
β is the square of the norm of the classical shifted Jacobi polynomials R
n
α
,
β
(
x
) and
(21)
k
n
+
n
0
α
,
β
=
Γ
(
n
+
n
0
+
α
+
1
)
Γ
(
n
+
n
0
+
β
+
1
)
(
2
n
+
2
n
0
+
α
+
β
+
1
)
(
n
+
n
0
)
!
Γ
(
n
+
n
0
+
α
+
β
+
1
)
.Proof.
Firstly,(22)
(
J
n
α
,
β
(
x
)
,
J
m
α
,
β
(
x
)
)
ω
α
,
β
=
∫
0
1
‍
R
n
α
,
β
(
x
)
R
m
α
,
β
(
x
)
(
1
-
x
)
α
x
β
d
x
=
δ
m
,
n
k
n
α
,
β
.
Secondly,
(23)
(
J
n
-
α
,
β
(
x
)
,
J
m
-
α
,
β
(
x
)
)
ω
-
α
,
β
=
∫
0
1
‍
(
1
-
x
)
α
R
n
-
α
α
,
β
(
x
)
(
1
-
x
)
α
R
m
-
α
α
,
β
(
x
)
(
1
-
x
)
-
α
x
β
d
x
=
∫
0
1
‍
R
n
-
α
α
,
β
(
x
)
R
m
-
α
α
,
β
(
x
)
(
1
-
x
)
α
x
β
d
x
=
δ
m
,
n
k
n
-
α
α
,
β
.
Thirdly,
(24)
(
J
n
α
,
-
β
(
x
)
,
J
m
α
,
-
β
(
x
)
)
ω
α
,
-
β
=
∫
0
1
‍
x
β
R
n
-
β
α
,
β
(
x
)
x
β
R
m
-
β
α
,
β
(
x
)
(
1
-
x
)
α
x
-
β
d
x
=
∫
0
1
‍
R
n
-
β
α
,
β
R
m
-
β
α
,
β
(
1
-
x
)
α
x
β
d
x
=
δ
m
,
n
k
n
-
β
α
,
β
.
And lastly,
(25)
(
J
n
-
α
,
-
β
(
x
)
,
J
m
-
α
,
-
β
(
x
)
)
ω
-
α
,
-
β
=
∫
0
1
‍
(
1
-
x
)
α
x
β
R
n
-
α
-
β
α
,
β
(
x
)
×
(
1
-
x
)
α
x
β
R
m
-
α
-
β
α
,
β
(
x
)
(
1
-
x
)
-
α
x
-
β
d
x
=
∫
0
1
‍
R
n
-
α
-
β
α
,
β
(
x
)
R
m
-
α
-
β
α
,
β
(
x
)
(
1
-
x
)
α
x
β
d
x
=
δ
m
,
n
k
n
-
α
-
β
α
,
β
.


## 2.1. The Fractional Derivative in the Caputo Sense

In this section, we state the definition and preliminaries of fractional calculus.Definition 1.
Form to be the smallest integer that exceeds ν, Caputo’s fractional derivative operator of order ν
>
0 is defined as
(1)
D
ν
f
(
x
)
=
{
J
m
-
ν
D
m
f
(
x
)
,
if
m
-
1
<
ν
<
m
,
D
m
f
(
x
)
,
if
ν
=
m
,
m
∈
N
,
where
(2)
J
ν
f
(
x
)
=
1
Γ
(
ν
)
∫
0
x
‍
(
x
-
t
)
ν
-
1
f
(
t
)
d
t
,
ν
>
0
,
x
>
0
.
For the Caputo derivative we have
(3)
D
ν
x
β
=
{
0
,
for
β
∈
N
0
,
β
<
⌈
ν
⌉
,
Γ
(
β
+
1
)
Γ
(
β
+
1
-
ν
)
x
β
-
ν
,
for
β
∈
N
0
,
β
≥
⌈
ν
⌉
or
β
∉
N
,
β
>
⌊
ν
⌋
.
Similar to the integer-order differentiation, the Caputo’s fractional differentiation is a linear operation; that is,(4)
D
ν
(
λ
f
(
x
)
+
μ
g
(
x
)
)
=
λ
D
ν
f
(
x
)
+
μ
D
ν
g
(
x
)
,
where λ and μ are constants.


## 2.2. Classical Jacobi Polynomials

The Jacobi polynomials with the real parameters(
α
>
-
1
,
β
>
-
1
) are a sequence of polynomials P
n
α
,
β
(
x
)
(
n
=
0,1
,
2
,
…
), satisfying the orthogonality relation
(5)
∫
-
1
1
‍
(
1
-
x
)
α
(
1
+
x
)
β
P
m
α
,
β
(
x
)
P
n
α
,
β
(
x
)
d
x
=
{
0
,
m
≠
n
,
h
n
α
,
β
,
m
=
n
,
where
(6)
h
n
α
,
β
=
2
α
+
β
+
1
Γ
(
n
+
α
+
1
)
Γ
(
n
+
β
+
1
)
(
2
n
+
α
+
β
+
1
)
n
!
Γ
(
n
+
α
+
β
+
1
)
.
It is convenient to standardize the Jacobi polynomials so that
(7)
P
n
α
,
β
(
1
)
=
(
α
+
1
)
n
n
!
,
P
n
α
,
β
(
-
1
)
=
(
-
1
)
n
(
β
+
1
)
n
n
!
,
where (
a
)
k
=
Γ
(
a
+
k
)
/
Γ
(
a
). In this form the polynomials may be generated using the standard recurrence relation of Jacobi polynomials starting from P
0
α
,
β
(
x
)
=
1 and P
1
α
,
β
(
x
)
=
(
1
/
2
)
[
α
-
β
+
(
λ
+
1
)
x
], or obtained from Rodrigue’s formula
(8)
P
n
α
,
β
(
x
)
=
(
-
1
)
n
2
n
n
!
(
1
-
x
)
-
α
(
1
+
x
)
-
β
D
n
[
(
1
-
x
)
α
+
n
(
1
+
x
)
β
+
n
]
,
where λ
=
α
+
β
+
1.The shifted Jacobi polynomials [34, 35] R
n
α
,
β
(
x
)
,
α
,
β
>
-
1 are orthogonal polynomials on [
0
,
1
] with respect to the weight function ω
(
x
)
=
(
1
-
x
)
α
x
β
,
α
,
β
>
-
1. Note that the shifted Jacobi polynomials satisfy the orthogonality relation
(9)
∫
0
1
‍
(
1
-
x
)
α
x
β
R
m
α
,
β
(
x
)
R
n
α
,
β
(
x
)
d
x
=
{
0
,
m
≠
n
,
k
n
α
,
β
,
m
=
n
,
where
(10)
k
n
α
,
β
=
Γ
(
n
+
α
+
1
)
Γ
(
n
+
β
+
1
)
(
2
n
+
α
+
β
+
1
)
n
!
Γ
(
n
+
α
+
β
+
1
)
.If we denote byx
N
,
j
(
x
j
N
)
,
0
⩽
j
⩽
N, and ϖ
N
,
j
(
ϖ
j
N
)
,
(
0
≤
i
≤
N
), to the nodes and Christoffel numbers of the standard (shifted) Legendre-Gauss-Lobatto quadratures on the intervals (
-
1,1
)
,
(
0,1
), respectively, then one can easily show that
(11)
x
j
N
=
1
2
(
x
N
,
j
+
1
)
,
ϖ
j
N
=
1
2
ϖ
N
,
j
,
0
≤
j
≤
N
,
and if S
N
(
0,1
) denotes the set of all polynomials of degree at most N, then it follows that for any ϕ
∈
S
2
N
+
1
(
0,1
),
(12)
∫
0
1
w
*
(
x
)
ϕ
(
x
)
d
x
=
1
2
∫
-
1
1
w
(
x
)
ϕ
(
1
2
(
x
+
1
)
)
d
x
aaaaaaaaaaaaiaaiia
=
1
2
∑
j
=
0
N
‍
ϖ
N
,
j
ϕ
(
1
2
(
x
N
,
j
+
1
)
)
aaaaaaaaaaaaiaiaia
=
∑
j
=
0
N
‍
ϖ
j
N
ϕ
(
x
j
N
)
.According to Legendre-Gauss quadratures(13)
x
N
,
j
are
the
zeros
of
L
N
+
1
(
x
)
,
ϖ
N
,
j
=
2
(
1
-
(
x
N
,
j
)
2
)
1
(
L
N
+
1
′
(
x
N
,
j
)
)
2
,
kkkkkikkkkkkkkkkkkk
kk
0
≤
j
≤
N
.We define the discrete inner product and norm as follows:(14)
(
u
,
v
)
w
*
,
N
=
∑
k
=
0
N
‍
u
(
x
k
N
)
v
(
x
k
N
)
ϖ
k
N
,
∥
u
∥
w
*
,
N
=
(
u
,
u
)
w
*
,
N
.Obviously,(15)
(
u
,
v
)
w
*
,
N
=
(
u
,
v
)
w
*
∀
u
,
v
∈
S
2
N
-
1
.


## 2.3. Generalized Jacobi Polynomials

Recently, Guo et al. [36] presented and developed the generalized Jacobi approximation, in which the parameters α and β considered in the generalized Jacobi polynomials J
^
n
α
,
β
(
x
) might be any real numbers. In this section, we give some properties of such polynomials. Let I
^
=
(
-
1,1
) and ω
^
α
,
β
(
x
)
=
(
1
-
x
)
α
(
1
+
x
)
β. We denote the set of integers by Z. For any α
,
β
∈
Z, the generalized Jacobi polynomials are defined by (see [36, 37])
(16)
J
^
n
α
,
β
(
x
)
=
{
(
1
-
x
)
-
α
(
1
+
x
)
-
β
P
n
+
n
0
-
α
,
-
β
(
x
)
,
if
α
,
β
≤
1
,
n
0
=
α
+
β
,
(
1
-
x
)
-
α
P
n
+
n
0
-
α
,
β
(
x
)
,
if
α
≤
1
,
β
>
-
1
,
n
0
=
α
,
(
1
+
x
)
-
β
P
n
+
n
0
α
,
-
β
(
x
)
,
if
β
≤
1
,
α
>
-
1
,
n
0
=
β
,
P
n
+
n
0
α
,
β
(
x
)
,
if
α
,
β
>
-
1
,
n
0
=
0
.
For our present purposes it is convenient to use the shifted Jacobi polynomials R
n
α
,
β
(
x
); let I
=
(
0,1
) and ω
α
,
β
(
x
)
=
(
1
-
x
)
α
x
β. We define the shifted GJPs and separate them into four cases as follows.Case 1.
(17)
J
n
α
,
β
(
x
)
=
R
n
+
n
0
α
,
β
(
x
)
,
n
0
=
0
.Case 2.
(18)
J
n
-
α
,
β
(
x
)
=
(
1
-
x
)
α
R
n
+
n
0
α
,
β
(
x
)
,
n
0
=
-
α
.Case 3.
(19)
J
n
α
,
-
β
(
x
)
=
x
β
R
n
+
n
0
α
,
β
(
x
)
,
n
0
=
-
β
.Case 4.
(20)
J
n
-
α
,
-
β
(
x
)
=
(
1
-
x
)
α
x
β
R
n
+
n
0
α
,
β
(
x
)
,
n
0
=
-
α
-
β
,
where α
,
β
>
-
1, α
,
β
∈
Z.Lemma 2.
Each of GJPsJ
n
α
,
β
(
x
)
,
J
n
-
α
,
β
(
x
)
,
J
n
α
,
-
β
(
x
) and J
n
-
α
,
-
β
(
x
)
:
n
>
n
0 forms a complete orthogonal system in L
ω
α
,
β
2
(
I
)
,
L
ω
-
α
,
β
2
(
I
)
,
L
ω
α
,
-
β
2
(
I
)
a
n
d
L
ω
-
α
,
-
β
2
(
I
), respectively. And the square of the norm of each of the four GJPs cases is defined as k
n
+
n
0
α
,
β where k
n
α
,
β is the square of the norm of the classical shifted Jacobi polynomials R
n
α
,
β
(
x
) and
(21)
k
n
+
n
0
α
,
β
=
Γ
(
n
+
n
0
+
α
+
1
)
Γ
(
n
+
n
0
+
β
+
1
)
(
2
n
+
2
n
0
+
α
+
β
+
1
)
(
n
+
n
0
)
!
Γ
(
n
+
n
0
+
α
+
β
+
1
)
.Proof.
Firstly,(22)
(
J
n
α
,
β
(
x
)
,
J
m
α
,
β
(
x
)
)
ω
α
,
β
=
∫
0
1
‍
R
n
α
,
β
(
x
)
R
m
α
,
β
(
x
)
(
1
-
x
)
α
x
β
d
x
=
δ
m
,
n
k
n
α
,
β
.
Secondly,
(23)
(
J
n
-
α
,
β
(
x
)
,
J
m
-
α
,
β
(
x
)
)
ω
-
α
,
β
=
∫
0
1
‍
(
1
-
x
)
α
R
n
-
α
α
,
β
(
x
)
(
1
-
x
)
α
R
m
-
α
α
,
β
(
x
)
(
1
-
x
)
-
α
x
β
d
x
=
∫
0
1
‍
R
n
-
α
α
,
β
(
x
)
R
m
-
α
α
,
β
(
x
)
(
1
-
x
)
α
x
β
d
x
=
δ
m
,
n
k
n
-
α
α
,
β
.
Thirdly,
(24)
(
J
n
α
,
-
β
(
x
)
,
J
m
α
,
-
β
(
x
)
)
ω
α
,
-
β
=
∫
0
1
‍
x
β
R
n
-
β
α
,
β
(
x
)
x
β
R
m
-
β
α
,
β
(
x
)
(
1
-
x
)
α
x
-
β
d
x
=
∫
0
1
‍
R
n
-
β
α
,
β
R
m
-
β
α
,
β
(
1
-
x
)
α
x
β
d
x
=
δ
m
,
n
k
n
-
β
α
,
β
.
And lastly,
(25)
(
J
n
-
α
,
-
β
(
x
)
,
J
m
-
α
,
-
β
(
x
)
)
ω
-
α
,
-
β
=
∫
0
1
‍
(
1
-
x
)
α
x
β
R
n
-
α
-
β
α
,
β
(
x
)
×
(
1
-
x
)
α
x
β
R
m
-
α
-
β
α
,
β
(
x
)
(
1
-
x
)
-
α
x
-
β
d
x
=
∫
0
1
‍
R
n
-
α
-
β
α
,
β
(
x
)
R
m
-
α
-
β
α
,
β
(
x
)
(
1
-
x
)
α
x
β
d
x
=
δ
m
,
n
k
n
-
α
-
β
α
,
β
.


## 3. The Fractional Derivatives ofJ
i
α
,
-
β
(
x
)

The main objective of this section is to prove the following theorem for the fractional derivatives of the shifted generalized Jacobi polynomials. The analytic form of the shifted generalized Jacobi polynomialsJ
i
α
,
-
β
(
x
) of degree i
-
β is given by
(26)
J
i
α
,
-
β
(
x
)
=
∑
k
=
0
i
-
β
‍
(
-
1
)
i
-
β
-
k
aaaaaaaaaa
×
Γ
(
i
+
1
)
Γ
(
i
+
k
+
α
+
1
)
Γ
(
k
+
β
+
1
)
Γ
(
i
+
α
+
1
)
(
i
-
β
-
k
)
!
k
!
x
k
+
β
.
A function u
(
x
), square integrable in (
0,1
), can be expressed in terms of shifted generalized Jacobi polynomials as
(27)
u
(
x
)
=
∑
j
=
0
∞
‍
a
j
J
j
α
,
-
β
(
x
)
,
where the coefficients a
j are given by
(28)
a
j
=
1
k
j
-
β
α
,
β
∫
0
1
‍
w
(
α
,
-
β
)
(
x
)
u
(
x
)
J
j
α
,
-
β
(
x
)
d
x
,
j
=
0,1
,
…
.Lemma 3.
LetJ
i
α
,
-
β
(
x
) be a shifted generalized Jacobi polynomial of degree i
-
β; then
(29)
D
ν
J
i
α
,
-
β
(
x
)
=
0
,
i
-
β
=
0,1
,
…
,
⌈
ν
⌉
-
1
,
ν
>
0
.Proof.
This lemma can be easily proved by making use of relations (3)-(4) with relation (26).Theorem 4.
The fractional derivative of orderν in the Caputo sense for the shifted generalized Jacobi polynomials is given by
(30)
D
ν
J
i
α
,
-
β
(
x
)
=
∑
j
=
0
∞
‍
S
ν
(
i
,
j
,
α
,
β
)
J
j
α
,
-
β
(
x
)
,
111111111111
i
-
β
=
⌈
ν
⌉
,
⌈
ν
⌉
+
1
,
…
,
where
(31)
S
ν
(
i
,
j
,
α
,
β
)
=
∑
k
=
⌈
ν
⌉
i
-
β
(
(
(
-
1
)
i
-
β
-
k
Γ
(
i
+
1
)
Γ
(
i
+
k
+
α
+
1
)
×
(
2
j
-
β
+
α
+
1
)
(
j
-
β
)
!
(
-
1
)
i
-
β
-
k
)
×
(
Γ
(
i
+
α
+
1
)
Γ
(
k
-
ν
+
β
+
1
)
×
(
i
-
β
-
k
)
!
k
!
Γ
(
j
-
β
+
α
+
1
)
)
-
1
)
×
∑
l
=
0
j
-
β
(
(
(
-
1
)
j
-
β
-
l
Γ
(
j
+
l
+
α
+
1
)
×
Γ
(
α
+
1
)
Γ
(
l
+
k
+
β
-
ν
+
1
)
(
-
1
)
j
-
β
-
l
)
×
(
Γ
(
l
+
β
+
1
)
×
(
j
-
β
-
l
)
!
l
!
Γ
(
l
+
k
+
α
+
β
-
ν
+
2
)
)
-
1
)
.Proof.
The analytic form of the shifted generalized Jacobi polynomialsJ
i
α
,
-
β
(
x
) of degree i
-
β is given by (26). Using (3)-(4) and (26), we have
(32)
D
ν
J
i
α
,
-
β
(
x
)
=
∑
k
=
0
i
-
β
‍
(
-
1
)
i
-
β
-
k
×
Γ
(
i
+
1
)
Γ
(
i
+
k
+
α
+
1
)
Γ
(
k
+
β
+
1
)
Γ
(
i
+
α
+
1
)
(
i
-
β
-
k
)
!
k
!
D
ν
x
k
+
β
=
∑
k
=
⌈
ν
⌉
i
-
β
‍
(
-
1
)
i
-
β
-
k
×
Γ
(
i
+
1
)
Γ
(
i
+
k
+
α
+
1
)
Γ
(
i
+
α
+
1
)
(
i
-
β
-
k
)
!
k
!
Γ
(
k
+
β
-
ν
+
1
)
x
k
+
β
-
ν
,
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
i
-
β
=
⌈
ν
⌉
,
⌈
ν
⌉
+
1
,
…
.
Now, approximating x
k
+
β
-
ν by terms of shifted generalized Jacobi series, we have
(33)
x
k
+
β
-
ν
≃
∑
j
=
0
∞
‍
b
k
,
j
J
j
α
,
-
β
(
x
)
,
where b
k
,
j is given from (28) with u
(
x
)
=
x
k
+
β
-
ν, and this immediately gives
(34)
b
k
,
j
=
(
2
j
-
β
+
α
+
1
)
(
j
-
β
)
!
Γ
(
j
-
β
+
α
+
1
)
×
∑
l
=
0
j
-
β
(
(
(
-
1
)
j
-
β
-
l
Γ
(
j
+
l
+
α
+
1
)
×
Γ
(
α
+
1
)
Γ
(
l
+
k
+
β
-
ν
+
1
)
(
-
1
)
j
-
β
-
l
)
×
(
Γ
(
l
+
β
+
1
)
×
(
j
-
β
-
l
)
!
l
!
Γ
(
l
+
k
+
α
+
β
-
ν
+
2
)
)
-
1
)
.
Employing (32)–(34), we get
(35)
D
ν
J
i
α
,
-
β
(
x
)
=
∑
j
=
0
∞
‍
S
ν
(
i
,
j
,
α
,
β
)
J
j
α
,
-
β
(
x
)
,
111111111111111
i
=
⌈
ν
⌉
,
⌈
ν
⌉
+
1
,
…
,
where S
ν
(
i
,
j
,
α
,
β
) is given as in (30), and this proves the theorem.


## 4. Shifted Generalized Jacobi Galerkin Method for FDEs

In this section, we are interested in employing the SGJG method to solve the linear multiterm FDE(36)
D
ν
u
(
x
)
+
∑
σ
=
1
r
-
1
‍
γ
σ
D
η
σ
u
(
x
)
+
γ
r
u
(
x
)
=
f
(
x
)
,
x
∈
I
=
(
0,1
)
,
subject to the homogeneous initial conditions
(37)
u
(
q
)
(
0
)
=
0
,
q
=
0
,
…
,
m
-
1
,
where γ
σ
(
σ
=
1
,
…
,
r
) and 0
<
η
1
<
η
2
<
⋯
<
η
r
-
1
<
ν
,
m
-
1
<
ν
≤
m are constants, D
ν
u
(
x
)
≡
u
(
ν
)
(
x
) denotes the Caputo fractional derivative of order ν for u
(
x
), and f
(
x
) is a given source function. Let us first introduce some basic notation that will be used in the upcoming sections. We set
(38)
S
N
=
span
⁡
{
J
β
α
,
-
β
(
x
)
,
J
β
+
1
α
,
-
β
(
x
)
,
…
,
J
N
α
,
-
β
(
x
)
}
,
V
N
=
{
v
∈
S
N
:
v
(
j
)
(
0
)
=
0
,
j
=
0,1
,
…
,
m
-
1
}
,
where v
(
j
)
(
x
) denotes jth-order differentiation of v
(
x
) with respect to x. Then the shifted generalized Jacobi-Galerkin approximation to (36) is to find u
N
∈
V
N such that
(39)
(
D
ν
u
N
,
v
(
x
)
)
ω
α
,
-
β
+
∑
σ
=
1
r
-
1
‍
γ
σ
(
D
η
σ
u
N
,
v
(
x
)
)
ω
α
,
-
β
aaa
+
γ
r
(
u
N
,
v
(
x
)
)
ω
α
,
-
β
=
(
f
,
v
(
x
)
)
ω
α
,
-
β
,
N
,
aaaaaaaaaaaaaaaaaaaaaaaaaaaaa
∀
v
∈
V
N
,
where ω
α
,
-
β
(
x
)
=
(
1
-
x
)
α
x
-
β and (
u
,
v
)
ω
α
,
-
β
=
∫
I
u
v
ω
α
,
-
β
d
x is the inner product in the weighted space L
ω
α
,
-
β
2
(
I
). The norm in L
ω
α
,
-
β
2
(
I
) will be denoted by ∥
·
∥
ω
α
,
-
β. Let
(40)
u
N
(
x
)
=
∑
j
=
β
N
‍
a
j
J
j
α
,
-
β
(
x
)
,
a
=
(
a
2
,
a
3
,
…
,
a
N
)
T
,
f
k
=
(
f
,
J
k
α
,
-
β
(
x
)
)
ω
α
,
-
β
,
k
=
β
,
β
+
1
,
…
,
N
,
1111111111111111111
f
=
(
f
2
,
f
3
,
…
,
f
N
)
T
.
Then we can write (39) as follows:
(41)
∑
j
=
2
N
‍
a
j
[
(
D
ν
J
j
α
,
-
β
(
x
)
,
J
k
α
,
-
β
(
x
)
)
ω
α
,
-
β
+
∑
σ
=
1
r
-
1
‍
γ
σ
(
D
η
σ
J
j
α
,
-
β
(
x
)
,
J
k
α
,
-
β
(
x
)
)
ω
α
,
-
β
+
γ
r
(
J
j
α
,
-
β
(
x
)
,
J
k
α
,
-
β
(
x
)
)
ω
α
,
-
β
]
=
(
f
,
J
k
α
,
-
β
(
x
)
)
ω
α
,
-
β
,
N
,
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
k
=
β
,
β
+
1
,
…
,
N
.
Let us denote
(42)
A
=
(
a
k
j
)
β
≤
k
,
j
≤
N
,
B
η
σ
=
(
b
k
j
η
σ
)
β
≤
k
,
j
≤
N
,
C
=
(
c
k
j
)
β
≤
k
,
j
≤
N
,
a
k
j
=
(
D
ν
J
j
α
,
-
β
(
x
)
,
J
k
α
,
-
β
(
x
)
)
ω
α
,
-
β
,
111111111111
j
=
β
,
β
+
1
,
…
,
N
,
b
k
j
η
σ
=
(
D
η
σ
J
j
α
,
-
β
(
x
)
,
J
k
α
,
-
β
(
x
)
)
ω
α
,
-
β
,
11111111111
k
,
j
=
β
,
β
+
1
,
…
,
N
,
c
k
j
=
(
J
j
α
,
-
β
(
x
)
,
J
k
α
,
-
β
(
x
)
)
ω
α
,
-
β
,
111111
i
1
k
,
j
=
β
,
β
+
1
,
…
,
N
.By virtue of (31) and making use of the orthogonality relation of shifted generalized Jacobi polynomials (21), and after some rather lengthy calculation, we get
(43)
a
k
j
=
S
ν
(
j
,
k
,
α
,
β
)
k
k
-
β
α
,
β
,
11
k
,
j
=
β
,
β
+
1
,
…
,
N
,
b
k
j
η
σ
=
S
η
σ
(
j
,
k
,
α
,
β
)
k
k
-
β
α
,
β
,
1
i
1
k
,
j
=
β
,
β
+
1
,
…
,
N
,
c
k
j
=
k
k
-
β
α
,
β
,
k
,
j
=
β
,
β
+
1
,
…
,
N
.Thereby, we can write (41) in the following matrix system form
(44)
(
A
+
∑
σ
=
1
r
-
1
‍
γ
σ
B
σ
+
γ
r
C
)
a
=
f
.


### 4.1. Treatment of the Nonhomogeneous Initial Conditions

In the following we can always modify the right-hand side to take care of the nonhomogeneous initial conditions. Let us consider for instance the one-dimensional fractional differential equation (36) subject to the nonhomogeneous initial conditions:
(45)
u
(
j
)
(
0
)
=
b
j
,
j
=
0,1
,
…
,
m
-
1
.
In such a case we proceed as follows.Setting(46)
V
(
x
)
=
u
(
x
)
+
∑
i
=
0
m
-
1
‍
E
i
x
i
,
where
(47)
E
i
=
-
b
i
i
!
,
i
=
0,1
,
…
,
m
-
1
,
the transformation (46) turns the nonhomogeneous initial conditions (45) into the homogeneous initial conditions
(48)
V
(
j
)
(
0
)
=
0
,
j
=
0,1
,
…
,
m
-
1
.
Hence it suffices to solve the following modified multiterm fractional differential equation:
(49)
D
ν
V
(
x
)
+
∑
σ
=
1
r
-
1
‍
γ
σ
D
β
σ
V
(
x
)
+
γ
r
V
(
x
)
=
f
*
(
x
)
,
x
∈
I
,
subject to the homogeneous initial conditions (48), where V
(
x
) is given by (46), and
(50)
f
*
(
x
)
=
f
(
x
)
+
γ
r
∑
i
=
0
m
-
1
‍
E
i
x
i
+
∑
σ
=
1
r
-
1
‍
γ
σ
D
β
σ
(
∑
i
=
0
m
-
1
‍
E
i
x
i
)
.


## 4.1. Treatment of the Nonhomogeneous Initial Conditions

In the following we can always modify the right-hand side to take care of the nonhomogeneous initial conditions. Let us consider for instance the one-dimensional fractional differential equation (36) subject to the nonhomogeneous initial conditions:
(45)
u
(
j
)
(
0
)
=
b
j
,
j
=
0,1
,
…
,
m
-
1
.
In such a case we proceed as follows.Setting(46)
V
(
x
)
=
u
(
x
)
+
∑
i
=
0
m
-
1
‍
E
i
x
i
,
where
(47)
E
i
=
-
b
i
i
!
,
i
=
0,1
,
…
,
m
-
1
,
the transformation (46) turns the nonhomogeneous initial conditions (45) into the homogeneous initial conditions
(48)
V
(
j
)
(
0
)
=
0
,
j
=
0,1
,
…
,
m
-
1
.
Hence it suffices to solve the following modified multiterm fractional differential equation:
(49)
D
ν
V
(
x
)
+
∑
σ
=
1
r
-
1
‍
γ
σ
D
β
σ
V
(
x
)
+
γ
r
V
(
x
)
=
f
*
(
x
)
,
x
∈
I
,
subject to the homogeneous initial conditions (48), where V
(
x
) is given by (46), and
(50)
f
*
(
x
)
=
f
(
x
)
+
γ
r
∑
i
=
0
m
-
1
‍
E
i
x
i
+
∑
σ
=
1
r
-
1
‍
γ
σ
D
β
σ
(
∑
i
=
0
m
-
1
‍
E
i
x
i
)
.


## 5. Illustrative Examples

Several test examples are carried out in this section. The results obtained by the present methods reveal that the present method is very effective and convenient for linear FDEs.Example 1.
Consider the linear FDE equation with homogeneous initial conditions(51)
D
ν
u
(
x
)
+
5
D
(
11
/
3
)
u
(
x
)
+
3
D
(
11
/
5
)
u
(
x
)
-
4
D
(
11
/
7
)
u
(
x
)
-
6
D
(
11
/
13
)
u
(
x
)
=
f
(
x
)
,
5
<
ν
≤
6
,
u
(
j
)
(
0
)
=
0
,
j
=
0,1
,
…
,
5
,
whose exact solution is given by u
(
x
)
=
x
13.Table1 lists the maximum absolute errors, using the shifted generalized Jacobi Galerkin (SGJG) method with various choices of νandN. Accuracy and stability of the SGJG method for all choices of ν are achieved in this table.Table 1
Maximum absolute errors with various choices ofν and N, for Example 1.
N
ν
α
β
SGJG method
ν
SGJG method
ν
SGJG method
8
5.1
3
6
3.38
×
1
0
-
2
5.5
4.33
×
1
0
-
2
5.9
6.41
×
1
0
-
2
16
9.10
×
1
0
-
7
3.31
×
1
0
-
7
1.14
×
1
0
-
7
24
9.10
×
1
0
-
7
3.31
×
1
0
-
7
1.14
×
1
0
-
7Example 2.
Consider the equation(52)
D
2
u
(
x
)
-
2
D
u
(
x
)
+
D
(
1
/
2
)
u
(
x
)
+
u
(
x
)
=
f
(
x
)
,
x
∈
I
,
u
(
0
)
=
0
,
u
′
(
0
)
=
0
,
whose exact solution is given by u
(
x
)
=
x
7
-
x
2.In Table2, we present the maximum absolute errors, using SGJG method with various choices of νandN.Table 2
Maximum pointwise errors using SGJG method forN
=
8,12,16,20,24.
N
α
β
SGJG
α
β
SGJG
8
0
1
1.171
·
1
0
-
2
1
2
3.237
·
1
0
-
6
12
5.433
·
1
0
-
7
5.433
·
1
0
-
7
16
1.468
·
1
0
-
7
1.468
·
1
0
-
7
20
5.217
·
1
0
-
8
5.215
·
1
0
-
8
24
1.979
·
1
0
-
8
2.421
·
1
0
-
8Example 3.
Consider the equation(53)
D
2
u
(
x
)
-
2
D
u
(
x
)
+
3
D
(
1
/
2
)
u
(
x
)
+
u
(
x
)
=
f
(
x
)
,
x
∈
I
,
u
(
0
)
=
6
,
u
′
(
0
)
=
-
4
,
whose exact solution is given by u
(
x
)
=
x
5
-
4
x
+
6.In Table3, we present the maximum absolute errors, using SGJG method with various choices of νandN.Table 3
Maximum pointwise errors using SGJG method forN
=
8,16,24.
N
α
β
SGJG
α
β
SGJG
8
0
0
6.991
·
1
0
-
3
0
2
5.689
·
1
0
-
10
16
3.296
·
1
0
-
4
5.359
·
1
0
-
13
24
4.737
·
1
0
-
5
6.394
·
1
0
-
14
8
1
1
2.715
·
1
0
-
5
2
1
6.091
·
1
0
-
5
16
3.009
·
1
0
-
7
4.465
·
1
0
-
7
24
1.848
·
1
0
-
8
2.407
·
1
0
-
8Example 4.
Consider the equation(54)
D
2
u
(
x
)
+
D
(
1
/
2
)
u
(
x
)
+
u
(
x
)
=
f
(
x
)
,
x
∈
I
,
u
(
0
)
=
0
,
u
′
(
0
)
=
π
,
whose exact solution is given by u
(
x
)
=
sin
(
π
x
).In Table4, we exhibit maximum pointwise error using SGJG method with two choices of the shifted generalized Jacobi parameters α
,
β and N
=
8,12,16,20,24. We observe from this table that the suggested algorithm provides accurate and stable numerical results. This numerical experiment demonstrates the utility of the method.Table 4
Maximum pointwise errors using SGJG method forN
=
8,12,16,20,24.
N
α
β
SGJG
α
β
SGJG
8
0
2
2.871
·
1
0
-
7
1
3
5.740
·
1
0
-
7
12
1.170
·
1
0
-
8
1.757
·
1
0
-
8
16
1.873
·
1
0
-
9
2.757
·
1
0
-
9
20
4.397
·
1
0
-
10
6.469
·
1
0
-
9
24
3.004
·
1
0
-
10
9.909
·
1
0
-
10


## 6. Conclusion

We have derived a new formula expressing explicitly the Caputo fractional derivatives for any fractional-order of shifted generalized Jacobi polynomials of any degree in terms of shifted generalized Jacobi polynomials themselves. We have derived a Galerkin method, involving a specified class of the shifted generalized Jacobi polynomials, which permits us to numerically solve an important class of FDEs. Indeed, in Section5, we demonstrated that for all parameter shifted generalized Jacobi considered, the method results in rather small errors with relatively few modes are considered. Since the method is rather robust, it is likely that it may be applied to other types of FDEs. For instance, one- and two-dimensional time-dependent FDEs



---

*Source: 728736-2014-06-12.xml*