In this section, we prove the optimal control problem using the Galerkin method and the existence and uniqueness of a solution of the problem (1)-(4).

**Theorem 1** *Suppose that a function* *f* *satisfies the condition* (5).

*So*,

*for each* $\mathrm{\forall}v\in V$,

*the problem* (2)-(4)

*has a unique solution*,

*and for this solution*,

*the estimate* ${\parallel \psi (\mathbf{\cdot},z)\parallel}_{{L}_{2}(0,l)}^{2}\le {c}_{0}({\parallel \phi \parallel}_{{L}_{2}(0,l)}^{2}+{\parallel f\parallel}_{{L}_{2}(\mathrm{\Omega})}^{2})$

(8)

*is valid for* $\mathrm{\forall}z\in [0,L]$. *Here*, *the number* ${c}_{0}>0$ *is independent of* *z*.

*Proof* Proof can be done by processes similar to those given in [7]. □

**Theorem 2** *Let us accept that the conditions of Theorem* 1 *hold and* $y\in {L}_{2}(0,l)$ *is a given function*. *Then there is such a set* *G* *dense in* $H\equiv {[{L}_{2}(0,L)]}^{2}\times {[{L}_{2}(0,l)]}^{2}$ *that the optimal control problem* (1)-(4) *has a unique solution* $\mathrm{\forall}\omega \in G$ *and* $\alpha >0$.

*Proof* Firstly, let us show that

${J}_{0}(v)={\parallel \psi (\mathbf{\cdot},L)-y\parallel}_{{L}_{2}(0,l)}^{2}$

(9)

is continuous on the set

*V*. Let us take an arbitrary ∈

*V*, and let

$v+\mathrm{\Delta}v$ be an increment of the

*v* for the

$\mathrm{\Delta}v\in H$. Then the solution

$\psi (x,z;v)$ of the problem (1)-(4) will have an increment

$\mathrm{\Delta}\psi =\mathrm{\Delta}\psi (x,z)=\psi (x,z;v+\mathrm{\Delta}v)-\psi (x,z;v)$. Here, the function

${\psi}_{\mathrm{\Delta}}(x,z)=\psi (x,z;v+\mathrm{\Delta}v)$ is the solution of (2)-(4). On the basis of the assumptions and conditions (2)-(4), it can be shown that the function

$\mathrm{\Delta}\psi (x,z)$ is a solution of the following boundary value problem:

Because the problem (10)-(12) and the problem (2)-(4) are the same type problems, we can write the following estimate the same as (8):

${\parallel \mathrm{\Delta}\psi (\mathbf{\cdot},z)\parallel}^{2}\le {c}_{4}{\parallel \mathrm{\Delta}\psi \parallel}_{{L}_{2}(0,l)}^{2}+{\parallel \mathrm{\Delta}{v}_{0}\psi +i\mathrm{\Delta}{v}_{1}\psi \parallel}_{{L}_{2}(\mathrm{\Omega})}^{2},\phantom{\rule{1em}{0ex}}\mathrm{\forall}z\in [0,L].$

(13)

If we use estimate (13) then we can write the following estimate:

${\parallel \mathrm{\Delta}\psi (\mathbf{\cdot},z)\parallel}_{{L}_{2}(0,l)}^{2}\le {c}_{5}{\parallel \mathrm{\Delta}v\parallel}_{H}^{2},\phantom{\rule{1em}{0ex}}\mathrm{\forall}z\in [0,L].$

(14)

${c}_{5}>0$ is constant that does not depend on Δ*v*.

Now, let us evaluate the increment of the functional

${J}_{0}(v)$ on

$v\in V$. Using formula (9) we can write the equality as

$\begin{array}{rcl}\mathrm{\Delta}{J}_{0}(v)& =& {J}_{0}(v+\mathrm{\Delta}v)-{J}_{0}(v)\\ =& 2{\int}_{0}^{l}Re(\psi (x,L)-y(x))\mathrm{\Delta}\overline{\psi}(x,L)\phantom{\rule{0.2em}{0ex}}dx+{\parallel \mathrm{\Delta}\psi (\mathbf{\cdot},L)\parallel}_{{L}_{2}(0,l)}^{2}.\end{array}$

(15)

Using the Cauchy-Bunyakowski inequality and estimates (8) and (14), we write the inequality as

$|\mathrm{\Delta}{J}_{0}(v)|\le {c}_{6}{\parallel \mathrm{\Delta}v\parallel}_{H}^{2},\phantom{\rule{1em}{0ex}}\mathrm{\forall}v\in V,$

