1 Introduction

1.1 The Controlled Model

In this work we study an optimal control problem for the (attractive or repulsive) Keller–Segel model in a 2D domain \(\Omega \subset {\mathbb {R}}^2\) with logistic source term and bilinear control acting on the chemical equation:

$$\begin{aligned} \left\{ \begin{array}{rcll} \partial _t u -\Delta u + \kappa \nabla \cdot (u \, \nabla v) &{}=&{} r \, u- \mu \, u^2 &{} \hbox {in }\Omega \times (0,T),\\ \partial _t v -\Delta v + v &{}=&{} u + f \, v\, 1_{\Omega _c}&{} \hbox {in} \Omega \times (0,T),\\ \partial _\textbf{n} u= \partial _\textbf{n} v &{}=&{}0 &{} \hbox {on} \partial \Omega \times (0,T),\\ u(0,\cdot )=u_0\ge 0, \quad v(0,\cdot )&{}=&{}v_0\ge 0 &{} \hbox {in} \Omega . \end{array}\right. \end{aligned}$$
(1)

Here, \(f:Q_c:=(0,T)\times \Omega _c\rightarrow {\mathbb {R}}\) is the control with \(\Omega _c\subset \Omega \subset {\mathbb {R}}^2\) the control domain (denoting \(1_{\Omega _c}\) the characteristic function in \(\Omega _c \)), and the states \(u,v:Q:=(0,T)\times \Omega \rightarrow {\mathbb {R}}_+^2\) are the cellular density and chemical concentration, respectively. Moreover, \(r, \mu >0\) are coefficients of the logistic reaction, and \(\kappa \in {\mathbb {R}}\) is the chemotaxis coefficient (\(\kappa >0\) models attraction and \(\kappa <0\) repulsion). We are interested in studying of optimal control problem associated to the weak solution setting for system (1), see Definition 1 below.

1.2 Previous Results

In the last decades, there has been a surge of activity on the study of the chemotaxis model describing the motion of cells directed by the concentration gradient of a chemical substance. Moreover, it is important to consider the biological situation where the bacterial population may proliferate according to a logistic law and the chemical signal is produced by cells. On the other hand, the chemotaxis-fluid systems, which is basically the chemotaxis model coupled with the Navier–Stokes equations, appear when the interactions between cells and the chemical signal is also extended with liquid environments. For more details, see the excellent review [3] and the references therein.

Plenty of analytical results have been obtained for the “uncontrolled" problem (1), that is, for \( f \equiv 0 \). Many of these results are based on classical in time solutions of such systems following Amann’s works (see, for instance [2]). Amongst the many articles related to this uncontrolled system, let us mention those on existence of weak and strong solutions in \( {\mathbb {R}}^2 \). In this case, without considering logistic reaction (i.e. \( r = \mu = 0 \)), the existence of global weak solutions was provided by Liu and Lorz [16]. In two-dimensional bounded convex domains, the existence of (global) classical solutions was obtained by Winkler [25]. In the presence of a logistic source, the existence of global weak solutions (and their long time behavior) has been analyzed in [14] by Lankeit. In this case, the existence of global mild solutions was examined in [8]. For 3D domains, we also refer [26] and the references therein.

It is important to mention that remarkable progress has been made in the mathematical and numerical analysis of optimal control problems for viscous flows described by the Navier–Stokes equations and other related models, see e.g., [1, 4, 19]. However, the literature related to optimal control for chemotaxis problems is still scarce. The reader can consult distributed linear control in [7] for a mathematical model of cancer invasion and [21] for the Keller–Segel system. In [17], the authors established the existence of an optimal control for a parabolic attraction-repulsion chemotaxis model with logistic source in 2D by introducing a linear distributed (positive) control in the chemical equation. The case of a Neumann boundary linear control for a chemotaxis system is treated in [22] for a one-dimensional problem. In these cases, positivity of the control needs to be imposed to guarantee the positivity of the states. As far as we know, the case of distributed bilinear control is only treated in [10] for a one-dimensional system of Keller–Segel type, acting either in the equation for the cell density or the chemical concentration. In [20], an optimal (distributed) control problem is studied constrained to a stationary chemotaxis model coupled with the Navier–Stokes equations. We note that in [5, 6] some results are provided related to the controllability for the Keller–Segel system and the chemotaxis-fluid model with consumption of chemoattractant substance, respectively. These results are based on Carleman-type estimates for the solutions of the adjoint system. Recently, a bilinear optimal control problem associated to the chemotaxis-Navier–Stokes model (without logistic source) in bounded 3D domains was examined in [18]. For the chemo-repulsion case, this problem was studied in [11, 13] for 2D and 3D domains respectively, and in [12] for 2D domains with a potential nonlinear production term, by changing the production term u in the v equation of (1) by \(u^p\), with \(1<p\le 2\).

1.3 Main Contributions of the Paper

We state the definition of weak solutions and then we will obtain the existence and uniqueness of such solutions (uv) of (1) which are bounded with respect to the control f.

Definition 1

Let \(f\in L^{2+}(Q_c):=L^{2+}(0,T;L^{2+}(\Omega _c))\), \(u_0\in L^2(\Omega )\), \(v_0\in W^{1+,2+}(\Omega )\) with \(u_0\ge 0\) and \(v_0\ge 0\) a.e. in \(\Omega \). A pair (uv) is called a weak solution of problem (1) in (0, T), if

$$\begin{aligned}{} & {} u\ge 0, \quad v\ge 0\quad \hbox {a.e. in }Q=(0,T)\times \Omega , \\{} & {} u\in W_2:=\{u\in C([0,T];L^2(\Omega ))\cap L^2(0,T;H^1(\Omega )),\ \partial _tu\in L^2(0,T;H^1(\Omega )')\},\\{} & {} v\in X_{2+}:=\{v\in C([0,T];W^{1+,2+}(\Omega ))\cap L^{2+}(0,T;W^{2,2+}(\Omega )),\ \partial _tv\in L^{2+}(Q)\}, \end{aligned}$$

the equation (1)\(_{1}\) and boundary condition for u hold in a variational sense, equation (1)\(_{2}\) and boundary condition for v pointwisely, and initial conditions (1)\(_3\) and (1)\(_4\) in the \(L^2(\Omega )\) and \(W^{1+,2+}(\Omega )\) sense, respectively.

Hereafter, \(L^{2+}\) means \(L^{2+\varepsilon }\) for small enough \(\varepsilon \). Notice that, since we are in 2D bounded domains, \(v\in C([0,T];W^{1+,2+} (\Omega ))\) implies \(v\in L^\infty (0,T;L^\infty (\Omega ))\), hence using that \(f\in L^{2+}(Q_c)\) one has \(fv\in L^{2+}(Q)\). That means that the maximal regularity expected is \(v\in X_{2+}\). The previous weak regularity for \(u\in W_2\) will be enough to solve the optimal control problem formulated in (3), which represents an improvement over previous optimal control results that needed the strong solution setting to obtain the first order necessary optimality system (5).

Theorem 1

Let \(u_0\in L^{2}(\Omega )\), \(v_0\in W^{1+,2+}(\Omega )\) with \(u_0\ge 0\) and \(v_0\ge 0\) in \(\Omega \), and \(f\in L^{2+}(Q_c)\). There exists a unique weak solution (uv) of system (1) in the sense of Definition 1. Moreover, there exists a positive constant

$$\begin{aligned} {\mathcal {K}}_1:={\mathcal {K}}_1(r,\mu ,\kappa ,\vert \Omega \vert ,T,\Vert u_0\Vert _{L^2},\Vert v_0\Vert _{W^{1+,2+}},\Vert f\Vert _{L^{2+}(Q_c)}), \end{aligned}$$

such that

$$\begin{aligned} \Vert (u,v) \Vert _{W_2 \times X_{2+}} \le {\mathcal {K}}_1, \end{aligned}$$
(2)

where we denote

$$\begin{aligned}{} & {} \Vert (u,v) \Vert _{W_2 \times X_{2+}}:= \Vert (\partial _tu,\partial _tv)\Vert _{L^2(H^1)'\times L^{2+}(L^{2+})}+\Vert (u,v)\Vert _{C(L^2\times W^{1+,2+})} \\{} & {} \qquad + \Vert (u,v) \Vert _{L^2(H^1)\times L^{2+}(0,T;W^{2,2+})} \end{aligned}$$

Finally, for any \(r,\mu ,\kappa , \Omega ,T,u_0,v_0\), the constant \({\mathcal {K}}_1\) is bounded if f is bounded in \(L^{2+}(Q_c)\).

The second main result of this paper will be the existence of a global optimal solution for the following problem:

$$\begin{aligned} \left\{ \begin{array}{l} \hbox {Find }(u,v,f)\in W_2\times X_{2+}\times {\mathcal {F}}\hbox { minimizing the functional }\\ J(u,v,f):=\frac{\gamma _u}{2}\int _0^T\Vert u(t)-u_d(t)\Vert ^{2}_{L^{2}{(\Omega )}}dt \\ \hbox {} +\frac{\gamma _v}{2}\int _0^T\Vert v(t)-v_d(t)\Vert ^2_{L^2{(\Omega )}}dt +\frac{\gamma _f}{{2+}}\int _0^T\Vert f(t)\Vert ^{2+}_{L^{2+}(\Omega _c)}dt\\ \hbox { subject to }(u,v,f) \text { be a weak solution of the PDE system }(1). \end{array} \right. \end{aligned}$$
(3)

Here, the pair \((u_d,\, v_d)\in L^2(Q)^2\) represents the target states and the nonnegative numbers \( \gamma _u\), \(\gamma _v\) and \(\gamma _f\) measure the cost of the states and control, respectively. With respect to the control constraint, we assume

$$\begin{aligned} {\mathcal {F}}\subset L^{2+}(Q_c) \quad \hbox { to be a nonempty, closed and convex set.} \end{aligned}$$
(4)

The functional J defined in (3) describes the deviation of the cell density u and the chemical concentration v from a target cell density \(u_d\) and chemical concentration \(v_d\), respectively, plus the cost of the control f measured in the \(L^{2+}\)-norm.

Theorem 2

Let \((u_0, v_0)\in L^2(\Omega )\times W^{1+,2+}(\Omega )\) with \(u_0\ge 0\) and \(v_0\ge 0\) in \(\Omega \). If either \(\gamma _f>0\) or \({\mathcal {F}}\) is bounded in \(L^{2+}(Q_c)\), then the bilinear optimal control problem (3) has at least one global optimal solution \(({\tilde{u}},{\tilde{v}},{\tilde{f}})\).

Finally, we obtain the existence and uniqueness of Lagrange multipliers associated to any local optimal control of (3):

Theorem 3

Let \({\tilde{s}}=({\tilde{u}},{\tilde{v}},{\tilde{f}})\in {\mathcal {S}}_{ad}\) be a local optimal solution of (3). Then, there exists a unique Lagrange multiplier \((\lambda ,\eta )\in X_{2}\times W_{2}\) satisfying the optimality system

$$\begin{aligned}{} & {} \left\{ \begin{array}{rcl} -\partial _t\lambda -\Delta \lambda + \kappa \,\nabla \lambda \cdot \nabla {\tilde{v}}-\eta -r \lambda + 2 \mu {\tilde{u}} \lambda &{}=&{}\gamma _u ({\tilde{u}}-u_d)\ \ \hbox { in Q,}\\ -\partial _t\eta -\Delta \eta - \kappa \, \nabla \cdot ({\tilde{u}}\nabla \lambda )+\eta -{\tilde{f}}\,\eta \, 1_{\Omega _c}&{}=&{}\gamma _v({\tilde{v}}-v_d)\ \ \hbox { in Q,}\\ \lambda (T)=0,\ \eta (T)&{}=&{}0\quad \hbox { in }\Omega ,\\ \frac{\partial \lambda }{\partial \textbf{n}}=0,\ \displaystyle \frac{\partial \eta }{\partial \textbf{n}} &{}=&{}0\quad \hbox { on }(0,T)\times \partial \Omega , \end{array}\right. \end{aligned}$$
(5)
$$\begin{aligned}{} & {} \int _0^T\int _{\Omega _c}(\gamma _f \textrm{sgn} {{{\tilde{f}}}} \vert {{{\tilde{f}}}} \vert ^{1+}+{{{\tilde{v}}}}\,\eta )(f-{{{\tilde{f}}}}) \ge 0, \ \ \ \forall f\in {\mathcal {F}}. \end{aligned}$$
(6)

Remark 1

If \(\gamma _f>0\) and \({\mathcal {F}}\equiv L^{2+}(Q_c)\) (that is, no convexity constraints on the control are imposed), then optimality condition (6) becomes the equality

$$\begin{aligned} \gamma _f \textrm{sgn} {{{\tilde{f}}}} \vert {{{\tilde{f}}}}\vert ^{1+} 1_{\Omega _c}+{\tilde{v}}\,\eta \, 1_{\Omega _c}=0. \end{aligned}$$

The rest of the paper is organized as follows. The proofs of Theorems 1, 2 and 3 are given in Sects. 2, 3 and 4, respectively. Conclusions will be made at Sect. 5.

Along this manuscript, the following result on \(L^p\) regularity will be considered.

Theorem 4

([9], page 344) For \(\Omega \in C^2\), let \(1<p<3\), \(u_0\in {W}^{2-2/p,p}(\Omega )\) and \(g\in L^p(Q)\). Then, the problem

$$\begin{aligned} \begin{array}{rclrclrcl} \partial _tu-\Delta u= & {} g \, \, \hbox { in }Q,&\quad u(0,\cdot )= & {} u_0\, \, \hbox { in }\Omega ,&\quad \frac{\partial u}{\partial \textbf{n}}= & {} 0\, \, \hbox { on }(0,T)\times \partial \Omega , \end{array} \end{aligned}$$

admits a unique solution u such that

$$\begin{aligned} u\in C([0,T];{W}^{2-2/p,p})\cap L^p(W^{2,p}), \quad \partial _tu\in L^p(Q). \end{aligned}$$

Moreover, there exists a positive constant \(C:=C(p,\Omega ,T)\) such that

$$\begin{aligned} \Vert u\Vert _{C({W}^{2-2/p,p})}+\Vert \partial _tu\Vert _{L^p(Q)}+\Vert u\Vert _{L^p(W^{2,p})} \le C(\Vert g\Vert _{L^p(Q)}+\Vert u_0\Vert _{{W}^{2-2/p,p}}). \end{aligned}$$

2 Proof of Theorem 1

We prove the existence via the Leray–Schauder fixed point theorem (the precise statement of this result can be consulted, for instance, in [13], Theorem 2) and the uniqueness by a comparison argument.

2.1 Existence

Let us introduce the auxiliary spaces

$$\begin{aligned} {\mathcal {X}}_u:= L^{4-}(Q)\quad \hbox { and }\quad {\mathcal {X}}_v:= L^{\infty }(Q), \end{aligned}$$

and the operator \(R:{\mathcal {X}}_u\times {\mathcal {X}}_v\rightarrow W_2 \times X_{2+}\hookrightarrow {\mathcal {X}}_u\times {\mathcal {X}}_v\) defined by \(R({\bar{u}},{\bar{v}})=(u,v)\), where (uv) is the solution of the decoupled linear problem

$$\begin{aligned} \left\{ \begin{array}{l} \int _0^T \langle \partial _tu,\varphi \rangle + \int _0^T\int _\Omega \nabla u \cdot \nabla \varphi + \mu \, {\bar{u}}_+\, u\, \varphi \\ \quad = \int _0^T\int _\Omega r \, {\bar{u}}_+ \varphi - \kappa \int _0^T\int _\Omega {\bar{u}}_+\nabla v \cdot \nabla \varphi , \quad \forall \, \varphi \in L^2(H^1), \\ \partial _tv-\Delta v+v = {\bar{u}}_+ + f\, {\bar{v}}_+ \, 1_{\Omega _c} \quad \hbox {in }Q, \\ u(0)=u_0,\ v(0)=v_0, \quad \hbox {in }\Omega , \qquad \frac{\partial v}{\partial \textbf{n}}=0, \quad \hbox {on }(0,T)\times \partial \Omega , \end{array} \right. \end{aligned}$$
(7)

where \({\bar{u}}_+:=\max \{{\bar{u}},0\}\ge 0\), \({\bar{v}}_+:=\max \{{\bar{v}},0\}\ge 0\). In fact, first we compute v and after u. In the following lemmas, we will prove that the hypotheses of the Leray-Schauder fixed point theorem are satisfied.

Lemma 5

The operator \(R:{\mathcal {X}}_u\times {\mathcal {X}}_v\rightarrow {\mathcal {X}}_u\times {\mathcal {X}}_v\) is well defined and compact.

Proof

Since \(f\in L^{2+}(Q_c)\) and \({\bar{v}}\in L^{\infty }(Q)\), then \(f {\bar{v}}\in L^{2+}(Q)\). Hence, there exists a unique \(v\in X_{2+} \) solution of the v-problem in (7). Considering the linear parabolic u-problem in (7), one has \(u\in W_2\) owing to \(v\in X_{2+}\), hence \(\nabla v\in L^{4+}(Q)\) and then \(\bar{u}_+\nabla v \in L^2(Q)\). Finally, since R maps bounded sets of \({\mathcal {X}}_u\times {\mathcal {X}}_v\) into bounded sets of \(W_2 \times X_{2+}\), then R is compact from \({\mathcal {X}}_u\times {\mathcal {X}}_v\) to itself. \(\square \)

Lemma 6

The set

$$\begin{aligned} T_\alpha =\{(u,v)\in W_2\times X_{2+}:\, (u,v)=\alpha R(u,v)\hbox { for some }\alpha \in [0,1]\} \end{aligned}$$

is bounded in \({\mathcal {X}}_u\times {\mathcal {X}}_v\) (independently of \(\alpha \in [0,1]\)). In fact, \(T_\alpha \) is also bounded in \( W_2\times X_{2+}\), because there exists

$$\begin{aligned} M=M(r,\mu ,\kappa ,\vert \Omega \vert ,T,\Vert u_0\Vert _{L^2},\Vert v_0\Vert _{W^{1^+,2^+}},\Vert f\Vert _{L^{2+}(Q_c)})>0, \end{aligned}$$
(8)

with M independent of \(\alpha \), such that

$$\begin{aligned} \Vert (u,v) \Vert _{W_2 \times X_{2+}} \le M, \quad \forall \,(u,v)\in T_\alpha ,\ \forall \,\alpha \in [0,1]. \end{aligned}$$
(9)

Proof

Let \((u,v)\in T_\alpha \) for \(\alpha \in (0,1]\) (the case \(\alpha =0\) is trivial). Then, due to Lemma 5, \((u,v) \in W_2 \times X_{2+}\) and satisfies the problem

$$\begin{aligned} \left\{ \begin{array}{l} \int _0^T \langle \partial _tu,\varphi \rangle + \int _0^T\int _\Omega \nabla u \cdot \nabla \varphi + \mu \,{u}_+\, u\, \varphi \\ \quad = \alpha \int _0^T\int _\Omega r \,{u}_+ \varphi - \kappa \int _0^T\int _\Omega {u}_+\nabla v \cdot \nabla \varphi , \quad \forall \, \varphi \in L^2(H^1), \\ \partial _tv-\Delta v+v = \alpha \,{u}_+ + \alpha \, f\,{v}_+ \, 1_{\Omega _c} \quad \hbox {a.e. in }Q, \end{array} \right. \end{aligned}$$
(10)

endowed with the corresponding initial and boundary conditions. Therefore, it suffices to look for a bound of (uv) in \(W_2 \times X_{2+}\) independent of \(\alpha \). This bound is carried out into six steps:

Step 1: Non-negativity: \(u,v\ge 0\).

Taking, in (10)\(_1\), \(\varphi =u_-:=\min \{u,0\}\le 0\) (that is possible because \(u\in L^2(H^1)\)), and considering that \(u_-=0\) if \(u\ge 0\), \(\nabla u_-=\nabla u\) if \(u\le 0\), and \(\nabla u_-=0\) if \(u>0\), we have

$$\begin{aligned} \frac{1}{2}\frac{d}{dt}\Vert u_-\Vert ^2+\Vert \nabla u_-\Vert ^2= \kappa (u_+\nabla v,\nabla u_-) +\alpha \, r \, (u_+,u_-) - \mu \, ((u_+)u,u_-) =0. \end{aligned}$$

Thus \(u_-\equiv 0\) and, consequently, \(u\ge 0\). Similarly, testing (10)\(_2\) by \(v_-\),

$$\begin{aligned} \frac{1}{2}\frac{d}{dt}\Vert v_-\Vert ^2+\Vert \nabla v_-\Vert ^2+\Vert v_-\Vert ^2=\alpha (u_+,v_-)+\alpha (fv_+,v_-)_{\Omega _c}\le 0, \end{aligned}$$

which implies \(v_-\equiv 0\) and then \(v\ge 0\). In particular, (uvf) is also the solution of problem (10) changing \(u_+\) by u and \(v_+\) by v. Therefore, fixed points of R are in particular weak solutions of problem (1).

Step 2: Boundedness of \(\int _\Omega u(x,t) \, dx \).

Taking \(\varphi =1\) in (10)\(_1\), we obtain

$$\begin{aligned} \frac{d}{dt} \int _{\Omega } u(x,t) \, dx + \mu \, \int _{\Omega } u^2(x,t) \, dx= \alpha \, r \, \int _{\Omega } u(x,t) \, dx. \end{aligned}$$
(11)

Using the Cauchy-Schwartz inequality \( \int _{\Omega } u(x,t) \, dx \le \vert \Omega \vert ^{1/2} \, \left( \int _{\Omega } u^2(x,t) \, dx \right) ^{1/2} \) and the change of variables \(y(t)=\int _{\Omega } u(x,t) \, dx\), (11) becomes

$$\begin{aligned} y'(t) + \frac{ \mu }{\vert \Omega \vert } \, y(t)^2 \le r \, y(t). \end{aligned}$$
(12)

Through a standard comparison argument with the logistic ODE \(z'=r\, z(1- z/K)\) for the “capacity" constant \(K=r\vert \Omega \vert /\mu \), from inequality (12) we arrive at the bound

$$\begin{aligned} y(t)=\int _{\Omega } u(x,t) \, dx \le \max \left\{ m_0,\frac{r\vert \Omega \vert }{\mu } \right\} :=K_1, \quad \forall t\ge 0. \end{aligned}$$
(13)

Step 3: Boundedness of u in \(L^2(0,T;L^2(\Omega ))\).

Integrating directly over (0, T) for a fixed \(T>0\) in (11), and using (13), we obtain

$$\begin{aligned} \int _0^T \int _{\Omega } u^2(x,t) \, dx \, dt \le \frac{m_0+\alpha \, r \, K_1 \, T}{\mu } \le \frac{m_0+r \, K_1 \, T}{\mu }:=K_2(T), \end{aligned}$$

which implies that

$$\begin{aligned} \Vert u \Vert _{L^2(Q)}^2 \le K_2(T). \end{aligned}$$

Step 4: Boundedness of v in \(L^\infty (0,T;H^1(\Omega ))\cap L^2(0,T;H^2(\Omega ))\).

Taking v as test function in (10)\(_2\) and using that \(\alpha \in (0,1]\), we obtain

$$\begin{aligned}{} & {} \frac{1}{2} \frac{d}{dt} \Vert v \Vert _{L^2}^2 + \Vert v \Vert _{H^1}^2 \le \Vert u \Vert _{L^2} \Vert v \Vert _{L^2} + \Vert f \Vert _{L^2} \Vert v \Vert _{L^4}^2 \nonumber \\{} & {} \quad \le \Vert u \Vert _{L^2} \Vert v \Vert _{L^2} + \Vert f \Vert _{L^2} \Vert v \Vert _{L^2} \Vert v \Vert _{H^1} \le \delta \, \Vert v \Vert _{H^1}^2 + C_{\delta } \, \left( \Vert u \Vert _{L^2}^2 + \Vert f \Vert _{L^2}^2 \Vert v \Vert _{L^2}^2 \right) \nonumber \\ \end{aligned}$$
(14)

where we have used the following standard inequality in 2D domains

$$\begin{aligned} \Vert u\Vert _{L^{4}} \le C\Vert u\Vert _{L^2}^{1 / 2}\Vert u\Vert _{H^{1}}^{1 / 2}, \quad \forall u \in H^{1}(\Omega ). \end{aligned}$$

Therefore, taking \(\delta \) small enough in (14), we get

$$\begin{aligned} \frac{d}{dt} \Vert v \Vert _{L^2}^2 + \Vert v \Vert _{H^1}^2 \le C \, \left( \Vert u \Vert _{L^2}^2 + \Vert f \Vert _{L^2}^2 \Vert v \Vert _{L^2}^2 \right) . \end{aligned}$$

From Gronwall’s lemma, and due to the boundedness of u and f in \(L^2(Q)\), one has v bounded in \(L^\infty (0,T;L^2(\Omega ))\cap L^2(0,T;H^1(\Omega ))\). Now, taking \(-\Delta v\) as test function in (10)\(_2\), we obtain

$$\begin{aligned}{} & {} \frac{1}{2} \frac{d}{dt} \Vert \nabla v \Vert _{L^2}^2 + \Vert \Delta v \Vert _{L^2}^2 + \Vert \nabla v \Vert _{L^2}^2 = -\alpha \, \int _{\Omega } u \, \Delta v \, dx - \alpha \, \int _{\Omega } f \, v \, \Delta v \, dx \nonumber \\{} & {} \quad \le \Vert u \Vert _{L^2} \Vert \Delta v \Vert _{L^2} + \Vert f \Vert _{L^{2+}} \Vert v \Vert _{H^1} \Vert \Delta v \Vert _{L^2} \nonumber \\{} & {} \quad \le \delta \, \left( \Vert \Delta v \Vert _{L^2}^2 + \Vert v \Vert _{H^1}^2 \right) + C_{\delta } \, \left( \Vert u \Vert _{L^2}^2 + \Vert f \Vert _{L^{2+}}^2 \Vert v \Vert _{H^1}^2 \right) . \end{aligned}$$
(15)

Adding (14) to (15) and taking \(\delta \) small enough, we obtain

$$\begin{aligned} \begin{array}{rcl} \displaystyle \frac{d}{dt} \Vert v \Vert _{H^1}^2 + \Vert v \Vert _{H^2}^2\le & {} C \, \Big ( \Vert u \Vert _{L^2}^2 + \Vert f \Vert _{L^{2+}}^2 \Vert v \Vert _{H^1}^2 \Big ). \end{array} \end{aligned}$$

Hence, v is bounded in \(L^\infty (0,T;H^1(\Omega ))\cap L^2(0,T;H^2(\Omega ))\).

Step 5: u is bounded in \(L^\infty (0,T;L^2(\Omega ))\cap L^2(0,T;H^1(\Omega ))\).

By testing (10)\(_1\) by u, after a few computations, we get

$$\begin{aligned}{} & {} \frac{1}{2} \frac{d}{dt} \Vert u \Vert _{L^2}^2 + \Vert \nabla u \Vert _{L^2}^2 + \mu \, \Vert u \Vert _{L^3}^3 \\{} & {} \quad \le \kappa \, \Vert u\Vert _{L^{4}}\Vert \nabla v\Vert _{L^{4}}\Vert \nabla u\Vert _{L^2} + r\,\alpha \, \Vert u \Vert _{L^2}^2 \le C\Vert u\Vert _{L^2}^{2}\Vert \nabla v\Vert _{L^{4}}^{4}+\frac{1}{2}\Vert u\Vert _{H^{1}}^{2} +r\, \Vert u \Vert _{L^2}^2. \end{aligned}$$

Adding \(\Vert u \Vert _{L^2}^2 \) to both sides of this inequality, we arrive at

$$\begin{aligned} \frac{\textrm{d}}{\textrm{d} t}\Vert u\Vert _{L^2}^{2}+\Vert u\Vert _{H^{1}}^{2} \le C\Vert \nabla v\Vert _{L^{4}}^{4}\Vert u\Vert _{L^2}^{2}+ 2 \, (r+1) \Vert u \Vert _{L^2}^2. \end{aligned}$$

Therefore, applying the Gronwall lemma and using Step 4, we obtain that u is bounded in \( L^{\infty }(0, T; L^{2}(\Omega )) \cap L^{2}(0, T; H^{1}(\Omega )) \).

Step 6: v is bounded in \(L^\infty (0,T;W^{1+,2+}(\Omega ))\cap L^{2+}(0,T;W^{2,2+}(\Omega ))\).

By interpolation, from Step 4 and Step 5 we also have bounds for v in \(L^{\infty -}(Q)\) and u in \(L^4(Q)\), respectively. Therefore, \(u+f \, v \in L^{2+}(Q)\). Then, the heat regularity result in Theorem 4 allows us to deduce that \(v \in X_{2^+}\) and to obtain the corresponding bound on \(X_{2^+}\) depending on \(\Vert v_0 \Vert _{W^{1^+,2^+}(\Omega )}\) and the bound of \(u+f \, v \) in \(L^{2+}(Q)\).

This finishes the proof of Lemma 6. \(\square \)

Lemma 7

The operator \(R:{\mathcal {X}}_u\times {\mathcal {X}}_v\rightarrow {\mathcal {X}}_u\times {\mathcal {X}}_v\), defined in (7), is continuous.

The proof is similar to Lemma 3.4 in [11].

Consequently, from Lemmas 5, 6 and 7, the Leray-Schauder fixed point theorem implies that the map \(R({\bar{u}},{\bar{v}})\) has at least one fixed point \(R(u,v)=(u,v)\) which is a weak solution to system (1) in (0, T).

Finally, we observe that estimate (2) is shown following the same steps given in the proof of Lemma 6 above (now for the case \(\alpha =1\)).

2.2 Uniqueness of Solution

This proof follows the same argument as in [11], but it is included here for the reader convenience. Let \((u_1,v_1),\, (u_2,v_2)\in W_2\times X_{2}\) be two weak solutions of system (1). Substracting equations (1) for \((u_1,v_1)\) and \((u_2,v_2)\), and denoting \((u,v):=(u_1-u_2,v_1-v_2)\), we obtain the following system

$$\begin{aligned} \left\{ \begin{array}{rcl} \partial _tu-\Delta u + \kappa \, \nabla \cdot (u_1\nabla v+u\nabla v_2)&{}=&{} r \, u -\mu \, u \, (u_1+u_2) \ \hbox { in }Q,\\ \partial _tv-\Delta v+v&{}=&{}u+f\,v\, 1_{\Omega _c}\ \hbox { in }Q,\\ u(0,\cdot )&{}=&{}0,\ v(0,\cdot )=0\ \hbox { in }\Omega ,\\ \frac{\partial u}{\partial \textbf{n}}&{}=&{}0,\ \frac{\partial v}{\partial \textbf{n}}=0\ \hbox { on }(0,T)\times \partial \Omega . \end{array} \right. \end{aligned}$$
(16)

Testing (16)\(_1\) by \(u\in L^2(H^1)\) and (16)\(_2\) by \(v-\Delta v\in L^2(Q)\), we have

$$\begin{aligned}{} & {} \frac{1}{2} \frac{d}{dt}\left( \Vert u\Vert ^2+\Vert \nabla v\Vert ^2\right) + \Vert \nabla u\Vert ^2+\Vert \Delta v\Vert ^2+\Vert \nabla v\Vert ^2 + \mu \, \int _{\Omega } u^2 \, (u_1+u_2) \, dx \nonumber \\{} & {} \quad = r \, \Vert u \Vert ^2 + \kappa \, (u_1\nabla v+ u\nabla v_2,\nabla u) +(u+fv,-\Delta v). \end{aligned}$$
(17)

Note that the term \( \mu \, \displaystyle \int _{\Omega } u^2 \, (u_1+u_2) \, dx\) has the good sign.

Applying Hölder and Young inequalities, we obtain

$$\begin{aligned}{} & {} ( u_1\nabla v,\nabla u) \le \Vert u_1\Vert _{L^4} \Vert \nabla v \Vert _{L^4} \Vert \nabla u \Vert \le C \Vert u_1 \Vert _{L^4} \Vert \nabla v \Vert ^{1/2} \Vert \nabla v \Vert ^{1/2}_{H^1} \Vert \nabla u \Vert \nonumber \\{} & {} \quad \le \delta (\Vert \nabla v\Vert ^2_{H^1}+\Vert \nabla u\Vert ^2)+C_\delta \Vert u_1\Vert ^4_{L^4}\Vert \nabla v\Vert ^2, \end{aligned}$$
(18)
$$\begin{aligned}{} & {} (u\nabla v_2,\nabla u)\le \Vert u\Vert _{L^4}\Vert \nabla v_2\Vert _{L^4}\Vert \nabla u\Vert \le C\Vert u\Vert ^{1/2}\Vert u\Vert _{H^1}^{1/2}\Vert \nabla v_2\Vert _{L^4}\Vert \nabla u\Vert \nonumber \\{} & {} \quad \le \delta \Vert u\Vert ^2_{H^1}+C_\delta \Vert \nabla v_2\Vert ^4_{L^4}\Vert u\Vert ^2, \end{aligned}$$
(19)
$$\begin{aligned}{} & {} (u,v-\Delta v)\le \delta (\Vert v\Vert ^2+ \Vert \Delta v\Vert ^2)+C_\delta \Vert u\Vert ^2, \end{aligned}$$
(20)
$$\begin{aligned}{} & {} \quad (fv,v-\Delta v)\le \Vert f \Vert _{L^{2+}} \Vert v \Vert _{H^{1}} \Vert v-\Delta v \Vert _{L^2} \le \delta \Vert v\Vert ^2_{H^2}+C_\delta \Vert f\Vert ^{2}_{L^{2+}}\Vert v\Vert ^2_{H^1}. \nonumber \\ \end{aligned}$$
(21)

Using (18)-(21) in (17), we obtain

$$\begin{aligned} \begin{array}{l} \frac{d}{dt}\left( \Vert u\Vert ^2+\Vert v\Vert _{H^1}^2 \right) + \Vert u \Vert _{H^1}^2 + \Vert v\Vert _{H^2}^2 \\ \quad \le C \, \Big (\Vert u \Vert ^2 +\Vert u_1\Vert ^4_{L^4}\Vert \nabla v\Vert ^2 + \Vert \nabla v_2\Vert ^4_{L^4}\Vert u\Vert ^2 +\Vert f\Vert ^{2}_{L^{2+}}\Vert v\Vert ^2_{H^1} \Big ). \end{array} \end{aligned}$$

Since \(\Vert u_1\Vert ^4_{L^4}+ \Vert \nabla v_2\Vert ^4_{L^4}+ \Vert f\Vert ^{2}_{L^{2+}} \in L^1(0,T)\) and \(u_0=v_0=0\), Gronwall’s lemma implies uniqueness. This finishes the proof of Theorem 1.

3 Proof of Theorem 2

The admissible set for the optimal control problem (3) is defined by

$$\begin{aligned} {\mathcal {S}}_{ad}=\{s=(u,v,f)\in W_2\times X_{2+}\times {\mathcal {F}}:\, s \hbox { is a weak solution of} (1) \hbox {in }(0,T)\}. \end{aligned}$$

From Theorem 1 one has \({\mathcal {S}}_{ad}\ne \emptyset \). Let \(\{s_m\}_{m\in {\mathbb {N}}}:=\{(u_m,v_m,f_m)\}_{m\in {\mathbb {N}}}\subset {\mathcal {S}}_{ad}\) be a minimizing sequence of J, that is, \(\displaystyle \lim _{m\rightarrow +\infty }J(s_m)=\inf _{s\in {\mathcal {S}}_{ad}}J(s)\). Then, by the definition of \({\mathcal {S}}_{ad}\), for each \(m\in {\mathbb {N}}\), \(s_m\) satisfies system (11)\(_1\) variationally in \(L^2((H^1)')\) and (11)\(_2\) a.e. \((t,x)\in Q\).

From the definition of J and the assumption that either \(\gamma _f>0\) or \({\mathcal {F}}\) is bounded in \(L^{2+}(Q_c)\), it follows that

$$\begin{aligned} \{f_m\}_{m\in {\mathbb {N}}}\hbox { is bounded in }L^{{2+}}(Q_c). \end{aligned}$$
(22)

From (8)–(9), there exists \(C>0\), independent of m, such that

$$\begin{aligned} \Vert (u_m,v_m)\Vert _{W_2\times X_{2+}}\le C. \end{aligned}$$
(23)

Therefore, from (22), (23), and taking into account that \({\mathcal {F}}\) is a closed convex subset of \(L^{2+}(Q_c)\) (hence it is weakly closed in \(L^{2+}(Q_c)\)), there exists \({\tilde{s}}=({\tilde{u}},{\tilde{v}},{\tilde{f}})\in W_2\times X_{2+}\times {\mathcal {F}}\) such that, for some subsequence of \(\{s_m\}_{m\in {\mathbb {N}}}\), still denoted by \(\{s_m\}_{m\in {\mathbb {N}}}\), the following convergences hold, as \(m\rightarrow +\infty \):

$$\begin{aligned} u_m\rightarrow & {} {\tilde{u}}\quad \hbox {weakly in }L^{2}(H^{1})\hbox { and weakly* in }L^\infty (L^{2}), \end{aligned}$$
(24)
$$\begin{aligned} v_m\rightarrow & {} {\tilde{v}} \quad \hbox {weakly in }L^{2+}(W^{2,2+})\hbox { and weakly* in }L^\infty (W^{1+,2+}), \end{aligned}$$
(25)
$$\begin{aligned} \partial _tu_m\rightarrow & {} \partial _t{\tilde{u}} \quad \hbox {weakly in } L^2((H^1)'), \end{aligned}$$
(26)
$$\begin{aligned} \partial _tv_m\rightarrow & {} \partial _t{\tilde{v}} \quad \hbox {weakly in } L^{2+}(Q), \end{aligned}$$
(27)
$$\begin{aligned} f_m\rightarrow & {} {\tilde{f}} \quad \hbox {weakly in } L^{2+}(Q_c),\hbox { and }{\tilde{f}}\in {\mathcal {F}}. \end{aligned}$$
(28)

From convergences (24)–(27), using Sobolev embeddings and Aubin-Lions compactness results (see, for instance, [15, 23]), one has

$$\begin{aligned} (u_m,v_m)\rightarrow & {} ({\tilde{u}},{\tilde{v}}) \quad \hbox {strongly in } C^0([0,T];((H^1(\Omega ))'\times L^2(\Omega )), \end{aligned}$$
(29)
$$\begin{aligned} v_m\rightarrow & {} {\tilde{v}} \quad \hbox {strongly in } L^{\infty }(Q)), \end{aligned}$$
(30)
$$\begin{aligned} (u_m, \nabla v_m)\rightarrow & {} ({\tilde{u}},\nabla {\tilde{v}})\quad \hbox {strongly in } L^{4-}(Q)) \times L^{4+}(Q). \end{aligned}$$
(31)

In particular, using (28), (30) and (31), the limit of the nonlinear terms of (11) can be controlled as follows:

$$\begin{aligned} u_m\cdot \nabla v_m\rightarrow & {} {\tilde{u}}\cdot \nabla {\tilde{v}} \quad \hbox { strongly in }L^{2}(Q), \end{aligned}$$
(32)
$$\begin{aligned} f_m v_m 1_{\Omega _c}\rightarrow & {} {\tilde{f}}\,{\tilde{v}}\, 1_{\Omega _c} \quad \hbox { weakly in } L^{2+}(Q). \end{aligned}$$
(33)

Moreover, from convergence (29), \((u_m(0),v_m(0))\) converges to \(({\tilde{u}}(0),{\tilde{v}}(0))\) in \(H^1(\Omega )'\times L^2(\Omega )\), and since \(u_m(0)=u_0\), \(v_m(0)=v_0\), it follows that \({\tilde{u}}(0)=u_0\) and \({\tilde{v}}(0)=v_0\). Thus, \({\tilde{s}}\) satisfies the initial conditions given in (1). Therefore, considering the convergences (24)–(33), and taking the limit in Eq. (10) replacing (uvf) by \((u_m,v_m,f_m)\), as m goes to \(+\infty \), it is possible to conclude that \({\tilde{s}}=({\tilde{u}},{\tilde{v}},{\tilde{f}})\) is a weak solution of the system (1), that is, \({\tilde{s}}\in {\mathcal {S}}_{ad}\). Therefore,

$$\begin{aligned} \lim _{m\rightarrow +\infty }J(s_m)=\inf _{s\in {\mathcal {S}}_{ad}}J(s)\le J({\tilde{s}}). \end{aligned}$$
(34)

On the other hand, since J is lower semicontinuous on \({\mathcal {S}}_{ad}\), one has \(J({\tilde{s}}) \! \! \le \! \! \displaystyle \liminf _{m\rightarrow +\infty } J(s_m)\), which jointly with (34), implies that \({\tilde{s}}\) is a global optimal control.

4 Proof of Theorem 3

4.1 A Generic Lagrange Multipliers Theorem

We consider the Lagrange multipliers theorem given in [27] (see also [24, Chapter 6], for more details) that we will apply to get first-order necessary optimality conditions for any local optimal solution \(({\tilde{u}},{\tilde{v}},{\tilde{f}})\) of problem (3). First, we consider the following (generic) optimization problem:

$$\begin{aligned} \min _{s\in {\mathbb {M}}} J(s)\ \hbox { subject to }G(s)=0, \end{aligned}$$
(35)

where \(J:{\mathbb {X}}\rightarrow {\mathbb {R}}\) is a functional, \(G:{\mathbb {X}}\rightarrow {\mathbb {Y}}\) is an operator, \({\mathbb {X}}\) and \({\mathbb {Y}}\) are Banach spaces, and \({\mathbb {M}}\) is a nonempty closed and convex subset of \({\mathbb {X}}\). The corresponding admissible set for problem (35) is

$$\begin{aligned} {\mathcal {S}}=\{s\in {\mathbb {M}}:\, G(s)=0\}. \end{aligned}$$

Definition 2

(Lagrangian) The functional \({\mathcal {L}}:{\mathbb {X}}\times {{\mathbb {Y}}}'\rightarrow {\mathbb {R}}\) given by

$$\begin{aligned} {\mathcal {L}}(s,\xi )=J(s)-\langle \xi ,G(s)\rangle _{{\mathbb {Y}}'} \end{aligned}$$

is called the Lagrangian functional related to problem (35).

Definition 3

(Lagrange multiplier) Let \({\tilde{s}}\in {\mathcal {S}}\) be a local optimal solution for problem (35). Suppose that J and G are Fréchet differentiable in \({\tilde{s}}\). Then, any \(\xi \in {\mathbb {Y}}'\) is called a Lagrange multiplier for (35) at the point \({\tilde{s}}\) if

$$\begin{aligned} {\mathcal {L}}_s'({\tilde{s}},\xi )[r]=J'({\tilde{s}})[r]-\langle \xi , G'({\tilde{s}})[r]\rangle _{{\mathbb {Y}}'}\ge 0,\quad \forall r\in {\mathcal {C}}({\tilde{s}}), \end{aligned}$$
(36)

where \({\mathcal {C}}({\tilde{s}})=\{\theta (s-{\tilde{s}})\,:\, s\in {\mathbb {M}},\, \theta \ge 0\}\) is the conical hull of \({\tilde{s}}\) in \({\mathbb {M}}\).

Definition 4

Let \({\tilde{s}}\in {\mathcal {S}}\). It will be said that \({\tilde{s}}\) is a regular point if

$$\begin{aligned} G'({\tilde{s}})[{\mathcal {C}}({\tilde{s}})] ={\mathbb {Y}}. \end{aligned}$$

Theorem 8

([24, Theorem 6.3, p. 330], [27, Theorem 3.1]) Let \({\tilde{s}}\in {\mathcal {S}}\) be a local optimal solution for problem (35). Suppose that J is Fréchet differentiable in \({\tilde{s}}\), and G is continuously Fréchet-differentiable in \({\tilde{s}}\). If \({\tilde{s}}\) is a regular point, then there exist Lagrange multipliers for (35) at \({\tilde{s}}\).

4.2 Application of the Lagrange Multiplier Theory

Now, in order to reformulate the optimal control problem (3) in the abstract setting (35), we introduce the Banach spaces

$$\begin{aligned} {\mathbb {X}}:={W}_2\times {\widetilde{X}}_{2+}\times L^{2+}(Q_c),\ {\mathbb {Y}}:=L^2((H^1)')\times L^{2+}(Q), \end{aligned}$$

where

$$\begin{aligned} {\widetilde{X}}_{2+}=\{v\in X_{2+}: \ \partial _n v\vert _{\partial \Omega }=0\}, \end{aligned}$$

and the operator \(G=(G_1,G_2):{\mathbb {X}}\rightarrow {\mathbb {Y}}\), where

$$\begin{aligned} G_1:{\mathbb {X}}\rightarrow L^2((H^1)'),\quad G_2:{\mathbb {X}}\rightarrow L^{2+}(Q) \end{aligned}$$

are defined at each point \(s=(u,v,f)\in {\mathbb {X}}\) by

$$\begin{aligned} \left\{ \begin{array}{l} \langle G_1(s),\varphi \rangle =\langle \partial _t u, \varphi \rangle _{L^2(H^1),L^2((H^1)')} +(\nabla u-\kappa \, u\nabla v, \nabla \varphi )_{L^2} \\ \quad ~~~~~~~~~~~~~~~~~~+ (-r\, u + \mu \, u^2,\varphi )_{L^2}, \quad \forall \, \varphi \in L^2(H^1),\\ ~~~~~~~G_2(s)=\partial _tv-\Delta v+v-u-f\,v\,1_{\Omega _c} \quad \hbox {in }L^{2+}(Q). \end{array} \right. \end{aligned}$$

Thus, the optimal control problem (3) is reformulated as follows

$$\begin{aligned} \min _{s\in {{\mathbb {M}}}}J(s)\quad \hbox { subject to }\quad {G}(s)=\textbf{0}, \end{aligned}$$
(37)

where

$$\begin{aligned} {\mathbb {M}}:=({\hat{u}},{\hat{v}},0) +{\widehat{W}}_2 \times {\widehat{X}}_{2+}\times {\mathcal {F}}, \end{aligned}$$
(38)

with \(({\hat{u}},{\hat{v}})\) the global weak solution of (1) without control, i.e., \({\hat{f}}=0\), \({\mathcal {F}}\) is defined in (4) and

$$\begin{aligned} {\widehat{W}}_2 =\{u\in W_2:\, u(0)=0\}, \quad {\widehat{X}}_{2+}=\{v\in X_{2+}: \ v(0)=0, \ \partial _n v\vert _{\partial \Omega }=0\}. \end{aligned}$$

Remark 2

From Definition 2, the Lagragian associated to the optimal control problem (37) is the functional \({\mathcal {L}}:{\mathbb {X}}\times L^{2}(H^1)\times L^{2-}(Q)\rightarrow {\mathbb {R}}\) given by

$$\begin{aligned} {\mathcal {L}}(s,\lambda ,\eta )=J(s)-\langle \lambda ,G_1(s) \rangle _{L^2(H^1),L^2((H^1)')}-(\eta ,G_2(s))_{L^{2-},L^{2+}}. \end{aligned}$$

The set \({{\mathbb {M}}}\) defined in (38) is a closed convex subset of \({\mathbb {X}}\) and the admissible set of control problem (37) is

$$\begin{aligned} {\mathcal {S}}_{ad}=\{s=(u,v,f)\in {{\mathbb {M}}}:\, {G}(s)=\textbf{0}\}. \end{aligned}$$
(39)

Concerning to the differentiability of the functional J and the constraint operator G, one has the following results.

Lemma 9

The functional \(J:{\mathbb {X}}\rightarrow {\mathbb {R}}\) is Fréchet differentiable and its Fréchet derivative in \({\tilde{s}}=({\tilde{u}},{\tilde{v}},{\tilde{f}})\in {\mathbb {X}}\) in the direction \(r=(U,V,F)\in {\mathbb {X}}\) is

$$\begin{aligned} J'({\tilde{s}})[r] = \displaystyle \gamma _u\int _0^T\!\!\!\int _{\Omega } ({{\tilde{u}}} - u_d) U +\gamma _v\int _0^T \!\!\! \int _{\Omega }({\tilde{v}}-v_d)V + \displaystyle \gamma _f\int _0^T\!\!\!\int _{\Omega _c} \textrm{sgn}({\tilde{f}}) \vert {\tilde{f}} \vert ^{1+} F.\nonumber \\ \end{aligned}$$
(40)

Lemma 10

The operator \({G}:{\mathbb {X}}\rightarrow {\mathbb {Y}}\) is continuous-Fréchet differentiable and its Fréchet derivative in \({\tilde{s}}=({\tilde{u}},{\tilde{v}},{\tilde{f}})\in {\mathbb {X}}\) in the direction \(r=(U,V,F)\in {\mathbb {X}}\) is the linear operator \({G}'({\tilde{s}})[r]=(G_1'({\tilde{s}})[r],G_2'({\tilde{s}})[r])\) defined by

$$\begin{aligned} \left\{ \begin{array}{l} \langle G_1'({\tilde{s}})[r], \varphi \rangle = \langle \partial _tU, \varphi \rangle +(\nabla U- \kappa \, U\nabla {\tilde{v}}-\kappa \, {\tilde{u}}\nabla V, \nabla \varphi ) \\ ~~~~~~~~~~~~~~~~~~~~~~~~~ + (-r\, U + 2\mu \, {\tilde{u}}\, U, \varphi ), \quad \forall \, \varphi \in L^2(H^1),\\ ~~~~~~~~G_2'({\tilde{s}})[r]=\partial _tV-\Delta V+V-U-{\tilde{f}}\,V\,1_{\Omega _c}-F{\tilde{v}} \,1_{\Omega _c}. \end{array} \right. \nonumber \\ \end{aligned}$$
(41)

4.3 The Linearized Problem (41) is Surjective

Lemma 11

If \({\tilde{s}}=({\tilde{u}},{\tilde{v}},{\tilde{f}})\in {\mathcal {S}}_{ad}\) (\({\mathcal {S}}_{ad}\) defined in (39)), then \({\tilde{s}}\) is a regular point.

Proof

From Definition 4, one has that \({\tilde{s}}=({\tilde{u}},{\tilde{v}},{\tilde{f}})\in {\mathcal {S}}_{ad}\) is a regular point if for any \((g_u,g_v)\in {\mathbb {Y}} = L^2((H^1)')\times L^{2+}(Q)\) there exists \(r=(U,V,F)\in {\widehat{W}}_2\times {\widehat{X}}_{2+}\times {\mathcal {C}}({\tilde{f}})\) such that \( {G}'({\tilde{s}})[r]=(g_u,g_v), \) where \({\mathcal {C}}({\tilde{f}}):=\{\theta (f-{\tilde{f}})\,:\, \theta \ge 0,\, f\in {\mathcal {F}}\}\) is the conical hull of \({\tilde{f}}\) in \({\mathcal {F}}\). Since \(0\in {\mathcal {C}}({\tilde{f}})=\{\theta (f-{\tilde{f}})\,:\, \theta \ge 0,\, f\in {\mathcal {F}}\}\), it suffices to show the existence of \((U,V)\in {\widehat{W}}_2 \times {\widehat{X}}_{2+}\) solving the linear problem

$$\begin{aligned} \left\{ \begin{array}{l} \langle \partial _tU, \varphi \rangle +(\nabla U- \kappa \, U\nabla {\tilde{v}}- \kappa \, {\tilde{u}}\nabla V, \nabla \varphi ) \\ \quad + (-r\, U + 2\mu \, {\tilde{u}}\, U, \varphi ) = \langle g_u, \varphi \rangle ,\quad \forall \, \varphi \in L^{2}(H^{1}),\\ \partial _tV-\Delta V+V-U-{\tilde{f}}\,V \,1_{\Omega _c}=g_v \quad \hbox { in }L^{2+}(Q). \end{array} \right. \end{aligned}$$
(42)

To this end, we will use the Leray-Schauder fixed point Theorem for the operator

$$\begin{aligned} S:({\overline{U}},{\overline{V}})\in L^{4-}(Q)\times L^{\infty }(Q)\mapsto (U,V)\in {\widehat{W}}_{2}\times {\widehat{X}}_{2+}, \end{aligned}$$

where (UV) is the solution of the decoupled problem (first V and after U)

$$\begin{aligned} \left\{ \begin{array}{l} \langle \partial _t U, \varphi \rangle +(\nabla U- \kappa \, U\nabla {\tilde{v}}- \kappa \,{\tilde{u}}\nabla V, \nabla \varphi ) \\ \qquad = (r\, {{\overline{U}}} - 2\mu \, {\tilde{u}}\, {{\overline{U}}}, \varphi ) + \langle g_u, \varphi \rangle , \quad \forall \, \varphi \in L^{2}(H^{1}),\\ \partial _t V-\Delta V+V= {\overline{U}}+{\tilde{f}}\,{\overline{V}} 1_{\Omega _c}+g_v\quad \hbox { in }Q. \end{array} \right. \end{aligned}$$
(43)

Let us show that S satisfies the hypothesis of the Leray-Schauder Theorem.

Step 1 (S is well-defined, continuous and bounded).

We prove that S maps bounded sets in \( L^{4-}(Q)\times L^{\infty }(Q)\) in bounded sets in \((U,V)\in {W}_{2}\times {X}_{2+}\). In particular, using that problem (42) is linear, it is not difficult to prove the continuity of S from \(L^{4-}(Q)\times L^{\infty }(Q)\) to itself.

Since \(({\overline{U}}, {\overline{V}})\in L^{4-}(Q)\times L^{\infty }(Q)\), then \(f\, {\overline{V}} \in L^{2+}(Q)\). Applying \(L^{2+}\)-regularity to the heat equation (43)\(_2\) (Theorem 4), one has \(V \in X_{2+}\) and

$$\begin{aligned} \Vert V \Vert _{X_{2+}} \le C \, \left( \Vert {\overline{U}}\Vert _{L^{2+}} + \Vert {\tilde{f}}\Vert _{L^{2+}(Q_c)} \Vert {\overline{V}} \Vert _{L^{\infty }} + \Vert g_v \Vert _{L^{2+}(Q)} \right) . \end{aligned}$$
(44)

Taking \(\varphi =U\) in (43)\(_1\), we arrive at

$$\begin{aligned}{} & {} \frac{d}{dt}\Vert U \Vert ^2_{L^2} + \Vert U \Vert ^2_{H^1} \le C_1(1+ \Vert \nabla {\tilde{v}} \Vert _{L^{4}}^4) \Vert U \Vert ^2_{L^2}\nonumber \\{} & {} \qquad +C_2 \Big ( \Vert {\tilde{u}} \Vert ^2_{L^{4}} \Vert \nabla V\Vert ^2_{L^{4}} + (1+ \Vert {\tilde{u}} \Vert _{ L^{4}}^2) \Vert {{\overline{U}}}\Vert _{L^{2}}^2 +\Vert g_u \Vert _{(H^1)'}^2 \Big ). \end{aligned}$$
(45)

Finally, using 2D interpolation estimates, we have

$$\begin{aligned} \Vert {\tilde{u}} \Vert _{L^{4}(Q)}^2 \Vert \nabla V\Vert _{L^{4}(Q)}^2 \le \Vert {\tilde{u}} \Vert _{W_2}^2 \Vert V\Vert _{X_2}^2. \end{aligned}$$

Then, using (44), Gronwall’s Lemma applied to (45) guarantees the bound for U in \(W_2\).

Step 2 (compactness): Using that \({W}_{2}\times {X}_{2+}\) is compactly embedded in \(L^{4-}(Q)\times L^{\infty }(Q)\), it follows that the operator S is compact.

Step 3 (boundedness of possible fixed points): Now, we will show that the set \(S_\alpha :=\{(U,V)\in {\widehat{W}}_{2}\times {\widehat{X}}_{2+}\,:\, (U,V)=\alpha \, S(U,V)\hbox { for some }\alpha \in [0,1]\}\) is bounded in \(L^{4-}(Q)\times L^{\infty }(Q)\) (with respect to \(\alpha \)). Indeed, if \((U,V)\in S_\alpha ,\) then \((U,V)\in {\widehat{W}}_{2}\times {\widehat{X}}_{2+}\) and it solves the coupled linear problem

$$\begin{aligned} \left\{ \begin{array}{l} \langle \partial _tU, \varphi \rangle +(\nabla U- \kappa \,U\nabla {\tilde{v}}-\kappa \, {\tilde{u}}\nabla V, \nabla \varphi ) \\ \qquad =\alpha (r\, U - 2\mu \, {\tilde{u}}\, U, \varphi ) + \alpha \langle g_u, \varphi \rangle , \quad \forall \, \varphi \in L^{2}(H^{1}), \\ \partial _tV-\Delta V+V=\alpha U+\alpha {\tilde{f}}V 1_{\Omega _c}+\alpha g_v\ \hbox { in }Q. \end{array} \right. \end{aligned}$$
(46)

Taking \(\varphi =U\) in (46)\(_1\), one obtains (see (45))

$$\begin{aligned} \begin{array}{l}\displaystyle \frac{d}{dt} \Vert U \Vert ^2 + \Vert \nabla U \Vert ^2 +2 \alpha \, \mu \, \int _\Omega {\tilde{u}}\, U ^2 \\ \qquad \le C \left( \alpha +\Vert \nabla {\tilde{v}} \Vert _{L^4}^4 \right) \, \Vert U \Vert ^2 + C \, \Vert {\tilde{u}} \Vert _{L^{4}}^4 \Vert \nabla V \Vert ^2 + \alpha ^2 \, \Vert g_u \Vert _{(H^1)'}^2. \end{array} \end{aligned}$$
(47)

Now, testing (46)\(_2\) by \(V-\Delta V \in L^{2+}(Q)\), one gets

$$\begin{aligned} \frac{d}{dt} \Vert V \Vert _{H^1}^2 + \Vert V \Vert _{H^2}^2 \le C \, \alpha ^2 \Vert f \Vert _{L^{2+}}^2 \, \Vert V \Vert _{H ^1}^2 + \alpha ^2 \, \left( \Vert g_v \Vert ^2 + \Vert U \Vert ^2 \right) . \end{aligned}$$
(48)

From inequalities (47) and (48) and using that \(\alpha \le 1\), one obtains

$$\begin{aligned}{} & {} \frac{d}{dt} \left( \Vert U \Vert ^2 + \Vert V \Vert _{H^1}^2 \right) + \Vert U \Vert _{H^1}^2 + \Vert V \Vert _{H^2}^2\\{} & {} \quad \le C \, \left( 1+\Vert \nabla {\tilde{v}} \Vert _{L^4}^4 \right) \, \Vert U \Vert ^2 + C \, \Big ( \Vert f \Vert _{L^{2+}}^2 + \Vert {\tilde{u}} \Vert _{L^{4}}^4 \Big ) \Vert V \Vert _{H^1}^2 \hbox {} + C \, \Big ( \Vert g_u \Vert _{(H^1)'}^2 + \Vert g_v \Vert ^2 \Big ). \end{aligned}$$

Using that \(U(0)=V(0)=0\) and \(\Vert g_u \Vert _{(H^1)'}^2\), \(\Vert g_v \Vert _{L^2}^2\), \(\Vert f \Vert _{L^{2+}} ^2\), \(\Vert {\tilde{u}} \Vert _{L^{4}}^2\) and \(\Vert \nabla {\tilde{v}} \Vert _{L^4}^2\) belongs to \(L^1(0,T)\), Gronwall’s Lemma implies that

$$\begin{aligned} \Vert (U,V) \Vert _{W_2\times X_2} \le C. \end{aligned}$$

Finally, applying the \(L^{2+}\)-regularity of the parabolic-Neumann problem (Theorem 4), one has \( \Vert V \Vert _{X_{2+}} \le C. \)

Step 4 (conclusion): Applying the Leray-Schauder fixed point theorem, one has the existence of \((U,V)\in W_2\times X_{2+}\), a solution of problem (42). Its uniqueness is directly deduced from the linearity of problem (42). \(\square \)

4.4 Existence of Lagrange Multipliers

Now, the existence of Lagrange multiplier for problem (3) associated to any local optimal solution \({\tilde{s}}=({\tilde{u}},{\tilde{v}},{\tilde{f}})\in {\mathcal {S}}_{ad}\) will be shown.

Theorem 12

Let \({\tilde{s}}=({\tilde{u}},{\tilde{v}},{\tilde{f}})\in {\mathcal {S}}_{ad}\) be a local optimal solution for the control problem (3). Then, there exists a Lagrange multiplier \(\xi =(\lambda ,\eta )\in L^{2}(H^1)\times L^{2-}(Q)\) such that, for all \((U,V,F)\in {\widehat{W}}_2 \times {\widehat{X}}_{2+}\times {\mathcal {C}}({\tilde{f}})\),

$$\begin{aligned}{} & {} \gamma _u\int _0^T\int _{\Omega } ({\tilde{u}}-u_d) U+\gamma _v\int _0^T\int _{\Omega }({\tilde{v}}-v_d)V +\gamma _f\int _0^T\int _{\Omega _c} \textrm{sgn}({\tilde{f}}) \vert {\tilde{f}} \vert ^{1+} F \nonumber \\{} & {} -\int _0^T \langle \partial _t U, \lambda \rangle -\int _0^T\int _\Omega (\nabla U- \kappa \, U\nabla {\tilde{v}}- \kappa \,{\tilde{u}}\nabla V,\nabla \lambda ) + (-r U + 2 \mu {\tilde{u}} U, \lambda ) \nonumber \\{} & {} -\int _0^T\int _\Omega \bigg (\partial _tV-\Delta V+V-U-{\tilde{f}}V 1_{\Omega _c}\bigg )\eta +\int _0^T\int _{\Omega _c}F{\tilde{v}} 1_{\Omega _c} \eta \ge 0. \end{aligned}$$
(49)

Proof

From Lemma 11, \({\tilde{s}}\in {\mathcal {S}}_{ad}\) is a regular point. Therefore, from Theorem 8, (36)\(_2\) and Remark 2, there exists a Lagrange multiplier \(\xi =(\lambda ,\eta )\in L^{2}(H^1)\times L^{2-}(Q)\) such that

$$\begin{aligned} {\mathcal {L}}'_s(s,\lambda ,\eta )[r] \! = \! J'({\tilde{s}})[r]-\langle \lambda , G_1'({\tilde{s}})[r]\rangle _{L^{2}(H^1), L^{2}((H^1)'} \! - \! ( \eta , G_2'({\tilde{s}})[r])_{L^{2}}\ge 0, \end{aligned}$$
(50)

for all \(r=(U,V,F)\in {\widehat{W}}_2\times {\widehat{X}}_{2+} \times {\mathcal {C}}({\tilde{f}}).\) The proof follows from (40), (41), and (50). \(\square \)

From Theorem 12, an optimality system for problem (3) can be derived.

Corollary 13

Let \({\tilde{s}}=({\tilde{u}},{\tilde{v}},{\tilde{f}})\in {\mathcal {S}}_{ad}\) be a local optimal solution for the control problem (3). Then any Lagrange multiplier \((\lambda ,\eta )\in L^{2}(H^1)\times L^{2-}(Q)\) provided by Theorem 12 satisfies the system

$$\begin{aligned}{} & {} \int _0^T\langle \partial _tU, \lambda \rangle +\int _0^T\int _\Omega (\nabla U- \kappa \,U\nabla {\tilde{v}})\cdot \nabla \lambda + (-r U + 2 \mu {\tilde{u}} U, \lambda ) -\int _0^T\int _\Omega U\eta \nonumber \\{} & {} \quad =\gamma _u\int _0^T\int _{\Omega } ({\tilde{u}}-u_d) U,\qquad \forall \, U\in {\widehat{W}}_2, \end{aligned}$$
(51)
$$\begin{aligned}{} & {} \int _0^T\int _\Omega \bigg (\partial _t V-\Delta V+V\bigg )\eta -\int _0^T\int _{\Omega _c}{\tilde{f}}V\eta + \kappa \int _0^T\int _\Omega {\tilde{u}}\nabla V \cdot \nabla \lambda \nonumber \\{} & {} \quad =\gamma _v\int _0^T\int _{\Omega }({\tilde{v}}-v_d)V,\qquad \forall \,V\in {\widehat{X}}_{2+}, \end{aligned}$$
(52)

and the optimality condition

$$\begin{aligned} \int _0^T\int _{\Omega _c}(\gamma _f \textrm{sgn}({\tilde{f}}) \vert {\tilde{f}} \vert ^{1+}+{\tilde{v}}\eta )(f-{\tilde{f}})\ge 0,\qquad \forall f\in {\mathcal {F}}. \end{aligned}$$
(53)

Proof

From (49), taking \((V,F)=(0,0)\), and using that \({\widehat{W}}_2\) is a vector space, (51) holds. Similarly, taking \((U,F)=(0,0)\) in (49), and taking into account that \({\widehat{X}}_{2+}\) is a vector space, (52) is deduced. Finally, taking \((U,V)=(0,0)\) in (49), one obtains

$$\begin{aligned} \gamma _f\int _0^T\int _{\Omega _c} \textrm{sgn}({\tilde{f}}) \vert {\tilde{f}} \vert ^{1+} F+\int _0^T\int _{\Omega _c}{\tilde{v}}\, \eta \, F\ge 0,\quad \forall \, F\in {\mathcal {C}}({\tilde{f}}). \end{aligned}$$

Thus, choosing \(F=\theta (f-{\tilde{f}})\in {\mathcal {C}}({\tilde{f}})\) for all \(f\in {\mathcal {F}}\) and \(\theta \ge 0\), (53) is deduced. \(\square \)

Remark 3

A pair \((\lambda ,\eta )\in L^{2}(H^1) \times L^{2-}(Q)\) satisfying (51)–(52) corresponds to the concept of a very weak solution (at least for the \(\eta \)-variable) of the linear problem (5).

4.5 Regularity of Lagrange Multipliers

Theorem 14

Let \({\tilde{s}}=({\tilde{u}},{\tilde{v}},{\tilde{f}})\in {\mathcal {S}}_{ad}\) be a local optimal solution for problem (3). Then, problem (5) has a unique solution \((\lambda ,\eta )\) such that

$$\begin{aligned} (\lambda ,\eta )\in X_{2}\times W_{2}. \end{aligned}$$

Proof

Let \(s=T-t\), with \(t\in (0,T)\) and \({\tilde{\lambda }}(s)=\lambda (t)\), \({\tilde{\eta }}(s)=\eta (t)\). Then, system (5) is equivalent to

$$\begin{aligned} \left\{ \begin{array}{rcl} \partial _s{\tilde{\lambda }}-\Delta {\tilde{\lambda }} -\kappa \,\nabla {\tilde{\lambda }}\cdot \nabla {\tilde{v}}-{\tilde{\eta }} -r {{\tilde{\lambda }}} + 2 \mu {\tilde{u}} {{\tilde{\lambda }}} &{}=&{}\gamma _u ({\tilde{u}} - u_d)\quad \hbox { in }Q,\\ \partial _s{\tilde{\eta }}-\Delta {\tilde{\eta }}+{\tilde{\eta }} -\kappa \,\nabla \cdot ({\tilde{u}}\nabla {\tilde{\lambda }}) -{\tilde{f}}\,{\tilde{\eta }}\, 1_{\Omega _c}&{}=&{}\gamma _v({\tilde{v}}-v_d)\quad \hbox { in }Q,\\ {\tilde{\lambda }}(0)=0,\ {\tilde{\eta }}(0)&{}=&{}0\quad \hbox { in }\Omega ,\\ \displaystyle \frac{\partial {\tilde{\lambda }}}{\partial \textbf{n}}=0,\ \frac{\partial {\tilde{\eta }}}{\partial \textbf{n}} &{}=&{}0\quad \hbox { on }(0,T)\times \partial \Omega . \end{array} \right. \end{aligned}$$
(54)

In order to prove the existence of a solution for (54), the Leray–Schauder fixed point Theorem can be applied as before, now for the operator

$$\begin{aligned} {\widehat{T}}:({\bar{\lambda }},{\bar{\eta }})\in L^{\infty -}\times L^{4-}\mapsto (\lambda ,\eta )\in X_{2}\times W_{2}, \end{aligned}$$

where \((\lambda ,\eta )={\widehat{T}}({\bar{\lambda }},{\bar{\eta }})\) solves the decoupled problem (first computing \(\lambda \) and after \(\mu \))

$$\begin{aligned} \left\{ \begin{array}{rcl} \partial _s {\lambda }-\Delta {\lambda } -\kappa \,\nabla {\lambda }\cdot \nabla {\tilde{v}} &{}=&{} {\bar{\eta }} +r {{\bar{\lambda }}} - 2 \mu {\tilde{u}} {{\bar{\lambda }}} + \gamma _u ({\tilde{u}}-u_d)\quad \hbox { in }Q,\\ \partial _s {\eta }-\Delta \eta +{\eta } - \kappa \,\nabla \cdot ({\tilde{u}}\nabla {\lambda }) &{}=&{} {\tilde{f}}\, {\bar{\eta }}\, 1_{\Omega _c} + \gamma _v({\tilde{v}}-v_d) \quad \hbox { in }Q,\\ {\lambda }(0)=0,\ {\eta }(0)&{}=&{}0\quad \hbox { in }\Omega ,\\ \frac{\partial {\lambda }}{\partial \textbf{n}}=0,\ \frac{\partial {\eta }}{\partial \textbf{n}}&{}=&{}0\quad \hbox { on }(0,T)\times \partial \Omega . \end{array} \right. \end{aligned}$$

The proof follows the same lines as before and it will be omitted. Indeed, the key point is to show that the set of possible fixed points

$$\begin{aligned} {{\widehat{T}}}_{\alpha }:=\{(\lambda ,\eta )\in X_{2} \times W_{2}:\, (\lambda ,\eta )= \alpha {\widehat{T}}(\lambda ,\eta ) \hbox { for some }{\alpha }\in [0,1]\} \end{aligned}$$

is bounded in \(X_{2} \times W_{2}\) (with respect to \({\alpha }\)). In fact, if \((\lambda ,\eta )\in {{\widehat{T}}}_{\alpha },\) then \((\lambda ,\eta )\in {X}_{2}\times {W}_{2}\) and it solves the coupled linear problem

$$\begin{aligned} \left\{ \begin{array}{rcl} \partial _s {\lambda }-\Delta {\lambda } +{\kappa } \, \nabla {\lambda }\cdot \nabla {\tilde{v}} -\alpha \,r \lambda + 2 \alpha \, \mu {\tilde{u}} \lambda - {\alpha } \, {\eta } &{}=&{} {\alpha } \, \gamma _u ({\tilde{u}}- u_d)\, \, \, \hbox { in }Q, \\ \partial _s {\eta }-\Delta \eta +{\eta }- {\tilde{f}}\, {\eta }\, 1_{\Omega _c} -\kappa \,\nabla \cdot ({\tilde{u}}\nabla {\lambda }) &{}=&{} {\alpha } \, \gamma _v({\tilde{v}}-v_d) \, \, \, \hbox { in }Q,\\ {\lambda }(0)=0,\ {\eta }(0)&{}=&{}0\quad \hbox { in }\Omega ,\\ \frac{\partial {\lambda }}{\partial \textbf{n}}=0,\ \frac{\partial {\eta }}{\partial \textbf{n}}&{}=&{}0\quad \hbox { on }(0,T)\times \partial \Omega . \end{array} \right. \end{aligned}$$
(55)

Now, taking \(\lambda - \Delta \lambda \in L^2(Q)\) as test function in (55)\(_1\) and \(\eta \in L^2(H^1)\) as test function in (55)\(_2\), the following bound is obtained via Gronwall’s Lemma:

$$\begin{aligned} \Vert (\lambda ,\eta ) \Vert _{X_2\times W_2} \le C( \Vert {\tilde{u}} \Vert _{W_2}, \Vert {\tilde{v}} \Vert _{X_2}, \Vert {\tilde{f}} \Vert _{L^{2+}(Q_c)}, \Vert u_d \Vert _{L^2(Q)}, \Vert v_d \Vert _{L^2(Q)} ). \end{aligned}$$

Therefore, applying Leray-Schauder fixed point theorem, the existence of a solution of problem (5), \((\lambda ,\eta )\in X_{2}\times W_{2}\), is obtained. Its uniqueness is directly deduced from the linearity of problem (5). \(\square \)

In the following result, more regularity and uniqueness of the Lagrange multiplier \((\lambda ,\eta )\) given by Theorem 12 will be obtained via the uniqueness of problem (5).

Theorem 15

Let \({\tilde{s}}=({\tilde{u}},{\tilde{v}},{\tilde{f}})\in {\mathcal {S}}_{ad}\) be a local optimal solution for the control problem (3). Then the Lagrange multiplier, provided by Theorem 12, is unique and satisfies \((\lambda ,\eta )\in X_{2}\times W_{2}\).

Proof

Let \((\lambda ,\eta )\in L^{2}(H^1)\times L^{2-}(Q)\) be a Lagrange multiplier given in Theorem 12, which is a very weak solution of problem (5). In particular, \((\lambda ,\eta )\) satisfies (51)–(52). On the other hand, from Theorem 14, system (5) has a unique solution \(({\overline{\lambda }},{\overline{\eta }})\in X_{2}\times W_{2}\). Then, it suffices to identify \((\lambda ,\eta )\) with \(({\overline{\lambda }},{\overline{\eta }})\).

With this objective, for any \((U,V)\in {\widehat{W}}_2 \times {\widehat{X}}_{2+}\), we write (5) for \(({\overline{\lambda }},{\overline{\eta }})\) (instead of \((\lambda ,\eta )\)), test the first equation by U, the second one by V, and integrate by parts over \(\Omega \) to obtain

$$\begin{aligned}{} & {} \begin{array}{rcl} \displaystyle \int _0^T \langle \partial _tU, {\overline{\lambda }} \rangle &{} + &{} \displaystyle \int _0^T \int _\Omega (\nabla U -\kappa \,U\nabla {\tilde{v}}) \cdot \nabla {\overline{\lambda }} + (-r U + 2 \mu {\tilde{u}} U ) {{\overline{\lambda }}} - U{\overline{\eta }}\\ &{} = &{} \displaystyle \gamma _u\int _0^T\int _{\Omega } ({\tilde{u}}-u_d) U, \end{array} \end{aligned}$$
(56)
$$\begin{aligned}{} & {} \int _0^T\int _\Omega \bigg (\partial _tV-\Delta V+V-{\tilde{f}}V 1_{\Omega _c}\bigg ){\overline{\eta }} + \kappa \, {\tilde{u}}\nabla V\cdot \nabla {\overline{\lambda }} =\gamma _v\int _0^T\int _{\Omega }({\tilde{v}}-v_d)V.\nonumber \\ \end{aligned}$$
(57)

Now, take the difference between (51) for \((\lambda ,\eta )\) and (56) for \(({\overline{\lambda }},{\overline{\eta }})\), the difference between (52) and (57), and add the respective equations. Since the right-hand side terms vanish, one obtains

$$\begin{aligned}{} & {} \int _0^T \langle \partial _tU, \lambda -{\overline{\lambda }} \rangle _{(H^1)',H^1} + \int _0^T \int _\Omega (\nabla U -\kappa \,U\nabla {\tilde{v}}- \kappa \, {\tilde{u}}\nabla {V}) \cdot \nabla (\lambda - {\overline{\lambda }}) \nonumber \\{} & {} \hbox {} + \int _0^T \int _\Omega (-r U + 2 \mu {\tilde{u}} U, \lambda -{\overline{\lambda }}) \nonumber \\{} & {} \hbox {} +\int _0^T\int _\Omega \bigg (\partial _tV-\Delta V+V-U-{\tilde{f}}V 1_{\Omega _c}\bigg )(\eta -{\overline{\eta }})=0. \end{aligned}$$

Then, if \((U,V)\in {\widehat{W}}_2 \times {\widehat{X}}_{2+}\) is the unique solution of the linear system (42) associated to any \((g_u,g_v)\in L^2((H^1)')\times L^{2+}(Q)\) (given by Lemma 11), we arrive at

$$\begin{aligned} \int _0^T\langle g_u, \lambda -{\overline{\lambda }} \rangle _{(H^1)',H^1}+\int _0^T\int _\Omega g_v(\eta -{\overline{\eta }})=0. \end{aligned}$$

Through density arguments, it is easy to deduce that \(\lambda -{\overline{\lambda }} =0\) and \(\eta -{\overline{\eta }}=0\), which implies that \((\lambda ,\eta )=({\overline{\lambda }},{\overline{\eta }})\). As a consequence of the regularity of \(({\overline{\lambda }},{\overline{\eta }})\), it holds that \((\lambda ,\eta )\in X_{2}\times W_{2}\). \(\square \)

All previous arguments of Sect. 4 prove Theorem 3.

5 Conclusions

The existence and uniqueness of a weak solution for problem (1) in 2D-domains allows one to deduce the existence of (at least) a global optimal solution of (3), leading the system near to the desired stated of cellular density and chemical concentration. The existence of a unique and regular Lagrange multiplier characterized by its optimality system (5)–(6) is also proven. The fact of using only weak solutions for problem (1) is a novelty with respect to the previous results in related models appearing in [11,12,13].