Theory and Modern Applications

# A space-time spectral method for the time fractional diffusion optimal control problems

## Abstract

In this paper, we study the Galerkin spectral approximation to an unconstrained convex distributed optimal control problem governed by the time fractional diffusion equation. We construct a suitable weak formulation, study its well-posedness, and design a Galerkin spectral method for its numerical solution. The contribution of the paper is twofold: a priori error estimate for the spectral approximation is derived; a conjugate gradient optimization algorithm is designed to efficiently solve the discrete optimization problem. In addition, some numerical experiments are carried out to confirm the efficiency of the proposed method. The obtained numerical results show that the convergence is exponential for smooth exact solutions.

## Introduction

Optimal control problems (OCPs) can be found in many scientific and engineering applications, and it has become a very active and successful research area in recent years. Considerable work has been done in the area of OCPs governed by integral order differential equations, the literature on this field is huge, and it is impossible to give even a very brief review here. Recently, fractional differential equations (FDEs) have gained considerable importance due to their application in various sciences, such as control theory [1, 2], viscoelastic materials [3, 4], anomalous diffusion , advection and dispersion of solutes in porous or fractured media , etc. . Therefore, the optimal control problem for the fractional-order system initiated a new research direction and has received increasing attention.

A general formulation and a solution scheme for the fractional optimal control problem (FOCP) were first proposed in , where the fractional variational principle and the Lagrange multiplier technique were used. Following this idea, Frederico and Torres [14, 15] formulated a Noether-type theorem in the general context and studied fractional conservation laws. Mophou  applied the classical control theory to a fractional diffusion equation, involving a Riemann-Liouville fractional time derivative. Dorville et al.  later extended the results of  to a boundary fractional optimal control. Also we refer the interested reader in FOCP to  for some recent work on the subject.

Recently, considerable efforts have been made in developing spectral methods for solving FDEs. For instance, a Legendre spectral approximation was proposed in  to solve the fractional diffusion equations. Bhrawy et al.  applied the shifted Legendre spectral collocation method to obtain the numerical solution of the space-time fractional Burger’s equation. A spectral collocation scheme based upon the generalized Laguerre polynomials was investigated in  to obtain a numerical solution of the fractional pantograph equation with variable coefficients on a semi-infinite domain. With the help of operational matrices of fractional derivatives for orthogonal polynomials, the Jacobi tau spectral method is also utilized in  to solve multi-term space-time fractional partial differential equations. On the other hand, there exist also limited but very promising efforts in developing spectral methods for solving FOCPs. In , a numerical direct method based on the Legendre orthonormal basis and operational matrix of Riemann-Liouville fractional integration were introduced to solve a general class of FOCP, and the convergence of the proposed method was also extensively discussed. Ye and Xu  proposed a Galerkin spectral method to solve the linear-quadratic FOCP associated to the time fractional diffusion equation with control constraints, and detailed error analysis was carried out. Doha et al.  derived an efficient numerical scheme based on the shifted orthonormal Jacobi polynomials to solve a general form of the FOCPs.

The main aim of this work is to derive a priori error estimates for spectral approximation to an unconstrained FOCP with general convex cost functional, and propose an efficient algorithm to solve the discrete control problem. As compared to the linear-quadratic FOCP considered by Ye and Xu , the presence of the general cost functional here leads to many additional difficulties, one of which is that the derivation of the optimality condition.

The rest of the paper is organized as follows. In the next section we formulate the optimal control problem under consideration and derive the optimality conditions. In Section 3, the space-time spectral discretization is presented. Thereafter, the main result on the error analysis for the considered optimal control problem is given in Section 4. In this section, error estimates for the error in the control, state, and adjoint variables are analyzed. In Section 5, we describe the overall algorithm and present some numerical examples to illustrate our results. Some concluding remarks are given at the end of this article.

## Fractional optimal control problem and optimization

Let $$\Lambda=(-1,1)$$, $$I=(0,T)$$, and $$\Omega=I\times\Lambda$$. We consider the following optimal control problem for the state variable u and the control variable q:

$$\min_{q} \bigl\{ g(u)+h(q) \bigr\} ,$$
(2.1)

where g and h are given convex functionals, u is governed by the time fractional diffusion equation as follows:

\begin{aligned}& {}_{0}\partial_{t}^{\alpha}u(x,t)- \partial_{x}^{2}u(x,t) =f(x,t)+q(x,t),\quad \forall(x,t)\in \Omega, \\& u(-1,t)=u(1,t) =0, \quad \forall t \in I, \\& u(x,0) =u_{0}(x), \quad \forall x \in\Lambda, \end{aligned}
(2.2)

with $${}_{0}\partial_{t}^{\alpha}$$ denoting the left-sided Caputo fractional derivative of order $$\alpha\in(0,1)$$, following , defined as

$${}_{0}\partial_{t}^{\alpha} u(x,t)=\frac{1}{\Gamma(1-\alpha)} \int_{0} ^{t} \partial_{\tau} u(x,\tau) \frac{ \mathrm{d} \tau}{(t-\tau)^{\alpha}}.$$
(2.3)

In order to define well the FOCP, we first introduce some notations that will be used to construct the weak problem of the time fractional diffusion equation (2.2). We use the symbol $$\mathcal{O}$$ to denote a domain which may stand for Λ, I or Ω. Let $$L^{2}(\mathcal{O})$$ be the space of measurable functions whose square is Lebesgue integrable in $$\mathcal{O}$$. The inner product and norm of $$L^{2}(\mathcal{O})$$ are defined by

$$(u,v)_{\mathcal{O}}:=\int_{\mathcal{O}} u v\, \mathrm{d} \mathcal{O}, \qquad \|u\|_{0,\mathcal{O}}:=(u,u)_{\mathcal{O}}^{\frac{1}{2}},\quad \forall u,v \in L^{2}(\mathcal{O}).$$

For a nonnegative real number s, we also use $$H^{s}(\mathcal{O})$$ and $$H_{0}^{s}(\mathcal{O})$$ to denote the usual Sobolev spaces, whose norms are denoted by $$\Vert \cdot \Vert _{s,\mathcal{O}}$$; see, e.g. .

Particularly, we will need to recall the definitions of some fractional Sobolev spaces introduced in . For a bounded domain I, the space

$${}^{l}H^{s}(I):= \bigl\{ v; \Vert v\Vert _{{}^{l}H^{s}(I)} < \infty \bigr\}$$

is endowed with the norm

$$\|v\|_{{}^{l}H^{s}(I)}:= \bigl(\|v\|^{2}_{0,I}+|v|^{2}_{{}^{l}H^{s}(I)} \bigr)^{\frac{1}{2}},\qquad |v|_{{}^{l}H^{s}(I)}:= \bigl\Vert {}_{0}^{R}\partial_{t}^{s} v\bigr\Vert _{0,I},$$

and the space

$${}^{r}H^{s}(I):= \bigl\{ v; \Vert v\Vert _{{}^{r}H^{s}(I)} < \infty \bigr\}$$

is endowed with the norm

$$\|v\|_{{}^{r}H^{s}(I)}:= \bigl(\Vert v\Vert ^{2}_{0,I}+|v|^{2}_{{}^{r}H^{s}(I)} \bigr)^{\frac{1}{2}},\qquad |v|_{{}^{r}H^{s}(I)}:= \bigl\Vert {}_{t}^{R}\partial_{T}^{s} v\bigr\Vert _{0,I},$$

where $${}_{0}^{R}\partial_{t}^{s} v$$ and $${}_{t}^{R}\partial_{T}^{s} v$$, respectively, denote the left and right Riemann-Liouville fractional derivative, whose definitions will be given later. It has been showed in  that the spaces $${}^{l}H^{s}(I)$$, $${}^{r} H^{s}(I)$$ and the usual Sobolev space $$H^{s}(I)$$ are equivalent for $$s\neq n-\frac{1}{2}$$.

For the Sobolev space X with norm $$\Vert \cdot \Vert _{X}$$, let

$$H^{s}(I;X):= \bigl\{ v | \bigl\Vert v(\cdot,t)\bigr\Vert _{X} \in H^{s}(I) \bigr\} , \quad s\geq0,$$

endowed with the norm