(16)

where ${c}_{6}>0$ is a constant that does not depend on Δ*v*. This inequality shows that the functional ${J}_{0}(v)$ is continuous on the set *V*. On the other hand, ${J}_{0}(z)\ge 0$ for $\mathrm{\forall}z\in V$; therefore, ${J}_{0}(v)$ is bounded on *V*. The set *V* is closed, bounded on a Hilbert space *H*. According to Theorem (Goebel) in [8], there is such a set *G* dense in *H* that optimalcontrol problem (1)-(4) has a unique solution for $\alpha >0$ and $\mathrm{\forall}\omega \in G$. Theorem 2 is proven. □

### 3.1 Fréchet diffrentiability of the functional

In this section, we prove the Fréchet differentiability of a given functional. For this purpose, we consider the following adjoint boundary value problem:

Here, the function

$\psi =\psi (x,z)\equiv \psi (x,z;v)$ is a solution of (2)-(4) for

$v\in V$. The solution of the boundary value problem (17)-(19) corresponding to

$v\in V$ is a function

$\phi =\phi (x,z)$ that belongs to the space

${C}^{0}([0,L],{L}_{2}(0,L))$ and satisfies the integral identity

As seen, the problem (17)-(19) is an initial boundary value problem. This can easily be obtained by a transform

$\theta =L-z$. Actually, if we do a variable transform

$\theta =L-z$, we obtain the boundary problem as

If we write the complex conjugate of this boundary value problem, we obtain the following boundary value problem:

where

$F(x,\theta )=\overline{\tilde{\phi}(x,\theta )},\phantom{\rule{2em}{0ex}}h(x)=-2i(\overline{\psi}(x,L)-\overline{y}(x)).$

This problem is a type of (2)-(4) boundary value problem. As the right-hand side is equal to zero, and initial function

$h(x)$ belongs to the space

${L}_{2}(0,l)$ for

$\psi \in {C}^{0}([0,L],{L}_{2}(0,l))$,

$y\in {L}_{2}(0,l)$. By using Theorem 2, it follows that the solution of the bounded value problem (24)-(26) existing in the space

${C}^{0}([0,L],{L}_{2}(0,l))$ is unique, and the following estimate is obtained:

${\parallel F(\mathbf{\cdot},\theta )\parallel}_{{L}_{2}(0,l)}^{2}\le {c}_{7}{\parallel h\parallel}_{{L}_{2}(0,l)}^{2},\phantom{\rule{1em}{0ex}}\mathrm{\forall}\theta \in [0,L].$

(27)

If we use the problem (24)-(26) as a type of the conjugate problem (17)-(19), we obtain the initial bounded value problem (17)-(19) has a unique solution belonging to the space

${C}^{0}([0,L],{L}_{2}(0,l))$, and the following estimate is obtained:

${\parallel \phi (\mathbf{\cdot},z)\parallel}_{{L}_{2}(0,l)}^{2}\le {c}_{8}{\parallel \psi (\mathbf{\cdot},L)-y\parallel}_{{L}_{2}(0,l)}^{2},\phantom{\rule{1em}{0ex}}\mathrm{\forall}z\in [0,L].$

Here, the number

${c}_{8}>0$ is independent of

*ψ* and

*y*. Now, using estimate (8) in this inequality, we easily write the following estimate:

${\parallel \phi (\mathbf{\cdot},z)\parallel}_{{L}_{2}(0,l)}^{2}\le {c}_{9}({\parallel \phi \parallel}_{{L}_{2}(0,l)}^{2}+{\parallel y\parallel}_{{L}_{2}(0,l)}^{2}+{\parallel \phi \parallel}_{{L}_{2}(\mathrm{\Omega})}^{2}),\phantom{\rule{1em}{0ex}}\mathrm{\forall}z\in [0,L].$

(28)

Here, the number ${c}_{9}>0$ is constant.

**Theorem 3** *Let us accept that the conditions of Theorem* 2

*hold and* $\omega \in H$ *is given*.

*Then the functional* ${J}_{\alpha}(v)$ *can be Frechet differentiable in the set* *V* *and the formula below for a gradient of the functional is valid*:

*Proof* Let us evaluate the increment of the functional

${J}_{\alpha}(v)$ for the element

$\mathrm{\forall}v\in V$. We can write the following equation for the increment of the functional:

$\begin{array}{rcl}\mathrm{\Delta}{J}_{\alpha}(v)& =& {J}_{\alpha}(v+\mathrm{\Delta}v)-{J}_{\alpha}(v)\\ =& 2{\int}_{0}^{l}Re[(\psi (x,L)-y(x))\mathrm{\Delta}\overline{\psi}(x,L)]\phantom{\rule{0.2em}{0ex}}dx+2\alpha {\int}_{0}^{l}({\phi}_{0}(x)-{\tilde{\omega}}_{0}(x))\mathrm{\Delta}{\phi}_{0}(x)\phantom{\rule{0.2em}{0ex}}dx\\ +2\alpha {\int}_{0}^{l}({\phi}_{1}(x)-{\tilde{\omega}}_{1}(x))\mathrm{\Delta}{\phi}_{1}(x)\phantom{\rule{0.2em}{0ex}}dx+2\alpha {\int}_{0}^{T}({v}_{0}(z)-{\omega}_{0}(z))\mathrm{\Delta}{v}_{0}(z)\phantom{\rule{0.2em}{0ex}}dz\\ +2\alpha {\int}_{0}^{T}({v}_{1}(z)-{\omega}_{1}(z))\mathrm{\Delta}{v}_{1}(z)\phantom{\rule{0.2em}{0ex}}dz+{\parallel \mathrm{\Delta}\psi (\mathbf{\cdot},L)\parallel}_{{L}_{2}(0,l)}^{2}+\alpha {\parallel \mathrm{\Delta}v\parallel}_{H}^{2}.\end{array}$

(30)

The last formula can be written as follows:

$\begin{array}{rcl}\mathrm{\Delta}{J}_{\alpha}(v)& =& {J}_{\alpha}(v+\mathrm{\Delta}v)-{J}_{\alpha}(v)\\ =& {\int}_{0}^{L}({\int}_{0}^{l}Re(\psi \overline{\phi})\phantom{\rule{0.2em}{0ex}}dx+2\alpha ({v}_{0}(z)-{\omega}_{0}(z))\mathrm{\Delta}{v}_{0}(z)\phantom{\rule{0.2em}{0ex}}dz-{\int}_{0}^{l}Im(\psi ,\overline{\phi})\phantom{\rule{0.2em}{0ex}}dx\mathrm{\Delta}{v}_{1}(z))\\ +{\int}_{0}^{L}(-{\int}_{0}^{l}Im(\psi \overline{\phi})\phantom{\rule{0.2em}{0ex}}dx+2\alpha ({v}_{1}(z)-{\omega}_{1}(z)))\mathrm{\Delta}{v}_{1}(z)\phantom{\rule{0.2em}{0ex}}dz\\ +{\int}_{0}^{l}[Im(\overline{\phi}(x,0))+2\alpha ({\phi}_{0}(x)-{\tilde{\omega}}_{0}(x))]\mathrm{\Delta}{\phi}_{0}(x)\phantom{\rule{0.2em}{0ex}}dx\\ +{\int}_{0}^{l}[Re(\overline{\phi}(x,0))+2\alpha ({\phi}_{1}(x)-{\tilde{\omega}}_{1}(x))]\mathrm{\Delta}{\phi}_{1}(x)\phantom{\rule{0.2em}{0ex}}dx+R(\mathrm{\Delta}v),\end{array}$

where

$R(\mathrm{\Delta}v)$ is defined as the formula

$\begin{array}{rcl}R(\mathrm{\Delta}v)& =& {\parallel \mathrm{\Delta}\psi (\mathbf{\cdot},L)\parallel}_{{L}_{2}(0,l)}^{2}+\alpha {\parallel \mathrm{\Delta}v\parallel}_{H}^{2}\\ +{\int}_{\mathrm{\Omega}}Re(\mathrm{\Delta}\psi \overline{\phi})\mathrm{\Delta}{v}_{0}(z)\phantom{\rule{0.2em}{0ex}}dx\phantom{\rule{0.2em}{0ex}}dz\\ -{\int}_{\mathrm{\Omega}}Im(\mathrm{\Delta}\psi \overline{\phi})\mathrm{\Delta}{v}_{1}(z)\phantom{\rule{0.2em}{0ex}}dx\phantom{\rule{0.2em}{0ex}}dz.\end{array}$

(31)

Applying the Cauchy-Bunyakowski inequality, we obtain:

$\begin{array}{rcl}|R(\mathrm{\Delta}v)|& \le & {\parallel \mathrm{\Delta}\psi (\mathbf{\cdot},L)\parallel}_{{L}_{2}(0,l)}^{2}+\alpha {\parallel \mathrm{\Delta}v\parallel}_{H}^{2}\\ +({\parallel \mathrm{\Delta}{v}_{1}\parallel}_{{L}_{2}(0,T)}+{\parallel \mathrm{\Delta}{v}_{0}\parallel}_{{L}_{2}(0,T)})max{\parallel \mathrm{\Delta}\psi (\mathbf{\cdot},L)\parallel}_{{L}_{2}(0,l)}{\parallel \phi \parallel}_{{L}_{2}(0,L)}.\end{array}$

If we use estimates (13) and (28) in this inequality, we obtain

$|R(\mathrm{\Delta}v)|\le {c}_{10}{\parallel \mathrm{\Delta}v\parallel}_{H}^{2}.$

(32)

Here,

${c}_{10}>0$ is a constant that does not depend on Δ

*v*. Hence, we write

$R(\mathrm{\Delta}v)=o\left({\parallel \mathrm{\Delta}v\parallel}_{H}\right).$

(33)

By using equality (33), the increment of the functional can be written as

Considering this equality (34), and by using the definition of Fréchet differentiable, we can easily obtain the validity of the rule. Theorem 3 is proved. □

### 3.2 A necessary condition for an optimal solution

In this section, we prove the continuity of a gradient and state a necessary condition to an optimal solution in the variational inequality form using the gradient.

**Theorem 4** *Accept that the conditions of Theorem* 3

*hold and* ${v}^{\ast}\in V$ *is an optimal solution of the problem* (1)-(4).

*Then the following inequality is valid for* $\mathrm{\forall}v\in V$:

*Here*, *the functions* ${\psi}^{\ast}(x,z)\equiv \psi (x,z;{v}^{\ast})$, ${\phi}^{\ast}(x,z)\equiv \phi (x,z;{v}^{\ast})$ *are solutions of the problems* (2)-(4) *and a conjugate problem corresponding to* ${v}^{\ast}\in V$, *respectively*.

*Proof* Now, we prove that the gradient

${J}_{\alpha}^{\prime}(v)$ is continuous at

*V*. For this we show

for ${\parallel \mathrm{\Delta}v\parallel}_{H}\to 0$.

In order to show (36), using the formula

${J}_{\alpha {v}_{0}}^{\prime}(v)={\int}_{0}^{l}Re(\psi \overline{\phi})\phantom{\rule{0.2em}{0ex}}dx+2\alpha ({v}_{0}(z)-{\omega}_{0}(z))$ in (29), we can write the following equation:

Here,

$\mathrm{\Delta}\psi =\mathrm{\Delta}\psi (x,z)$ is the solution of the problem (9)-(11) and

$\mathrm{\Delta}\phi =\mathrm{\Delta}\phi (x,z)$ is the solution of the following problem:

This bounded value problem is a type of a conjugate problem. For this solution, the following estimate is valid:

${\parallel \phi (\mathbf{\cdot},z)\parallel}_{{L}_{2}(0,l)}^{2}\le {c}_{11}({\parallel \mathrm{\Delta}{v}_{0}\phi +i\mathrm{\Delta}{v}_{0}\phi \parallel}_{{L}_{2}(\mathrm{\Omega})}^{2}+{\parallel \mathrm{\Delta}\psi (\mathbf{\cdot},L)\parallel}_{{L}_{2}(0,l)}^{2}),\phantom{\rule{1em}{0ex}}\mathrm{\forall}z\in (0,L).$

(44)

Here, the number ${c}_{11}$ is constant.

Using (13) and (28), we write

${\parallel \phi (\mathbf{\cdot},z)\parallel}_{{L}_{2}(0,l)}^{2}\le {c}_{12}\left({\parallel \mathrm{\Delta}v\parallel}_{H}^{2}\right),\phantom{\rule{1em}{0ex}}\mathrm{\forall}z\in (0,L).$

(45)

Here, the number

${c}_{12}$ is constant. Using (13) and (45) and applying the Cauchy-Bunyakovski inequality, we obtain