$$\Vert v\Vert _{H^{s} (I;X)}:=\bigl\Vert \bigl\Vert v({\cdot,t})\bigr\Vert _{X}\bigr\Vert _{s,I}=\bigl\Vert \bigl\Vert v({ \cdot,t})\bigr\Vert _{X}\bigr\Vert _{0,I}+\bigl\Vert {}^{R}_{0} \partial_{t}^{\alpha } \bigl(\bigl\Vert v({\cdot,t})\bigr\Vert _{X} \bigr)\bigr\Vert _{0,I}.$$

When X stands for $$H^{\mu}(\Lambda)$$ or $$H^{\mu}_{0}(\Lambda)$$, $$\mu\geq0$$, the norm of the space $$H^{s}(I;X)$$ will be denoted by $$\Vert \cdot \Vert _{\mu, s,\Omega}$$. Hereafter, in the cases where no confusion would arise, the domain symbols I, Λ, and Ω may be dropped from the notations.

We also need some definitions regarding fractional derivatives allowing us to formulate the FOCP. The right Caputo fractional derivative  is given by

$${}_{t}\partial_{T}^{\alpha} u(t)=- \frac{1}{\Gamma(1-\alpha)} \int_{t} ^{T} \frac{u'(\tau) }{(\tau-t)^{\alpha}}\, \mathrm{d} \tau, \quad 0< \alpha<1.$$
(2.4)

The left Riemann-Liouville fractional derivative is defined as

$${}^{R} _{0} \partial_{t}^{\alpha} u(t)=\frac{1}{\Gamma(1-\alpha)} \frac{\mathrm{d}}{ \mathrm {d}t}\int_{0} ^{t} \frac{ u(\tau)}{(t-\tau)^{\alpha}}\, \mathrm{d} \tau, \quad 0< \alpha<1,$$
(2.5)

and the right Riemann-Liouville fractional derivative is given by

$${}^{R} _{t} \partial_{T}^{\alpha} u(t)=-\frac{1}{\Gamma(1-\alpha)} \frac{\mathrm{d}}{ \mathrm{d}t}\int_{t}^{T} \frac{ u(\tau )}{(\tau-t)^{\alpha}} \, \mathrm{d} \tau,\quad 0< \alpha<1.$$
(2.6)

The definitions of the Riemann-Liouville and the Caputo fractional derivative are linked by the following relationship:

\begin{aligned}& {}^{R}_{0} \partial_{t}^{\alpha} v(t) = \frac{v(0)t^{-\alpha}}{\Gamma (1-\alpha)} + {}_{0}\partial_{t}^{\alpha}v(t), \end{aligned}
(2.7)
\begin{aligned}& {}^{R}_{t} \partial_{T}^{\alpha} v(t) = \frac{v(T)(T-t)^{-\alpha }}{\Gamma(1-\alpha)} + {}_{t}\partial_{T}^{\alpha}v(t). \end{aligned}
(2.8)

We employ the space introduced in 

$$B^{s}(\Omega)=H^{s}\bigl(I,L^{2}(\Lambda)\bigr) \cap L^{2}\bigl(I,H_{0}^{1}(\Lambda)\bigr)$$

equipped with the norm

$$\Vert v\Vert _{B^{s}(\Omega)}= \bigl(\Vert v \Vert _{H^{s}(I,L^{2}(\Lambda ))}^{2}+ \Vert v\Vert _{L^{2}(I,H_{0}^{1}(\Lambda))}^{2} \bigr)^{\frac{1}{2}}.$$

In this setting, the weak formulation of the state equation (2.2) reads : given $$q, f \in L^{2}(\Omega)$$, find $$u\in B^{\frac{\alpha}{2}}(\Omega)$$, such that

$$\mathcal {A}(u,v)=(f+q,v)_{\Omega}+ \biggl(\frac{u_{0}(x)t^{-\alpha}}{\Gamma (1-\alpha)},v \biggr)_{\Omega}, \quad \forall v \in B^{\frac{\alpha}{2}}(\Omega),$$
(2.9)

where the bilinear form $$\mathcal{A}(\cdot,\cdot)$$ is defined by

$$\mathcal{A}(u,v):= \bigl( {}_{0}^{R}\partial_{t}^{\frac{\alpha}{2}} u, {}^{R}_{t}\partial_{T}^{\frac{\alpha}{2}} v \bigr)_{\Omega}+(\partial_{x} u,\partial_{x} v)_{\Omega}.$$

It has been proved  that the problem (2.9) is well-posed.

We now define the cost functional as follows:

$$\mathcal{J}(q,u):=g(u)+h(q),$$
(2.10)

then the optimal control problem (2.1)-(2.2) reads: find $$(q^{\ast},u(q^{\ast})) \in L^{2}(\Omega) \times B^{\frac{\alpha }{2}}(\Omega)$$, such that

$$\mathcal{J}\bigl(q^{\ast},u\bigl(q^{\ast}\bigr)\bigr) =\min _{(q,u)\in L^{2}(\Omega) \times B^{\frac{\alpha}{2}}(\Omega)} \mathcal{J}(q,u)\quad \text{subject to (2.9)}.$$
(2.11)

We further assume that $$h(q)\rightarrow+\infty$$ as $$\Vert q\Vert _{0,\Omega}\rightarrow+\infty$$, and the functional $$g(\cdot)$$ is bounded below, then the optimal control problem (2.11) admits a unique solution $$(q^{\ast},u(q^{\ast})) \in L^{2}(\Omega) \times B^{\frac{\alpha }{2}}(\Omega)$$.

The well-posedness of the state problem ensures the existence of a control-to-state mapping $$q\mapsto u=u(q)$$ defined through (2.9). By means of this mapping we introduce the reduced cost functional $$J(q):=\mathcal{J}(q,u(q))$$, $$q\in L^{2}(\Omega)$$. Then the optimal control problem (2.11) is equivalent to: find $$q^{\ast}\in L^{2}(\Omega)$$, such that

$$J\bigl(q^{\ast}\bigr) = \min_{q\in L^{2}(\Omega)}J(q).$$
(2.12)

The first order necessary optimality condition for (2.12) takes the form

$$J'\bigl(q^{\ast}\bigr) (\delta q) =0, \quad \forall\delta q \in L^{2}(\Omega),$$
(2.13)

where $$J'(q^{\ast})(\delta q)$$ is usually called the gradient of $$J(q)$$, which is defined through the Gâteaux differential of $$J(q)$$ at $$q^{\ast}$$ along the direction δq.

### Lemma 2.1

We have

$$J'(q) (\delta q)=\bigl(h'(q) +z(q),\delta q \bigr)_{\Omega}, \quad \forall\delta q\in L^{2}(\Omega),$$
(2.14)

where $$z(q)=z$$ is the solution of the following adjoint state equation:

\begin{aligned}& {}_{t}\partial_{T}^{\alpha}z(x,t)- \partial_{x}^{2}z(x,t) = g'(u),\quad \forall(x,t)\in\Omega, \\& z(-1,t)=z(1,t) = 0, \quad \forall t \in I, \\& z(x,T) = 0, \quad \forall x \in\Lambda. \end{aligned}
(2.15)

### Proof

We first obtain by using the chain rule

\begin{aligned} J'(q) (\delta q) =& \bigl(g\bigl(u(q)\bigr)\bigr)'( \delta q)+h'(q) (\delta q) \\ =& \int_{\Omega}g'\bigl(u(q)\bigr)u'(q) (\delta q)\, \mathrm{d}x\, \mathrm {d}t+\int_{\Omega}h'(q) \delta q\, \mathrm{d}x\, \mathrm{d}t. \end{aligned}
(2.16)

We now compute $$u'(q)(\delta q)$$. For simplicity, let δu denote the derivative of $$u =u(q)$$ in the direction δq, that is,

$$\delta u (x,t):=u'(q) (\delta q)= \lim_{\varepsilon\rightarrow0} \frac{u(q+\varepsilon\delta q)-u(q)}{\varepsilon}.$$

Then it is readily seen that δu is the solution of the following problem:

$$\begin{cases} {}_{0}\partial_{t}^{\alpha}\delta u-\partial_{x}^{2}\delta u=\delta q, \quad \forall(x,t)\in\Omega, \\ \delta u(-1,t)=\delta u(1,t)=0, \quad \forall t \in I, \\ \delta u(x,0)=0 , \quad \forall x \in\Lambda. \end{cases}$$
(2.17)