$\begin{array}{rcl}|{J}_{\alpha {v}_{0}}^{\prime}(v+\mathrm{\Delta}v)-{J}_{\alpha {v}_{0}}^{\prime}(v)|& \le & {\parallel {\psi}_{\mathrm{\Delta}}(\mathbf{\cdot},z)\parallel}_{{L}_{2}(0,l)}{\parallel \mathrm{\Delta}\phi (\mathbf{\cdot},z)\parallel}_{{L}_{2}(0,l)}\\ +{\parallel \mathrm{\Delta}\psi (\mathbf{\cdot},z)\parallel}_{{L}_{2}(0,l)}{\parallel \phi (\mathbf{\cdot},z)\parallel}_{{L}_{2}(0,l)}+2\alpha |\mathrm{\Delta}{v}_{0}(z)|,\phantom{\rule{1em}{0ex}}\mathrm{\forall}z\in (0,L),\end{array}$

If we use estimate (8), we can write the following inequality:

${\parallel {\psi}_{\mathrm{\Delta}}(\mathbf{\cdot},z)\parallel}_{{L}_{2}(0,l)}^{2}\le {c}_{13},\phantom{\rule{1em}{0ex}}\mathrm{\forall}z\in [0,L].$

(47)

Using this inequality and estimates (13), (28), and (45), we obtain

${\parallel {J}_{\alpha {v}_{0}}^{\prime}(v+\mathrm{\Delta}v)-{J}_{\alpha {v}_{0}}^{\prime}(v)\parallel}_{{L}_{2}(0,L)}\le {c}_{14}{\parallel \mathrm{\Delta}v\parallel}_{H}.$

(48)

Here, the number of

${c}_{14}$ is constant. Similarly, we can prove the following inequality:

${\parallel {J}_{\alpha {v}_{1}}^{\prime}(v+\mathrm{\Delta}v)-{J}_{\alpha {v}_{1}}^{\prime}(v)\parallel}_{{L}_{2}(0,L)}\le {c}_{15}{\parallel \mathrm{\Delta}v\parallel}_{H}.$

(49)

If we use inequalities (48) and (49), we see that the correlations limit (36) and (37) is valid.

Now, we prove (38). To prove this using the formula

${J}_{\alpha {\phi}_{1}}^{\prime}(v)=Re(\overline{\phi}(x,0))+2\alpha ({\phi}_{1}(x)-{\tilde{\omega}}_{1}(x))$ in (29), we can write the following inequality:

${J}_{\alpha {v}_{0}}^{\prime}(v+\mathrm{\Delta}v)-{J}_{\alpha {v}_{0}}^{\prime}(v)={I}_{m}(\mathrm{\Delta}\overline{\phi}(x,0))+2\alpha \mathrm{\Delta}{\phi}_{0}.$

(50)

Here,

$\mathrm{\Delta}\phi (x,z)$ is a solution of the problem (41). Estimate (45) is valid for

$\mathrm{\forall}z\in [0,L]$. Therefore, the following estimate can be written at

$z=0$:

${\parallel \phi (\mathbf{\cdot},0)\parallel}_{{L}_{2}(0,l)}^{2}\le {c}_{12}\left({\parallel \mathrm{\Delta}v\parallel}_{H}^{2}\right).$

If this inequality is used in (49), we easily can write

${\parallel {J}_{\alpha {\phi}_{0}}^{\prime}(v+\mathrm{\Delta}v)-{J}_{\alpha {\phi}_{0}}^{\prime}(v)\parallel}_{{L}_{2}(0,l)}\le {c}_{16}\left({\parallel \mathrm{\Delta}v\parallel}_{H}\right).$

(51)

Similarly, if we use (39), we obtain

${\parallel {J}_{\alpha {\phi}_{1}}^{\prime}(v+\mathrm{\Delta}v)-{J}_{\alpha {\phi}_{1}}^{\prime}(v)\parallel}_{{L}_{2}(0,l)}\le {c}_{17}\left({\parallel \mathrm{\Delta}v\parallel}_{H}\right).$

(52)

We can see that (38) and (39) are valid by inequalities (51) and (52). That is,

${J}_{\alpha}\in {C}^{1}(V)$. On the other hand,

*V* is a convex set according to the definition. So, the functional

${J}_{\alpha}(v)$ holds by the condition of Theorem (Goebel) in [

8] at

*V*. Therefore, considering Theorem 3, we obtain

${\u3008{J}_{\alpha}^{\prime}\left({v}^{\ast}\right),v-{v}^{\ast})\u3009}_{H}\ge 0$

for $\mathrm{\forall}z\in V$. Here, using (29), it is seen that the statement of Theorem 4 is valid. □