To prove (2.14), we multiply each side of the first equation in (2.15) by δu, then integrate the resulted equation on the domain Ω to find

$$\int_{\Omega}g'(u)\delta u\, \mathrm{d}x\, \mathrm{d}t =\int_{\Omega} \bigl({}_{t} \partial_{T}^{\alpha}z-\partial_{x}^{2} z \bigr)\delta u\, \mathrm{d}x\, \mathrm{d}t.$$
(2.18)

On one side, taking into account the boundary conditions in (2.17) and (2.15), we have

$$\int_{\Omega}\partial_{x}^{2} z\delta u\, \mathrm{d}x\, \mathrm{d}t =\int_{\Omega}z\partial_{x}^{2} \delta u\, \mathrm{d}x\, \mathrm{d}t.$$
(2.19)

On the other side, by means of (2.7), (2.8), the terminal condition in (2.15), the initial condition in (2.17), and the fractional integration by parts demonstrated in , we have

\begin{aligned} \int_{\Omega} { {}_{t} \partial_{T}^{\alpha}z}\delta u\,\mathrm{d}x\,\mathrm{d}t =&\int _{\Omega} \biggl({}^{R}_{t} \partial_{T}^{\alpha}z-\frac {z(x,T)(T-t)^{-\alpha}}{\Gamma (1-\alpha)} \biggr)\delta u\, \mathrm{d}x\,\mathrm{d}t \\ =&\int_{\Omega} {}^{R}_{t} \partial_{T}^{\alpha}z \delta u\,\mathrm{d}x\,\mathrm{d}t =\int _{\Omega}z {{}^{R}_{0}\partial_{t}^{\alpha} \delta u}\,\mathrm{d}x\,\mathrm{d}t \\ =&\int_{\Omega}z {{}_{0}\partial_{t}^{\alpha} \delta u}\, \mathrm {d}x\,\mathrm{d}t +\int_{\Omega} \frac{z\delta u(x,0)}{\Gamma(1-\alpha)t^{\alpha }}\,\mathrm{d}x\,\mathrm{d}t \\ =&\int_{\Omega}z {{}_{0}\partial_{t}^{\alpha} \delta u}\, \mathrm {d}x\,\mathrm{d}t. \end{aligned}
(2.20)

Finally, combining (2.17), (2.18), (2.19), and (2.20), we obtain

\begin{aligned} \int_{\Omega}g'(u)\delta u\, \mathrm{d}x\, \mathrm{d}t &=\int_{\Omega} \bigl({}_{0} \partial_{t}^{\alpha}\delta u-\partial _{x}^{2} \delta u \bigr)z\, \mathrm{d}x\, \mathrm{d}t \\ &=\int_{\Omega}\delta q z\, \mathrm{d}x\, \mathrm{d}t. \end{aligned}
(2.21)

This, together with (2.16), leads to (2.14). □

The weak form of (2.15) reads: find $$z\in B^{\frac{\alpha}{2}}(\Omega)$$, such that

$$\mathcal{A}(\varphi,z)=\bigl(g'(u),\varphi\bigr)_{\Omega}, \quad \forall \varphi\in B^{\frac{\alpha}{2}}(\Omega).$$
(2.22)

Following the same idea as for the problem (2.9), it can be proved that (2.22) admits a unique solution $$z\in B^{\frac{\alpha }{2}}(\Omega)$$ for any given $$u\in B^{\frac{\alpha}{2}}(\Omega)$$.

In what follows we will need the mapping $$q\rightarrow u(q) \rightarrow z(q)$$, where for any given q, $$u(q)$$ is defined by (2.9), and once $$u(q)$$ is known $$z(q)$$ is defined by (2.22).

## Space-time spectral discretization

In this section we investigate a space-time spectral approximation to the optimization problem (2.12).

We first define the polynomial space

$$P_{M}^{0}(\Lambda):=P_{M}(\Lambda)\cap H_{0}^{1} (\Lambda),\qquad S_{L}:=P_{M}^{0}( \Lambda ) \otimes P_{N}(I),$$

where $$P_{M}$$ denotes the space of all polynomials of degree less than or equal to M, L stands for the parameter pair $$(M,N)$$.

We then define the discrete cost functional, which is an approximation to the reduced cost functional J, as follows:

$$J_{L}(q_{L}):=g(u_{L})+h(q_{L}), \quad \forall q_{L}\in P_{M}(\Lambda) \otimes P_{N}(I),$$
(3.1)

where $$u_{L}=u_{L}(q_{L})\in S_{L}$$ is the solution of the following problem:

$$\mathcal{A}(u_{L},v_{L})=(f+q_{L},v_{L})_{\Omega}+ \biggl(\frac {u_{0}(x)t^{-\alpha}}{\Gamma (1-\alpha)},v_{L} \biggr)_{\Omega},\quad \forall v_{L} \in S_{L}.$$
(3.2)

We propose the following space-time spectral approximation to the optimization problem (2.12): find $$q_{L}^{\ast}\in P_{M}(\Lambda) \otimes P_{N}(I)$$ such that

$$J_{L}\bigl(q_{L}^{\ast}\bigr)=\min _{q_{L}\in P_{M}(\Lambda) \otimes P_{N}(I)} J_{L}(q_{L}).$$
(3.3)

It can be proved that the discrete optimization problem (3.3) admits a unique solution $$q_{L}^{\ast}\in P_{M}(\Lambda) \otimes P_{N}(I)$$, which fulfills the first order optimality condition:

$$J_{L}'\bigl(q_{L}^{\ast}\bigr) ( \delta q)=0, \quad \forall\delta q \in P_{M}(\Lambda) \otimes P_{N}(I),$$
(3.4)

where

$$J'_{L} (q_{L}) (\delta q) = \bigl(h'(q_{L})+z_{L},\delta q \bigr)_{\Omega}$$
(3.5)

with $$z_{L}=z_{L}(q_{L})\in S_{L}$$, the solution of the discrete adjoint state equation:

$$\mathcal{A}(\varphi_{L},z_{L})=\bigl(g'(u_{L}), \varphi_{L}\bigr)_{\Omega}, \quad \forall\varphi_{L} \in S_{L} .$$
(3.6)

## A priori error estimation

We now carry out an error analysis for the spectral approximation (3.3). To simplify the notations, we let c be a generic positive constant independent of any functions and of any discretization parameters. We use the expression $$A\lesssim B$$ to mean that $$A\leq cB$$.

We now introduce the auxiliary problem:

\begin{aligned}& \mathcal{A}\bigl(u_{L}(q),v_{L}\bigr) =(f+q,v_{L})_{\Omega}+ \biggl(\frac {u_{0}(x)t^{-\alpha}}{\Gamma (1-\alpha)},v_{L} \biggr)_{\Omega}, \quad \forall v_{L} \in S_{L}, \end{aligned}
(4.1)
\begin{aligned}& \mathcal{A}\bigl(\varphi_{L},z_{L}(q)\bigr) = \bigl(g'\bigl(u_{L}(q)\bigr),\varphi_{L} \bigr)_{\Omega}, \quad \forall\varphi_{L} \in S_{L}, \end{aligned}
(4.2)

where $$q\in L^{2}(\Omega)$$ and $$u_{L}(q),z_{L}(q)\in S_{L}$$. Let

$$J_{L}(q)=g\bigl(u_{L}(q)\bigr)+h(q),\quad \forall q\in L^{2}(\Omega),$$
(4.3)

then it can be verified by a direct calculation that

$$J_{L}'(q) (\delta q)= \bigl(h'(q)+z_{L}(q), \delta q \bigr)_{\Omega}, \quad \delta q\in L^{2}(\Omega).$$
(4.4)

Following , the error between the solution of (2.9) and the solution of (4.1) can be estimated as follows.

### Lemma 4.1

For any $$q\in L^{2}(\Omega)$$, let $$u(q)$$ be the solution of (2.9), $$u_{L}(q)$$ be the solution of (4.1). Suppose $$u \in H^{\frac{\alpha}{2}}(I;H^{\mu}(\Lambda)) \cap H^{\nu }(I;H_{0}^{1}(\Lambda))$$, $$0 < \alpha< 1$$, $$\nu> 1$$, $$\mu\geq1$$, then we have

\begin{aligned} \bigl\Vert u(q)-u_{L}(q)\bigr\Vert _{B^{\frac{\alpha}{2}}(\Omega)} \lesssim& N^{\frac{\alpha}{2}-\nu} \Vert u\Vert _{0,\nu}+N^{-\nu } \Vert u\Vert _{1,\nu} +N^{\frac{\alpha}{2}-\nu}M^{-\mu} \Vert u\Vert _{\mu ,\nu} \\ &{} +M^{-\mu} \Vert u\Vert _{\mu,\frac{\alpha }{2}}+M^{1-\mu} \Vert u\Vert _{\mu,0}. \end{aligned}
(4.5)

We are now in a position to analyze the approximation error of the proposed space-time spectral method. The proof of the main result will be accomplished with a series of lemmas which we present below.

### Lemma 4.2

If $$g(\cdot)$$ is convex and $$h(\cdot)$$ is uniformly convex, that is, there exists a constant c such that

$$\bigl(h'(p)-h'(q),p-q\bigr)_{\Omega}\geq c \Vert p-q\Vert _{0,\Omega }^{2}, \quad \forall p,q \in L^{2}(\Omega).$$

Then, for all $$p,q \in L^{2}(\Omega)$$, we have

$$J_{L}'(p) (p-q)-J_{L}'(q) (p-q)\geq c \Vert p-q\Vert _{0,\Omega}^{2}.$$
(4.6)

### Proof

Note that

\begin{aligned} J_{L}'(p) (p-q)-J_{L}'(q) (p-q) =&\bigl(z_{L}(p)+h'(p),p-q\bigr)_{\Omega }- \bigl(z_{L}(q)+h'(q),p-q\bigr)_{\Omega} \\ =&\bigl(z_{L}(p)-z_{L}(q),p-q\bigr)_{\Omega}+ \bigl(h'(p)-h'(q),p-q\bigr)_{\Omega}. \end{aligned}
(4.7)

Moreover, it follows from (4.1) and (4.2) that

\begin{aligned} \bigl(z_{L}(p)-z_{L}(q),p-q\bigr)_{\Omega} =& \mathcal {A}\bigl(u_{L}(p)-u_{L}(q),z_{L}(p)-z_{L}(q) \bigr) \\ =&\bigl(g'\bigl(u_{L}(p)\bigr)-g' \bigl(u_{L}(q)\bigr),u_{L}(p)-u_{L}(q) \bigr)_{\Omega}. \end{aligned}
(4.8)

Noting that $$g(\cdot)$$ is convex, and $$h(\cdot)$$ is uniformly convex, (4.7) and (4.8) imply that

$$J_{L}'(p) (p-q)-J_{L}'(q) (p-q)\geq\bigl(h'(p)-h'(q),p-q\bigr)_{\Omega} \geq c \Vert p-q\Vert _{0,\Omega}^{2}.$$

This proves (4.6). □

### Lemma 4.3

Let $$q^{\ast}$$ be the solution of the continuous optimization problem (2.12), $$q_{L}^{\ast}$$ be the solution of the discrete optimization problem (3.3). Assume that $$h(\cdot)$$ and $$g(\cdot)$$ are Lipschitz continuous with Lipschitz constants $$L_{1}$$ and $$L_{2}$$, respectively. Moreover, suppose $$q^{\ast} \in L^{2}(I;H^{\mu}(\Lambda)) \cap H^{\nu}(I;L^{2}(\Lambda))$$, $$\nu>1$$, $$\mu\geq1$$, then we have

$$\bigl\Vert q^{\ast}-q_{L}^{\ast}\bigr\Vert _{0,\Omega} \lesssim N^{-\nu}\bigl\Vert q^{\ast}\bigr\Vert _{0,\nu}+M^{-\mu} \bigl\Vert q^{\ast}\bigr\Vert _{\mu ,0}+\bigl\Vert z_{L}\bigl(q^{\ast}\bigr)-z \bigl(q^{\ast}\bigr)\bigr\Vert _{0,\Omega}.$$
(4.9)

### Proof

To obtain the asserted result, we split the error to be estimated in the following way:

$$\bigl\Vert q^{\ast}-q^{\ast}_{L}\bigr\Vert _{0,\Omega} \leq \bigl\Vert q^{\ast}-p_{L}\bigr\Vert _{0,\Omega} +\bigl\Vert p_{L}-q^{\ast}_{L} \bigr\Vert _{0,\Omega}, \quad \forall p_{L}\in P_{M}( \Lambda) \otimes P_{N}(I).$$
(4.10)

First it follows from Lemma 4.2 that

$$c \bigl\Vert p_{L}-q_{L}^{\ast}\bigr\Vert _{0,\Omega}^{2} \leq J_{L}'(p_{L}) \bigl(p_{L}-q_{L}^{\ast}\bigr)-J_{L}' \bigl(q_{L}^{\ast}\bigr) \bigl(p_{L}-q_{L}^{\ast} \bigr), \quad \forall p_{L}\in P_{M}(\Lambda) \otimes P_{N}(I).$$
(4.11)

In virtue of (2.13) and (3.4), we have

$$J_{L}'\bigl(q_{L}^{\ast}\bigr) \bigl(p_{L}-q_{L}^{\ast}\bigr)=J' \bigl(q^{\ast}\bigr) \bigl(p_{L}-q_{L}^{\ast } \bigr)=0, \quad \forall p_{L}\in P_{M}(\Lambda) \otimes P_{N}(I).$$

Combining these equalities with (2.14), (3.5), and (4.4), we obtain

\begin{aligned}& c\bigl\Vert p_{L}-q_{L}^{\ast}\bigr\Vert _{0,\Omega}^{2} \\& \quad \leq J_{L}'(p_{L}) \bigl(p_{L}-q_{L}^{\ast}\bigr)-J' \bigl(q^{\ast}\bigr) \bigl(p_{L}-q_{L}^{\ast} \bigr) \\& \quad = J_{L}'(p_{L}) \bigl(p_{L}-q_{L}^{\ast} \bigr)-J_{L}'\bigl(q^{\ast}\bigr) \bigl(p_{L}-q_{L}^{\ast }\bigr)+J_{L}' \bigl(q^{\ast}\bigr) \bigl(p_{L}-q_{L}^{\ast} \bigr)-J'\bigl(q^{\ast}\bigr) \bigl(p_{L}-q_{L}^{\ast} \bigr) \\& \quad = \bigl(h'(p_{L})-h' \bigl(q^{\ast}\bigr),p_{L}-q_{L}^{\ast} \bigr)_{\Omega}+\bigl( z_{L}(p_{L})-z_{L} \bigl(q^{\ast}\bigr),p_{L}-q_{L}^{\ast} \bigr)_{\Omega} \\& \qquad {} +\bigl(z_{L}\bigl(q^{\ast}\bigr)-z \bigl(q^{\ast}\bigr),p_{L}-q_{L}^{\ast} \bigr)_{\Omega} \\& \quad \leq \bigl\Vert h'(p_{L})-h' \bigl(q^{\ast}\bigr)\bigr\Vert _{0,\Omega} \bigl\Vert p_{L}-q_{L}^{\ast }\bigr\Vert _{0,\Omega} + \bigl\Vert z_{L}(p_{L})-z_{L} \bigl(q^{\ast}\bigr)\bigr\Vert _{0,\Omega} \bigl\Vert p_{L}-q_{L}^{\ast }\bigr\Vert _{0,\Omega} \\& \qquad {} +\bigl\Vert z_{L}\bigl(q^{\ast}\bigr)-z \bigl(q^{\ast}\bigr)\bigr\Vert _{0,\Omega }\bigl\Vert p_{L}-q_{L}^{\ast}\bigr\Vert _{0,\Omega} \\& \quad \leq L_{1}\bigl\Vert p_{L}-q^{\ast}\bigr\Vert _{0,\Omega} \bigl\Vert p_{L}-q_{L}^{\ast } \bigr\Vert _{0,\Omega} +\bigl\Vert z_{L}(p_{L})-z_{L} \bigl(q^{\ast}\bigr)\bigr\Vert _{0,\Omega} \bigl\Vert p_{L}-q_{L}^{\ast }\bigr\Vert _{0,\Omega} \\& \qquad {}+\bigl\Vert z_{L}\bigl(q^{\ast}\bigr)-z \bigl(q^{\ast}\bigr)\bigr\Vert _{0,\Omega }\bigl\Vert p_{L}-q_{L}^{\ast}\bigr\Vert _{0,\Omega}. \end{aligned}

By simplifying both sides, we obtain

$$c\bigl\Vert p_{L}-q_{L}^{\ast}\bigr\Vert _{0,\Omega} \leq L_{1} \bigl\Vert p_{L}-q^{\ast} \bigr\Vert _{0,\Omega} +\bigl\Vert z_{L}(p_{L})-z_{L} \bigl(q^{\ast}\bigr)\bigr\Vert _{0,\Omega} +\bigl\Vert z_{L}\bigl(q^{\ast}\bigr)-z\bigl(q^{\ast}\bigr)\bigr\Vert _{0,\Omega}.$$
(4.12)

Note that $$z_{L}(p_{L})-z_{L}(q^{\ast})$$ solves

$$\mathcal{A}\bigl(\varphi_{L},z_{L}(p_{L})-z_{L} \bigl(q^{\ast }\bigr)\bigr)=\bigl(g'\bigl(u_{L}(p_{L}) \bigr)-g'\bigl(u_{L}\bigl(q^{\ast}\bigr)\bigr), \varphi_{L}\bigr)_{\Omega},\quad \forall\varphi_{L} \in S_{L},$$
(4.13)

and $$u_{L}(p_{L})-u_{L}(q^{\ast})$$ satisfies

$$\mathcal{A}\bigl(u_{L}(p_{L})-u_{L} \bigl(q^{\ast}\bigr),v_{L}\bigr)=\bigl(p_{L}-q^{\ast},v_{L} \bigr)_{\Omega }, \quad \forall v_{L} \in S_{L}.$$
(4.14)

On the other hand, the bilinear form $$\mathcal{A}(\cdot,\cdot)$$ satisfies the following continuity and coercivity :

$$\mathcal{A}(u,v)\lesssim \Vert u\Vert _{B^{\frac{\alpha }{2}}(\Omega)} \Vert v\Vert _{B^{\frac{\alpha}{2}}(\Omega)}, \qquad \mathcal {A}(v,v)\gtrsim \Vert v\Vert ^{2}_{B^{\frac{\alpha }{2}}(\Omega)}, \quad \forall u,v \in B^{\frac{\alpha}{2}}(\Omega).$$

Thus, taking $$v_{L}=u_{L}(p_{L})-u_{L}(q^{\ast})$$ in (4.14) gives

$$\bigl\Vert u_{L}(p_{L})-u_{L} \bigl(q^{\ast}\bigr)\bigr\Vert _{B^{\frac{\alpha }{2}}(\Omega )}\lesssim \bigl\Vert p_{L}-q^{\ast}\bigr\Vert _{0,\Omega}.$$
(4.15)

Similarly, taking $$\varphi_{L}=z_{L}(p_{L})-z_{L}(q^{\ast})$$ in (4.13) gives

$$\bigl\Vert z_{L}(p_{L})-z_{L} \bigl(q^{\ast}\bigr)\bigr\Vert _{B^{\frac{\alpha }{2}}(\Omega)} \lesssim \bigl\Vert g'\bigl(u_{L}(p_{L})\bigr)-g' \bigl(u_{L}\bigl(q^{\ast}\bigr)\bigr)\bigr\Vert _{0,\Omega} \lesssim \bigl\Vert u_{L}(p_{L})-u_{L} \bigl(q^{\ast}\bigr)\bigr\Vert _{B^{\frac{\alpha }{2}}(\Omega)}.$$

Putting (4.15) into the above inequality, we obtain

$$\bigl\Vert z_{L}(p_{L})-z_{L} \bigl(q^{\ast}\bigr)\bigr\Vert _{B^{\frac{\alpha }{2}}(\Omega)} \lesssim \bigl\Vert p_{L}-q^{\ast}\bigr\Vert _{0,\Omega}.$$
(4.16)

Then combining (4.12) and (4.16), we get

$$c\bigl\Vert p_{L}-q_{L}^{\ast}\bigr\Vert _{0,\Omega} \leq (C+L_{1})\bigl\Vert p_{L}-q^{\ast} \bigr\Vert _{0,\Omega} +\bigl\Vert z_{L}\bigl(q^{\ast} \bigr)-z\bigl(q^{\ast}\bigr)\bigr\Vert _{0,\Omega}.$$
(4.17)

Plugging (4.17) into (4.10) yields

$$\bigl\Vert q^{\ast}-q^{\ast}_{L}\bigr\Vert _{0,\Omega} \lesssim \bigl\Vert q^{\ast}-p_{L}\bigr\Vert _{0,\Omega}+\bigl\Vert z_{L}\bigl(q^{\ast} \bigr)-z\bigl(q^{\ast }\bigr)\bigr\Vert _{0,\Omega}.$$
(4.18)

Since the above estimate is true for all $$p_{L}\in P_{M}(\Lambda) \otimes P_{N}(I)$$, we take $$p_{L}=\Pi_{M}\Pi_{N} q^{\ast}$$ in (4.18), with $$\Pi_{M}$$ and $$\Pi_{N}$$ standing for the standard $$L^{2}$$-orthogonal projectors, respectively, defined in Λ and I, to obtain

$$\bigl\Vert q^{\ast}-q^{\ast}_{L}\bigr\Vert _{0,\Omega} \lesssim N^{-\nu}\bigl\Vert q^{\ast}\bigr\Vert _{0,\nu}+M^{-\mu} \bigl\Vert q^{\ast}\bigr\Vert _{\mu ,0}+\bigl\Vert z_{L}\bigl(q^{\ast}\bigr)-z \bigl(q^{\ast}\bigr)\bigr\Vert _{0,\Omega}.$$

□

### Lemma 4.4

Let $$z=z(q) \in B^{\frac{\alpha}{2}}(\Omega)$$ be the solution of the continuous adjoint state problem (2.22), $$z_{L}(q)$$ be the solution of its approximation problem (4.2). Assume that $$g(\cdot)$$ is Lipschitz continuous, then we have

$$\bigl\Vert z(q)-z_{L}(q)\bigr\Vert _{B^{\frac{\alpha}{2}}(\Omega )}\lesssim \bigl\Vert u(q)-u_{L}(q)\bigr\Vert _{0,\Omega}+\inf _{\forall\varphi _{L} \in S_{L}} \Vert z-\varphi_{L}\Vert _{B^{\frac{\alpha}{2}}(\Omega)},$$
(4.19)

where $$u(q)$$ and $$u_{L}(q)$$ are, respectively, the solutions of (2.9) and (4.1).

### Proof

The proof goes along the same lines as Lemma 4.5 in . □

Using the above lemmas and following the same lines as the proof of Theorem 4.1 in , we obtain the main result concerning the approximation errors.

### Theorem 4.1

Suppose $$q^{\ast}$$ and $$q_{L}^{\ast}$$ are, respectively, the solutions of the continuous optimization problem (2.12) and its discrete counterpart (3.3), $$u(q^{\ast})$$ and $$u_{L}(q^{\ast}_{L})$$ are the state solutions of (2.9) and (3.2) associated to $$q^{\ast}$$ and $$q_{L}^{\ast}$$, respectively, $$z(q^{\ast})$$ and $$z_{L}(q^{\ast}_{L})$$ are the associated solutions of (2.22) and (3.6), respectively. Suppose, moreover, $$h(\cdot)$$ and $$g(\cdot)$$ are Lipschitz continuous. If $$q^{\ast} \in L^{2}(I;H^{\mu}(\Lambda)) \cap H^{\nu}(I;L^{2}(\Lambda))$$ and $$u(q^{\ast}),z(q^{\ast}) \in H^{\frac{\alpha}{2}}(I;H^{\mu}(\Lambda)) \cap H^{\nu}(I;H_{0}^{1} (\Lambda))$$, $$0 < \alpha< 1$$, $$\nu> 1$$, $$\mu\geq1$$, then the following estimate holds:

\begin{aligned}& \bigl\Vert q^{\ast}-q^{\ast}_{L}\bigr\Vert _{0,\Omega}+ \bigl\Vert u\bigl(q^{\ast}\bigr)-u_{L} \bigl(q^{\ast}_{L}\bigr)\bigr\Vert _{B^{\frac{\alpha}{2}}(\Omega)}+\bigl\Vert z\bigl(q^{\ast}\bigr)-z_{L}\bigl(q^{\ast }_{L} \bigr)\bigr\Vert _{B^{\frac{\alpha}{2}}(\Omega)} \\& \quad \lesssim N^{-\nu}\bigl\Vert q^{\ast}\bigr\Vert _{0,\nu}+M^{-\mu} \bigl\Vert q^{\ast}\bigr\Vert _{\mu,0} +N^{\frac{\alpha}{2}-\nu}\bigl(\bigl\Vert u\bigl(q^{\ast}\bigr) \bigr\Vert _{0,\nu} +\bigl\Vert z\bigl(q^{\ast}\bigr)\bigr\Vert _{0,\nu}\bigr) \\& \qquad {}+N^{-\nu}\bigl(\bigl\Vert u\bigl(q^{\ast}\bigr)\bigr\Vert _{1,\nu}+\bigl\Vert z\bigl(q^{\ast}\bigr)\bigr\Vert _{1,\nu}\bigr) +N^{\frac{\alpha}{2}-\nu}M^{-\mu}\bigl(\bigl\Vert u \bigl(q^{\ast}\bigr) \bigr\Vert _{\mu,\nu }+\bigl\Vert z \bigl(q^{\ast}\bigr)\bigr\Vert _{\mu,\nu}\bigr) \\& \qquad {} +M^{-\mu}\bigl(\bigl\Vert u\bigl(q^{\ast}\bigr)\bigr\Vert _{\mu,\frac{\alpha}{2}} +\bigl\Vert z\bigl(q^{\ast}\bigr)\bigr\Vert _{\mu,\frac{\alpha}{2}}\bigr) +M^{1-\mu}\bigl(\bigl\Vert u\bigl(q^{\ast} \bigr)\bigr\Vert _{\mu,0}+\bigl\Vert z\bigl(q^{\ast}\bigr)\bigr\Vert _{\mu,0} \bigr). \end{aligned}
(4.20)

## Conjugate gradient optimization algorithm and numerical results

We carry out in this section a series of numerical experiments to numerically verify the a priori error estimates we obtained in the previous sections. We will focus on the linear-quadratic optimal control problem. Precisely, we consider the quadratic cost functional $$J(q)$$ with

$$g(u)=\frac{1}{2}\int_{\Omega}(u-\bar{u})^{2}\, \mathrm{d}x\, \mathrm{d}t,\qquad h(q)=\frac{1}{2}\int_{\Omega}q^{2} \, \mathrm{d}x\, \mathrm{d}t,$$

where $$\bar{u}$$ is a given observation data. Then we have

$$J'(q) (\delta q)=\bigl(q +z(q),\delta q\bigr)_{\Omega}, \quad \forall\delta q\in L^{2}(\Omega).$$

In the following, we propose a conjugate gradient algorithm for the associated linear-quadratic optimization problem. The details are described below.

Given an initial control $$q_{L}^{(0)}$$, the corresponding state $$u_{L} (q_{L}^{(0)} )$$ is given by the solution of the state equation in (3.2). To apply the stopping criterion $$\Vert {J_{L}' (q_{L}^{(0)} )}\Vert \leq\varepsilon$$, with ε being a pre-defined tolerance, we need information on the adjoint state $$z_{L} (q_{L}^{(0)} )$$, which is obtained from the adjoint state equation (3.6) for given $$u_{L} (q_{L}^{(0)} )$$ and $$q_{L}^{(0)}$$. Then the descent direction, that is, the gradient of the objective functional at $$q_{L}^{(0)}$$ is calculated through

$$d_{L}^{(0)}:=J_{L}' \bigl(q_{L}^{(0)} \bigr)=z_{L} \bigl(q_{L}^{(0)} \bigr)+h'\bigl(q_{L}^{(0)} \bigr)=z_{L} \bigl(q_{L}^{(0)} \bigr)+q_{L}^{(0)}.$$

We simultaneously let the first conjugate direction be the gradient direction, namely

$$s_{L}^{(0)}=d_{L}^{(0)}.$$

Then, assuming known $$q_{L}^{(k)}$$, $$d_{L}^{(k)}$$, and $$s_{L}^{(k)}$$ at the current (kth) iteration, we update $$q_{L}^{(k)}$$ via

$$q_{L}^{(k+1)}=q_{L}^{(k)}- \rho_{k} s_{L}^{(k)},$$

where $$\rho_{k}$$ is the iteration step size, determined in such a way that

$$J_{L} \bigl(q_{L}^{(k)}-\rho_{k} d_{L}^{(k)} \bigr)=\min_{\rho>0} J_{L} \bigl(q_{L}^{(k)}-\rho d_{L}^{(k)} \bigr).$$

Due to $$(d_{L}^{(k+1)},s_{L}^{(k)})_{\Omega}=0$$ and

$$d_{L}^{(k+1)}=z_{L} \bigl(q_{L}^{(k+1)} \bigr)+ q_{L}^{(k+1)}=z_{L} \bigl(q_{L}^{(k+1)} \bigr)+ \bigl(q_{L}^{(k)}-\rho_{k} s_{L}^{(k)} \bigr),$$

$$\rho_{k}$$ is characterized as

$$\bigl(z_{L} \bigl(q_{L}^{(k+1)} \bigr)+ \bigl(q_{L}^{(k)}-\rho_{k} s_{L}^{(k)} \bigr),s_{L}^{(k)} \bigr)_{\Omega}=0,$$
(5.1)

where $$z_{L} (q_{L}^{(k+1)} )$$ is the solution of

$$\mathcal{A}\bigl(\varphi_{L},z_{L} \bigl(q_{L}^{(k+1)} \bigr)\bigr)=\bigl(u_{L}^{(k+1)}-\bar {u},\varphi_{L} \bigr)_{\Omega}, \quad \forall\varphi_{L} \in S_{L} ,$$
(5.2)

with $$u_{L}^{(k+1)}\in S_{L}$$ given by

$$\mathcal{A}\bigl(u_{L}^{(k+1)},v_{L}\bigr) = \bigl(f+q_{L}^{(k)}-\rho_{k} s_{L}^{(k)},v_{L} \bigr)_{\Omega}+ \biggl(\frac{u_{0}(x)t^{-\alpha}}{\Gamma (1-\alpha)},v_{L} \biggr)_{\Omega}, \quad \forall v_{L} \in S_{L}.$$
(5.3)

The optimal iteration step size $$\rho_{k}$$ can be efficiently calculated through solving (5.1). Indeed we first notice there exists an explicit expression of $$z_{L} (q_{L}^{(k+1)} )$$ on $$\rho_{k}$$. Let $$\tilde{u}_{L}^{(k)}$$ and $$\tilde{z}_{L}^{(k)}$$ denote, respectively, the solutions of

\begin{aligned}& \mathcal{A}\bigl(\tilde {u}_{L}^{(k)},v_{L}\bigr) =\bigl(s_{L}^{(k)},v_{L}\bigr)_{\Omega}, \quad \forall v_{L} \in S_{L}, \end{aligned}
(5.4)
\begin{aligned}& \mathcal{A}\bigl(\varphi_{L},\tilde{z}_{L}^{(k)} \bigr) =\bigl(\tilde {u}_{L}^{(k)},\varphi_{L} \bigr)_{\Omega},\quad \forall\varphi_{L} \in S_{L}, \end{aligned}
(5.5)

$$u_{L} (q_{L}^{(k)} )$$ and $$z_{L} (q_{L}^{(k)} )$$ are, respectively, the solutions of

\begin{aligned}& \mathcal{A}\bigl(u_{L} \bigl(q_{L}^{(k)} \bigr),v_{L}\bigr) =\bigl(f+q_{L}^{(k)},v_{L} \bigr)_{\Omega}+ \biggl(\frac{u_{0}(x)t^{-\alpha}}{\Gamma (1-\alpha)},v_{L} \biggr)_{\Omega}, \quad \forall v_{L} \in S_{L}, \end{aligned}
(5.6)
\begin{aligned}& \mathcal{A}\bigl(\varphi_{L},z_{L} \bigl(q_{L}^{(k)} \bigr)\bigr) =\bigl(u_{L} \bigl(q_{L}^{(k)} \bigr)-\bar{u},\varphi_{L}\bigr)_{\Omega}, \quad \forall \varphi_{L} \in S_{L} , \end{aligned}
(5.7)

then it can be checked that $$z_{L} (q_{L}^{(k)} )-\rho_{k} \tilde {z}_{L}^{(k)}$$ solves (5.2)-(5.3), that is,

$$z_{L} \bigl(q_{L}^{(k+1)} \bigr)=z_{L} \bigl(q_{L}^{(k)} \bigr)-\rho_{k} \tilde{z}_{L}^{(k)}.$$

Putting this expression into (5.1) gives

$$\bigl(z_{L} \bigl(q_{L}^{(k)} \bigr)- \rho_{k} \tilde{z}_{L}^{(k)}+ \bigl(q_{L}^{(k)}- \rho_{k} s_{L}^{(k)}\bigr),s_{L}^{(k)} \bigr)_{\Omega}=0.$$

Obviously, $$d_{L}^{(k)}=z_{L} (q_{L}^{(k)} )+ q_{L}^{(k)}$$ holds. Let $$\tilde{d}_{L}^{(k)}=\tilde{z}_{L}^{(k)}+ s_{L}^{(k)}$$, then we obtain

$$\rho_{k}=\frac{ (d_{L}^{(k)},s_{L}^{(k)} )_{\Omega}}{ (\tilde{d}_{L}^{(k)},s_{L}^{(k)} )_{\Omega}}.$$
(5.8)

In addition, it is easy to prove that

$$d_{L}^{(k+1)}=d_{L}^{(k)}- \rho_{k} \tilde{d}_{L}^{(k)}$$

holds. Let

$$\beta_{k}=\frac{\Vert d_{L}^{(k+1)}\Vert ^{2}_{0,\Omega }}{\Vert d_{L}^{(k)}\Vert ^{2}_{0,\Omega}}$$

be the conjugate coefficient, we update the conjugate direction via

$$s_{L}^{(k+1)}=d_{L}^{(k+1)}+ \beta_{k} s_{L}^{(k)}.$$

Using the result

$$\bigl(d_{L}^{(k)},s_{L}^{(k-1)} \bigr)_{\Omega}=0,$$

we improve the optimum iterative step $$\rho_{k}$$ as follows:

$$\rho_{k}=\frac{ (d_{L}^{(k)},s_{L}^{(k)} )_{\Omega}}{ (\tilde{d}_{L}^{(k)},s_{L}^{(k)} )_{\Omega}} =\frac{ (d_{L}^{(k)},d_{L}^{(k)}+\beta_{k-1} s_{L}^{(k-1)} )_{\Omega}}{ (\tilde{d}_{L}^{(k)},s_{L}^{(k)} )_{\Omega}} =\frac{ (d_{L}^{(k)},d_{L}^{(k)} )_{\Omega}}{ (\tilde {d}_{L}^{(k)},s_{L}^{(k)} )_{\Omega}}.$$
(5.9)

The overall process is summarized below.

Choose an initial control $$q_{L}^{(0)}$$. Set $$k=0$$.

1. (a)

Solve problems (5.6)-(5.7), let $$d_{L}^{(k)}=z_{L}(q_{L}^{(k)})+ q_{L}^{(k)}$$, $$s_{L}^{(k)}=g_{L}^{(k)}$$.

2. (b)

Solve problems (5.4)-(5.5), and set $$\tilde{d}_{L}^{(k)}=\tilde{z}_{L}^{(k)}+ s_{L}^{(k)}$$, $$\rho_{k}=\frac{ (d_{L}^{(k)},d_{L}^{(k)} )_{\Omega}}{ (\tilde{d}_{L}^{(k)},s_{L}^{(k)} )_{\Omega}}$$.

3. (c)

Update $$q_{L}^{(k+1)}=q_{L}^{(k)}-\rho_{k} s_{L}^{(k)}$$, $$d_{L}^{(k+1)}=d_{L}^{(k)}-\rho_{k} \tilde{d}_{L}^{(k)}$$.

4. (d)

If $$\Vert d_{L}^{(k+1)}\Vert _{0,\Omega}\leq$$ tolerance, then take $$q_{L}^{\ast}=q_{L}^{(k+1)}$$, and solve problems (3.2) and (3.6) to get $$u_{L}(q_{L}^{\ast})$$ and $$z_{L}(q_{L}^{\ast})$$; else, let $$\beta_{k}=\frac{\Vert d_{L}^{(k+1)}\Vert ^{2}_{0,\Omega}}{ \Vert d_{L}^{(k)}\Vert ^{2}_{0,\Omega}}$$, $$s_{L}^{(k+1)}=d_{L}^{(k+1)}+\beta_{k} s_{L}^{(k)}$$. Set $$k=k+1$$, repeat (a)-(d).

### Numerical results

We are now in a position to carry out some numerical experiments and present some results to validate the obtained error estimates. In all the calculations, we take $$T=1$$.

### Example 5.1

We now let the observation data $$\bar{u}(x,t)=\sin\pi t \sin\pi x$$, and consider problem (2.1)-(2.2) with exact analytical solution:

$$u\bigl(q^{\ast}\bigr)=\sin\pi t \sin\pi x,\qquad z\bigl(q^{\ast} \bigr)=0,\quad q^{\ast}=0.$$

For this choice of data, that is, the exact solution $$u(q^{\ast})$$ serves as the observation data, problem (2.1)-(2.2) is indeed an inverse problem about unknown parameter in the right-hand side and the corresponding objective function is expected to attain its minimum 0.

In this example, we fix the initial guess at $$q^{(0)}=1$$. We should mention here that any initial guess is possible. We will show in our next example that the presence of perturbation or noise in the control has limited influences on the optimization algorithm.

We first check the convergence behavior of numerical solutions with respect to the polynomial degrees M. In Figure 1, we plot the errors as functions of the polynomial degrees M with $$\alpha=0.3$$, $$N = 20$$. Also, in Table 1, we list the maximum absolute errors of q, u, and J at $$\alpha=0.3$$, $$N = 20$$, and various choices of M. As expected, the errors show an exponential decay, since in this semi-log representation one observes that the error variations are essentially linear versus the degrees of polynomial.

We then investigate the temporal errors, which is more interesting to us because of the fractional derivative in time. In Figures 2 to 4, we plot the errors as functions of N with $$M = 20$$ for three values $$\alpha=0.1,0.5,0.99$$. The straight line of the error curves indicates that the convergence in time is also exponential. The maximum absolute errors of q, u, and J at $$M = 20$$ are also listed in Table 2.

### Example 5.2

We choose another exact analytical solutions as

$$u\bigl(q^{\ast}\bigr)=\sin\pi xe^{t}, \qquad z \bigl(q^{\ast}\bigr)=\sin\pi x (1-t)e^{2t},\quad q^{\ast }=-z\bigl(q^{\ast}\bigr).$$

Unlike the previous example which uses the exact solution $$u(q^{\ast })$$ as the observation data, the observation data $$\bar{u}(x,t)$$ here is calculated through (2.22) using $$u(q^{\ast})$$ and $$z(q^{\ast})$$.

First, as mentioned in the previous example, we investigate the impact of the initial guess on the convergence of the conjugate gradient algorithm. We start by considering $$q^{(0)}=20q^{\ast}$$. This represents a strong perturbation in the initial guess. We now fix $$M=N=18$$, $$\alpha=0.6$$. In Figure 5, we plot the convergence history of the gradient of the objective function as a function of the iteration number with $$M=N=18$$, $$\alpha=0.6$$. We see that the iterative method converges within seven iterations. We then take $${q^{(0)}}$$ to be constant c with $$c=0\mbox{ or }10$$, which has nothing to compare with the exact control $$q^{\ast}$$. We repeat the same computation as in Figure 5. The result is given in Figure 6. These results seem to tell that the type and amplitude of the perturbation have no significant effects on the convergence of the optimization algorithm, since in any case the iterative algorithm converges with the same rate. In the following, the initial guess is set to 0.

We now investigate the errors of the numerical solution with respect to the temporal and spatial approximations. In Figure 7 and Figures 8-10 we report the errors in logarithmic scale as a function of the polynomial degrees M and N, respectively. Also, in Tables 3 and 4, we list the maximum absolute errors of q, u, and J. Clearly, all the errors show an exponential decay.

## Concluding remarks

In the present work, we have shown an efficient optimization algorithm for the space-time fractional equation optimal control problem based on the spectral approximation. A priori error estimates are derived. Some numerical experiments have been carried out to confirm the theoretical results.

There are many important issues that still need to be addressed. Firstly, the same formulation and solution scheme can be used with minor changes for the problem defined in terms of Riemann-Liouville derivatives. Secondly, studies for more complicated control problems and constraint sets are needed. Thirdly, although our analysis and algorithm are designed for the optimization of the distributed control problem, we hope that they are generalizable for the minimization problems of other parameters, such as boundary conditions and so on.

## References

1. Oustaloup, A: La Dérivation Non Entière: Théorie, Synthèse et Applications. Hermes, Paris (1995)

2. Zhang, H, Cao, JD, Jiang, W: Controllability criteria for linear fractional differential systems with state delay and impulses. J. Appl. Math. 2013, Article ID 146010 (2013). doi:10.1155/2013/146010

3. Koeller, RC: Application of fractional calculus to the theory of viscoelasticity. J. Appl. Mech. 51, 299-307 (1984)

4. Mainardi, F: Fractional diffusive waves in viscoelastic solids. In: Nonlinear Waves in Solids, pp. 93-97. ASME/AMR, Fairfield (1995)

5. Bouchaud, JP, Georges, A: Anomalous diffusion in disordered media: statistical mechanisms, models and physical applications. Phys. Rep. 195(4-5), 127-293 (1990)

6. Dentz, M, Cortis, A, Scher, H, Berkowitz, B: Time behavior of solute transport in heterogeneous media: transition from anomalous to normal transport. Adv. Water Resour. 27(2), 155-173 (2004)

7. Goychuk, I, Heinsalu, E, Patriarca, M, Schmid, G, Hänggi, P: Current and universal scaling in anomalous transport. Phys. Rev. E 73(2), 020101 (2006)

8. Benson, DA, Wheatcraft, SW, Meerschaert, MM: The fractional-order governing equation of Lévy motion. Water Resour. Res. 36(6), 1413-1423 (2000)

9. Diethelm, K: The Analysis of Fractional Differential Equations. Springer, Berlin (2010)

10. Gutiérrez, RE, Rosário, JM, Machado, JT: Fractional order calculus: basic concepts and engineering applications. Math. Probl. Eng. 2010, Article ID 375858 (2010). doi:10.1155/2010/375858

11. Miller, K, Ross, B: An Introduction to the Fractional Calculus and Fractional Differential Equations. Wiley, New York (1993)

12. Podlubny, I: Fractional Differential Equations. Academic Press, New York (1999)

13. Agrawal, O: A general formulation and solution scheme for fractional optimal control problems. Nonlinear Dyn. 38(1), 323-337 (2004)

14. Frederico, G, Torres, D: Fractional conservation laws in optimal control theory. Nonlinear Dyn. 53(3), 215-222 (2008)

15. Frederico, G, Torres, D: Fractional optimal control in the sense of Caputo and the fractional Noether’s theorem. Int. Math. Forum 3(10), 479-493 (2008)

16. Mophou, GM: Optimal control of fractional diffusion equation. Comput. Math. Appl. 61(1), 68-78 (2011)

17. Dorville, R, Mophou, GM, Valmorin, VS: Optimal control of a nonhomogeneous Dirichlet boundary fractional diffusion equation. Comput. Math. Appl. 62(3), 1472-1481 (2011)

18. Agrawal, OP, Hasan, MM, Tangpong, XW: A numerical scheme for a class of parametric problem of fractional variational calculus. J. Comput. Nonlinear Dyn. 7(2), 021005 (2012)

19. Agrawal, O, Baleanu, D: A Hamiltonian formulation and a direct numerical scheme for fractional optimal control problems. J. Vib. Control 13(9-10), 1269-1281 (2007)

20. Alipour, M, Rostamy, D, Baleanu, D: Solving multi-dimensional FOCPs with inequality constraint by BPs operational matrices. J. Vib. Control 19(16), 2523-2540 (2013)

21. Baleanu, D, Defterli, O, Agrawal, O: A central difference numerical scheme for fractional optimal control problems. J. Vib. Control 15(4), 583-597 (2009)

22. Bhrawy, A, Doha, E, Baleanu, D, Ezz-Eldien, S, Abdelkawy, M: An accurate numerical technique for solving fractional optimal control problems. Proc. Rom. Acad. 16(1), 47-54 (2015)

23. Ezz-Eldien, S, Doha, E, Baleanu, D, Bhrawy, A: A numerical approach based on Legendre orthonormal polynomials for numerical solutions of fractional optimal control problems. J. Vib. Control (2015). doi:10.1177/1077546315573916

24. Liu, XY, Liu, ZH, Fu, X: Relaxation in nonconvex optimal control problems described by fractional differential equations. J. Math. Anal. Appl. 409(1), 446-458 (2014)

25. Li, XJ, Xu, CJ: A space-time spectral method for the time fractional diffusion equation. SIAM J. Numer. Anal. 47(3), 2108-2131 (2009)

26. Li, XJ, Xu, CJ: The existence and uniqueness of the weak solution of the space-time fractional diffusion equation and a spectral method approximation. Commun. Comput. Phys. 8(5), 1016-1051 (2010)

27. Lin, Y, Xu, C: Finite difference/spectral approximations for the time-fractional diffusion equation. J. Comput. Phys. 225(2), 1533-1552 (2007)

28. Bhrawy, A, Zaky, M, Baleanu, D: New numerical approximations for space-time fractional Burgers’ equations via a Legendre spectral-collocation method. Rom. Rep. Phys. 67(2), 1-13 (2015)

29. Bhrawy, A, Al-Zahrani, A, Alhamed, Y, Baleanu, D: A new generalized Laguerre-Gauss collocation scheme for numerical solution of generalized fractional pantograph equations. Rom. J. Phys. 59(7-8), 646-657 (2014)

30. Bhrawy, AH, Zaky, MA: A method based on the Jacobi tau approximation for solving multi-term time-space fractional partial differential equations. J. Comput. Phys. 281, 876-895 (2015). doi:10.1016/j.jcp.2014.10.060

31. Lotfi, A, Yousefi, S, Dehghan, M: Numerical solution of a class of fractional optimal control problems via the Legendre orthonormal basis combined with the operational matrix and the Gauss quadrature rule. J. Comput. Appl. Math. 250, 143-160 (2013)

32. Ye, X, Xu, C: A spectral method for optimal control problems governed by the time fractional diffusion equation with control constraints. In: Spectral and High Order Methods for Partial Differential Equations - ICOSAHOM 2012, pp. 403-414. Springer, Berlin (2014)

33. Doha, EH, Bhrawy, AH, Baleanu, D, Ezz-Eldien, SS, Hafez, RM: An efficient numerical scheme based on the shifted orthonormal Jacobi polynomials for solving fractional optimal control problems. Adv. Differ. Equ. 2015, 15 (2015)

35. Ye, X, Xu, C: Spectral optimization methods for the time fractional diffusion inverse problem. Numer. Math., Theory Methods Appl. 6(3), 499-519 (2013)

## Acknowledgements

The work of Xingyang Ye is partially supported by the Science Foundation of Jimei University, China (Grant Nos. ZQ2013005 and ZC2013021), Foundation (Class B) of Fujian Educational Committee (Grant No. FB2013005), Foundation of Fujian Educational Committee (No. JA14180). The work of Chuanju Xu was partially supported by National NSF of China (Grant Nos. 11471274 and 11421110001).

## Author information

Authors

### Corresponding author

Correspondence to Chuanju Xu.

### Competing interests

The authors declare that they have no competing interests.

### Authors’ contributions

The authors have equal contributions to each part of this paper. All the authors read and approved the final manuscript.

## Rights and permissions 