Optimal control of the fidelity coefficient in a Cahn–Hilliard image inpainting model Abstract We consider an inpainting model proposed by A. Bertozzi et al., which is based on a Cahn–Hilliard-type equation. This equation describes the evolution of an order parameter that represents an approximation of the original image occupying a bounded two-dimensional domain. The given image is assumed to be damaged in a fixed subdomain, and the equation is characterised by a linear reaction term. This term is multiplied by the so-called fidelity coefficient, which is a strictly positive bounded function defined in the undamaged region. The idea is that, given an initial image, the order parameter evolves towards the given image and this process properly diffuses through the boundary of the damaged region, restoring the damaged image, provided that the fidelity coefficient is large enough. Here, we formulate an optimal control problem based on this fact, namely, our cost functional accounts for the magnitude of the fidelity coefficient. Assuming a singular potential to ensure that the order parameter takes its values in between 0 0 and 1 1 , we first analyse the control-to-state operator and prove the existence of at least one optimal control, establishing the validity of first-order optimality conditions. Then, under suitable assumptions, we demonstrate second-order optimality conditions. Key words: Inpainting, Cahn–Hilliard equation, singular potential, strict separation property, optimal control, first-order optimality condition, second-order optimality condition. AMS (MOS) Subject Classification: 35Q99, 49K20, 49J20. Elena Beretta 1 e-mail: eb147@nyu.edu Cecilia Cavaterra 2,3 e-mail: cecilia.cavaterra@unimi.it Matteo Fornoni 4 e-mail: matteo.fornoni@unipv.it Maurizio Grasselli 5 e-mail: maurizio.grasselli@polimi.it 1 Division of Science, New York University Abu Dhabi, Saadiyat Island, Abu Dhabi, United Arab Emirates 2 Dipartimento di Matematica “F. Enriques”, Università degli Studi di Milano, 20133 Milano, Italy 3 Istituto di Matematica Applicata e Tecnologie Informatiche “Enrico Magenes”, CNR, 27100 Pavia, Italy 4 Dipartimento di Matematica “F. Casorati”, Università degli Studi di Pavia, 27100 Pavia, Italy 5 Dipartimento di Matematica, Politecnico di Milano, 20133 Milano, Italy 1 Introduction Image inpainting refers to the process of filling in missing or damaged regions of an image by leveraging information from the surrounding areas. Over the past few decades, many different techniques have been developed to address this goal. These include, for example, PDE-driven inpainting methods starting from the works of [ 2 ] and [ 34 ] ; see also [ 33 ] and references therein. A notable PDE model is the Cahn–Hilliard inpainting method introduced by Bertozzi et al. in [ 3 , 4 ] . Here the evolution is governed by the Cahn–Hilliard equation coupled with a fidelity term that keeps the reconstructed image close to the given one in the undamaged regions. Other methods are based on variational principles where one minimizes an energy that balances fidelity to the known data and smoothness or sparsity constraints in the missing regions (see, e.g., [ 12 , 27 , 32 ] ). Other methods include exemplar-based inpainting techniques based on the idea that part of an image can be reconstructed by simply pasting samples extracted from the known part, and were introduced in [ 20 ] . More recently deep-learning methods have become popular leveraging convolutional neural networks (CNNs) or generative adversarial networks (GANs) to predict missing content (see the review [ 22 ] ). In this paper, we follow the successful mathematical model introduced by Bertozzi et al. based on the Cahn–Hilliard equation, which ensures smooth transitions and sharp interfaces between known and missing regions. The inclusion of a fidelity term allows the model to stay close to the original image, while diffuse-interface modelling effectively preserves the edges. Indeed, it received a lot of attention in recent years and was generalized and studied from many points of view [ 5 , 6 , 7 , 14 , 15 , 25 , 31 , 37 ] . Let us describe the mathematical model in detail. Given \Omega\subset\mathbb{R}^{2} an open, bounded, and sufficiently regular domain (i.e. the image support), we interpret a binary image as a function g:\Omega\to\{0,1\} , where g=1 stands for black and g=0 for white. We call D\subset\Omega the damaged region and g:\Omega\setminus D\to\{0,1\} the given original image. Our objective is to recover a phase-field approximation u:\Omega\to[0,1] of the original image in the whole domain \Omega . Notice that u is allowed to also take the values in-between 0 and 1 , but ideally only in a small diffuse interface of width \varepsilon . Then, we recover the inpainted image \overline{u}=u(T):\Omega\to[0,1] by solving the following initial and boundary value problem: \displaystyle\partial_{t}u-\Delta w=\lambda(x)(g-u)\hskip 20.00003pt \displaystyle\hbox{in $\Omega\times(0,T)$}, (1.1) \displaystyle w=-\varepsilon\Delta u+\frac{1}{\varepsilon}W^{\prime}(u) \displaystyle\hbox{in $\Omega\times(0,T)$}, (1.2) \displaystyle\partial_{\mathbf{n}}u=\partial_{\mathbf{n}}w=0 \displaystyle\hbox{on $\partial\Omega\times(0,T)$}, (1.3) \displaystyle u(0)=u_{0} \displaystyle\hbox{in $\Omega$}, (1.4) where \mathbf{n} is the outward unit normal vector to \partial\Omega . Here T>0 is a fixed final time, possibly large enough to ensure that \overline{u} is close enough to an equilibrium. Conversely, u_{0} is a given initial data, to be thought of as a starting guess for the inpainted image (for instance, the convolution of g with a suitable regularising kernel). The whole inpainting process essentially depends on the fidelity coefficient \lambda whose typical form is \lambda(x)=\begin{cases}0\quad&\hbox{if $x\in D$},\\ \lambda_{0}\quad&\hbox{if $x\in\Omega\setminus D$},\end{cases} (1.5) where \lambda_{0}>>1 constant. Indeed, in \Omega\setminus D , the fidelity term \lambda_{0}(g-u) forces the solution to stay close to the original image g , while, inside D , u is just a solution to the standard Cahn–Hilliard equation. We recall that Cahn–Hilliard equation can be seen as an H^{-1} gradient flow of the Ginzburg–Landau energy E_{\varepsilon}(u)=\int_{\Omega}\left(\frac{\varepsilon}{2}\lvert\nabla u\rvert^{2}+\frac{1}{\varepsilon}W(u)\right)\,\mathrm{d}x, where \varepsilon>0 and W is a double-well potential with equal minima at 0 and 1 , which, for the moment, can be taken as follows W(u)=u^{2}(u-1)^{2} . It is well-known (see, for instance, [ 30 ] ) that, as \varepsilon\to 0 , the energy E_{\varepsilon} acts as a diffuse interface approximation, in the sense of \Gamma -convergence, of the perimeter energy, which was used in previous models for image inpainting (see, e.g., [ 23 ] ). Notice that we are not imposing any explicit boundary condition on \partial D , since the idea is that the sharp variation of \lambda through \partial D should already implicitly guide the restoration of the image inside of D by matching the behaviour of g on \partial D . Indeed, in [ 4 ] , it was shown that, if D\subset\subset\Omega , g\in\mathcal{C}^{2}(\Omega) and \lambda_{0}\to+\infty , the stationary solutions to ( 1.1 )–( 1.4 ) in D converge to the solution of the following boundary value problem \displaystyle-\Delta\left(-\varepsilon\Delta u+\frac{1}{\varepsilon}W^{\prime}(u)\right)=0\hskip 20.00003pt \displaystyle\hbox{in $D$}, \displaystyle u=g \displaystyle\hbox{on $\partial D$}, \displaystyle\nabla u=\nabla g \displaystyle\hbox{on $\partial D$}, where the last two equations are exactly the matching conditions needed for a good reconstruction. To further stress the importance of the choice of large values for \lambda_{0} , in the Appendix we complement the above-mentioned result by showing that also the solution to the evolutionary system ( 1.1 )–( 1.4 ) in \Omega\setminus D with boundary conditions on \partial D given by the inpainted image, converges to a stationary solution in \Omega\setminus D if \lambda_{0} is large enough (cf. Proposition A.1 ). One possible drawback of model ( 1.1 )–( 1.4 ) is that, with a polynomial double-well potential as W(u)=u^{2}(u-1)^{2} , one cannot guarantee that the solution u takes its values in [0,1] . However, this issue can be solved by reformulating the problem using a physically relevant potential, namely, the so-called logarithmic-type double-well (or Flory–Huggins) potential (see [ 13 , 28 , 29 ] ). In some situations, potentials of this kind were also shown to provide better inpainting results and faster-converging algorithms (see [ 13 ] ). For convenience, we now change most of the notation used so far in order to work in the physical interval [-1,1] , instead of [0,1] , since it is more common in the literature on Cahn–Hilliard-type equations. We call \varphi this new phase-field variable in [-1,1] . Clearly, this does not change anything in applications, since one can easily switch between the two formulations by setting \varphi=2(u-\frac{1}{2}) . More precisely, we replace W(u) by F(\varphi)=\frac{\theta}{2}\left((1-\varphi)\log(1-\varphi)+(1+\varphi)\log(1+\varphi)\right)-\frac{\theta_{c}}{2}\varphi^{2}\hskip 10.00002pt\hbox{for $\varphi\in[-1,1]$}, (1.6) which, for constants 0<\theta<\theta_{c} , has equal minima at the points \pm m_{*} , with \lvert m_{*}\rvert<1 characterised by the following implicit relation \frac{1}{m_{*}}\log\left(\frac{1-m_{*}}{1+m_{*}}\right)=\frac{2\theta_{c}}{\theta}. Consequently, we now consider binary images of the form f:\Omega\setminus D\to\{-m_{*},m_{*}\},\hbox{where $\{f=m_{*}\}$ is the black region and $\{f=-m_{*}\}$ the white one,} for a fixed constant m_{*}\in(0,1) . Therefore, the inpainted image is now a function \overline{\varphi}:\Omega\to[-1,1] , which should always be approximately equal to \pm m_{*} up to a diffuse interface of width \varepsilon (see [ 28 , Rem. 2.1] ). Indeed, we find \overline{\varphi}=\varphi(T) by solving the following evolutionary problem: \displaystyle\partial_{t}\varphi-\Delta\mu=\lambda(x)(f-\varphi)\hskip 20.00003pt \displaystyle\hbox{in $\Omega\times(0,T)$}, (1.7) \displaystyle\mu=-\varepsilon\Delta\varphi+\frac{1}{\varepsilon}F^{\prime}(\varphi) \displaystyle\hbox{in $\Omega\times(0,T)$}, (1.8) \displaystyle\partial_{\mathbf{n}}\varphi=\partial_{\mathbf{n}}\mu=0 \displaystyle\hbox{on $\partial\Omega\times(0,T)$}, (1.9) \displaystyle\varphi(0)=\varphi_{0} \displaystyle\hbox{in $\Omega$}, (1.10) for given T>0 large enough and \varphi_{0}:\Omega\to[-1,1] . The main advantage of this reformulated problem is that, due to the blow-up of F^{\prime}(\varphi) for \varphi\to\pm 1 , any energy bounded weak solution, which necessarily requires the integrability of F^{\prime}(\varphi) , is such that \lvert\varphi\rvert<1 for almost any (x,t)\in\Omega\times(0,T) . The goal of this work is to propose and study an optimal control problem aimed at finding a fidelity term that guarantees a faithful inpainting of the given damaged image f . On account of ( 1.5 ), we seek more generally a function \lambda of the form \lambda(x)=\begin{cases}0\quad&\hbox{if $x\in D$},\\ \lambda_{0}(x)\quad&\hbox{if $x\in\Omega\setminus D$},\end{cases} (1.11) where \lambda_{0}\in L^{\infty}(\Omega\setminus D) is such that \essinf\lambda_{0}\geq\lambda_{\text{min}}>0 . We allow \lambda_{0} to be dependent on x\in\Omega , as it could be beneficial to have different values for it. For instance, it might be useful to take \lambda_{0} larger in regions where the image f carries a higher level of detail, and it might be taken smaller in less detailed regions. Our optimal control problem can take care of this aspect. Indeed, we fix 0<\lambda_{\text{min}}<\lambda_{\text{max}} as a minimum and a maximum value for \lambda_{0} and we formulate the following problem: (CP) Minimise the cost functional \mathcal{J}(\varphi,\lambda_{0})=\frac{\alpha_{1}}{2}\int_{0}^{T}\int_{\Omega\setminus D}|\varphi-f|^{2}\,\mathrm{d}x\,\mathrm{d}t+\frac{\alpha_{2}}{2}\int_{\Omega\setminus D}|\varphi(T)-f|^{2}\,\mathrm{d}x+\frac{\beta}{2}\int_{\Omega\setminus D}\,\left(\frac{1}{\lambda_{0}}\right)^{2}\,\mathrm{d}x, (1.12) subject to the control constraints \lambda_{0}\in\mathcal{U}_{\text{ad}}:=\{\lambda_{0}\in L^{\infty}(\Omega\setminus D)\mid 0<\lambda_{\text{min}}\leq\lambda_{0}\leq\lambda_{\text{max}}\,\text{ a.e. in }\Omega\}, (1.13) and to the state system ( 1.7 )-( 1.10 ) . Here, \alpha_{1} , \alpha_{2} and \beta are non-negative parameters that can be tuned depending on the particular application. The first two tracking-type terms in the cost functional are there to keep the solution close to the original image f in the undamaged domain, both during its evolution and at the final time. Conversely, note that the third term in \mathcal{J} actually promotes large values of \lambda_{0} , as it is expected from the analysis carried out in [ 4 ] . Also, observe that it does not hinder the convexity of the functional \mathcal{J} on the admissible set \mathcal{U}_{\text{ad}} . We conclude by recalling that a similar optimal control problem for the related Cahn–Hilliard–Oono equation is studied in [ 17 ] . There, the control is a space-time mass density and first-order optimality conditions are obtained. Let us describe our main results. Preliminarily, we report some results on the well-posedness of problem ( 1.7 )-( 1.10 ) which allow us to define a suitable control-to-state operator (see Section 2 ). Then, we show the existence of an optimal control in Section 3 and we establish first-order optimality conditions in Section 4 . Finally, we prove second-order optimality conditions in Section 5 . 2 Preliminaries and well-posedness results We begin by introducing some notation that will be used throughout the paper. We first recall that \Omega\subset\mathbb{R}^{2} is an open and bounded domain with sufficiently regular boundary. Let T>0 be the final time and denote Q_{t}=\Omega\times(0,t) and \Sigma_{t}=\partial\Omega\times(0,t) , for any t\in(0,T] . For a (real) Banach space X , we denote by \lVert\cdot\rVert_{X} its norm, by X^{*} its dual space and by \langle\cdot,\cdot\rangle_{X} the duality pairing between X and X^{*} . If X is a Hilbert space, we additionally denote by (\cdot,\cdot)_{X} its inner product. For the standard Lebesgue and Sobolev spaces with 1\leq p\leq\infty and k\in\mathbb{N} , we use the notation L^{p}(\Omega) and W^{k,p}(\Omega) , with norms \lVert\cdot\rVert_{L^{p}(\Omega)} and \lVert\cdot\rVert_{W^{k,p}(\Omega)} respectively. In the case p=2 , we employ the notation H^{k}(\Omega):=W^{k,2}(\Omega) and denote its norm by \lVert\cdot\rVert_{H^{k}(\Omega)} . For Bochner spaces, we use the standard notation L^{p}(0,T;X) , for any 1\leq p\leq\infty and any Banach space X . Next, we introduce the main Hilbert triplet that will be used in the following. Namely, we set H:=L^{2}(\Omega),\hskip 10.00002ptV:=H^{1}(\Omega),\hskip 10.00002ptW:=\{u\in H^{2}(\Omega)\mid\partial_{\mathbf{n}}u=0\}, and we recall that the following compact and dense embeddings hold: W\hookrightarrow V\hookrightarrow H\cong H^{*}\hookrightarrow V^{*}\hookrightarrow W^{*}. Moreover, owing to standard elliptic regularity estimates, we can equip W with the equivalent norm \lVert w\rVert^{2}_{W}:=\lVert w\rVert^{2}_{H}+\lVert\Delta w\rVert^{2}_{H}, where \Delta denotes the Laplace operator. We also need to define the generalised mean value of a function v as v_{\Omega}:=\frac{1}{\lvert\Omega\rvert}\int_{\Omega}v\,\mathrm{d}x\hbox{ if $v\in L^{1}(\Omega)$}\hskip 10.00002pt\hbox{and}\hskip 10.00002ptv_{\Omega}:=\frac{1}{\lvert\Omega\rvert}\langle v,1\rangle_{V}\hbox{ if $v\in V^{*}$}, |\Omega| being the Lebesgue measure of \Omega , and introduce the zero-mean spaces V_{0}:=\{v\in V\mid v_{\Omega}=0\},\hskip 10.00002ptV^{*}_{0}:=\{v^{*}\in V^{*}\mid v^{*}_{\Omega}=0\}. Then, the Neumann–Laplace operator \mathcal{N}:V_{0}\to V^{*}_{0} , defined as \langle\mathcal{N}w,v\rangle:=\int_{\Omega}\nabla w\cdot\nabla v\,\mathrm{d}x, is positive definite and self-adjoint. In particular, by the Lax–Milgram theorem and Poincaré–Wirtinger’s inequality, the inverse operator \mathcal{N}^{-1}:V^{*}_{0}\to V_{0} is well defined and w=\mathcal{N}^{-1}g if w\in V_{0} is the weak solution to the elliptic boundary value problem \begin{cases}-\Delta w=g\quad&\hbox{in $\Omega$,}\\ \partial_{\mathbf{n}}w=0\quad&\hbox{on $\partial\Omega$.}\end{cases} Finally, we recall that by spectral theory the eigenfunctions of the operator \mathcal{N} form an orthonormal Schauder basis in H , which is also orthogonal in V . 2.1 Weak and strong solutions We introduce the following structural assumptions. A1. \Omega\subset\mathbb{R}^{2} is an open bounded domain with boundary \partial\Omega of class \mathcal{C}^{4} and D\subset\Omega is a bounded domain such that 0<|D|<|\Omega| . A2. The potential F admits the splitting F=F_{0}+F_{1} . We assume that F_{0}:[-1,1]\to[0,+\infty) is a continuous strictly convex function such that \begin{split}&\quad F_{0}\in\mathcal{C}^{4}(-1,1),\quad F_{0}(0)=F^{\prime}_{0}(0)=0,\\ &\qquad F_{0}(-s)=F_{0}(s)\quad\forall s\in(-1,1),\\ &\lim_{s\to\pm 1}F_{0}^{\prime}(s)=\pm\infty,\quad\lim_{s\to\pm 1}F_{0}^{\prime\prime}(s)=+\infty.\end{split} (2.1) We also suppose that there exist constants c_{0},C>0 such that for any s\in(-1,1) the following bounds hold: F_{0}^{\prime\prime}(s)\geq c_{0}>0,\hskip 10.00002ptF_{0}^{\prime\prime}(s)\leq e^{C(1+\lvert F_{0}^{\prime}(s)\rvert)}. (2.2) Instead, F_{1}:[-1,1]\to\mathbb{R} is a W^{4,\infty} -perturbation such that \lvert F_{1}^{\prime\prime}(s)\rvert\leq\theta for any s\in[-1,1] , for some \theta>0 . A3. f\in L^{\infty}(\Omega\setminus D) and there exists a positive constant \varepsilon_{0}>0 such that \lVert f\rVert_{L^{\infty}(\Omega\setminus D)}\leq 1-\varepsilon_{0} . For the purposes of our analysis, we can also assume that f is extended by 0 to a function in L^{\infty}(\Omega) , which we still call f for simplicity. A4. We assume that the fidelity coefficient \lambda\in L^{\infty}(\Omega) has the form given in ( 1.11 ), i.e. \lambda(x)=\begin{cases}0\quad&\hbox{if $x\in D$},\\ \lambda_{0}(x)\quad&\hbox{if $x\in\Omega\setminus D$},\end{cases} and that there exists \lambda_{\text{min}}>0 such that \lambda(x)\geq\lambda_{\text{min}} in D . A5. \varphi_{0}\in V satisfies \lVert\varphi_{0}\rVert_{L^{\infty}(\Omega)}\leq 1 , F_{0}(\varphi_{0})\in L^{1}(\Omega) and \lvert(\varphi_{0})_{\Omega}\rvert<1 . In the sequel, C>0 will stand for a generic positive constant, possibly changing from line to line, depending only on the fixed parameters introduced above. Remark 2.1 . Assumptions A1 – A5 are the same used in [ 28 ] to show the existence of strong solutions to ( 1.7 )–( 1.10 ), as we will recall below. Observe that A2 is satisfied by the logarithmic double-well potential ( 1.6 ) introduced above. We also mention that ( 2.2 ) can be further weakened in view of the recent results regarding the validity of the separation property in two spatial dimensions (see [ 24 , Thm. 3.3] ). Moreover, for A3 , we refer again to [ 28 , Rem. 2.1] . We first recall the result contained in [ 28 , Proposition 2.5] on the existence of weak solutions to ( 1.7 )–( 1.10 ) (cf. also [ 29 ] ). Proposition 2.2 . Let A1 – A5 hold. Then, there exists a pair (\varphi,\mu) to ( 1.7 )–( 1.10 ) enjoying the regularity \displaystyle\varphi\in H^{1}(0,T;V^{*})\cap L^{\infty}(0,T;V)\cap L^{4}(0,T;W)\cap L^{2}(0,T;W^{2,p}(\Omega))\hskip 10.00002pt\hbox{for any $p\in[2,+\infty)$,} \displaystyle\mu\in L^{2}(0,T;V),\hskip 10.00002ptF_{0}^{\prime}(\varphi)\in L^{2}(0,T;H), \displaystyle\lvert\varphi(x,t)\rvert<1\hskip 10.00002pt\hbox{for a.e.\penalty\ $(x,t)\in Q_{T}$,}\hskip 10.00002pt\lvert\varphi_{\Omega}(t)\rvert<1\hskip 10.00002pt\hbox{for any $t\in(0,T)$,} and such that \displaystyle\langle\partial_{t}\varphi,\zeta\rangle_{V}+(\nabla\mu,\nabla\varphi)_{H}=(\lambda(x)(f-\varphi),\zeta)_{H}\hskip 10.00002pt\hbox{for any $\zeta\in V$, a.e. in $(0,T)$}, \displaystyle\mu=-\varepsilon\Delta\varphi+\frac{1}{\varepsilon}F^{\prime}(\varphi)\hskip 10.00002pt\hbox{a.e.\penalty\ in $Q_{T}$,} \displaystyle\varphi(0)=\varphi_{0}\hskip 10.00002pt\hbox{ in }V. Such a pair is called (finite energy) weak solution to problem ( 1.7 )–( 1.10 ). Next, we recall the result we will use in the sequel to define the control-to-state operator, namely, the well-posedness of problem ( 1.7 )–( 1.10 ) with respect to strong solutions (cf. [ 28 , Theorem 3.2] ). We point out that a key step to obtain higher regularity for solutions to ( 1.7 )–( 1.10 ) is to establish the strict separation property , that is, proving that \varphi stays uniformly away from \pm 1 in [0,T] (see [ 24 ] and references therein). This basic property allows us to handle the singular potential as if it were a globally Lipschitz nonlinearity. Theorem 2.3 . Let A1 – A5 hold and assume that \varphi_{0}\in W and \mu_{0}:=-\Delta\varphi_{0}+F^{\prime}(\varphi_{0}) satisfies \nabla\mu_{0}\in H . Then, a weak solution (\varphi,\mu) given by Proposition 2.2 satisfies the further regularities \displaystyle\varphi\in H^{1}(0,T;V)\cap L^{\infty}(0,T;W^{2,p}(\Omega))\cap L^{2}(0,T;H^{4}(\Omega))\hskip 10.00002pt\hbox{for any $p\geq 2$,} \displaystyle\mu\in L^{\infty}(0,T;V)\cap L^{2}(0,T;W), \displaystyle F^{\prime}(\varphi),F^{\prime\prime}(\varphi)\in L^{\infty}(0,T;L^{p}(\Omega))\hskip 10.00002pt\hbox{for any $p\geq 2$.} Moreover, the strict separation property holds, namely there exists \delta>0 , depending only on the data of the system, such that \lVert\varphi\rVert_{C^{0}(\overline{Q_{T}})}\leq 1-\delta, (2.3) Finally, such a solution is unique . Remark 2.4 . In the original [ 28 , Theorem 3.2] only the instantaneous strict separation property was shown, namely that for any \sigma>0 there exists \delta>0 such that \displaystyle\lvert\varphi(x,t)\rvert\leq 1-\delta\hskip 10.00002pt\hbox{for any $(x,t)\in\overline{\Omega}\times[\sigma,T]$.} However, we observe that our assumptions on \varphi_{0} and \mu_{0} already entail the existence of a 0<\delta_{0}<1 such that \varphi is strictly separated locally in time (see [ 26 , Rem. 3.9] and references therein). Thus the strict separation property holds up to time t=0 (see [ 26 , Rem. 3.11] ), as shown in ( 2.3 ) for some 0<\delta<\delta_{0} . In particular, we stress that \delta_{0} depends only on the initial energy, therefore it can be chosen uniformly if the energy of the initial guess \varphi_{0} is uniformly bounded. The analysis conducted in [ 28 ] shows, in particular, that the solutions to ( 1.7 )–( 1.10 ) regularise in finite time (see [ 28 , Thm. 3.1] ). Hence, for the purposes of our analysis, we can assume to start with an initial guess \varphi_{0} satisfying A6. \varphi_{0}\in W and \mu_{0}\in V . In this way, we can use all the global regularity properties shown in Theorem 2.3 and the separation property ( 2.3 ), namely, we have a unique strong solution. We stress that A6 is not restrictive for the inpainting algorithm since, even if the initial guess \varphi_{0} is less regular, we can take as a “new” initial guess the more regular \tilde{\varphi}_{0}=\varphi(\sigma) , where \sigma could be any positive time as in Remark 2.4 . Remark 2.5 . Observe that, thanks to A6 and Remark 2.4 , there exists a constant C>0 such that \lVert F^{(i)}(\varphi)\rVert_{C^{0}(\overline{Q_{T}})}\leq C\hskip 10.00002pt\hbox{for any $i=0,\dots,4$.} (2.4) 2.2 Continuous dependence on the fidelity coefficient For the subsequent analysis, we fix \varepsilon=1 in ( 1.7 )–( 1.10 ) as its particular value does not influence our results. Hence, from now on we consider the following initial and boundary value problem: \displaystyle\partial_{t}\varphi-\Delta\mu=\lambda(x)(f-\varphi)\hskip 20.00003pt \displaystyle\hbox{in $Q_{T}$}, (2.5) \displaystyle\mu=-\Delta\varphi+F^{\prime}(\varphi) \displaystyle\hbox{in $Q_{T}$}, (2.6) \displaystyle\partial_{\mathbf{n}}\varphi=\partial_{\mathbf{n}}\mu=0 \displaystyle\hbox{on $\Sigma_{T}$}, (2.7) \displaystyle\varphi(0)=\varphi_{0} \displaystyle\hbox{in $\Omega$}. (2.8) In order to study the optimal control problem (CP) in the next section, we need to define a control-to-state operator. Along with the existence and uniqueness of a strong solution given by Theorem 2.3 and the validity of the separation property ( 2.3 ), we also need to establish a continuous dependence of the (strong) solution itself on the fidelity coefficient \lambda . Theorem 2.6 . Assume that A1 – A3 and A6 hold. Let \lambda_{1} , \lambda_{2} be two fidelity coefficients satisfying A4 and let (\varphi_{1},\mu_{1}) , (\varphi_{2},\mu_{2}) be the corresponding (strong) solutions to ( 2.5 )–( 2.8 ). Then, there exists a constant K>0 , depending only on the parameters of the system and on \lambda_{1} , \lambda_{2} , but not on their difference, such that the following continuous dependence estimate holds: \lVert\varphi_{1}-\varphi_{2}\rVert^{2}_{H^{1}(0,T;H)\cap L^{\infty}(0,T;W)\cap L^{2}(0,T;H^{4}(\Omega))}+\lVert\mu_{1}-\mu_{2}\rVert^{2}_{L^{2}(0,T;W)}\leq K\lVert\lambda_{1}-\lambda_{2}\rVert^{2}_{H}. (2.9) Proof. We argue as in the proof of [ 28 , Theorem 3.2] . Let us set \varphi:=\varphi_{1}-\varphi_{2},\hskip 10.00002pt\mu:=\mu_{1}-\mu_{2},\hskip 10.00002pt\lambda:=\lambda_{1}-\lambda_{2}. Then, it is easy to observe that \displaystyle\partial_{t}\varphi-\Delta\mu=\lambda(f-\varphi_{2})-\lambda_{1}\varphi\hskip 10.00002pt in Q_{T} , (2.10) \displaystyle\mu=-\Delta\varphi+(F^{\prime}(\varphi_{1})-F^{\prime}(\varphi_{2}))\hskip 10.00002pt in Q_{T} , (2.11) \displaystyle\partial_{\mathbf{n}}\varphi=\partial_{\mathbf{n}}\mu=0\hskip 10.00002pt on \Sigma_{T} , (2.12) \displaystyle\varphi(0)=0\hskip 10.00002pt in \Omega . (2.13) First estimate. We multiply equation ( 2.10 ) by \mu and equation ( 2.11 ) by \partial_{t}\varphi-\Delta\varphi , we integrate over \Omega and we add the obtained equations together. This gives \begin{split}&\frac{1}{2}\frac{\mathrm{d}}{\mathrm{d}t}\lVert\nabla\varphi\rVert^{2}_{H}+\lVert\nabla\mu\rVert^{2}_{H}+\lVert\Delta\varphi\rVert^{2}_{H}+(F^{\prime}(\varphi_{1})-F^{\prime}(\varphi_{2}),\partial_{t}\varphi)_{H}\\ &\quad=(\lambda(f-\varphi_{2}),\mu)_{H}-(\lambda_{1}\varphi,\mu)_{H}-(\mu,\Delta\varphi)_{H}+(F^{\prime}(\varphi_{1})-F^{\prime}(\varphi_{2}),\Delta\varphi)_{H}.\end{split} (2.14) We start by estimating the term on the left-hand side. Using hypothesis A2 and Leibniz’s rule on the time-derivative, we infer that \displaystyle(F^{\prime}(\varphi_{1})-F^{\prime}(\varphi_{2}),\partial_{t}\varphi)_{H} \displaystyle\hskip 10.00002pt=(F_{0}^{\prime}(\varphi_{1})-F_{0}^{\prime}(\varphi_{2}),\partial_{t}\varphi)_{H}+(F_{1}^{\prime}(\varphi_{1})-F_{1}^{\prime}(\varphi_{2}),\partial_{t}\varphi)_{H} \displaystyle\hskip 10.00002pt=\frac{\mathrm{d}}{\mathrm{d}t}(F_{0}^{\prime}(\varphi_{1})-F_{0}^{\prime}(\varphi_{2}),\varphi)_{H}-(F_{0}^{\prime\prime}(\varphi_{1})\partial_{t}\varphi_{1}-F_{0}^{\prime\prime}(\varphi_{2})\partial_{t}\varphi_{2},\varphi)_{H}+(F_{1}^{\prime}(\varphi_{1})-F_{1}^{\prime}(\varphi_{2}),\partial_{t}\varphi)_{H} \displaystyle\hskip 10.00002pt=\frac{\mathrm{d}}{\mathrm{d}t}(F_{0}^{\prime}(\varphi_{1})-F_{0}^{\prime}(\varphi_{2}),\varphi)_{H}-(F_{0}^{\prime\prime}(\varphi_{1})\partial_{t}\varphi,\varphi)_{H} \displaystyle\hskip 20.00003pt-((F_{0}^{\prime}(\varphi_{1})-F_{0}^{\prime}(\varphi_{2}))\partial_{t}\varphi_{2},\varphi)_{H}+(F_{1}^{\prime}(\varphi_{1})-F_{1}^{\prime}(\varphi_{2}),\partial_{t}\varphi)_{H} \displaystyle\hskip 10.00002pt=\frac{\mathrm{d}}{\mathrm{d}t}(F_{0}^{\prime}(\varphi_{1})-F_{0}^{\prime}(\varphi_{2}),\varphi)_{H}-I_{1}-I_{2}+I_{3}. To estimate I_{1} , we first rewrite \partial_{t}\varphi by exploiting equation ( 2.10 ). Then, we use integration by parts, Hölder’s inequality, Young’s inequality and Sobolev embeddings, together with the regularity properties guaranteed by Theorem 2.3 , ( 2.3 ) and ( 2.4 ), to deduce that \displaystyle I_{1} \displaystyle=\int_{\Omega}F_{0}^{\prime\prime}(\varphi_{1})\partial_{t}\varphi\,\varphi\,\mathrm{d}x \displaystyle=\int_{\Omega}F_{0}^{\prime\prime}(\varphi_{1})\Delta\mu\,\varphi\,\mathrm{d}x+\int_{\Omega}F_{0}^{\prime\prime}(\varphi_{1})\lambda f\varphi\,\mathrm{d}x-\int_{\Omega}F_{0}^{\prime\prime}(\varphi_{1})\lambda_{1}\varphi^{2}\,\mathrm{d}x-\int_{\Omega}F_{0}^{\prime\prime}(\varphi_{1})\lambda\varphi_{2}\,\varphi\,\mathrm{d}x \displaystyle=-\int_{\Omega}F_{0}^{\prime\prime\prime}(\varphi_{1})\nabla\varphi_{1}\cdot\nabla\mu\,\varphi\,\mathrm{d}x-\int_{\Omega}F_{0}^{\prime\prime}(\varphi_{1})\nabla\varphi\cdot\nabla\mu\,\mathrm{d}x \displaystyle\hskip 10.00002pt+\int_{\Omega}F_{0}^{\prime\prime}(\varphi_{1})\lambda f\varphi\,\mathrm{d}x-\int_{\Omega}F_{0}^{\prime\prime}(\varphi_{1})\lambda_{1}\varphi^{2}\,\mathrm{d}x-\int_{\Omega}F_{0}^{\prime\prime}(\varphi_{1})\lambda\varphi_{2}\,\varphi\,\mathrm{d}x \displaystyle\leq\lVert F_{0}^{\prime\prime\prime}(\varphi_{1})\rVert_{L^{\infty}(\Omega)}\lVert\nabla\varphi_{1}\rVert_{L^{4}(\Omega)}\lVert\nabla\mu\rVert_{H}\lVert\varphi\rVert_{L^{4}(\Omega)}+\lVert F_{0}^{\prime\prime}(\varphi_{1})\rVert_{L^{\infty}(\Omega)}\lVert\nabla\varphi\rVert_{H}\lVert\nabla\mu\rVert_{H} \displaystyle\hskip 10.00002pt+\lVert F_{0}^{\prime\prime}(\varphi_{1})\rVert_{L^{\infty}(\Omega)}\left(\lVert\lambda\rVert_{H}\lVert f\rVert_{L^{\infty}(\Omega)}\lVert\varphi\rVert_{H}+\lVert\lambda_{1}\rVert_{L^{\infty}(\Omega)}\lVert\varphi\rVert^{2}_{H}+\lVert\lambda\rVert_{H}\lVert\varphi_{2}\rVert_{L^{\infty}(\Omega)}\lVert\varphi\rVert_{H}\right) \displaystyle\leq C\lVert\varphi_{1}\rVert_{H^{2}(\Omega)}\lVert\nabla\mu\rVert_{H}\lVert\varphi\rVert_{V}+C\lVert\nabla\varphi\rVert_{H}\lVert\nabla\mu\rVert_{H} \displaystyle\hskip 10.00002pt+C\lVert\lambda\rVert_{H}\lVert\varphi\rVert_{H}+C\lVert\varphi\rVert^{2}_{H}+C\lVert\lambda\rVert_{H}\lVert\varphi\rVert_{H} \displaystyle\leq\frac{1}{4}\lVert\nabla\mu\rVert^{2}_{H}+C\left(1+\lVert\varphi_{1}\rVert^{2}_{H^{2}(\Omega)}\right)\lVert\varphi\rVert^{2}_{V}+C\lVert\lambda\rVert^{2}_{H}. Here we used the Sobolev embeddings V\hookrightarrow L^{4}(\Omega) and H^{2}(\Omega)\hookrightarrow W^{1,4}(\Omega) . Moreover, by Theorem 2.3 , we also know that \lVert\varphi_{1}\rVert^{2}_{H^{2}(\Omega)}\in L^{\infty}(0,T) uniformly. In order to estimate I_{2} , we use Hölder’s inequality, Young’s inequality and Sobolev embeddings, together with the separation property ( 2.3 ), the local Lipschitz continuity of F_{0}^{\prime} and Remark 2.5 . Hence, we obtain that \displaystyle I_{2} \displaystyle=\int_{\Omega}(F_{0}^{\prime}(\varphi_{1})-F_{0}^{\prime}(\varphi_{2}))\partial_{t}\varphi_{2}\,\varphi\,\mathrm{d}x\leq\lVert F_{0}^{\prime}(\varphi_{1})-F_{0}^{\prime}(\varphi_{2})\rVert_{L^{4}(\Omega)}\lVert\partial_{t}\varphi_{2}\rVert_{H}\lVert\varphi\rVert_{L^{4}(\Omega)} \displaystyle\leq C\lVert\varphi\rVert^{2}_{L^{4}(\Omega)}\lVert\partial_{t}\varphi_{2}\rVert_{H}\leq C\lVert\partial_{t}\varphi_{2}\rVert_{H}\lVert\varphi\rVert^{2}_{V}, where \lVert\partial_{t}\varphi_{2}\rVert_{H}\in L^{2}(0,T) thanks to Theorem 2.3 . To estimate I_{3} , we use again ( 2.10 ) to replace \partial_{t}\varphi . Thus we get \displaystyle I_{3} \displaystyle=\int_{\Omega}(F_{1}^{\prime}(\varphi_{1})-F_{1}^{\prime}(\varphi_{2}))\partial_{t}\varphi\,\mathrm{d}x \displaystyle=\int_{\Omega}(F_{1}^{\prime}(\varphi_{1})-F_{1}^{\prime}(\varphi_{2}))(\Delta\mu+\lambda f-\lambda_{1}\varphi-\lambda\varphi_{2})\,\mathrm{d}x \displaystyle=-\int_{\Omega}F_{1}^{\prime\prime}(\varphi_{1})\nabla\varphi\cdot\nabla\mu\,\mathrm{d}x-\int_{\Omega}(F_{1}^{\prime\prime}(\varphi_{1})-F_{1}^{\prime\prime}(\varphi_{2}))\nabla\varphi_{2}\cdot\nabla\mu\,\mathrm{d}x \displaystyle\hskip 10.00002pt+\int_{\Omega}(F_{1}^{\prime}(\varphi_{1})-F_{1}^{\prime}(\varphi_{2}))(\lambda f-\lambda_{1}\varphi-\lambda\varphi_{2})\,\mathrm{d}x \displaystyle\leq\lVert F^{\prime\prime}_{1}(\varphi_{1})\rVert_{L^{\infty}(\Omega)}\lVert\nabla\varphi\rVert_{H}\lVert\nabla\mu\rVert_{H}+\lVert F_{1}^{\prime\prime}(\varphi_{1})-F_{1}^{\prime\prime}(\varphi_{2})\rVert_{L^{4}(\Omega)}\lVert\nabla\varphi_{2}\rVert_{L^{4}(\Omega)}\lVert\nabla\mu\rVert_{L^{4}(\Omega)} \displaystyle\hskip 20.00003pt+\lVert F_{1}^{\prime\prime}(\varphi_{1})-F_{1}^{\prime\prime}(\varphi_{2})\rVert_{H}\left(\lVert\lambda\rVert_{H}\lVert f\rVert_{L^{\infty}(\Omega)}+\lVert\lambda_{1}\rVert_{L^{\infty}(\Omega)}\lVert\varphi\rVert_{H}+\lVert\lambda\rVert_{H}\lVert\varphi_{2}\rVert_{L^{\infty}(\Omega)}\right) \displaystyle\leq C\lVert\nabla\varphi\rVert_{H}\lVert\nabla\mu\rVert_{H}+C\lVert\varphi\rVert_{V}\lVert\varphi_{2}\rVert_{H^{2}(\Omega)}\lVert\nabla\mu\rVert_{H}+C\lVert\varphi\rVert_{H}\left(\lVert\lambda\rVert_{H}+\lVert\varphi\rVert_{H}\right) \displaystyle\leq\frac{1}{4}\lVert\nabla\mu\rVert^{2}_{H}+C\left(1+\lVert\varphi_{2}\rVert^{2}_{H^{2}(\Omega)}\right)\lVert\varphi\rVert^{2}_{V}+C\lVert\lambda\rVert^{2}_{H}, where \lVert\varphi_{2}\rVert^{2}_{H^{2}(\Omega)}\in L^{\infty}(0,T) owing to Theorem 2.3 . We now estimate all the remaining terms on the right-hand side of ( 2.14 ). Here we use a combination of Cauchy–Schwarz and Young’s inequalities and as well as the separation property ( 2.3 ), the local Lipschitz continuity of F^{\prime} , and ( 2.4 ). We will also replace \mu by exploiting equation ( 2.11 ) for the first three terms. Summing up, we have \displaystyle(\lambda f,\mu)_{H}=(\lambda f,-\Delta\varphi+(F^{\prime}(\varphi_{1})-F^{\prime}(\varphi_{2})))_{H} \displaystyle\hskip 20.00003pt\leq\lVert\lambda\rVert_{H}\lVert f\rVert_{L^{\infty}(\Omega)}\lVert\Delta\varphi\rVert_{H}+\lVert\lambda\rVert_{H}\lVert f\rVert_{L^{\infty}(\Omega)}\lVert F^{\prime}(\varphi_{1})-F^{\prime}(\varphi_{2})\rVert_{H} \displaystyle\hskip 20.00003pt\leq\frac{1}{8}\lVert\Delta\varphi\rVert^{2}_{H}+C\lVert\varphi\rVert^{2}_{H}+C\lVert\lambda\rVert^{2}_{H}, \displaystyle(\lambda\varphi_{2},\mu)_{H}=(\lambda f,-\Delta\varphi+(F^{\prime}(\varphi_{1})-F^{\prime}(\varphi_{2})))_{H} \displaystyle\hskip 20.00003pt\leq\lVert\lambda\rVert_{H}\lVert\varphi_{2}\rVert_{L^{\infty}(\Omega)}\lVert\Delta\varphi\rVert_{H}+\lVert\lambda\rVert_{H}\lVert\varphi_{2}\rVert_{L^{\infty}(\Omega)}\lVert F^{\prime}(\varphi_{1})-F^{\prime}(\varphi_{2})\rVert_{H} \displaystyle\hskip 20.00003pt\leq\frac{1}{8}\lVert\Delta\varphi\rVert^{2}_{H}+C\lVert\varphi\rVert^{2}_{H}+C\lVert\lambda\rVert^{2}_{H}, \displaystyle(\lambda_{1}\varphi,\mu)_{H}=(\lambda_{1}\varphi,-\Delta\varphi+(F^{\prime}(\varphi_{1})-F^{\prime}(\varphi_{2})))_{H} \displaystyle\hskip 20.00003pt\leq\lVert\lambda_{1}\rVert_{L^{\infty}(\Omega)}\lVert\varphi\rVert_{H}\lVert\Delta\varphi\rVert_{H}+\lVert\lambda_{1}\rVert_{L^{\infty}(\Omega)}\lVert\varphi\rVert_{H}\lVert F^{\prime}(\varphi_{1})-F^{\prime}(\varphi_{2})\rVert_{H} \displaystyle\hskip 20.00003pt\leq\frac{1}{8}\lVert\Delta\varphi\rVert^{2}_{H}+C\lVert\varphi\rVert^{2}_{H}, \displaystyle-(\mu,\Delta\varphi)_{H}=(\nabla\mu,\nabla\varphi)_{H}\leq\frac{1}{4}\lVert\nabla\mu\rVert^{2}_{H}+C\lVert\nabla\varphi\rVert^{2}_{H} \displaystyle(F^{\prime}(\varphi_{1})-F^{\prime}(\varphi_{2}),\Delta\varphi)_{H}\leq\frac{1}{8}\lVert\Delta\varphi\rVert_{H}+C\lVert\varphi\rVert^{2}_{H}. Consequently, by integrating ( 2.14 ) on (0,t) , for any t\in(0,T) , using all the above estimates and ( 2.13 ), we infer that \begin{split}&\frac{1}{2}\lVert\nabla\varphi(t)\rVert^{2}_{H}+\int_{\Omega}(F^{\prime}_{0}(\varphi_{1})-F^{\prime}_{0}(\varphi_{2}))\varphi(t)\,\mathrm{d}x+\frac{1}{4}\int_{0}^{t}\lVert\nabla\mu\rVert^{2}_{H}\,\mathrm{d}s+\frac{1}{2}\int_{0}^{t}\lVert\Delta\varphi\rVert^{2}_{H}\,\mathrm{d}s\\ &\quad\leq C\int_{0}^{T}\left(1+\lVert\varphi_{1}\rVert^{2}_{H^{2}(\Omega)}+\lVert\varphi_{2}\rVert^{2}_{H^{2}(\Omega)}+\lVert\partial_{t}\varphi_{2}\rVert_{H}\right)\lVert\varphi\rVert^{2}_{V}\,\mathrm{d}s+CT\lVert\lambda\rVert^{2}_{H}.\end{split} (2.15) At this point, by using the strict convexity of F_{0} (see ( 2.2 )), we observe that \displaystyle\int_{\Omega}(F^{\prime}_{0}(\varphi_{1})-F^{\prime}_{0}(\varphi_{2}))\varphi(t)\,\mathrm{d}x=\int_{\Omega}\left(\int_{0}^{1}F_{0}^{\prime\prime}(z\varphi_{1}+(1-z)\varphi_{2})\,\mathrm{d}z\right)\varphi(t)^{2}\,\mathrm{d}x\geq c_{0}\lVert\varphi(t)\rVert^{2}_{H}. Hence, from ( 2.15 ) we further deduce that \displaystyle\min\left\{\frac{1}{2},c_{0}\right\}\lVert\varphi(t)\rVert^{2}_{V}+\frac{1}{4}\int_{0}^{t}\lVert\nabla\mu\rVert^{2}_{H}\,\mathrm{d}s+\frac{1}{2}\int_{0}^{t}\lVert\Delta\varphi\rVert^{2}_{H}\,\mathrm{d}s \displaystyle\hskip 10.00002pt\leq C\int_{0}^{T}\underbrace{\left(1+\lVert\varphi_{1}\rVert^{2}_{H^{2}(\Omega)}+\lVert\varphi_{2}\rVert^{2}_{H^{2}(\Omega)}+\lVert\partial_{t}\varphi_{2}\rVert_{H}\right)}_{\in\,L^{1}(0,T)}\lVert\varphi\rVert^{2}_{V}\,\mathrm{d}s+CT\lVert\lambda\rVert^{2}_{H}. Therefore, Gronwall’s Lemma yields \lVert\varphi\rVert^{2}_{L^{\infty}(0,T;V)\cap L^{2}(0,T;W)}+\lVert\nabla\mu\rVert^{2}_{L^{2}(0,T;H)}\leq C\lVert\lambda\rVert^{2}_{H}. (2.16) Moreover, by comparison in ( 2.11 ), it is now easy to also deduce that \lVert\mu\rVert^{2}_{L^{2}(0,T;V)}\leq C\lVert\lambda\rVert^{2}_{H}. (2.17) Likewise, by ( 2.10 ), one can also easily show that \lVert\varphi\rVert^{2}_{H^{1}(0,T;V^{*})}\leq C\lVert\lambda\rVert^{2}_{H}. Second estimate. We now multiply ( 2.10 ) by \partial_{t}\varphi . Then we take the gradient of ( 2.11 ) and we multiply it by \nabla\partial_{t}\varphi . Observe that this makes sense in our regularity setting. Integrating the resulting equations over \Omega , summing them up, and integrating by parts, we obtain that \begin{split}&\frac{1}{2}\frac{\mathrm{d}}{\mathrm{d}t}\lVert\Delta\varphi\rVert^{2}_{H}+\lVert\partial_{t}\varphi\rVert^{2}_{H}\\ &\quad=(\nabla(F^{\prime}(\varphi_{1})-F^{\prime}(\varphi_{2})),\nabla\partial_{t}\varphi)_{H}+(\lambda f,\partial_{t}\varphi)_{H}-(\lambda_{1}\varphi,\partial_{t}\varphi)_{H}-(\lambda\varphi_{2},\partial_{t}\varphi)_{H}.\end{split} (2.18) To estimate the first term on the right-hand side of ( 2.18 ), we initially rewrite it by integrating by parts and by adding and subtracting some terms (see the first two equalities below). We stress that the integration by parts does not produce boundary terms, since the separation property and ( 2.7 ) ensure that \partial_{\mathbf{n}}F^{\prime}(\varphi_{i})=F^{\prime\prime}(\varphi_{i})\partial_{n}\varphi_{i}=0 , for i=1,2 . Then, we employ Hölder and Young’s inequalities, Sobolev embeddings and Remark 2.5 to deduce that \displaystyle(\nabla(F^{\prime}(\varphi_{1})-F^{\prime}(\varphi_{2})),\nabla\partial_{t}\varphi)_{H} \displaystyle\hskip 10.00002pt=-(\Delta(F^{\prime}(\varphi_{1})-F^{\prime}(\varphi_{2})),\partial_{t}\varphi)_{H} \displaystyle\hskip 10.00002pt=-(F^{\prime\prime}(\varphi_{1})\Delta\varphi,\partial_{t}\varphi)_{H}-(F^{\prime\prime\prime}(\varphi_{1})(\nabla\varphi_{1}+\nabla\varphi_{2})\cdot\nabla\varphi,\partial_{t}\varphi)_{H} \displaystyle\hskip 20.00003pt-((F^{\prime\prime\prime}(\varphi_{1})-F^{\prime\prime\prime}(\varphi_{2}))\nabla\varphi_{2}\cdot\nabla\varphi_{2},\partial_{t}\varphi)_{H}-((F^{\prime\prime}(\varphi_{1})-F^{\prime\prime}(\varphi_{2}))\Delta\varphi_{2},\partial_{t}\varphi)_{H} \displaystyle\hskip 10.00002pt\leq\lVert F^{\prime\prime}(\varphi_{1})\rVert_{L^{\infty}(\Omega)}\lVert\Delta\varphi\rVert_{H}\lVert\partial_{t}\varphi\rVert_{H} \displaystyle\hskip 20.00003pt+\lVert F^{\prime\prime\prime}(\varphi_{1})\rVert_{L^{\infty}(\Omega)}\left(\lVert\nabla\varphi_{1}\rVert_{L^{4}(\Omega)}+\lVert\nabla\varphi_{2}\rVert_{L^{4}(\Omega)}\right)\lVert\nabla\varphi\rVert_{L^{4}(\Omega)}\lVert\partial_{t}\varphi\rVert_{H} \displaystyle\hskip 20.00003pt+\lVert F^{\prime\prime\prime}(\varphi_{1})-F^{\prime\prime\prime}(\varphi_{2})\rVert_{L^{\infty}(\Omega)}\lVert\nabla\varphi_{2}\rVert^{2}_{L^{4}(\Omega)}\lVert\partial_{t}\varphi\rVert_{H} \displaystyle\hskip 20.00003pt+\lVert F^{\prime\prime}(\varphi_{1})-F^{\prime\prime}(\varphi_{2})\rVert_{L^{\infty}(\Omega)}\lVert\Delta\varphi_{2}\rVert_{H}\lVert\partial_{t}\varphi\rVert_{H} \displaystyle\hskip 10.00002pt\leq C\lVert\Delta\varphi\rVert_{H}\lVert\partial_{t}\varphi\rVert_{H}+C\left(\lVert\varphi_{1}\rVert_{W}+\lVert\varphi_{2}\rVert_{W}\right)\lVert\varphi\rVert_{W}\lVert\partial_{t}\varphi\rVert_{H} \displaystyle\hskip 20.00003pt+C\lVert\varphi\rVert_{L^{\infty}(\Omega)}\left(\lVert\varphi_{2}\rVert_{W}+\lVert\varphi_{2}\rVert^{2}_{W}\right)\lVert\partial_{t}\varphi\rVert_{H} \displaystyle\hskip 10.00002pt\leq\frac{1}{8}\lVert\partial_{t}\varphi\rVert^{2}_{H}+C\left(1+\lVert\varphi_{1}\rVert^{2}_{W}+\lVert\varphi_{2}\rVert^{4}_{W}\right)\lVert\varphi\rVert^{2}_{W}. Here we used the Sobolev embeddings W\hookrightarrow W^{1,4}(\Omega) and W\hookrightarrow L^{\infty}(\Omega) . Moreover, we observe that \lVert\varphi_{1}\rVert^{2}_{W}+\lVert\varphi_{2}\rVert^{4}_{W}\in L^{\infty}(0,T) by Theorem 2.3 . In particular, the above estimate entails, as a byproduct, that \lVert\Delta(F^{\prime}(\varphi_{1})-F^{\prime}(\varphi_{2}))\rVert^{2}_{H}\leq C\left(1+\lVert\varphi_{1}\rVert^{2}_{W}+\lVert\varphi_{2}\rVert^{4}_{W}\right)\lVert\varphi\rVert^{2}_{W}. (2.19) The remaining terms on the right-hand side of ( 2.18 ) can be easily estimated as follows \displaystyle(\lambda f,\partial_{t}\varphi)_{H}\leq\lVert\lambda\rVert_{H}\lVert f\rVert_{L^{\infty}(\Omega)}\lVert\partial_{t}\varphi\rVert_{H}\leq\frac{1}{8}\lVert\partial_{t}\varphi\rVert^{2}_{H}+C\lVert\lambda\rVert^{2}_{H}, \displaystyle(\lambda_{1}\varphi,\partial_{t}\varphi)_{H}\leq\lVert\lambda_{1}\rVert_{L^{\infty}(\Omega)}\lVert\varphi\rVert_{H}\lVert\partial_{t}\varphi\rVert_{H}\leq\frac{1}{8}\lVert\partial_{t}\varphi\rVert^{2}_{H}+C\lVert\varphi\rVert^{2}_{H}, \displaystyle(\lambda\varphi_{2},\partial_{t}\varphi)_{H}\leq\lVert\lambda\rVert_{H}\lVert\varphi_{2}\rVert_{L^{\infty}(\Omega)}\lVert\partial_{t}\varphi\rVert_{H}\leq\frac{1}{8}\lVert\partial_{t}\varphi\rVert^{2}_{H}+C\lVert\lambda\rVert^{2}_{H}. Thus, by integrating ( 2.18 ) in (0,t) , for any given t\in(0,T) , and by exploiting the estimates above, we infer that \displaystyle\frac{1}{2}\lVert\Delta\varphi(t)\rVert^{2}_{H}+\frac{1}{2}\int_{0}^{t}\lVert\partial_{t}\varphi\rVert^{2}_{H}\,\mathrm{d}s \displaystyle\hskip 10.00002pt\leq C\int_{0}^{T}\left(1+\lVert\varphi_{1}\rVert^{2}_{W}+\lVert\varphi_{2}\rVert^{4}_{W}\right)\left(\lVert\Delta\varphi\rVert^{2}_{H}+\lVert\varphi\rVert^{2}_{H}\right)\,\mathrm{d}s+CT\lVert\lambda\rVert^{2}_{H}. Using again Gronwall’s Lemma and recalling ( 2.16 ) for \varphi in L^{\infty}(0,T;H) , we get \lVert\varphi\rVert^{2}_{H^{1}(0,T;H)\cap L^{\infty}(0,T;W)}\leq C\lVert\lambda\rVert^{2}_{H}. (2.20) Next, by comparison in ( 2.10 ), we infer that \Delta\mu is uniformly bounded in L^{2}(0,T;H) by ( 2.20 ). This means that \lVert\mu\rVert^{2}_{L^{2}(0,T;W)}\leq C\lVert\lambda\rVert^{2}_{H}. (2.21) Applying now the Laplacian to ( 2.11 ), by comparison, we infer that \lVert\Delta^{2}\varphi\rVert^{2}_{H}\leq C\lVert\Delta\mu\rVert^{2}_{H}+C\lVert\Delta(F^{\prime}(\varphi_{1})-F^{\prime}(\varphi_{2}))\rVert^{2}_{H}. Then, using ( 2.19 ), ( 2.20 ), ( 2.21 ) and recalling that \lVert\varphi_{1}\rVert^{2}_{W}+\lVert\varphi_{2}\rVert^{4}_{W}\in L^{\infty}(0,T) (see Theorem 2.3 ), we deduce that \lVert\Delta^{2}\varphi\rVert^{2}_{L^{2}(0,T;H)}\leq C\lVert\lambda\rVert^{2}_{H}. In turn, on account of ( 2.12 ), by standard elliptic regularity we infer that \lVert\varphi\rVert^{2}_{L^{2}(0,T;H^{4}(\Omega))}\leq C\lVert\lambda\rVert^{2}_{H}. This concludes the proof. ∎ 3 Existence of an optimal control Given an initial guess \varphi_{0} satisfying A6 , we now consider the optimal control problem: (CP) Minimise the cost functional \mathcal{J}(\varphi,\lambda_{0})=\frac{\alpha_{1}}{2}\int_{0}^{T}\int_{\Omega\setminus D}|\varphi-f|^{2}\,\mathrm{d}x\,\mathrm{d}t+\frac{\alpha_{2}}{2}\int_{\Omega\setminus D}|\varphi(T)-f|^{2}\,\mathrm{d}x+\frac{\beta}{2}\int_{\Omega\setminus D}\,\left(\frac{1}{\lambda_{0}}\right)^{2}\,\mathrm{d}x, subject to the control constraints \lambda_{0}\in\mathcal{U}_{\text{ad}}:=\{\lambda_{0}\in L^{\infty}(\Omega\setminus D)\mid 0<\lambda_{\text{min}}\leq\lambda_{0}\leq\lambda_{\text{max}}\text{ a.e. in }\Omega\}, and to the state system ( 2.5 )–( 2.8 ) . We recall that the fidelity coefficient takes the form given by ( 1.11 ), namely \lambda(x)=\begin{cases}0\quad&\hbox{if $x\in D$},\\ \lambda_{0}(x)\quad&\hbox{if $x\in\Omega\setminus D$}.\end{cases} Remark 3.1 . We mention that all the analysis we will carry out in the following can be extended in a straight-forward way to the more general case in which the last term in the cost functional \mathcal{J} is replaced by the integral of a C^{2} convex function of \lambda_{0} . For instance, to penalise large values of \lambda_{0} , one can choose \frac{\beta}{r}\int_{\Omega\setminus D}\,\left(\frac{1}{\lambda_{0}}\right)^{r}\,\mathrm{d}x, for any r>0 . Here we just use r=2 for convenience. Our assumptions on the parameters at play are: C1. \alpha_{1},\alpha_{2},\beta\geq 0 , but not all equal to 0 . C2. \lambda_{\text{min}},\lambda_{\text{max}}\in\mathbb{R} such that 0<\lambda_{\text{min}}<\lambda_{\text{max}} . First, we prove the existence of an optimal control. Theorem 3.2 . Assume hypotheses A1 – A3 , A6 and C1 – C2 . Then, the optimal control problem (CP) admits at least one solution \overline{\lambda}_{0}\in\mathcal{U}_{\text{ad}} , that is, if (\overline{\varphi},\overline{\mu}) is the solution to ( 2.5 )–( 2.8 ) associated to \overline{\lambda}_{0} , then \mathcal{J}(\overline{\varphi},\overline{\lambda}_{0})=\min_{\lambda_{0}\in\mathcal{U}_{\text{ad}}}\mathcal{J}(\varphi,\lambda_{0}). Proof. Let \{\lambda_{0}^{n}\}_{n\in\mathbb{N}}\subset\mathcal{U}_{\text{ad}} be a minimising sequence such that 0\leq\inf_{\lambda_{0}\in\mathcal{U}_{\text{ad}}}\mathcal{J}(\varphi,\lambda_{0})=\lim_{n\to+\infty}\mathcal{J}(\varphi_{n},\lambda_{0}^{n}), where (\varphi_{n},\mu_{n}) is the solution to ( 2.5 )–( 2.8 ) corresponding to \lambda_{0}^{n} , with the regularity given by Theorem 2.3 . Observe that \{\lambda_{0}^{n}\}_{n\in\mathbb{N}}\subset\mathcal{U}_{\text{ad}} is bounded in L^{\infty}(\Omega) . Thus, by Banach–Alaoglu’s theorem, we can infer that there exists \overline{\lambda}_{0}\in L^{\infty}(\Omega) such that, up to a subsequence, \lambda_{0}^{n}\stackrel{{\scriptstyle\ast}}{{\rightharpoonup}}\overline{\lambda}_{0}\hbox{ weakly star in $L^{\infty}(\Omega)$}\hskip 10.00002pt\text{and}\hskip 10.00002pt\lambda_{0}^{n}\rightharpoonup\overline{\lambda}_{0}\hbox{ weakly in $L^{p}(\Omega)$ for any $p\in(1,+\infty)$}. Moreover, since \mathcal{U}_{\text{ad}} is convex and closed in L^{p}(\Omega) for any p\in(1,+\infty) , which means that \mathcal{U}_{\text{ad}} is also weakly closed in L^{p}(\Omega) for any p\in(1,+\infty) , it follows that \overline{\lambda}_{0}\in\mathcal{U}_{\text{ad}} . Next, consider the solutions (\varphi_{n},\mu_{n}) corresponding to \lambda_{0}^{n} . By Theorem 2.3 , we have that they are uniformly bounded in the spaces of strong solutions. Thus, using Banach–Alaoglu’s theorem once more, we can deduce that, up to a subsequence, \displaystyle\varphi_{n}\stackrel{{\scriptstyle\ast}}{{\rightharpoonup}}\overline{\varphi}\hskip 10.00002pt\hbox{weakly star in $H^{1}(0,T;V)\cap L^{\infty}(0,T;W^{2,p}(\Omega))$ for any $p\geq 2$,} \displaystyle\mu_{n}\stackrel{{\scriptstyle\ast}}{{\rightharpoonup}}\overline{\mu}\hskip 10.00002pt\hbox{weakly star in $L^{\infty}(0,T;V)\cap L^{2}(0,T;W)$.} In particular, thanks to well-known compact embeddings (see [ 35 , Section 8, Corollary 4] ), it follows that \varphi_{n}\to\overline{\varphi} strongly in C^{0}([0,T];H^{s}(\Omega)) for any 01 in dimension two. Moreover, by uniform convergence, \overline{\varphi} still satisfies the strict separation property, namely there exists \delta>0 such that \lVert\overline{\varphi}\rVert_{C^{0}(\overline{Q_{T}})}\leq 1-\delta . This fact, by the continuity of F^{\prime} inside (-1,1) , implies that F^{\prime}(\varphi_{n})\to F^{\prime}(\overline{\varphi})\hskip 10.00002pt\hbox{strongly in $C^{0}(\overline{Q_{T}})$.} Therefore, by exploiting the weak and strong convergences written above, it is now easy to show that the limit (\overline{\varphi},\overline{\mu}) also satisfies the system ( 2.5 )–( 2.8 ) with respect to \overline{\lambda}_{0} . Then, we can deduce that \inf_{\lambda_{0}\in\mathcal{U}_{\text{ad}}}\mathcal{J}(\varphi,\lambda_{0})\leq\mathcal{J}(\overline{\varphi},\overline{\lambda}_{0}). Finally, if we think \mathcal{J}(\varphi,\lambda_{0}) as a functional \widetilde{\mathcal{J}}(\varphi,\varphi(T),\lambda_{0}) of three variables, we observe that \widetilde{\mathcal{J}} is weakly lower semi-continuous in L^{2}(Q_{T})\times H\times\{\lambda_{0}\in L^{2}(\Omega\setminus D)\mid\lambda_{0}\geq\lambda_{*}>0\} , for some 0<\lambda_{*}<\lambda_{\text{min}} , with respect to the weak topology in L^{2} . Indeed, it is easy to see that \widetilde{\mathcal{J}} is strongly continuous and convex in a set which is also closed and convex itself in L^{2}(Q_{T})\times H\times L^{2}(\Omega\setminus D) . Thus, a consequence of Hahn–Banach’s theorem, implies that \widetilde{\mathcal{J}} is weakly lower semi-continuous. Hence, we can infer that \mathcal{J}(\overline{\varphi},\overline{\lambda}_{0})\leq\liminf_{n\to+\infty}\mathcal{J}(\varphi_{n},\lambda_{0}^{n})=\inf_{\lambda_{0}\in\mathcal{U}_{\text{ad}}}\mathcal{J}(\varphi,\lambda_{0})\leq\mathcal{J}(\overline{\varphi},\overline{\lambda}_{0}), which means that \overline{\lambda}_{0} is optimal. The proof is complete. ∎ 4 First-order optimality conditions We now introduce the control-to-state operator \mathcal{S} , associating to any \lambda_{0}\in\mathcal{U}_{\text{ad}} the corresponding unique strong solution (\varphi,\mu)=\mathcal{S}(\lambda_{0}) to ( 2.5 )–( 2.8 ). For the sake of future convenience, we set \displaystyle\mathbb{X}:=(H^{1}(0,T;V)\cap L^{\infty}(0,T;H^{3}(\Omega))\cap L^{2}(0,T;H^{4}(\Omega)))\times(L^{\infty}(0,T;V)\cap L^{2}(0,T;W)), \displaystyle\mathbb{Y}:=(H^{1}(0,T;H)\cap L^{\infty}(0,T;W)\cap L^{2}(0,T;H^{4}(\Omega)))\times L^{2}(0,T;W). Then, by Theorem 2.3 , we have that \mathcal{S}:\mathcal{U}_{\text{ad}}\to\mathbb{X} is well defined and that, by Theorem 2.6 , \mathcal{S}:\mathcal{U}_{\text{ad}}\to\mathbb{Y} is Lipschitz continuous with respect to the H -norm in \mathcal{U}_{\text{ad}} and the natural one in \mathbb{Y} . Our next step is to show the Fréchet differentiability of \mathcal{S} in order to differentiate the cost functional and derive the first-order necessary optimality conditions. Indeed, in this section, we first study the linearised system and we prove the Fréchet differentiability of \mathcal{S} . Then, we prove the well-posedness of the adjoint system which allows us to show the first-order optimality conditions. 4.1 Linearised system As an ansatz for the Fréchet derivative of the control-to-state operator, we now introduce the linearised system corresponding to our control problem. Indeed, to formulate the linearised system, we fix an optimal control \overline{\lambda}_{0}\in\mathcal{U}_{\text{ad}} , corresponding to an optimal state (\overline{\varphi},\overline{\mu})\in\mathbb{X} , and we linearise near \overline{\lambda}_{0} : \varphi=\overline{\varphi}+\xi,\hskip 10.00002pt\mu=\overline{\mu}+\eta,\hskip 10.00002pt\lambda_{0}=\overline{\lambda}_{0}+h_{0}, with h_{0}\in L^{\infty}(\Omega\setminus D) such that \lVert h_{0}\rVert_{L^{\infty}(\Omega\setminus D)}<\lambda_{\text{min}} and \overline{\lambda}_{0}+h_{0}\in\mathcal{U}_{\text{ad}} . Then, by approximating the non-linearities at the first order of their Taylor expansion, it is easy to see that (\xi,\eta) formally satisfies the problem \displaystyle\partial_{t}\xi-\Delta\eta=h(f-\overline{\varphi})-\overline{\lambda}\xi\hskip 10.00002pt in Q_{T} , (4.1) \displaystyle\eta=-\Delta\xi+F^{\prime\prime}(\overline{\varphi})\xi\hskip 10.00002pt in Q_{T} , (4.2) \displaystyle\partial_{\mathbf{n}}\xi=\partial_{\mathbf{n}}\eta=0\hskip 10.00002pt on \Sigma_{T} , (4.3) \displaystyle\xi(0)=0\hskip 10.00002pt in \Omega , (4.4) where we set \overline{\lambda}(x)=\begin{cases}0&\hbox{if $x\in D$,}\\ \overline{\lambda}_{0}(x)&\hbox{if $x\in\Omega\setminus D$,}\end{cases}\hskip 10.00002pt\text{and}\hskip 10.00002pth(x)=\begin{cases}0&\hbox{if $x\in D$,}\\ h_{0}(x)&\hbox{if $x\in\Omega\setminus D$.}\end{cases} (4.5) We now prove the well-posedness of the linearised problem ( 4.1 )–( 4.4 ) in the more general case in which h\in H . Proposition 4.1 . Let A1 – A3 , A6 and C1 – C2 hold. If (\overline{\varphi},\overline{\mu})\in\mathbb{X} be the strong solution to ( 2.5 )–( 2.8 ) corresponding to \overline{\lambda}_{0}\in\mathcal{U}_{\text{ad}} , then, for any h\in H the linearised problem ( 4.1 )–( 4.4 ) admits a unique (weak) solution (\xi,\eta) such that \displaystyle\xi\in H^{1}(0,T;V^{*})\cap L^{\infty}(0,T;V)\cap L^{2}(0,T;W), \displaystyle\eta\in L^{2}(0,T;V), and \displaystyle\langle\partial_{t}\xi,v\rangle_{V}+(\nabla\eta,\nabla v)_{H}=(h(f-\overline{\varphi}),v)_{H}-(\overline{\lambda}\xi,v)_{H}\hskip 10.00002pt \displaystyle\forall v\in V,\hbox{ a.e. in }(0,T), \displaystyle(\eta,v)_{H}=(\nabla\xi,\nabla v)_{H}+(F^{\prime\prime}(\varphi)\xi,v)_{H}\hskip 10.00002pt \displaystyle\forall v\in V,\hbox{ a.e. in }(0,T), \displaystyle\xi(0)=0. This weak solution is actually strong. Indeed, there holds \displaystyle\xi\in H^{1}(0,T;H)\cap L^{\infty}(0,T;W)\cap L^{2}(0,T;H^{4}(\Omega)), \displaystyle\eta\in L^{2}(0,T;W), and we have the uniform estimate \lVert\xi\rVert^{2}_{H^{1}(0,T;H)\cap L^{\infty}(0,T;W)\cap L^{2}(0,T;H^{4}(\Omega))}+\lVert\eta\rVert^{2}_{L^{2}(0,T;W)}\leq C\lVert h\rVert^{2}_{H}. (4.6) Proof. The proof can be carried out rigorously through a Faedo–Galerkin discretisation scheme using finite-dimensional spaces generated by the eigenvectors of the operator \mathcal{N} . However, being the system linear, this procedure is quite standard, thus we proceed by providing only formal a priori estimates, leaving the details to the interested reader. In particular, due to the linearity of the system, the discrete solutions are C^{1} with respect to time with values in the discrete eigenspaces, thus all the upcoming a priori estimates make sense within the discretisation scheme. First estimate. We begin by testing ( 4.1 ) with \eta and ( 4.2 ) with -\partial_{t}\xi+\eta in H . Summing the obtained equations up, we obtain: \begin{split}&\frac{1}{2}\frac{\mathrm{d}}{\mathrm{d}t}\lVert\nabla\xi\rVert^{2}_{H}+\lVert\eta\rVert^{2}_{H}+\lVert\nabla\eta\rVert^{2}_{H}+(F^{\prime\prime}(\overline{\varphi})\xi,\partial_{t}\xi)_{H}\\ &\quad=(h(f-\overline{\varphi}),\eta)_{H}-(\overline{\lambda}\xi,\eta)_{H}+(F^{\prime\prime}(\overline{\varphi})\xi,\eta)_{H}-(\Delta\xi,\eta)_{H}.\end{split} (4.7) Using A2 and Leibniz’s rule, we get \displaystyle(F^{\prime\prime}(\overline{\varphi})\xi,\partial_{t}\xi)_{H} \displaystyle=(F^{\prime\prime}_{0}(\overline{\varphi})\xi,\partial_{t}\xi)_{H}+(F^{\prime\prime}_{1}(\overline{\varphi})\xi,\partial_{t}\xi)_{H} \displaystyle=\frac{1}{2}\frac{\mathrm{d}}{\mathrm{d}t}(F^{\prime\prime}_{0}(\overline{\varphi})\xi,\xi)_{H}-(F_{0}^{\prime\prime\prime}(\overline{\varphi})\partial_{t}\overline{\varphi}\,\xi,\xi)_{H}+(F_{1}^{\prime\prime}(\overline{\varphi})\xi,\partial_{t}\xi)_{H} \displaystyle=\frac{1}{2}\frac{\mathrm{d}}{\mathrm{d}t}(F^{\prime\prime}_{0}(\overline{\varphi})\xi,\xi)_{H}-I_{1}+I_{2}. Next, we estimate I_{1} by using Hölder’s inequality, the Sobolev embedding V\hookrightarrow L^{4}(\Omega) and Remark 2.5 . This gives I_{1}=\int_{\Omega}F_{0}^{\prime\prime\prime}(\overline{\varphi})\partial_{t}\overline{\varphi}\,\xi^{2}\,\mathrm{d}x\leq\lVert F_{0}^{\prime\prime\prime}(\overline{\varphi})\rVert_{L^{\infty}(\Omega)}\lVert\partial_{t}\overline{\varphi}\rVert_{H}\lVert\xi\rVert^{2}_{L^{4}(\Omega)}\leq C\lVert\partial_{t}\overline{\varphi}\rVert_{H}\lVert\xi\rVert^{2}_{V}, where \lVert\partial_{t}\overline{\varphi}\rVert_{H}\in L^{2}(0,T) by Theorem 2.3 . To estimate I_{2} , we rewrite \partial_{t}\xi through equation ( 4.1 ), then we integrate by parts and finally we use Hölder and Young’s inequalities, Sobolev embeddings and A2 . Hence, we find \displaystyle I_{2} \displaystyle=\int_{\Omega}F_{1}^{\prime\prime}(\overline{\varphi})\xi\,\partial_{t}\xi\,\mathrm{d}x \displaystyle=\int_{\Omega}F_{1}^{\prime\prime}(\overline{\varphi})\xi\,\Delta\eta\,\mathrm{d}x+\int_{\Omega}F_{1}^{\prime\prime}(\overline{\varphi})\xi\left(h(f-\overline{\varphi})-\overline{\lambda}\xi\right)\,\mathrm{d}x \displaystyle=-\int_{\Omega}F_{1}^{\prime\prime}(\overline{\varphi})\nabla\xi\cdot\nabla\eta\,\mathrm{d}x-\int_{\Omega}F_{1}^{\prime\prime\prime}(\overline{\varphi})\nabla\overline{\varphi}\cdot\nabla\eta\,\xi\,\mathrm{d}x+\int_{\Omega}F_{1}^{\prime\prime}(\overline{\varphi})\xi\left(h(f-\overline{\varphi})-\overline{\lambda}\xi\right)\,\mathrm{d}x \displaystyle\leq\lVert F_{1}^{\prime\prime}(\overline{\varphi})\rVert_{L^{\infty}(\Omega)}\lVert\nabla\xi\rVert_{H}\lVert\nabla\eta\rVert_{H}+\lVert F_{1}^{\prime\prime\prime}(\overline{\varphi})\rVert_{L^{\infty}(\Omega)}\lVert\nabla\overline{\varphi}\rVert_{L^{4}(\Omega)}\lVert\nabla\eta\rVert_{H}\lVert\xi\rVert_{L^{4}(\Omega)} \displaystyle\hskip 10.00002pt+\lVert F_{1}^{\prime\prime}(\overline{\varphi})\rVert_{L^{\infty}(\Omega)}\lVert\xi\rVert_{H}\left(\left(\lVert f\rVert_{L^{\infty}(\Omega)}+\lVert\overline{\varphi}\rVert_{L^{\infty}(\Omega)}\right)\lVert h\rVert_{H}+\lVert\overline{\lambda}\rVert_{L^{\infty}(\Omega)}\lVert\xi\rVert_{H}\right) \displaystyle\leq\frac{1}{2}\lVert\nabla\eta\rVert^{2}_{H}+C\left(1+\lVert\nabla\overline{\varphi}\rVert^{2}_{L^{4}(\Omega)}\right)\lVert\xi\rVert^{2}_{V}+\lVert h\rVert^{2}_{H}, where \lVert\nabla\overline{\varphi}\rVert^{2}_{L^{4}(\Omega)}\in L^{\infty}(0,T) owing to Theorem 2.3 and the Sobolev embedding H^{2}(\Omega)\hookrightarrow W^{1,4}(\Omega) . Going back to ( 4.7 ), we now estimate the terms on the right-hand side by using similar techniques, namely, \displaystyle(h(f-\overline{\varphi}),\eta)_{H}\leq\lVert h\rVert_{H}\left(\lVert f\rVert_{L^{\infty}(\Omega)}+\lVert\overline{\varphi}\rVert_{L^{\infty}(\Omega)}\right)\lVert\eta\rVert_{H}\leq\frac{1}{4}\lVert\eta\rVert^{2}_{H}+C\lVert h\rVert^{2}_{H}, \displaystyle(\overline{\lambda}\xi,\eta)_{H}\leq\lVert\overline{\lambda}\rVert_{L^{\infty}(\Omega)}\lVert\xi\rVert_{H}\lVert\eta\rVert_{H}\leq\frac{1}{4}\lVert\eta\rVert^{2}_{H}+C\lVert\xi\rVert^{2}_{H}, \displaystyle(F^{\prime\prime}(\overline{\varphi})\xi,\eta)_{H}\leq\lVert F^{\prime\prime}(\overline{\varphi})\rVert_{L^{\infty}(\Omega)}\lVert\xi\rVert_{H}\lVert\eta\rVert_{H}\leq\frac{1}{4}\lVert\eta\rVert^{2}_{H}+C\lVert\xi\rVert^{2}_{H}, \displaystyle-(\Delta\xi,\eta)_{H}=(\nabla\xi,\nabla\eta)_{H}\leq\frac{1}{4}\lVert\nabla\eta\rVert^{2}_{H}+\lVert\nabla\xi\rVert^{2}_{H}. Therefore, by integrating ( 4.7 ) on (0,t) , for any t\in(0,T) , recalling ( 4.4 ), and putting together all the previous estimates, we deduce that \displaystyle\frac{1}{2}\left((F^{\prime\prime}_{0}(\overline{\varphi})\xi(t),\xi(t))_{H}+\lVert\nabla\xi(t)\rVert^{2}_{H}\right)+\frac{1}{4}\int_{0}^{t}\lVert\eta\rVert^{2}_{V}\,\mathrm{d}s \displaystyle\hskip 10.00002pt\leq C\int_{0}^{T}\left(1+\lVert\partial_{t}\overline{\varphi}\rVert_{H}+\lVert\nabla\overline{\varphi}\rVert^{2}_{L^{4}(\Omega)}\right)\lVert\xi\rVert^{2}_{V}\,\mathrm{d}x+CT\lVert h\rVert^{2}_{H}. Then, A2 entails that (F^{\prime\prime}_{0}(\overline{\varphi})\xi(t),\xi(t))_{H}+\lVert\nabla\xi(t)\rVert^{2}_{H}\geq c_{0}\lVert\xi(t)\rVert^{2}_{H}+\lVert\nabla\xi(t)\rVert^{2}_{H}\geq\min\{c_{0},1\}\lVert\xi(t)\rVert^{2}_{V}. Thus, using Gronwall’s Lemma, we conclude that \lVert\xi\rVert^{2}_{L^{\infty}(0,T;V)}+\lVert\eta\rVert^{2}_{L^{2}(0,T;V)}\leq C\lVert h\rVert^{2}_{H}. (4.8) Moreover, by comparison in ( 4.1 ) and ( 4.2 ), it is now easy to see that \lVert\varphi\rVert^{2}_{H^{1}(0,T;V^{*})\cap L^{2}(0,T;W)}\leq C\lVert h\rVert^{2}_{H}. (4.9) Using the above bounds, one can simply pass to the limit in the discretisation framework and show that there exists a (weak) solution (\xi,\eta) to the linearised system ( 4.1 )–( 4.4 ) with the prescribed regularities. Additionally, being the system linear, uniqueness follows from estimate ( 4.8 ). Second estimate. We now test ( 4.1 ) with \partial_{t}\xi and ( 4.2 ) with \Delta\partial_{t}\xi and we sum them up. This gives \frac{1}{2}\frac{\mathrm{d}}{\mathrm{d}t}\lVert\Delta\xi\rVert^{2}_{H}+\lVert\partial_{t}\xi\rVert^{2}_{H}=(F^{\prime\prime}(\overline{\varphi})\xi,\Delta\partial_{t}\xi)_{H}+(h(f-\overline{\varphi}),\partial_{t}\xi)_{H}-(\overline{\lambda}\xi,\partial_{t}\xi)_{H}. (4.10) Note that, to be rigorous, one should perform this estimate within the Galerkin discretisation framework. Nevertheless, our formal a priori estimates can easily be obtained also in the corresponding discretised version. Let us estimate the first term on the right-hand side of ( 4.10 ). We integrate by parts and then employ Hölder and Young’s inequalities, the Sobolev embeddings W\hookrightarrow W^{1,4}(\Omega) and W\hookrightarrow L^{\infty}(\Omega) and Remark 2.5 to deduce the following: \displaystyle(F^{\prime\prime}(\overline{\varphi})\xi,\Delta\partial_{t}\xi)_{H} \displaystyle=(\Delta(F^{\prime\prime}(\overline{\varphi})\xi),\partial_{t}\xi)_{H} \displaystyle=(F^{\prime\prime}(\overline{\varphi})\Delta\xi+2F^{\prime\prime\prime}(\overline{\varphi})\nabla\overline{\varphi}\cdot\nabla\xi+F^{(4)}(\overline{\varphi})\nabla\overline{\varphi}\cdot\nabla\overline{\varphi}\,\xi,\partial_{t}\xi)_{H} \displaystyle\leq\lVert F^{\prime\prime}(\overline{\varphi})\rVert_{L^{\infty}(\Omega)}\lVert\Delta\xi\rVert_{H}\lVert\partial_{t}\xi\rVert_{H} \displaystyle\hskip 10.00002pt+2\lVert F^{\prime\prime\prime}(\overline{\varphi})\rVert_{L^{\infty}(\Omega)}\lVert\nabla\overline{\varphi}\rVert_{L^{4}(\Omega)}\lVert\nabla\xi\rVert_{L^{4}(\Omega)}\lVert\partial_{t}\xi\rVert_{H} \displaystyle\hskip 10.00002pt+\lVert F^{(4)}(\overline{\varphi})\rVert_{L^{\infty}(\Omega)}\lVert\nabla\overline{\varphi}\rVert^{2}_{L^{4}(\Omega)}\lVert\xi\rVert_{L^{\infty}(\Omega)}\lVert\partial_{t}\xi\rVert_{H} \displaystyle\leq\frac{1}{4}\lVert\partial_{t}\xi\rVert^{2}_{H}+C\left(1+\lVert\overline{\varphi}\rVert^{2}_{W}+\lVert\overline{\varphi}\rVert^{4}_{W}\right)\lVert\xi\rVert^{2}_{W}. On the other hand, the estimate above also implies that \lVert\Delta(F^{\prime\prime}(\overline{\varphi})\xi)\rVert^{2}_{H}\leq C\left(1+\lVert\overline{\varphi}\rVert^{2}_{W}+\lVert\overline{\varphi}\rVert^{4}_{W}\right)\lVert\xi\rVert^{2}_{W}, (4.11) where \lVert\overline{\varphi}\rVert^{2}_{W}+\lVert\overline{\varphi}\rVert^{4}_{W}\in L^{\infty}(0,T) by Theorem 2.3 . Next, we can also easily estimate the remaining terms on the right-hand side of ( 4.10 ), namely, \displaystyle(h(f-\overline{\varphi}),\partial_{t}\xi)_{H}\leq\lVert h\rVert_{H}\left(\lVert f\rVert_{L^{\infty}(\Omega)}+\lVert\overline{\varphi}\rVert_{L^{\infty}(\Omega)}\right)\lVert\partial_{t}\xi\rVert_{H}\leq\frac{1}{4}\lVert\partial_{t}\xi\rVert^{2}_{H}+C\lVert h\rVert^{2}_{H}, \displaystyle(\overline{\lambda}\xi,\partial_{t}\xi)_{H}\leq\lVert\overline{\lambda}\rVert_{L^{\infty}(\Omega)}\lVert\xi\rVert_{H}\lVert\partial_{t}\xi\rVert_{H}\leq\frac{1}{4}\lVert\partial_{t}\xi\rVert^{2}_{H}+C\lVert\xi\rVert^{2}_{H}. Then, integrating ( 4.10 ) over (0,t) , for any t\in(0,T) , and using all the above estimates, we infer that \displaystyle\frac{1}{2}\lVert\Delta\xi(t)\rVert^{2}_{H}+\frac{1}{4}\int_{0}^{t}\lVert\partial_{t}\xi\rVert^{2}_{H}\,\mathrm{d}s \displaystyle\hskip 10.00002pt\leq C\int_{0}^{T}\left(1+\lVert\overline{\varphi}\rVert^{2}_{W}+\lVert\overline{\varphi}\rVert^{4}_{W}\right)\left(\lVert\Delta\xi\rVert^{2}_{H}+\lVert\xi\rVert^{2}_{H}\right)\,\mathrm{d}s+CT\lVert h\rVert^{2}_{H}. Hence, using Gronwall’s Lemma and ( 4.8 ) for \xi , we get that \lVert\xi\rVert^{2}_{H^{1}(0,T;H)\cap L^{\infty}(0,T;W)}\leq C\lVert h\rVert^{2}_{H}. (4.12) Next, by comparison in ( 4.1 ), it follows that \Delta\eta is uniformly bounded in L^{2}(0,T;H) by ( 4.12 ), so that \lVert\eta\rVert^{2}_{L^{2}(0,T;W)}\leq C\lVert h\rVert^{2}_{H}. (4.13) Finally, taking the Laplacian of ( 4.2 ), by comparison, we deduce that \lVert\Delta^{2}\xi\rVert^{2}_{H}\leq C\lVert\Delta\eta\rVert^{2}_{H}+C\lVert\Delta(F^{\prime\prime}(\overline{\varphi})\xi)\rVert^{2}_{H}. Consequently, by using ( 4.11 )–( 4.13 ), we obtain that \lVert\Delta^{2}\xi\rVert^{2}_{L^{2}(0,T;H)}\leq C\lVert h\rVert^{2}_{H}. Recalling now ( 4.3 ), by elliptic regularity theory we eventually find that \lVert\xi\rVert^{2}_{L^{2}(0,T;H^{4}(\Omega))}\leq C\lVert h\rVert^{2}_{H}. This ends the proof. ∎ Remark 4.2 . For future reference, we observe that the proof of Proposition 4.1 can be easily extended to a more general linear system of the form: \displaystyle\partial_{t}\xi-\Delta\eta=-\overline{\lambda}\xi+g_{1}\hskip 10.00002pt in Q_{T} , (4.14) \displaystyle\eta=-\Delta\xi+F^{\prime\prime}(\overline{\varphi})\xi+g_{2}\hskip 10.00002pt in Q_{T} , (4.15) \displaystyle\partial_{\mathbf{n}}\xi=\partial_{\mathbf{n}}\eta=0\hskip 10.00002pt on \Sigma_{T} , (4.16) \displaystyle\xi(0)=0\hskip 10.00002pt in \Omega , (4.17) where g_{1} and g_{2} are given sources ( g_{1}=h(f-\overline{\varphi}) and g_{2}=0 in ( 4.1 )–( 4.4 )). In particular, the following results can be proven: • If g_{1}\in L^{2}(0,T;V^{*}) and g_{2}\in L^{2}(0,T;V) , then there exists a unique weak solution to ( 4.14 )–( 4.17 ) such that \displaystyle\xi\in H^{1}(0,T;V^{*})\cap L^{\infty}(0,T;V)\cap L^{2}(0,T;W), \displaystyle\eta\in L^{2}(0,T;V), and the following estimate holds: \begin{split}&\lVert\xi\rVert^{2}_{H^{1}(0,T;V^{*})\cap L^{\infty}(0,T;V)\cap L^{2}(0,T;W)}+\lVert\eta\rVert^{2}_{L^{2}(0,T;V)}\\ &\quad\leq C\left(\lVert g_{1}\rVert^{2}_{L^{2}(0,T;V^{*})}+\lVert g_{2}\rVert^{2}_{L^{2}(0,T;V)}\right).\end{split} (4.18) • If g_{1}\in L^{2}(0,T;H) and g_{2}\in L^{2}(0,T;W) , then there exists a unique strong solution to ( 4.14 )–( 4.17 ) such that \displaystyle\xi\in H^{1}(0,T;H)\cap L^{\infty}(0,T;W)\cap L^{2}(0,T;H^{4}(\Omega)), \displaystyle\eta\in L^{2}(0,T;W), and the following estimate holds: \begin{split}&\lVert\xi\rVert^{2}_{H^{1}(0,T;H)\cap L^{\infty}(0,T;W)\cap L^{2}(0,T;H^{4}(\Omega))}+\lVert\eta\rVert^{2}_{L^{2}(0,T;W)}\\ &\quad\leq C\left(\lVert g_{1}\rVert^{2}_{L^{2}(0,T;H)}+\lVert g_{2}\rVert^{2}_{L^{2}(0,T;W)}\right).\end{split} (4.19) 4.2 Fréchet differentiability We now fix an open bounded set \mathcal{U}_{R}\subset L^{\infty}(\Omega\setminus D) such that \mathcal{U}_{\text{ad}}\subset\mathcal{U}_{R} and \lambda_{0}>0 for any \lambda_{0}\in\mathcal{U}_{R} . Note that the continuous dependence estimate of Theorem 2.6 now holds in \mathcal{U}_{R} with a constant K depending only on R and the fixed data of the problem. Here we want to show that the control-to-state operator \mathcal{S}:\mathcal{U}_{R}\to\mathbb{W} is Fréchet differentiable, where \mathbb{W}:=(H^{1}(0,T;V^{*})\cap L^{\infty}(0,T;V)\cap L^{2}(0,T;W))\times L^{2}(0,T;V). More precisely, the following result holds. Theorem 4.3 . Let A1 – A3 , A6 and C1 – C2 hold. Then, \mathcal{S}:\mathcal{U}_{R}\to\mathbb{W} is Fréchet differentiable, namely for any \overline{\lambda}_{0}\in\mathcal{U}_{R} there exists a unique Fréchet derivative \mathrm{D}\mathcal{S}(\overline{\lambda}_{0})\in\mathcal{L}(L^{\infty}(\Omega\setminus D),\mathbb{W}) such that \frac{\lVert\mathcal{S}(\overline{\lambda}_{0}+h_{0})-\mathcal{S}(\overline{\lambda}_{0})-\mathrm{D}\mathcal{S}(\overline{\lambda}_{0})[h_{0}]\rVert_{\mathbb{W}}}{\lVert h_{0}\rVert_{L^{2}(\Omega\setminus D)}}\to 0\hskip 10.00002pt\text{as }\lVert h_{0}\rVert_{L^{2}(\Omega\setminus D)}\to 0. (4.20) In particular, for any h_{0}\in L^{\infty}(\Omega\setminus D) , the Fréchet derivative of \mathcal{S} at \overline{\lambda}_{0} , which we denote by \mathrm{D}\mathcal{S}(\overline{\lambda}_{0})[h_{0}] , is defined as the solution (\xi,\eta) to the linearised system ( 4.1 )–( 4.4 ) corresponding to (\overline{\varphi},\overline{\mu})=\mathcal{S}(\overline{\lambda}_{0}) , with datum h_{0} . In addition, the Fréchet derivative \mathrm{D}\mathcal{S} is Lipschitz continuous as a function from \mathcal{U}_{R} to the space \mathcal{L}(L^{\infty}(\Omega\setminus D),\mathbb{W}) . More precisely, for any \overline{\lambda}_{0}^{1},\overline{\lambda}_{0}^{2}\in\mathcal{U}_{R} the following estimate holds: \lVert\mathrm{D}\mathcal{S}(\overline{\lambda}_{0}^{1})-\mathrm{D}\mathcal{S}(\overline{\lambda}_{0}^{2})\rVert_{\mathcal{L}(L^{\infty}(\Omega\setminus D),\mathbb{W})}\leq K\lVert\overline{\lambda}_{0}^{1}-\overline{\lambda}_{0}^{2}\rVert_{L^{2}(\Omega\setminus D)}, (4.21) for some constant K>0 depending only on the parameters of the system. Remark 4.4 . Note that the definition of \mathrm{D}\mathcal{S}(\overline{\lambda}_{0})[h_{0}] as the corresponding solution to the linearised system ( 4.1 )–( 4.4 ) is well defined for any h_{0}\in L^{2}(\Omega\setminus D) , and thus for any h_{0}\in L^{\infty}(\Omega\setminus D) , due to Proposition 4.1 . Then, \mathrm{D}\mathcal{S}(\overline{\lambda}_{0}) is a well defined linear bounded operator, i.e., it belongs to \mathcal{L}(L^{\infty}(\Omega\setminus D),\mathbb{W}) . Observe also that ( 4.20 ) shows the Fréchet differentiability with respect to the L^{2}(\Omega\setminus D) -norm, but, since L^{\infty}(\Omega\setminus D)\hookrightarrow L^{2}(\Omega\setminus D) , this also implies the differentiability in our reference space. Moreover, \mathrm{D}\mathcal{S}(\overline{\lambda}_{0}) can be extended to a linear bounded linear operator in \mathcal{L}(L^{2}(\Omega\setminus D),\mathbb{W}) . Proof. It is sufficient to prove the result for any small enough perturbation h_{0} , hence we fix \gamma>0 and consider only perturbations such that \lVert h_{0}\rVert_{L^{2}(\Omega\setminus D)}\leq\gamma. Let us fix \overline{\lambda}_{0}\in\mathcal{U}_{R} and h_{0} as above and consider \displaystyle(\varphi^{h},\mu^{h}):=\mathcal{S}(\overline{\lambda}_{0}+h_{0}), \displaystyle(\overline{\varphi},\overline{\mu}):=\mathcal{S}(\overline{\lambda}_{0}), \displaystyle(\xi,\eta)\hbox{ solution to \eqref{eq:xi}--\eqref{eq:iclin} corresponding to $h_{0}$}. In order to show the Fréchet differentiability of \mathcal{S} , it is enough to show that there exists a constant C>0 , depending only on the parameters of the system and possibly on \gamma , and an exponent s>2 such that \lVert(\varphi^{h},\mu^{h})-(\overline{\varphi},\overline{\mu})-(\xi,\eta)\rVert^{2}_{\mathbb{W}}\leq C\lVert h_{0}\rVert^{s}_{L^{2}(\Omega\setminus D)}. If we introduce the additional variables (see Theorem 2.3 and Proposition 4.1 ) \displaystyle\psi:=\varphi^{h}-\overline{\varphi}-\xi\in H^{1}(0,T;H)\cap L^{\infty}(0,T;W)\cap L^{2}(0,T;H^{4}(\Omega)), \displaystyle\zeta:=\mu^{h}-\overline{\mu}-\eta\in L^{2}(0,T;W), then this is equivalent to showing that \lVert(\psi,\zeta)\rVert^{2}_{\mathbb{W}}\leq C\lVert h_{0}\rVert^{s}_{L^{2}(\Omega)}. (4.22) We can now rewrite problem ( 4.1 )–( 4.4 ) in terms of \psi and \zeta , namely, \displaystyle\partial_{t}\psi-\Delta\zeta=\Lambda^{h}\hskip 10.00002pt in Q_{T} , (4.23) \displaystyle\zeta=-\Delta\psi+F^{h}\hskip 10.00002pt in Q_{T} , (4.24) \displaystyle\partial_{\mathbf{n}}\psi=\partial_{\mathbf{n}}\zeta=0\hskip 10.00002pt on \Sigma_{T} , (4.25) \displaystyle\psi(0)=0\hskip 10.00002pt in \Omega , (4.26) where \displaystyle\Lambda^{h}:=(\overline{\lambda}+h)(f-\varphi^{h})-\overline{\lambda}(f-\overline{\varphi})-h(f-\overline{\varphi})+\overline{\lambda}\xi, \displaystyle F^{h}:=F^{\prime}(\varphi^{h})-F^{\prime}(\overline{\varphi})-F^{\prime\prime}(\overline{\varphi})\xi, and \overline{\lambda} and h are as in ( 4.5 ). We can rewrite \Lambda^{h} and F^{h} as follows \Lambda^{h}=-\overline{\lambda}\psi-h(\varphi^{h}-\overline{\varphi}),\hskip 10.00002ptF^{h}=F^{\prime\prime}(\overline{\varphi})\psi+R^{h}(\varphi^{h}-\overline{\varphi})^{2}, where R^{h}=\int_{0}^{1}(1-z)F^{\prime\prime\prime}(\overline{\varphi}+z(\varphi^{h}-\overline{\varphi}))\,\mathrm{d}z. Recalling that \varphi^{h} and \overline{\varphi} satisfy ( 2.3 ) and using the continuity of F^{\prime\prime\prime} , it is easy to see that there exists a constant C_{\gamma}>0 , possibly depending on \gamma , such that \lVert R^{h}\rVert_{L^{\infty}(Q_{T})}\leq C_{\gamma}. (4.27) Moreover, one can also see that \lVert\nabla R^{h}\rVert_{L^{\infty}(Q_{T})}\leq C_{\gamma}. (4.28) Indeed, recalling Theorem 2.3 and ( 2.4 ), we have that \displaystyle\lVert\nabla R^{h}\rVert_{L^{\infty}(\Omega)} \displaystyle\leq\int_{0}^{1}(1-z)\lVert F^{(4)}(\overline{\varphi}+z(\varphi^{h}-\overline{\varphi}))\rVert_{L^{\infty}(\Omega)}\lVert\nabla\overline{\varphi}+z(\nabla\varphi^{h}-\nabla\overline{\varphi})\rVert_{L^{\infty}(\Omega)}\,\mathrm{d}z \displaystyle\leq C_{\gamma}\left(\lVert\varphi^{h}\rVert_{W^{1,\infty}(\Omega)}+\lVert\overline{\varphi}\rVert_{W^{1,\infty}(\Omega)}\right) \displaystyle\leq C_{\gamma}\left(\lVert\varphi^{h}\rVert_{L^{\infty}(0,T;W^{2,p}(\Omega))}+\lVert\overline{\varphi}\rVert_{L^{\infty}(0,T;W^{2,p}(\Omega))}\right)\leq C_{\gamma}, which implies ( 4.28 ). We now observe that problem ( 4.23 )–( 4.26 ) has the same formal structure as general linearised problem ( 4.14 )–( 4.17 ) in Remark 4.2 (with \xi=\psi and \eta=\zeta ), if we put g_{1}:=-h(\varphi^{h}-\overline{\varphi})\hskip 10.00002pt\text{and}\hskip 10.00002ptg_{2}:=R^{h}(\varphi^{h}-\overline{\varphi})^{2}. Then, by ( 4.18 ), we immediately deduce that \begin{split}&\lVert\psi\rVert^{2}_{H^{1}(0,T;V^{*})\cap L^{\infty}(0,T;V)\cap L^{2}(0,T;W)}+\lVert\zeta\rVert^{2}_{L^{2}(0,T;V)}\\ &\quad\leq C\left(\lVert g_{1}\rVert^{2}_{L^{2}(0,T;V^{*})}+\lVert g_{2}\rVert^{2}_{L^{2}(0,T;V)}\right).\end{split} (4.29) Let us estimate the norms on the right-hand side. By applying Hölder’s inequality, the Sobolev embedding V\hookrightarrow L^{4}(\Omega) , which implies L^{4/3}(\Omega)\hookrightarrow V^{*} , and the continuous dependence estimate ( 2.9 ), we infer that \displaystyle\lVert g_{1}\rVert^{2}_{L^{2}(0,T;V^{*})} \displaystyle=\int_{0}^{T}\lVert h(\varphi^{h}-\overline{\varphi})\rVert^{2}_{V^{*}}\,\mathrm{d}t \displaystyle\leq\int_{0}^{T}\lVert h(\varphi^{h}-\overline{\varphi})\rVert^{2}_{L^{4/3}(\Omega)}\,\mathrm{d}t \displaystyle\leq\int_{0}^{T}\lVert h\rVert^{2}_{H}\lVert\varphi^{h}-\overline{\varphi}\rVert^{2}_{L^{4}(\Omega)}\,\mathrm{d}t \displaystyle\leq\lVert h\rVert^{2}_{H}\lVert\varphi^{h}-\overline{\varphi}\rVert^{2}_{L^{2}(0,T;V)}\leq C\lVert h\rVert^{4}_{H}. Next, by using Hölder’s inequality, the Sobolev embeddings V\hookrightarrow L^{4}(\Omega) and W\hookrightarrow W^{1,4}(\Omega) , estimates ( 4.27 ) and ( 4.28 ) and again the continuous dependence estimate ( 2.9 ), we deduce that \displaystyle\lVert g_{2}\rVert^{2}_{L^{2}(0,T;H)} \displaystyle=\int_{0}^{T}\lVert R^{h}(\varphi^{h}-\overline{\varphi})^{2}\rVert^{2}_{H}\,\mathrm{d}t \displaystyle\leq\int_{0}^{T}\lVert R^{h}\rVert^{2}_{L^{\infty}(\Omega)}\lVert\varphi^{h}-\overline{\varphi}\rVert^{4}_{L^{4}(\Omega)}\,\mathrm{d}t \displaystyle\leq\lVert R^{h}\rVert^{2}_{L^{\infty}(Q_{T})}\int_{0}^{T}\lVert\varphi^{h}-\overline{\varphi}\rVert^{4}_{V}\,\mathrm{d}t \displaystyle\leq CT\lVert\varphi^{h}-\overline{\varphi}\rVert^{4}_{L^{\infty}(0,T;V)}\leq C\lVert h\rVert^{4}_{H}, \displaystyle\lVert\nabla g_{2}\rVert^{2}_{L^{2}(0,T;H)} \displaystyle=\int_{0}^{T}\lVert\nabla R^{h}\,(\varphi^{h}-\overline{\varphi})^{2}+2R^{h}(\varphi^{h}-\overline{\varphi})\nabla(\varphi^{h}-\overline{\varphi})\rVert^{2}_{H}\,\mathrm{d}t \displaystyle\leq C\int_{0}^{T}\lVert\nabla R^{h}\rVert^{2}_{L^{\infty}(\Omega)}\lVert\varphi^{h}-\overline{\varphi}\rVert^{4}_{L^{4}(\Omega)}\,\mathrm{d}t \displaystyle\hskip 10.00002pt+C\int_{0}^{T}\lVert R^{h}\rVert^{2}_{L^{\infty}(\Omega)}\lVert\varphi^{h}-\overline{\varphi}\rVert^{2}_{L^{4}(\Omega)}\lVert\nabla(\varphi^{h}-\overline{\varphi})\rVert^{2}_{L^{4}(\Omega)}\,\mathrm{d}t \displaystyle\leq CT\lVert\nabla R^{h}\rVert_{L^{\infty}(Q_{T})}\lVert\varphi^{h}-\overline{\varphi}\rVert^{4}_{L^{\infty}(0,T;V)} \displaystyle\hskip 10.00002pt+C\lVert R^{h}\rVert^{2}_{L^{\infty}(Q_{T})}\lVert\varphi^{h}-\overline{\varphi}\rVert^{2}_{L^{\infty}(0,T;V)}\int_{0}^{T}\lVert\varphi^{h}-\overline{\varphi}\rVert^{2}_{W^{1,4}(\Omega)}\,\mathrm{d}t \displaystyle\leq C\lVert\varphi^{h}-\overline{\varphi}\rVert^{4}_{L^{\infty}(0,T;V)}+C\lVert\varphi^{h}-\overline{\varphi}\rVert^{2}_{L^{\infty}(0,T;V)}\lVert\varphi^{h}-\overline{\varphi}\rVert^{2}_{L^{2}(0,T;W)} \displaystyle\leq C\lVert h\rVert^{4}_{H}. Therefore, we deduce from ( 4.29 ) that \lVert(\psi,\zeta)\rVert^{2}_{\mathbb{W}}\leq\lVert h\rVert^{4}_{H}, which is exactly ( 4.22 ) with s=4>2 . We are left to prove that \mathrm{D}\mathcal{S} is Lipschitz continuous. This amounts to show that, given \overline{\lambda}_{0}^{i}\in\mathcal{U}_{R} , i=1,2 , corresponding to the solutions (\overline{\varphi}_{i},\overline{\mu}_{i}) , i=1,2 , we have, for any h_{0}\in L^{\infty}(\Omega\setminus D) with \lVert h_{0}\rVert_{L^{\infty}(\Omega\setminus D)}=1 , that \lVert\mathrm{D}\mathcal{S}(\overline{\lambda}_{0}^{1})[h_{0}]-\mathrm{D}\mathcal{S}(\overline{\lambda}_{0}^{2})[h_{0}]\rVert^{2}_{\mathbb{W}}=\lVert(\xi_{1},\eta_{1})-(\xi_{2},\eta_{2})\rVert^{2}_{\mathbb{W}}\leq K\lVert\overline{\lambda}_{0}^{1}-\overline{\lambda}_{0}^{2}\rVert^{2}_{L^{2}(\Omega\setminus D)}, (4.30) which, by taking the supremum over h_{0}\in L^{\infty}(\Omega\setminus D) with \lVert h_{0}\rVert_{L^{\infty}(\Omega\setminus D)}=1 , yields ( 4.21 ). Here, (\xi_{i},\eta_{i}) , i=1,2 , denotes the corresponding strong solution to the linearised system ( 4.1 )–( 4.4 ) with (\overline{\varphi}_{i},\overline{\mu}_{i}) , i=1,2 , respectively, with the same h . Let us consider the problem solved by the differences \xi:=\xi_{1}-\xi_{2} and \eta:=\eta_{1}-\eta_{2} , which formally takes the following form (see ( 4.5 )) \displaystyle\partial_{t}\xi-\Delta\eta=-\overline{\lambda}_{1}\xi-h(\overline{\varphi}_{1}-\overline{\varphi}_{2})-(\overline{\lambda}_{1}-\overline{\lambda}_{2})\xi_{2}\hskip 10.00002pt in Q_{T} , (4.31) \displaystyle\eta=-\Delta\xi+F^{\prime\prime}(\overline{\varphi}_{1})\xi+(F^{\prime\prime}(\overline{\varphi}_{1})-F^{\prime\prime}(\overline{\varphi}_{2}))\xi_{2}\hskip 10.00002pt in Q_{T} , (4.32) \displaystyle\partial_{\mathbf{n}}\xi=\partial_{\mathbf{n}}\eta=0\hskip 10.00002pt on \Sigma_{T} , (4.33) \displaystyle\xi(0)=0\hskip 10.00002pt in \Omega . (4.34) Observe once more that problem ( 4.31 )–( 4.34 ) has the same formal structure as the general linearised problem ( 4.14 )–( 4.17 ), provided we set g_{1}=-h(\overline{\varphi}_{1}-\overline{\varphi}_{2})-(\overline{\lambda}_{1}-\overline{\lambda}_{2})\xi_{2}\hskip 10.00002pt\text{and}\hskip 10.00002ptg_{2}=(F^{\prime\prime}(\overline{\varphi}_{1})-F^{\prime\prime}(\overline{\varphi}_{2}))\xi_{2}. Then, by Remark 4.2 , recalling ( 4.18 ), we have \lVert(\xi,\eta)\rVert^{2}_{\mathbb{W}}\leq C\left(\lVert g_{1}\rVert^{2}_{L^{2}(0,T;V^{*})}+\lVert g_{2}\rVert^{2}_{L^{2}(0,T;V)}\right). (4.35) Let us estimate the norm of g_{1} first. Using that \lVert h\rVert_{L^{\infty}(\Omega)}=1 and \xi_{2}\in L^{\infty}(0,T;V) uniformly by Proposition ( 4.1 ), the Sobolev embedding V\hookrightarrow L^{4}(\Omega) , which implies L^{4/3}(\Omega)\hookrightarrow V^{*} , and the continuous dependence estimate ( 2.9 ), we have \displaystyle\lVert g_{1}\rVert^{2}_{L^{2}(0,T;V^{*})} \displaystyle=\int_{0}^{T}\lVert g_{1}\rVert^{2}_{V^{*}}\,\mathrm{d}t \displaystyle\leq C\int_{0}^{T}\lVert h(\overline{\varphi}_{1}-\overline{\varphi}_{2})\rVert^{2}_{L^{4/3}(\Omega)}\,\mathrm{d}t+C\int_{0}^{T}\lVert(\overline{\lambda}_{1}-\overline{\lambda}_{2})\xi_{2}\rVert^{2}_{L^{4/3}(\Omega)}\,\mathrm{d}t \displaystyle\leq C\lVert h\rVert^{2}_{H}\int_{0}^{T}\lVert\overline{\varphi}_{1}-\overline{\varphi}_{2}\rVert^{2}_{L^{4}(\Omega)}\,\mathrm{d}t+C\int_{0}^{T}\lVert\xi_{2}\rVert^{2}_{L^{4}(\Omega)}\lVert\overline{\lambda}_{1}-\overline{\lambda}_{2}\rVert^{2}_{H}\,\mathrm{d}t \displaystyle\leq C\int_{0}^{T}\lVert\overline{\varphi}_{1}-\overline{\varphi}_{2}\rVert^{2}_{V}\,\mathrm{d}t+CT\lVert\xi_{2}\rVert^{2}_{L^{\infty}(0,T;V)}\lVert\overline{\lambda}_{1}-\overline{\lambda}_{2}\rVert^{2}_{H} \displaystyle\leq C\lVert\overline{\lambda}_{1}-\overline{\lambda}_{2}\rVert^{2}_{H}. Concerning the norm of g_{2} , by employing Remark 2.5 , the Sobolev embedding W\hookrightarrow L^{\infty}(\Omega) , the regularity of \xi_{2} given by Proposition 4.1 and the continuous dependence estimate ( 2.9 ), we find that \displaystyle\lVert g_{2}\rVert^{2}_{L^{2}(0,T;H)} \displaystyle=\int_{0}^{T}\lVert(F^{\prime\prime}(\overline{\varphi}_{1})-F^{\prime\prime}(\overline{\varphi}_{2}))\xi_{2}\rVert^{2}_{H}\,\mathrm{d}t \displaystyle\leq\int_{0}^{T}\lVert\xi_{2}\rVert^{2}_{L^{\infty}(\Omega)}\lVert F^{\prime\prime}(\overline{\varphi}_{1})-F^{\prime\prime}(\overline{\varphi}_{2})\rVert^{2}_{H}\,\mathrm{d}t \displaystyle\leq\lVert\xi_{2}\rVert^{2}_{L^{\infty}(0,T;W)}\int_{0}^{T}C\lVert\overline{\varphi}_{1}-\overline{\varphi}_{2}\rVert^{2}_{H}\,\mathrm{d}t \displaystyle\leq C\lVert\overline{\lambda}_{1}-\overline{\lambda}_{2}\rVert^{2}_{H}. Arguing similarly for \nabla g_{2} , we get \displaystyle\lVert\nabla g_{2}\rVert^{2}_{L^{2}(0,T;H)} \displaystyle\hskip 10.00002pt\leq C\int_{0}^{T}\lVert F^{\prime\prime\prime}(\overline{\varphi}_{1})\nabla(\overline{\varphi}_{1}-\overline{\varphi}_{2})\rVert^{2}_{H}\,\mathrm{d}t+C\int_{0}^{T}\lVert(F^{\prime\prime\prime}(\overline{\varphi}_{1})-F^{\prime\prime\prime}(\overline{\varphi}_{2}))\nabla\overline{\varphi}_{2}\,\xi_{2}\rVert^{2}_{H}\,\mathrm{d}t \displaystyle\hskip 20.00003pt+C\int_{0}^{T}\lVert(F^{\prime\prime}(\overline{\varphi}_{1})-F^{\prime\prime}(\overline{\varphi}_{2}))\nabla\xi_{2}\rVert^{2}_{H}\,\mathrm{d}t \displaystyle\hskip 10.00002pt\leq C\int_{0}^{T}\lVert F^{\prime\prime\prime}(\overline{\varphi}_{1})\rVert^{2}_{L^{\infty}(\Omega)}\lVert\nabla(\overline{\varphi}_{1}-\overline{\varphi}_{2})\rVert^{2}_{H}\,\mathrm{d}t \displaystyle\hskip 20.00003pt+C\int_{0}^{T}\lVert F^{\prime\prime\prime}(\overline{\varphi}_{1})-F^{\prime\prime\prime}(\overline{\varphi}_{2})\rVert^{2}_{L^{4}(\Omega)}\lVert\nabla\overline{\varphi}_{2}\rVert^{2}_{L^{4}(\Omega)}\lVert\xi_{2}\rVert^{2}_{L^{\infty}(\Omega)}\,\mathrm{d}t \displaystyle\hskip 20.00003pt+C\int_{0}^{T}\lVert F^{\prime\prime}(\overline{\varphi}_{1})-F^{\prime\prime}(\overline{\varphi}_{2})\rVert^{2}_{L^{4}(\Omega)}\lVert\nabla\xi_{2}\rVert^{2}_{L^{4}(\Omega)}\,\mathrm{d}t \displaystyle\hskip 10.00002pt\leq C\int_{0}^{T}\lVert\overline{\varphi}_{1}-\overline{\varphi}_{2}\rVert^{2}_{V}\,\mathrm{d}t+C\lVert\overline{\varphi}_{2}\rVert^{2}_{L^{\infty}(0,T;W)}\lVert\xi_{2}\rVert^{2}_{L^{\infty}(0,T;W)}\int_{0}^{T}\lVert\overline{\varphi}_{1}-\overline{\varphi}_{2}\rVert^{2}_{L^{4}(\Omega)}\,\mathrm{d}t \displaystyle\hskip 20.00003pt+\lVert\xi_{2}\rVert^{2}_{L^{\infty}(0,T;W)}\int_{0}^{T}\lVert\overline{\varphi}_{1}-\overline{\varphi}\rVert^{2}_{L^{4}(\Omega)}\,\mathrm{d}t \displaystyle\hskip 10.00002pt\leq C\int_{0}^{T}\lVert\overline{\varphi}_{1}-\overline{\varphi}_{2}\rVert^{2}_{V}\,\mathrm{d}t\leq C\lVert\overline{\lambda}_{1}-\overline{\lambda}_{2}\rVert^{2}_{H}. In particular, throughout the estimates above, we employed Hölder’s inequality, ( 2.4 ), the Sobolev embeddings V\hookrightarrow L^{4}(\Omega) , W\hookrightarrow L^{\infty}(\Omega) and W\hookrightarrow W^{1,4}(\Omega) , the regularities of \overline{\varphi}_{2} and \xi_{2} given respectively by Theorem 2.3 and Proposition 4.1 , and finally the continuous dependence estimate ( 2.9 ). Finally, going back to ( 4.35 ), we conclude that \lVert(\xi,\eta)\rVert^{2}_{\mathbb{W}}\leq C\lVert\overline{\lambda}_{1}-\overline{\lambda}_{2}\rVert^{2}_{H}, that is, ( 4.30 ). This concludes the proof. ∎ 4.3 Adjoint system In order to derive the first-order optimality conditions for (CP) in a form which is suitable for applications, we now introduce the adjoint problem associated with our optimal control problem. Indeed, we fix an optimal state (\overline{\varphi},\overline{\mu})=\mathcal{S}(\overline{\lambda}_{0}) and we use the formal Lagrangian method with adjoint variables (p,q) . Then, we find that the adjoint problem, which is formally solved by these variables, has the following form: \displaystyle-\partial_{t}p-\Delta q+\overline{\lambda}p+F^{\prime\prime}(\overline{\varphi})q=\alpha_{1}\chi_{\Omega\setminus D}(\overline{\varphi}-f)\hskip 10.00002pt in Q_{T} , (4.36) \displaystyle q=-\Delta p\hskip 10.00002pt in Q_{T} , (4.37) \displaystyle\partial_{\mathbf{n}}p=\partial_{\mathbf{n}}{q}=0\hskip 10.00002pt on \Sigma_{T} , (4.38) \displaystyle p(T)=\alpha_{2}\chi_{\Omega\setminus D}(\overline{\varphi}(T)-f)\hskip 10.00002pt in \Omega . (4.39) Here \chi_{\Omega\setminus D} denotes the characteristic function of the set \Omega\setminus D , namely \chi_{\Omega\setminus D}(x)=1 if x\in\Omega\setminus D and \chi_{\Omega\setminus D}(x)=0 otherwise, \overline{\lambda} is given by ( 4.5 ) and \alpha_{1} and \alpha_{2} are the constants appearing in the definition of \mathcal{J} . Remark 4.5 . To derive the adjoint problem, it is useful to rewrite the functional \mathcal{J} as \mathcal{J}(\varphi,\lambda_{0})=\frac{\alpha_{1}}{2}\int_{0}^{T}\int_{\Omega}\chi_{\Omega\setminus D}|\varphi-f|^{2}\,\mathrm{d}x\,\mathrm{d}t+\frac{\alpha_{2}}{2}\int_{\Omega}\chi_{\Omega\setminus D}|\varphi(T)-f|^{2}\,\mathrm{d}x+\frac{\beta}{2}\int_{\Omega\setminus D}\,\left(\frac{1}{\lambda_{0}}\right)^{2}\,\mathrm{d}x. In this way, we can get the equations above. We also mention that if \alpha_{2}>0 , due to the low regularity of the final datum p(T) , which can be at most in L^{\infty}(\Omega) , we are only able to establish the existence of very weak solutions to ( 4.36 )–( 4.39 ). This is enough to derive first-order necessary conditions. However, we will need higher regularity for second-order ones. For this reason, we will also assume \alpha_{2}=0 in the following (see Section 5 ). We now state and prove a well-posedness result for the adjoint problem ( 4.36 )–( 4.39 ). Proposition 4.6 . Let A1 – A3 , A6 and C1 – C2 hold. Consider the strong solution (\overline{\varphi},\overline{\mu})\in\mathbb{X} to ( 2.5 )–( 2.8 ) corresponding to \overline{\lambda}_{0}\in\mathcal{U}_{\text{ad}} . Then the adjoint problem ( 4.36 )–( 4.39 ) admits a unique weak solution such that \displaystyle p\in H^{1}(0,T;W^{*})\cap L^{\infty}(0,T;H)\cap L^{2}(0,T;W), \displaystyle q\in L^{2}(0,T;H), which satisfies the following variational formulation \displaystyle\langle-\partial_{t}p,w\rangle_{W}-(q,\Delta w)_{H}+(\overline{\lambda}p,w)_{H}+(F^{\prime\prime}(\overline{\varphi})q,w)_{H}=\alpha_{1}(\chi_{\Omega\setminus D}(\overline{\varphi}-f),w)_{H}, (4.40) \displaystyle(q,w)_{H}=(-\Delta p,w)_{H}, (4.41) for almost any t\in(0,T) and for any w\in W , and p(T)=\alpha_{2}\chi_{\Omega\setminus D}(\overline{\varphi}(T)-f) in H . Moreover, if \alpha_{2}=0 , we can further say that the unique solution (p,q) is a strong solution to ( 4.36 )–( 4.39 ), satisfying all the equations almost everywhere, and enjoying the regularity: \displaystyle p\in H^{1}(0,T;H)\cap L^{\infty}(0,T;W)\cap L^{2}(0,T;H^{4}(\Omega)), \displaystyle q\in L^{2}(0,T;W). Proof. Since ( 4.36 )–( 4.39 ) is a backward linear problem, one can rigorously prove the existence of a unique weak solution through a convenient Faedo–Galerkin discretisation scheme. For the sake of brevity, here we just obtain the formal a priori bounds that are needed to pass to the limit in the discretisation scheme. First estimate. We take w=p in ( 4.40 ) and w=q in ( 4.41 ) and we sum the corresponding equations to obtain: -\frac{1}{2}\frac{\mathrm{d}}{\mathrm{d}t}\lVert p\rVert^{2}_{H}+\lVert q\rVert^{2}_{H}=(\overline{\lambda}p,p)_{H}+(F^{\prime\prime}(\overline{\varphi})q,p)_{H}+\alpha_{1}(\chi_{\Omega\setminus D}(\overline{\varphi}-f),p)_{H}. (4.42) Then, we estimate the terms on the right-hand side of ( 4.42 ) by means of Hölder and Young’s inequalities and Remark 2.5 . This gives \displaystyle(\overline{\lambda}p,p)_{H}\leq\lVert\overline{\lambda}\rVert_{L^{\infty}(\Omega)}\lVert p\rVert^{2}_{H}\leq C\lVert p\rVert^{2}_{H}, \displaystyle(F^{\prime\prime}(\overline{\varphi})q,p)_{H}\leq\lVert F^{\prime\prime}(\overline{\varphi})\rVert_{L^{\infty}(\Omega)}\lVert q\rVert_{H}\lVert p\rVert_{H}\leq\frac{1}{2}\lVert q\rVert^{2}_{H}+C\lVert p\rVert^{2}_{H}, \displaystyle\alpha_{1}(\chi_{\Omega\setminus D}(\overline{\varphi}-f),p)_{H}\leq\frac{1}{2}\lVert p\rVert^{2}_{H}+\frac{1}{2}\lVert\alpha_{1}\chi_{\Omega\setminus D}(\overline{\varphi}-f)\rVert^{2}_{H}. Hence, by integrating ( 4.42 ) in (t,T) , for any given t\in(0,T) , and using the above estimates, we infer that \displaystyle\frac{1}{2}\lVert p(t)\rVert^{2}_{H}+\frac{1}{2}\int_{t}^{T}\lVert q\rVert^{2}_{H}\,\mathrm{d}s \displaystyle\hskip 10.00002pt\leq\lVert\alpha_{2}\chi_{\Omega\setminus D}(\overline{\varphi}(T)-f)\rVert^{2}_{H}+C\int_{0}^{T}\lVert p\rVert^{2}_{H}\,\mathrm{d}s+C\int_{0}^{T}\lVert\alpha_{1}\chi_{\Omega\setminus D}(\overline{\varphi}-f)\rVert^{2}_{H}\,\mathrm{d}s. Since \alpha_{2}\chi_{\Omega\setminus D}(\overline{\varphi}(T)-f)\in H and \alpha_{1}\chi_{\Omega\setminus D}(\overline{\varphi}-f)\in L^{2}(0,T;H) , an application of Gronwall’s Lemma yields \lVert p\rVert^{2}_{L^{\infty}(0,T;H)}+\lVert q\rVert^{2}_{L^{2}(0,T;H)}\leq C\left(\lVert\alpha_{2}\chi_{\Omega\setminus D}(\overline{\varphi}(T)-f)\rVert^{2}_{H}+\lVert\alpha_{1}\chi_{\Omega\setminus D}(\overline{\varphi}-f)\rVert^{2}_{L^{2}(0,T;H)}\right). (4.43) Moreover, by comparison in ( 4.36 ) and ( 4.37 ), we also easily deduce that \lVert p\rVert^{2}_{H^{1}(0,T;W^{*})\cap L^{2}(0,T;W)}\leq C\left(\lVert\alpha_{2}\chi_{\Omega\setminus D}(\overline{\varphi}(T)-f)\rVert^{2}_{H}+\lVert\alpha_{1}\chi_{\Omega\setminus D}(\overline{\varphi}-f)\rVert^{2}_{L^{2}(0,T;H)}\right). (4.44) Estimates ( 4.43 ) and ( 4.44 ) are then enough to pass to the limit in the discretisation framework and prove the existence of the desired weak solution, which is also unique, the problem being linear. In particular, observe that, due to the embedding H^{1}(0,T;W^{*})\cap L^{2}(0,T;W)\hookrightarrow C^{0}([0,T];H) , the final condition makes sense in H . Second estimate. From now on, we assume that \alpha_{2}=0 , so that the final condition ( 4.39 ) becomes p(T)=0 . Taking w=q in ( 4.40 ) and w=\partial_{t}p in ( 4.41 ) and adding together the resulting identities, we find -\frac{1}{2}\frac{\mathrm{d}}{\mathrm{d}t}\lVert\nabla p\rVert^{2}_{H}+\lVert\nabla q\rVert^{2}_{H}=-(\overline{\lambda}p,q)_{H}-(F^{\prime\prime}(\overline{\varphi})q,q)_{H}+(\alpha_{1}\chi_{\Omega\setminus D}(\overline{\varphi}-f),q)_{H}. (4.45) By using Hölder and Young’s inequalities, we estimate the terms on the right-hand side of ( 4.45 ) in the following way: \displaystyle(\overline{\lambda}p,q)_{H}\leq\lVert\overline{\lambda}\rVert_{L^{\infty}(\Omega)}\lVert p\rVert_{H}\lVert q\rVert_{H}\leq C\lVert p\rVert^{2}_{H}+C\lVert q\rVert^{2}_{H} \displaystyle(F^{\prime\prime}(\overline{\varphi})q,q)_{H}\leq\lVert F^{\prime\prime}(\overline{\varphi})\rVert_{L^{\infty}(\Omega)}\lVert q\rVert^{2}_{H}\leq C\lVert q\rVert^{2}_{H} \displaystyle(\alpha_{1}\chi_{\Omega\setminus D}(\overline{\varphi}-f),q)_{H}\leq\frac{1}{2}\lVert q\rVert^{2}_{H}+\frac{1}{2}\lVert\alpha_{1}\chi_{\Omega\setminus D}(\overline{\varphi}-f)\rVert^{2}_{H}. Thus, by integrating ( 4.45 ) in (t,T) , for any given t\in(0,T) , and by exploiting the above estimates, we infer that \displaystyle\frac{1}{2}\lVert\nabla p(t)\rVert^{2}_{H}+\int_{t}^{T}\lVert\nabla q\rVert^{2}_{H}\,\mathrm{d}s\leq C\int_{0}^{T}\left(\lVert p\rVert^{2}_{H}+\lVert q\rVert^{2}_{H}\right)\,\mathrm{d}s+C\int_{0}^{T}\lVert\alpha_{1}\chi_{\Omega\setminus D}(\overline{\varphi}-f)\rVert^{2}_{H}\,\mathrm{d}s. Therefore, by using the previous estimate ( 4.43 ) on the right-hand side, we conclude that \lVert p\rVert^{2}_{L^{\infty}(0,T;V)}+\lVert q\rVert^{2}_{L^{2}(0,T;V)}\leq C\lVert\alpha_{1}\chi_{\Omega\setminus D}(\overline{\varphi}-f)\rVert^{2}_{L^{2}(0,T;H)}. (4.46) Third estimate. We now take w=-\partial_{t}p in ( 4.40 ) and w=-\Delta\partial_{t}p in ( 4.41 ). Again, summing the resulting identities up gives -\frac{1}{2}\frac{\mathrm{d}}{\mathrm{d}t}\lVert\Delta p\rVert^{2}_{H}+\lVert\partial_{t}p\rVert^{2}_{H}=(\overline{\lambda}p,\partial_{t}p)_{H}+(F^{\prime\prime}(\overline{\varphi})q,\partial_{t}p)_{H}-(\alpha_{1}\chi_{\Omega\setminus D}(\overline{\varphi}-f),\partial_{t}p)_{H}. (4.47) Then, arguing as before, we estimate the terms on the right-hand side and we find \displaystyle(\overline{\lambda}p,\partial_{t}p)_{H}\leq\lVert\overline{\lambda}\rVert_{L^{\infty}(\Omega)}\lVert p\rVert_{H}\lVert\partial_{t}p\rVert_{H}\leq\frac{1}{4}\lVert\partial_{t}p\rVert^{2}_{H}+C\lVert p\rVert^{2}_{H} \displaystyle(F^{\prime\prime}(\overline{\varphi})q,\partial_{t}p)_{H}\leq\lVert F^{\prime\prime}(\overline{\varphi})\rVert_{L^{\infty}(\Omega)}\lVert q\rVert_{H}\lVert\partial_{t}p\rVert_{H}\leq\frac{1}{4}\lVert\partial_{t}p\rVert^{2}_{H}+C\lVert q\rVert^{2}_{H} \displaystyle(\alpha_{1}\chi_{\Omega\setminus D}(\overline{\varphi}-f),\partial_{t}p)_{H}\leq\frac{1}{4}\lVert\partial_{t}p\rVert^{2}_{H}+\lVert\alpha_{1}\chi_{\Omega\setminus D}(\overline{\varphi}-f)\rVert^{2}_{H}. Thus, by integrating ( 4.47 ) in (t,T) , for any given t\in(0,T) , and by exploiting the above estimates, we infer that \displaystyle\frac{1}{2}\lVert\Delta p(t)\rVert^{2}_{H}+\frac{1}{4}\int_{t}^{T}\lVert\partial_{t}p\rVert^{2}_{H}\,\mathrm{d}s\leq C\int_{0}^{T}\left(\lVert p\rVert^{2}_{H}+\lVert q\rVert^{2}_{H}\right)\,\mathrm{d}s+C\int_{0}^{T}\lVert\alpha_{1}\chi_{\Omega\setminus D}(\overline{\varphi}-f)\rVert^{2}_{H}\,\mathrm{d}s. Hence, by using the previous estimate ( 4.43 ) on the right-hand side, we conclude that \lVert p\rVert^{2}_{H^{1}(0,T;H)\cap L^{\infty}(0,T;W)}\leq C\lVert\alpha_{1}\chi_{\Omega\setminus D}(\overline{\varphi}-f)\rVert^{2}_{L^{2}(0,T;H)}. (4.48) Finally, by comparison in ( 4.36 ), due to ( 4.48 ), we see that \Delta q is now uniformly bounded in L^{2}(0,T;H) , which implies that \lVert q\rVert^{2}_{L^{2}(0,T;W)}\leq C\lVert\alpha_{1}\chi_{\Omega\setminus D}(\overline{\varphi}-f)\rVert^{2}_{L^{2}(0,T;H)}. (4.49) Moreover, due to ( 4.49 ), applying the Laplacian to ( 4.37 ), we also see that \Delta^{2}p is uniformly bounded in L^{2}(0,T;H) . Then, by standard elliptic regularity theory (see also ( 4.38 )), we deduce that \lVert p\rVert^{2}_{L^{2}(0,T;H^{4}(\Omega))}\leq C\lVert\alpha_{1}\chi_{\Omega\setminus D}(\overline{\varphi}-f)\rVert^{2}_{L^{2}(0,T;H)}. The proof is complete. ∎ Remark 4.7 . For future convenience, we observe that the proof of Proposition 4.6 can be easily generalised to a more general backward linear problem of the form: \displaystyle-\partial_{t}p-\Delta q+\overline{\lambda}p+F^{\prime\prime}(\overline{\varphi})q=g_{3}\hskip 10.00002pt in Q_{T} , (4.50) \displaystyle q=-\Delta p\hskip 10.00002pt in Q_{T} , (4.51) \displaystyle\partial_{\mathbf{n}}p=\partial_{\mathbf{n}}{q}=0\hskip 10.00002pt on \Sigma_{T} , (4.52) \displaystyle p(T)=g_{4}\hskip 10.00002pt in \Omega . (4.53) where g_{3} and g_{4} are given sources ( g_{3}=\alpha_{1}\chi_{\Omega\setminus D}(\overline{\varphi}-f) and g_{4}=\alpha_{2}\chi_{\Omega\setminus D}(\overline{\varphi}(T)-f) , or g_{4}=0 if \alpha_{2}=0 , in ( 4.36 )–( 4.39 )). In particular, we have the following results: • If g_{3}\in L^{2}(0,T;H) and g_{4}\in H , then there exists a unique weak solution to ( 4.50 )–( 4.53 ) such that \displaystyle\xi\in H^{1}(0,T;W^{*})\cap L^{\infty}(0,T;H)\cap L^{2}(0,T;W), \displaystyle\eta\in L^{2}(0,T;H), and the following estimate holds: \begin{split}&\lVert p\rVert^{2}_{H^{1}(0,T;W^{*})\cap L^{\infty}(0,T;H)\cap L^{2}(0,T;W)}+\lVert q\rVert^{2}_{L^{2}(0,T;H)}\\ &\quad\leq C\left(\lVert g_{3}\rVert^{2}_{L^{2}(0,T;H)}+\lVert g_{4}\rVert^{2}_{H}\right).\end{split} (4.54) • If g_{2}\in L^{2}(0,T;H) and g_{4}\in W , then there exists a unique strong solution to ( 4.50 )–( 4.53 ) such that \displaystyle p\in H^{1}(0,T;H)\cap L^{\infty}(0,T;W)\cap L^{2}(0,T;H^{4}(\Omega)), \displaystyle q\in L^{2}(0,T;W), and the following estimate holds: \begin{split}&\lVert p\rVert^{2}_{H^{1}(0,T;H)\cap L^{\infty}(0,T;W)\cap L^{2}(0,T;H^{4}(\Omega))}+\lVert q\rVert^{2}_{L^{2}(0,T;W)}\\ &\quad\leq C\left(\lVert g_{3}\rVert^{2}_{L^{2}(0,T;H)}+\lVert g_{4}\rVert^{2}_{W}\right).\end{split} (4.55) 4.4 First-order optimality conditions Having the adjoint system at our disposal, we can now state and prove the main result of this section. Theorem 4.8 . Let A1 – A3 , A6 and C1 – C2 hold. If \overline{\lambda}_{0}\in\mathcal{U}_{\text{ad}} is an optimal control for (CP) and (\overline{\varphi},\overline{\mu})\in\mathbb{X} is the corresponding optimal state, i.e. the strong solution to ( 2.5 )–( 2.8 ) with such \overline{\lambda}_{0} , then the optimal control \overline{\lambda}_{0} satisfies the following variational inequality: \int_{0}^{T}\int_{\Omega\setminus D}\alpha_{1}p(f-\overline{\varphi})(\lambda_{0}-\overline{\lambda}_{0})\,\mathrm{d}x\,\mathrm{d}t-\int_{\Omega\setminus D}\frac{\beta}{\overline{\lambda}_{0}^{3}}(\lambda_{0}-\overline{\lambda}_{0})\,\mathrm{d}x\geq 0\hskip 10.00002pt\hbox{for any $\lambda_{0}\in\mathcal{U}_{\text{ad}}$,} (4.56) where (p,q) is the adjoint variable to (\overline{\varphi},\overline{\mu}) , i.e. the solution to the adjoint system ( 4.36 )–( 4.39 ). Proof. Observe that the cost functional \mathcal{J} is convex and Fréchet differentiable in the space C^{0}([0,T];H)\times\mathcal{U}_{R} , where \mathcal{U}_{R}\subset L^{\infty}(\Omega) is an open bounded set such that \mathcal{U}_{\text{ad}}\subset\mathcal{U}_{R} and \lambda_{0}>0 for any \lambda_{0}\in\mathcal{U}_{R} . Moreover, thanks to Theorem 4.3 , we know that the solution operator \mathcal{S} is Fréchet differentiable from \mathcal{U}_{R} to \mathbb{W} . Consequently, since H^{1}(0,T;V^{*})\cap L^{2}(0,T;V)\hookrightarrow C^{0}([0,T];H) (cf. the definition of \mathbb{W} ), we also have that the operator \mathcal{S}_{1} , which selects the first component of \mathcal{S} , is Fréchet differentiable from \mathcal{U}_{R} to C^{0}([0,T];H) . Therefore, we can consider the reduced cost functional \mathcal{J}_{\text{red}}:\mathcal{U}_{R}\to\mathbb{R} , defined as \mathcal{J}_{\text{red}}(\lambda_{0})=\mathcal{J}(\mathcal{S}_{1}(\lambda_{0}),\lambda_{0}), which is Fréchet differentiable in \mathcal{U}_{R} by the chain rule. Thus, we can rewrite the optimal control problem (CP) through the reduced cost functional as the following minimisation problem \argmin_{\lambda_{0}\in\,\mathcal{U}_{\text{ad}}}\mathcal{J}_{\text{red}}(\lambda_{0}). Recalling now that \mathcal{U}_{\text{ad}} is convex and \mathcal{J}_{\text{red}} is Fréchet differentiable, if \overline{\lambda}_{0} is optimal, then it has to satisfy the necessary optimality condition \mathrm{D}\mathcal{J}_{\text{red}}(\overline{\lambda}_{0})[\lambda_{0}-\overline{\lambda}_{0}]\geq 0\hskip 10.00002pt\hbox{for any $\lambda_{0}\in\mathcal{U}_{\text{ad}}$.} By computing explicitly the derivative of \mathcal{J}_{\text{red}} , we get that, for any \lambda_{0}\in\mathcal{U}_{\text{ad}} , \int_{0}^{T}\int_{\Omega}\alpha_{1}\chi_{\Omega\setminus D}(\overline{\varphi}-f)\xi\,\mathrm{d}x\,\mathrm{d}t+\int_{\Omega}\alpha_{2}\chi_{\Omega\setminus D}(\overline{\varphi}(T)-f)\xi(T)\,\mathrm{d}x-\int_{\Omega\setminus D}\frac{\beta}{\overline{\lambda}_{0}^{3}}(\lambda_{0}-\overline{\lambda}_{0})\,\mathrm{d}x\geq 0, where \xi=\mathrm{D}\mathcal{S}_{1}(\overline{\varphi})[\lambda_{0}-\overline{\lambda}_{0}] is the first component of the solution (\xi,\eta) to the linearised problem ( 4.1 )–( 4.4 ) corresponding to (\overline{\varphi},\overline{\mu}) and h_{0}=\lambda_{0}-\overline{\lambda}_{0} . Observe that the right-hand side and the final condition of the adjoint problem ( 4.36 )–( 4.39 ) appear in the above inequality. Thus, by substituing equations ( 4.40 ) and ( 4.39 ) into the previous expression and accounting for the low regularity of the adjoint variables, we deduce that for any \lambda_{0}\in\mathcal{U}_{\text{ad}} \displaystyle\int_{0}^{T}\langle-\partial_{t}p,\xi\rangle_{W}\,\mathrm{d}t+\int_{0}^{T}\int_{\Omega}\left(-q\Delta\xi+\overline{\lambda}p\,\xi+F^{\prime\prime}(\overline{\varphi})q\,\xi\right)\,\mathrm{d}x\,\mathrm{d}t \displaystyle\hskip 10.00002pt+\int_{\Omega}p(T)\xi(T)\,\mathrm{d}x-\int_{\Omega\setminus D}\frac{\beta}{\overline{\lambda}_{0}^{3}}(\lambda_{0}-\overline{\lambda}_{0})\,\mathrm{d}x\geq 0, where we used the boundary condition ( 4.3 ). Integrating by parts in time and using ( 4.4 ), we obtain that, for any \lambda_{0}\in\mathcal{U}_{\text{ad}} , \displaystyle\int_{0}^{T}\int_{\Omega}\left(p\partial_{t}\xi-q\Delta\xi+\overline{\lambda}p\,\xi+F^{\prime\prime}(\overline{\varphi})q\,\xi\right)\,\mathrm{d}x\,\mathrm{d}t-\int_{\Omega\setminus D}\frac{\beta}{\overline{\lambda}_{0}^{3}}(\lambda_{0}-\overline{\lambda}_{0})\,\mathrm{d}x\geq 0. Recalling now the adjoint equation ( 4.37 ), we integrate by parts, using the boundary conditions ( 4.3 ) and ( 4.38 ), and we find \displaystyle 0=\int_{0}^{T}\int_{\Omega}(-q-\Delta p)\eta\,\mathrm{d}x\,\mathrm{d}t=\int_{0}^{T}\int_{\Omega}(-q\eta-p\Delta\eta)\,\mathrm{d}x\,\mathrm{d}t. Hence, combining the above identity with the previous inequality and regrouping some terms, we have that, for any \lambda_{0}\in\mathcal{U}_{\text{ad}} , \displaystyle\int_{0}^{T}\int_{\Omega}\left(\partial_{t}\xi-\Delta\eta+\overline{\lambda}\xi\right)p\,\mathrm{d}x\,\mathrm{d}t+\int_{0}^{T}\int_{\Omega}(-\eta-\Delta\xi+F^{\prime\prime}(\overline{\varphi})\xi)q\,\mathrm{d}x\,\mathrm{d}t \displaystyle\hskip 10.00002pt-\int_{\Omega\setminus D}\frac{\beta}{\overline{\lambda}_{0}^{3}}(\lambda_{0}-\overline{\lambda}_{0})\,\mathrm{d}x\geq 0. We now notice that the linearised equations ( 4.1 )–( 4.2 ), up to their source terms, have appeared in the above inequality. Indeed, we can substitute them, recalling that h_{0}=\lambda_{0}-\overline{\lambda}_{0} in our context, and infer that \displaystyle\int_{0}^{T}\int_{\Omega}p(f-\overline{\varphi})(\lambda-\overline{\lambda})\,\mathrm{d}x\,\mathrm{d}t-\int_{\Omega\setminus D}\frac{\beta}{\overline{\lambda}_{0}^{3}}(\lambda_{0}-\overline{\lambda}_{0})\,\mathrm{d}x\geq 0, for any \lambda_{0}\in\mathcal{U}_{\text{ad}} . This is exactly inequality ( 4.56 ) and the proof follows. ∎ 5 Second-order optimality conditions Observe that problem ( 2.5 )–( 2.8 ) is nonlinear and so is the control-to-state operator \mathcal{S} . Therefore, our optimal control problem (CP) is not convex and the first-order conditions given by Theorem 4.8 are only necessary and not sufficient. In this section, we derive second-order sufficient conditions to characterise the optimal solutions of (CP). In general, such conditions require more regularity on the solutions to the adjoint system ( 4.36 )–( 4.39 ). In view of Remark 4.7 , we observe that one could keep \alpha_{2}>0 if, for some particular application, the target image f could be replaced by a regularised version \tilde{f}\in H^{2}(\Omega\setminus D) , for instance through the system ( A.1 )–( A.3 ). However, it is not clear if this could be relevant from the point of view of applications (e. g. numerical approximations), therefore we stick to the standard case f\in L^{\infty}(\Omega\setminus D) . This choice forces us to assume that C3. \alpha_{2}=0 . Note that most classical PDE-based inpainting methods impose either a boundary condition on \Omega\setminus D or a penalty term that keeps \varphi close to f for all time. Hence, many of the references in the literature can be viewed as the special case \alpha_{2}=0 . 5.1 Control-to-costate operator In view of computing the second-order derivatives of the cost functional \mathcal{J} , we now introduce the control-to-costate operator . Then, for any \lambda_{0}\in\mathcal{U}_{\text{ad}} , we define \mathcal{T}(\lambda_{0})=(p,q), where (p,q) is the solution to the adjoint problem ( 4.36 )–( 4.39 ) with \overline{\lambda}_{0}=\lambda_{0} , (\overline{\varphi},\overline{\mu})=\mathcal{S}(\lambda_{0}) and \alpha_{2}=0 . Recalling Proposition 4.6 , we have that \mathcal{T}:\mathcal{U}_{R}\supset\mathcal{U}_{\text{ad}}\to\mathbb{Y}=(H^{1}(0,T;H)\cap L^{\infty}(0,T;W)\cap L^{2}(0,T;H^{4}(\Omega)))\times L^{2}(0,T;W). The rest of this section is devoted to study the differentiability properties of the operator \mathcal{T} . First, we establish its Lipschitz continuity. Proposition 5.1 . Assume that A1 – A3 , A6 and C1 – C3 hold. Let \lambda_{0}^{1},\lambda_{0}^{2}\in\mathcal{U}_{R} and let (p_{1},q_{1}) and (p_{2},q_{2}) be the corresponding solutions to the adjoint problem ( 4.36 )–( 4.39 ). Then, there exists a constant K>0 , depending only on R and the parameters of the system, such that \lVert p_{1}-p_{2}\rVert^{2}_{H^{1}(0,T;H)\cap L^{\infty}(0,T;W)\cap L^{2}(0,T;H^{4}(\Omega))}+\lVert q_{1}-q_{2}\rVert^{2}_{L^{2}(0,T;W)}\leq K\lVert\lambda_{0}^{1}-\lambda_{0}^{2}\rVert^{2}_{L^{2}(\Omega\setminus D)}. (5.1) Proof. We set p:=p_{1}-p_{2},\hskip 20.00003ptq:=q_{1}-q_{2}, and we define the extensions \lambda_{1} and \lambda_{2} of \lambda_{0}^{1} and \lambda_{0}^{2} (see ( 4.5 )). Then, it is straightforward to check that these new variables formally satisfy the following problem: \displaystyle-\partial_{t}p-\Delta q+\overline{\lambda}_{1}p+F^{\prime\prime}(\overline{\varphi}_{1})q \displaystyle\hskip 10.00002pt=\alpha_{1}\chi_{\Omega\setminus D}(\overline{\varphi}_{1}-\overline{\varphi}_{2})-(\lambda_{1}-\lambda_{2})p_{2}-(F^{\prime\prime}(\overline{\varphi}_{1})-F^{\prime\prime}(\overline{\varphi}_{2}))q_{2}\hskip 10.00002pt in Q_{T} , (5.2) \displaystyle q=-\Delta p\hskip 10.00002pt in Q_{T} , (5.3) \displaystyle\partial_{\mathbf{n}}p=\partial_{\mathbf{n}}{q}=0\hskip 10.00002pt on \Sigma_{T} , (5.4) \displaystyle p(T)=0\hskip 10.00002pt in \Omega . (5.5) Observe that this problem has the same formal structure as the general adjoint problem ( 4.50 )–( 4.53 ) introduced in Remark 4.7 , provided we set g_{3}=\alpha_{1}\chi_{\Omega\setminus D}(\overline{\varphi}_{1}-\overline{\varphi}_{2})-(\lambda_{1}-\lambda_{2})p_{2}-(F^{\prime\prime}(\overline{\varphi}_{1})-F^{\prime\prime}(\overline{\varphi}_{2}))q_{2}\hskip 10.00002pt\text{and}\hskip 10.00002ptg_{4}=0. Hence, if g_{3}\in L^{2}(0,T;H) , then, by Remark 4.7 , estimate ( 4.55 ) holds, namely \lVert p\rVert^{2}_{H^{1}(0,T;H)\cap L^{\infty}(0,T;W)\cap L^{2}(0,T;H^{4}(\Omega))}+\lVert q\rVert^{2}_{L^{2}(0,T;W)}\leq C\lVert g_{3}\rVert^{2}_{L^{2}(0,T;H)}. Consequently, if we prove that \lVert g_{3}\rVert^{2}_{L^{2}(0,T;H)}\leq C\lVert\lambda_{1}-\lambda_{2}\rVert^{2}_{H}, (5.6) then ( 5.1 ) immediately follows. Indeed, we have that \displaystyle\lVert g_{3}\rVert^{2}_{L^{2}(0,T;H)} \displaystyle=\int_{0}^{T}\lVert g_{3}\rVert^{2}_{H}\,\mathrm{d}t \displaystyle\leq C\int_{0}^{T}\lVert\alpha_{1}\chi_{\Omega\setminus D}(\overline{\varphi}_{1}-\overline{\varphi}_{2})\rVert^{2}_{H}\,\mathrm{d}t+C\int_{0}^{T}\lVert(\lambda_{1}-\lambda_{2})p_{2}\rVert^{2}_{H}\,\mathrm{d}t \displaystyle\hskip 10.00002pt+C\int_{0}^{T}\lVert(F^{\prime\prime}(\overline{\varphi}_{1})-F^{\prime\prime}(\overline{\varphi}_{2}))q_{2}\rVert^{2}_{H}\,\mathrm{d}t \displaystyle\leq C\int_{0}^{T}\lVert\overline{\varphi}_{1}-\overline{\varphi}_{2}\rVert^{2}_{H}\,\mathrm{d}t+C\int_{0}^{T}\lVert p_{2}\rVert^{2}_{L^{\infty}(\Omega)}\lVert\lambda_{1}-\lambda_{2}\rVert^{2}_{H}\,\mathrm{d}t \displaystyle\hskip 10.00002pt+C\int_{0}^{T}\lVert\overline{\varphi}_{1}-\overline{\varphi}_{2}\rVert^{2}_{L^{4}(\Omega)}\lVert q_{2}\rVert^{2}_{L^{4}(\Omega)}\,\mathrm{d}t \displaystyle\leq C\int_{0}^{T}\lVert\overline{\varphi}_{1}-\overline{\varphi}_{2}\rVert^{2}_{H}\,\mathrm{d}t+CT\lVert p_{2}\rVert^{2}_{L^{\infty}(0,T;W)}\lVert\lambda_{1}-\lambda_{2}\rVert^{2}_{H} \displaystyle\hskip 10.00002pt+C\lVert\overline{\varphi}_{1}-\overline{\varphi}_{2}\rVert^{2}_{L^{\infty}(0,T;V)}\int_{0}^{T}\lVert q_{2}\rVert^{2}_{V}\,\mathrm{d}t \displaystyle\leq C\lVert\lambda_{1}-\lambda_{2}\rVert^{2}_{H}, where we used Hölder’s inequality, the Sobolev embeddings V\hookrightarrow L^{4}(\Omega) and W\hookrightarrow L^{\infty}(\Omega) , Remark 2.5 , the uniform bounds for p_{2}\in L^{\infty}(0,T;W) and q_{2}\in L^{2}(0,T;V) given by Proposition 4.6 , and estimate ( 2.9 ). This concludes the proof. ∎ Next, we want to show that \mathcal{T} is also continuously Fréchet differentiable. As an ansatz for the Fréchet derivative of the control-to-costate operator, we introduce a linearised version of the adjoint problem corresponding to our original control problem. Indeed, we fix an adjoint state (\overline{p},\overline{q}) corresponding to \overline{\lambda}_{0}\in\mathcal{U}_{\text{ad}} , and (\overline{\varphi},\overline{\mu})=\mathcal{S}(\overline{\lambda}_{0}) , and we linearise near \overline{\lambda}_{0} : p=\overline{p}+P,\hskip 10.00002ptq=\overline{q}+Q,\hskip 10.00002pt\varphi=\overline{\varphi}+\xi,\hskip 10.00002pt\lambda_{0}=\overline{\lambda}_{0}+h_{0}, with h_{0}\in L^{\infty}(\Omega\setminus D) such that \lVert h_{0}\rVert_{L^{\infty}(\Omega\setminus D)}<\lambda_{\text{min}} . Then, by approximating the non-linear terms at the first order using their Taylor expansions, we see that (P,Q) formally satisfies the problem \displaystyle-\partial_{t}P-\Delta Q+\overline{\lambda}P+F^{\prime\prime}(\overline{\varphi})Q=\alpha_{1}\chi_{\Omega\setminus D}\xi-h\overline{p}-F^{\prime\prime\prime}(\overline{\varphi})\xi\,\overline{q}\hskip 10.00002pt in Q_{T} , (5.7) \displaystyle Q=-\Delta P\hskip 10.00002pt in Q_{T} , (5.8) \displaystyle\partial_{\mathbf{n}}P=\partial_{\mathbf{n}}Q=0\hskip 10.00002pt on \Sigma_{T} , (5.9) \displaystyle P(T)=0\hskip 10.00002pt in \Omega , (5.10) where \xi is the solution to the linearised problem ( 4.1 )–( 4.4 ) and we define the extensions \overline{\lambda} and h of \overline{\lambda}_{0} and h_{0} , respectively, as in ( 4.5 ). We now prove the well-posedness of the backward linear problem ( 5.7 )–( 5.10 ) in the more general case in which h\in L^{2}(\Omega) is a given function. Proposition 5.2 . Let A1 – A3 , A6 and C1 – C3 hold. Consider the strong solution (\overline{p},\overline{q})\in\mathbb{Y} to the adjoint problem ( 4.36 )–( 4.39 ) that corresponds to \overline{\lambda}_{0}\in\mathcal{U}_{\text{ad}} and (\overline{\varphi},\overline{\mu})=\mathcal{S}(\overline{\lambda}_{0})\in\mathbb{X} . Moreover, given h\in L^{2}(\Omega) , consider the strong solution (\xi,\eta)\in\mathbb{Y} to the linearised problem ( 4.1 )–( 4.4 ) corresponding to \overline{\lambda}_{0} and (\overline{\varphi},\overline{\mu}) . Then, for any h\in L^{2}(\Omega) , problem ( 5.7 )–( 5.10 ) admits a unique strong solution such that \displaystyle P\in H^{1}(0,T;H)\cap L^{\infty}(0,T;W)\cap L^{2}(0,T;H^{4}(\Omega)), \displaystyle Q\in L^{2}(0,T;W), and the following estimate holds: \lVert P\rVert^{2}_{H^{1}(0,T;H)\cap L^{\infty}(0,T;W)\cap L^{2}(0,T;H^{4}(\Omega))}+\lVert Q\rVert^{2}_{L^{2}(0,T;W)}\leq C\lVert h\rVert^{2}_{H}. (5.11) Proof. We observe that, if we set g_{3}=\alpha_{1}\chi_{\Omega\setminus D}\xi-h\overline{p}-F^{\prime\prime}(\overline{\varphi})\xi\,\overline{q}\hskip 10.00002pt\text{and}\hskip 10.00002ptg_{4}=0, then problem ( 5.7 )–( 5.10 ) has the same formal structure as the general adjoint problem ( 4.50 )–( 4.53 ) introduced in Remark 4.7 . Hence, if g_{3}\in L^{2}(0,T;H) , by Remark 4.7 , estimate ( 4.55 ) holds, namely, \lVert P\rVert^{2}_{H^{1}(0,T;H)\cap L^{\infty}(0,T;W)\cap L^{2}(0,T;H^{4}(\Omega))}+\lVert Q\rVert^{2}_{L^{2}(0,T;W)}\leq C\lVert g_{3}\rVert^{2}_{L^{2}(0,T;H)}. Consequently, we just have to prove that \lVert g_{3}\rVert^{2}_{L^{2}(0,T;H)}\leq C\lVert h\rVert^{2}_{H} to readily deduce the wanted estimate ( 5.11 ). Indeed, we have that \displaystyle\lVert g_{3}\rVert^{2}_{L^{2}(0,T;H)} \displaystyle=\int_{0}^{T}\lVert g_{3}\rVert^{2}_{H}\,\mathrm{d}t \displaystyle\leq C\int_{0}^{T}\lVert\alpha_{1}\chi_{\Omega\setminus D}\xi\rVert^{2}_{H}\,\mathrm{d}t+C\int_{0}^{T}\lVert h\overline{p}\rVert^{2}_{H}\,\mathrm{d}t+C\int_{0}^{T}\lVert F^{\prime\prime\prime}(\overline{\varphi})\xi\,\overline{q}\rVert^{2}_{H}\,\mathrm{d}t \displaystyle\leq C\int_{0}^{T}\lVert\xi\rVert^{2}_{H}\,\mathrm{d}t+C\int_{0}^{T}\lVert\overline{p}\rVert^{2}_{L^{\infty}(\Omega)}\lVert h\rVert^{2}_{H}\,\mathrm{d}t \displaystyle\hskip 10.00002pt+C\int_{0}^{T}\lVert F^{\prime\prime\prime}(\overline{\varphi})\rVert^{2}_{L^{\infty}(\Omega)}\lVert\xi\rVert^{2}_{L^{4}(\Omega)}\lVert\overline{q}\rVert^{2}_{L^{4}(\Omega)}\,\mathrm{d}t \displaystyle\leq C\int_{0}^{T}\lVert\xi\rVert^{2}_{H}\,\mathrm{d}t+CT\lVert\overline{p}\rVert^{2}_{L^{\infty}(0,T;W)}\lVert h\rVert^{2}_{H}+C\lVert\xi\rVert^{2}_{L^{\infty}(0,T;V)}\int_{0}^{T}\lVert\overline{q}\rVert^{2}_{V}\,\mathrm{d}t \displaystyle\leq C\lVert h\rVert^{2}_{H}. Here, we used Hölder’s inequality, the Sobolev embeddings V\hookrightarrow L^{4}(\Omega) and W\hookrightarrow L^{\infty}(\Omega) , Remark 2.5 , the uniform bounds \overline{p}\in L^{\infty}(0,T;W) and \overline{q}\in L^{2}(0,T;V) given by Proposition 4.6 , and estimate ( 4.6 ). This ends the proof. ∎ We are now ready to show that the control-to-costate operator \mathcal{T} is continuously Fréchet differentiable. Theorem 5.3 . Let A1 – A3 , A6 and C1 – C3 hold. Then, \mathcal{T}:\mathcal{U}_{R}\to\mathbb{Y} is Fréchet differentiable, namely, for any \overline{\lambda}_{0}\in\mathcal{U}_{R} , there exists a unique Fréchet derivative \mathrm{D}\mathcal{T}(\overline{\lambda}_{0})\in\mathcal{L}(L^{\infty}(\Omega\setminus D),\mathbb{Y}) such that \frac{\lVert\mathcal{T}(\overline{\lambda}_{0}+h_{0})-\mathcal{T}(\overline{\lambda}_{0})-\mathrm{D}\mathcal{T}(\overline{\lambda}_{0})[h_{0}]\rVert_{\mathbb{Y}}}{\lVert h_{0}\rVert_{L^{2}(\Omega\setminus D)}}\to 0\hskip 10.00002pt\text{as }\lVert h_{0}\rVert_{L^{2}(\Omega\setminus D)}\to 0. In particular, for any h_{0}\in L^{\infty}(\Omega\setminus D) , the Fréchet derivative of \mathcal{T} , denoted by \mathrm{D}\mathcal{T}(\overline{u})[h_{0}] , is defined as the solution (P,Q) to the problem ( 5.7 )–( 5.10 ) corresponding to (\overline{p},\overline{q})=\mathcal{T}(\overline{\lambda}_{0}) , (\overline{\varphi},\overline{\mu})=\mathcal{S}(\overline{\lambda}_{0}) , (\xi,\eta)=\mathrm{D}\mathcal{S}(\overline{\lambda}_{0})[h_{0}] and h_{0} . Moreover, \mathrm{D}\mathcal{T} is Lipschitz continuous as a function from \mathcal{U}_{R} to the space \mathcal{L}(L^{\infty}(\Omega\setminus D),\mathbb{Y}) . More precisely, for any \overline{\lambda}_{0}^{1},\overline{\lambda}_{0}^{2}\in\mathcal{U}_{R} , the following estimate holds: \lVert\mathrm{D}\mathcal{T}(\overline{\lambda}_{0}^{1})-\mathrm{D}\mathcal{T}(\overline{\lambda}_{0}^{2})\rVert_{\mathcal{L}(L^{\infty}(\Omega\setminus D),\mathbb{Y})}\leq K\lVert\overline{\lambda}_{0}^{1}-\overline{\lambda}_{0}^{2}\rVert_{L^{2}(\Omega\setminus D)}, (5.12) for some constant K>0 depending only on the parameters of the system and on R . Remark 5.4 . Note that, as before, the definition of \mathrm{D}\mathcal{T}(\overline{\lambda}_{0})[h_{0}] as the corresponding solution to problem ( 5.7 )–( 5.10 ) makes sense for any h_{0}\in L^{2}(\Omega\setminus D) , and thus for any h_{0}\in L^{\infty}(\Omega\setminus D) , due to Proposition 5.2 . Then, \mathrm{D}\mathcal{T}(\overline{\lambda}_{0}) is well defined as a bounded linear operator, that is, it belongs to \mathcal{L}(L^{\infty}(\Omega\setminus D),\mathbb{Y}) . Moreover, \mathrm{D}\mathcal{T}(\overline{\lambda}_{0}) can also be extended in order to belong to \mathcal{L}(L^{2}(\Omega\setminus D),\mathbb{W}) . Proof. We follow the general strategy already used in the proof of Theorem 4.3 . Indeed, to prove the Fréchet differentiability we consider only small perturbations h_{0} such that \lVert h_{0}\rVert_{L^{2}(\Omega\setminus D)}\leq\gamma, for some \gamma>0 . Next, we fix \overline{\lambda}_{0}\in\mathcal{U}_{R} and h_{0} as above, set (p^{h},q^{h}):=\mathcal{T}(\overline{\lambda}_{0}+h_{0}),\hskip 10.00002pt(\overline{p},\overline{q}):=\mathcal{T}(\overline{\lambda}_{0}), and indicate by (P,Q) the solution to ( 5.7 )–( 5.10 ) with respect to h_{0} and \overline{\lambda}_{0} . Then, we need to show that there exists a constant C>0 and an exponent s>2 such that \lVert(p^{h},q^{h})-(\overline{p},\overline{q})-(P,Q)\rVert^{2}_{\mathbb{Y}}\leq C\lVert h_{0}\rVert^{s}_{L^{2}(\Omega\setminus D)}. If we introduce the additional variables (see Propositions 4.6 and 5.2 ) \displaystyle\pi:=p^{h}-\overline{p}-P\in H^{1}(0,T;H)\cap L^{\infty}(0,T;W)\cap L^{2}(0,T;H^{4}(\Omega)), \displaystyle\upsilon:=q^{h}-\overline{q}-Q\in L^{2}(0,T;W), then showing the above inequality is equivalent to show that \lVert(\pi,\upsilon)\rVert^{2}_{\mathbb{Y}}\leq C\lVert h_{0}\rVert^{s}_{L^{2}(\Omega\setminus D)}. (5.13) To such end, we observe that, (\pi,\upsilon) satisfies the following problem: \displaystyle-\partial_{t}\pi-\Delta\upsilon+\overline{\lambda}\pi+F^{\prime\prime}(\overline{\varphi})\upsilon=\alpha_{1}\chi_{\Omega\setminus D}\psi-h(p^{h}-\overline{p})-F^{h}\hskip 10.00002pt in Q_{T} , (5.14) \displaystyle\upsilon=-\Delta\pi\hskip 10.00002pt in Q_{T} , (5.15) \displaystyle\partial_{\mathbf{n}}\pi=\partial_{\mathbf{n}}\upsilon=0\hskip 10.00002pt on \Sigma_{T} , (5.16) \displaystyle\pi(T)=0\hskip 10.00002pt in \Omega , (5.17) where the extensions \overline{\lambda} and h are defined, as usual, like in ( 4.5 ), (\varphi^{h},\mu^{h})=\mathcal{S}(\overline{\lambda}_{0}+h_{0}) , (\overline{\varphi},\overline{\mu})=\mathcal{S}(\overline{\lambda}_{0}) , (\xi,\eta)=\mathrm{D}\mathcal{S}(\overline{\lambda}_{0})[h_{0}] , \psi=\varphi^{h}-\overline{\varphi}-\xi is the same variable appearing in ( 4.23 )–( 4.26 ) (see the proof of Theorem 4.3 ), and F^{h}:=(F^{\prime\prime}(\varphi^{h})-F^{\prime\prime}(\overline{\varphi}))q^{h}-F^{\prime\prime\prime}(\overline{\varphi})\xi\overline{q}. Using now Taylor’s expansion with integral remainder, we can rewrite F^{h} as follows F^{h}=F^{\prime\prime\prime}(\overline{\varphi})\psi+(F^{\prime\prime}(\varphi^{h})-F^{\prime\prime}(\overline{\varphi}))(q^{h}-\overline{q})+R^{h}(\varphi^{h}-\overline{\varphi})^{2}\overline{q}, where R^{h}:=\int_{0}^{1}(1-z)F^{(4)}(\overline{\varphi}+z(\varphi^{h}-\overline{\varphi}))\,\mathrm{d}z. In particular, arguing as in Theorem 4.3 , we find the bound \lVert R^{h}\rVert_{L^{\infty}(Q_{T})}\leq C_{\gamma}. Moreover, we recall that throughout the proof of Theorem 4.3 , using ( 4.29 ) and subsequent estimates, we showed that \lVert\psi\rVert^{2}_{H^{1}(0,T;V^{*})\cap L^{\infty}(0,T;V)\cap L^{2}(0,T;W)}\leq C\lVert h\rVert^{4}_{H}. (5.18) We are now ready to perform some estimates on the solution to problem ( 5.14 )–( 5.17 ). Observe that this problem has the same formal structure as the general adjoint problem ( 4.50 )–( 4.53 ), provided we set \displaystyle g_{3} \displaystyle:=\alpha_{1}\chi_{\Omega\setminus D}\psi-h(p^{h}-\overline{p})-F^{h} \displaystyle=\alpha_{1}\chi_{\Omega\setminus D}\psi-h(p^{h}-\overline{p})-F^{\prime\prime\prime}(\overline{\varphi})\psi-(F^{\prime\prime}(\varphi^{h})-F^{\prime\prime}(\overline{\varphi}))(q^{h}-\overline{q})-R^{h}(\varphi^{h}-\overline{\varphi})^{2}\overline{q}. Thus, by Remark 4.7 , we immediately deduce that \lVert(\pi,\upsilon)\rVert^{2}_{\mathbb{Y}}\leq C\lVert g_{3}\rVert^{2}_{L^{2}(0,T;H)}. On the other hand, using Hölder’s inequality, ( 5.18 ), the continuous dependence results obtained in Theorem 2.6 and Proposition 5.1 , Remark 2.5 , the Sobolev embeddings V\hookrightarrow L^{4}(\Omega) and W\hookrightarrow L^{\infty}(\Omega) , and the regularity of \overline{q} given by Proposition 4.6 , we can deduce the following estimate: \displaystyle\lVert g_{3}\rVert^{2}_{L^{2}(0,T;H)} \displaystyle\leq C\int_{0}^{T}\alpha_{1}\lVert\chi_{\Omega\setminus D}\rVert_{L^{\infty}(\Omega)}\lVert\psi\rVert^{2}_{H}\,\mathrm{d}t+C\int_{0}^{T}\lVert p^{h}-\overline{p}\rVert^{2}_{L^{\infty}(\Omega)}\lVert h\rVert^{2}_{H}\,\mathrm{d}t \displaystyle\hskip 10.00002pt+C\int_{0}^{T}\lVert F^{\prime\prime\prime}(\overline{\varphi})\rVert^{2}_{L^{\infty}(\Omega)}\lVert\psi\rVert^{2}_{H}\,\mathrm{d}t+C\int_{0}^{T}\lVert F^{\prime\prime}(\varphi^{h})-F^{\prime\prime}(\overline{\varphi})\rVert^{2}_{L^{4}(\Omega)}\lVert q^{h}-\overline{q}\rVert^{2}_{L^{4}(\Omega)}\,\mathrm{d}t \displaystyle\hskip 10.00002pt+C\int_{0}^{T}\lVert R^{h}\rVert^{2}_{L^{\infty}(\Omega)}\lVert\varphi^{h}-\overline{\varphi}\rVert^{4}_{L^{4}(\Omega)}\lVert\overline{q}\rVert^{2}_{L^{\infty}(\Omega)}\,\mathrm{d}t \displaystyle\leq C\lVert\psi\rVert^{2}_{L^{2}(0,T;H)}+C\lVert h\rVert^{2}_{H}\int_{0}^{T}\lVert p^{h}-\overline{p}\rVert^{2}_{W}\,\mathrm{d}t \displaystyle\hskip 10.00002pt+C\lVert\varphi^{h}-\overline{\varphi}\rVert^{2}_{L^{\infty}(0,T;V)}\int_{0}^{T}\lVert q^{h}-\overline{q}\rVert^{2}_{V}\,\mathrm{d}t+C\lVert\varphi^{h}-\overline{\varphi}\rVert^{4}_{L^{\infty}(0,T;V)}\int_{0}^{T}\lVert\overline{q}\rVert^{2}_{W}\,\mathrm{d}t \displaystyle\leq C_{\gamma}\lVert h\rVert^{4}_{H}, which gives \lVert(\pi,\upsilon)\rVert^{2}_{\mathbb{Y}}\leq C\lVert h\rVert^{4}_{H}, so that ( 5.13 ) holds, i.e., the Fréchet differentiability of \mathcal{T} . We now want to prove that \mathrm{D}\mathcal{T} is Lipschitz continuous. To do this, we have to show that, given \overline{\lambda}_{0}^{i}\in\mathcal{U}_{R} , with corresponding solutions (\overline{\varphi}^{i},\overline{\mu}^{i}) and (\overline{p}^{i},\overline{q}^{i}) , i=1,2 , then for any h_{0}\in L^{\infty}(\Omega\setminus D) with \lVert h_{0}\rVert_{L^{\infty}(\Omega\setminus D)}=1 it holds that \lVert\mathrm{D}\mathcal{T}(\overline{\lambda}_{0}^{1})[h_{0}]-\mathrm{D}\mathcal{T}(\overline{\lambda}_{0}^{2})[h_{0}]\rVert^{2}_{\mathbb{Y}}=\lVert(P_{1},Q_{1})-(P_{2},Q_{2})\rVert^{2}_{\mathbb{Y}}\leq C\lVert\overline{\lambda}_{0}^{1}-\overline{\lambda}_{0}^{2}\rVert^{2}_{L^{2}(\Omega\setminus D)}, (5.19) which implies ( 5.12 ). Here, we called (P_{i},Q_{i}) , i=1,2 , the corresponding solutions to ( 5.7 )–( 5.10 ) with (\overline{p}_{i},\overline{q}_{i}) and (\overline{\varphi}_{i},\overline{\mu}_{i}) , i=1,2 , respectively and the same h_{0} . We now consider the problem formulated for P:=P_{1}-P_{2} and Q:=Q_{1}-Q_{2} , which takes the following form (see also ( 4.5 )) \displaystyle-\partial_{t}P-\Delta Q+\overline{\lambda}_{1}P+F^{\prime\prime}(\overline{\varphi}_{1})Q \displaystyle\hskip 10.00002pt=\alpha_{1}\chi_{\Omega\setminus D}(\xi_{1}-\xi_{2})-h(\overline{p}_{1}-\overline{p}_{2})-(\overline{\lambda}_{1}-\overline{\lambda}_{2})P_{2}-(F^{\prime\prime}(\overline{\varphi}_{1})-F^{\prime\prime}(\overline{\varphi}_{2}))Q_{2} \displaystyle\hskip 10.00002pt-F^{\prime\prime\prime}(\overline{\varphi}_{1})\xi_{1}(\overline{q}_{1}-\overline{q}_{2})-F^{\prime\prime\prime}(\overline{\varphi}_{1})(\xi_{1}-\xi_{2})\overline{q}_{2}-(F^{\prime\prime\prime}(\overline{\varphi}_{1})-F^{\prime\prime\prime}(\overline{\varphi}_{2}))\xi_{2}\overline{q}_{2}\hskip 10.00002pt in Q_{T} , (5.20) \displaystyle Q=-\Delta P\hskip 10.00002pt in Q_{T} , (5.21) \displaystyle\partial_{\mathbf{n}}P=\partial_{\mathbf{n}}Q=0\hskip 10.00002pt on \Sigma_{T} , (5.22) \displaystyle P(T)=0\hskip 10.00002pt in \Omega , (5.23) Observe that, also in this case, problem ( 5.20 )–( 5.23 ) has the same formal structure as the general adjoint problem ( 4.50 )–( 4.53 ), if we set \displaystyle g_{3} \displaystyle:=\alpha_{1}\chi_{\Omega\setminus D}(\xi_{1}-\xi_{2})-h(\overline{p}_{1}-\overline{p}_{2})-(\overline{\lambda}_{1}-\overline{\lambda}_{2})P_{2}-(F^{\prime\prime}(\overline{\varphi}_{1})-F^{\prime\prime}(\overline{\varphi}_{2}))Q_{2} \displaystyle\hskip 10.00002pt-F^{\prime\prime\prime}(\overline{\varphi}_{1})\xi_{1}(\overline{q}_{1}-\overline{q}_{2})-F^{\prime\prime\prime}(\overline{\varphi}_{1})(\xi_{1}-\xi_{2})\overline{q}_{2}-(F^{\prime\prime\prime}(\overline{\varphi}_{1})-F^{\prime\prime\prime}(\overline{\varphi}_{2}))\xi_{2}\overline{q}_{2}. Hence, taking Remark 4.7 into account, we immediately deduce that \lVert(P,Q)\rVert^{2}_{\mathbb{Y}}\leq C\lVert g_{3}\rVert^{2}_{L^{2}(0,T;H)}. Then, employing Hölder’s inequality, the Sobolev embeddings V\hookrightarrow L^{4}(\Omega) and W\hookrightarrow L^{\infty}(\Omega) , Remark 2.5 , the uniform bounds for (\overline{p}_{i},\overline{q}_{i}) and (P_{i},Q_{i}) given by Propositions 4.6 and 5.2 , the continuous dependence estimates given by Theorem 2.6 and Proposition 5.1 and the Lipschitz continuity of \mathrm{D}\mathcal{S} by Theorem 4.3 , we find \displaystyle\lVert g_{3}\rVert^{2}_{L^{2}(0,T;H)} \displaystyle\leq C\int_{0}^{T}\alpha_{1}\lVert\chi_{\Omega\setminus D}\rVert_{L^{\infty}(\Omega)}\lVert\xi_{1}-\xi_{2}\rVert^{2}_{H}\,\mathrm{d}t+C\int_{0}^{T}\lVert\overline{p}_{1}-\overline{p}_{2}\rVert^{2}_{L^{\infty}(\Omega)}\lVert h\rVert^{2}_{H}\,\mathrm{d}t \displaystyle\hskip 10.00002pt+C\int_{0}^{T}\lVert\overline{\lambda}_{1}-\overline{\lambda}_{2}\rVert^{2}_{H}\lVert P_{2}\rVert^{2}_{L^{\infty}(\Omega)}\,\mathrm{d}t+C\int_{0}^{T}\lVert F^{\prime\prime}(\overline{\varphi}_{1})-F^{\prime\prime}(\overline{\varphi}_{2})\rVert^{2}_{L^{4}(\Omega)}\lVert Q_{2}\rVert^{2}_{L^{4}(\Omega)}\,\mathrm{d}t \displaystyle\hskip 10.00002pt+C\int_{0}^{T}\lVert F^{\prime\prime\prime}(\varphi_{1})\rVert^{2}_{L^{\infty}(\Omega)}\lVert\xi_{1}\rVert^{2}_{L^{4}(\Omega)}\lVert\overline{q}_{1}-\overline{q}_{2}\rVert^{2}_{L^{4}(\Omega)}\,\mathrm{d}t \displaystyle\hskip 10.00002pt+C\int_{0}^{T}\lVert F^{\prime\prime\prime}(\overline{\varphi}_{1})\rVert^{2}_{L^{\infty}(\Omega)}\lVert\xi_{1}-\xi_{2}\rVert^{2}_{L^{4}(\Omega)}\lVert\overline{q}_{2}\rVert^{2}_{L^{4}(\Omega)} \displaystyle\hskip 10.00002pt+C\int_{0}^{T}\lVert F^{\prime\prime\prime}(\overline{\varphi}_{1})-F^{\prime\prime\prime}(\overline{\varphi}_{2})\rVert^{2}_{L^{4}(\Omega)}\lVert\xi_{2}\rVert^{2}_{L^{\infty}(\Omega)}\lVert\overline{q}_{2}\rVert^{2}_{L^{4}(\Omega)} \displaystyle\leq C\lVert\xi_{1}-\xi_{2}\rVert^{2}_{L^{2}(0,T;H)}+C\int_{0}^{T}\lVert\overline{p}_{1}-\overline{p}_{2}\rVert^{2}_{W}\,\mathrm{d}t+C\lVert\overline{\lambda}_{1}-\overline{\lambda}_{2}\rVert^{2}_{H}\int_{0}^{T}\lVert P_{2}\rVert^{2}_{W}\,\mathrm{d}t \displaystyle\hskip 10.00002pt+C\lVert\overline{\varphi}_{1}-\overline{\varphi}_{2}\rVert^{2}_{L^{\infty}(0,T;V)}\int_{0}^{T}\lVert Q_{2}\rVert^{2}_{V}\,\mathrm{d}t+C\lVert\xi_{1}\rVert^{2}_{L^{\infty}(0,T;V)}\int_{0}^{T}\lVert\overline{q}_{1}-\overline{q}_{2}\rVert^{2}_{V}\,\mathrm{d}t \displaystyle\hskip 10.00002pt+C\lVert\xi_{1}-\xi_{2}\rVert^{2}_{L^{\infty}(0,T;V)}\int_{0}^{T}\lVert\overline{q}_{2}\rVert^{2}_{V}\,\mathrm{d}t \displaystyle\hskip 10.00002pt+C\lVert\xi_{2}\rVert^{2}_{L^{\infty}(0,T;W)}\lVert\overline{\varphi}_{1}-\overline{\varphi}_{2}\rVert^{2}_{L^{\infty}(0,T;V)}\int_{0}^{T}\lVert\overline{q}_{2}\rVert^{2}_{V}\,\mathrm{d}t \displaystyle\leq C\lVert\overline{\lambda}_{1}-\overline{\lambda}_{2}\rVert^{2}_{H}, so that ( 5.19 ) holds and the proof is complete. ∎ 5.2 Second-order optimality conditions By Theorems 4.3 and 5.3 , the control-to-state operator \mathcal{S} and the control-to-costate operator \mathcal{T} are now both continuously Fréchet differentiable in the respective spaces. Then, the reduced cost functional \mathcal{J}_{\text{red}}:\mathcal{U}_{R}\to\mathbb{R} , defined as \mathcal{J}_{\text{red}}(\lambda_{0})=\mathcal{J}(\mathcal{S}_{1}(\lambda_{0}),\lambda_{0}) , where \mathcal{S}_{1} selects the first component of \mathcal{S} , is twice continuously Fréchet differentiable by the chain rule. In particular, we can explicitly compute the second order derivatives of the \mathcal{C}^{2} functional \mathcal{J}_{\text{red}} in terms of the systems introduced above. Indeed, on account of C3 , we have \mathcal{J}_{\text{red}}(\lambda_{0})=\frac{\alpha_{1}}{2}\int_{0}^{T}\int_{\Omega\setminus D}\lvert\varphi-f\rvert^{2}\,\mathrm{d}x\,\mathrm{d}t+\frac{\beta}{2}\int_{\Omega\setminus D}\frac{1}{\lambda_{0}^{2}}\,\mathrm{d}x, where \varphi=\mathcal{S}_{1}(\lambda_{0}) . For a fixed \overline{\lambda}_{0}\in\mathcal{U}_{\text{ad}} , Theorem 4.8 shows that \mathrm{D}\mathcal{J}_{\text{red}}(\overline{\lambda}_{0})[h_{0}]=\int_{0}^{T}\int_{\Omega\setminus D}\alpha_{1}(\overline{\varphi}-f)\xi\,\mathrm{d}x\,\mathrm{d}t-\int_{\Omega\setminus D}\frac{\beta}{\overline{\lambda}_{0}^{3}}h_{0}\,\mathrm{d}x, where \overline{\varphi}=\mathcal{S}_{1}(\overline{\lambda}_{0}) and \xi=\mathrm{D}\mathcal{S}_{1}(\overline{\lambda}_{0})[h_{0}] . By exploiting the adjoint problem ( 4.36 )–( 4.39 ), we also know that we can rewrite the above derivative in the form (see Theorem 4.8 ) \mathrm{D}\mathcal{J}_{\text{red}}(\overline{\lambda}_{0})[h_{0}]=\int_{0}^{T}\int_{\Omega\setminus D}\overline{p}(f-\overline{\varphi})h_{0}\,\mathrm{d}x\,\mathrm{d}t-\int_{\Omega\setminus D}\frac{\beta}{\overline{\lambda}_{0}^{3}}h_{0}\,\mathrm{d}x, (5.24) where \overline{p}=\mathcal{T}_{1}(\overline{\lambda}_{0}) , \overline{\varphi}=\mathcal{S}_{1}(\overline{\lambda}_{0}) . Then, thanks to the chain rule, we can compute the second derivative of \mathcal{J}_{\text{red}} at \overline{\lambda}_{0} in the directions h_{0},k_{0}\in L^{\infty}(\Omega\setminus D) as follows: \displaystyle\mathrm{D}^{2}\mathcal{J}_{\text{red}}(\overline{\lambda}_{0})[h_{0},k_{0}] \displaystyle=\int_{0}^{T}\int_{\Omega\setminus D}\mathrm{D}T_{1}(\overline{\lambda}_{0})[k_{0}](f-\overline{\varphi})h_{0}\,\mathrm{d}x\,\mathrm{d}t \displaystyle\hskip 10.00002pt+\int_{0}^{T}\int_{\Omega\setminus D}\overline{p}\,\mathrm{D}\mathcal{S}_{1}(\overline{\lambda}_{0})[k_{0}]h_{0}\,\mathrm{d}x\,\mathrm{d}t+\int_{\Omega\setminus D}\frac{3\beta}{\overline{\lambda}_{0}^{4}}h_{0}k_{0}\,\mathrm{d}x, namely, \mathrm{D}^{2}\mathcal{J}_{\text{red}}(\overline{\lambda}_{0})[h_{0},k_{0}]=\int_{0}^{T}\int_{\Omega\setminus D}P\,(f-\overline{\varphi})h_{0}\,\mathrm{d}x\,\mathrm{d}t+\int_{0}^{T}\int_{\Omega\setminus D}\overline{p}\,\xi h_{0}\,\mathrm{d}x\,\mathrm{d}t+\int_{\Omega\setminus D}\frac{3\beta}{\overline{\lambda}_{0}^{4}}h_{0}k_{0}\,\mathrm{d}x, (5.25) where P:=\mathrm{D}\mathcal{T}_{1}(\overline{\lambda}_{0})[k_{0}] is the solution to the linearised adjoint problem ( 5.7 )–( 5.10 ) with k_{0} , \overline{\varphi}:=\mathcal{S}_{1}(\overline{\lambda}_{0}) is the solution to ( 2.5 )–( 2.8 ) with \overline{\lambda}_{0} , \overline{p}:=\mathcal{T}_{1}(\overline{\lambda}_{0}) is the solution to the adjoint problem ( 4.36 )–( 4.39 ) with \overline{\lambda}_{0} , and \xi:=\mathrm{D}\mathcal{S}_{1}(\overline{\lambda}_{0})[k_{0}] solves the linearised problem ( 4.1 )–( 4.4 ) with k_{0} . Moreover, we observe that, owing to Remarks 4.4 and 5.4 , the expressions above for the derivatives of \mathcal{J}_{\text{red}} make sense even for h_{0},k_{0}\in L^{2}(\Omega\setminus D) . Then, for any \overline{\lambda}_{0}\in\mathcal{U}_{R} , \mathrm{D}^{2}\mathcal{J}_{\text{red}}(\overline{\lambda}_{0}) can be extended to a continuous bilinear form from L^{2}(\Omega\setminus D) to \mathbb{R} . We are now ready to state and prove the second-order sufficient optimality conditions for our optimal control problem (CP). To do this, we follow the approach developed in [ 8 , 9 ] (cf. also [ 11 , 38 ] for a slightly different one). Both were later applied also to Cahn–Hilliard-type systems (see [ 1 , 21 , 18 , 36 , 16 , 19 ] ). The idea of sufficient second-order conditions is to show that if \mathrm{D}^{2}\mathcal{J}_{\text{red}}(\overline{\lambda}_{0}) is positive definite in an optimal point \overline{\lambda}_{0}\in\mathcal{U}_{\text{ad}} , namely \mathrm{D}^{2}\mathcal{J}_{\text{red}}(\overline{\lambda}_{0})[h_{0},h_{0}]>0\hskip 10.00002pt\hbox{for any $h_{0}\in L^{2}(\Omega\setminus D)\setminus\{0\}$,} then such a \overline{\lambda}_{0} is a strict local minimiser of \mathcal{J}_{\text{red}} on \mathcal{U}_{\text{ad}} . However, imposing the positive definiteness of \mathrm{D}^{2}\mathcal{J}_{\text{red}} in all directions h_{0} is generally too restrictive. Indeed, it suffices to require such a condition only in a certain class of critical directions (cf. [ 38 , Section 4.10] and [ 8 , 9 ] for more details on this topic). Essentially, due to some additional information on the structure of the optimal controls that can be extracted from the first-order optimality condition and from the fact that \mathcal{U}_{\text{ad}} has a box form (cf. [ 38 , 8 , 9 ] ), one can restrict to impose the positive definiteness only in some particular directions. Hence, we need to introduce some notions which are summarized in the following Definition 5.5 . Given \overline{\lambda}_{0}\in\mathcal{U}_{\text{ad}} , we call A_{0}(\overline{\lambda}_{0}):=\left\{x\in\Omega\setminus D:\,\left\lvert\int_{0}^{T}\overline{p}(x,t)(\overline{\varphi}(x,t)-f)\,\mathrm{d}t-\frac{\beta}{\overline{\lambda}_{0}(x)^{3}}\right\rvert>0\right\} the set of strongly active constraints , where \overline{\varphi} and \overline{p} are respectively the forward and adjoint states associated to \overline{\lambda}_{0} . Then, we define the cone of critical directions as the set \mathcal{C}_{0}(\overline{\lambda}_{0}):=\{h_{0}\in\mathcal{U}_{R}\mid\hbox{$h_{0}$ satisfies \eqref{eq:criticalcone}}\}, where ( 5.26 ) is given by h_{0}(x)\,\begin{cases}\geq 0,\quad\hbox{if $x\notin A_{0}(\overline{\lambda}_{0})$ and $\overline{\lambda}_{0}(x)=\lambda_{\text{min}}(x)$,}\\ \leq 0,\quad\hbox{if $x\notin A_{0}(\overline{\lambda}_{0})$ and $\overline{\lambda}_{0}(x)=\lambda_{\text{max}}(x)$,}\\ =0,\quad\hbox{if $x\in A_{0}(\overline{\lambda}_{0})$,}\end{cases} (5.26) for almost any x\in\Omega\setminus D . Another thing to keep in mind when dealing with the second-order sufficient conditions is the so-called two-norm discrepancy . This arises because \mathcal{J}_{\text{red}} is of class \mathcal{C}^{2} in L^{\infty}(\Omega\setminus D) , but its second derivative should be positive definite with respect to the L^{2}(\Omega\setminus D) -norm. However, if \beta>0 , this issue can be overcome and the whole analysis can be extended to L^{2}(\Omega\setminus D) . For further details on the matter, we refer the reader to [ 9 , 10 ] . Here we just state and prove the main result of this section. Theorem 5.6 . Let A1 – A3 , A6 and C1 – C3 hold and let \beta>0 . Suppose that \overline{\lambda}_{0}\in\mathcal{U}_{\text{ad}} is an optimal control satisfying ( 4.56 ), and assume that \mathrm{D}^{2}\mathcal{J}_{\text{red}}(\overline{\lambda}_{0})[h_{0},h_{0}]>0\hskip 10.00002pt\hbox{for any $h_{0}\in\mathcal{C}_{0}(\overline{\lambda}_{0})\setminus\{0\}$.} (5.27) Then, there exist constants \varepsilon,\delta>0 such that \mathcal{J}_{\text{red}}(\lambda_{0})\geq\mathcal{J}_{\text{red}}(\overline{\lambda}_{0})+\delta\lVert\lambda_{0}-\overline{\lambda}_{0}\rVert^{2}_{L^{2}(\Omega\setminus D)}\hskip 10.00002pt\hbox{$\forall\lambda_{0}\in\mathcal{U}_{\text{ad}}$ s.t. $\lVert\lambda_{0}-\overline{\lambda}_{0}\rVert_{L^{2}(\Omega\setminus D)}<\varepsilon$.} (5.28) Consequently, \overline{\lambda}_{0} is a strict local minimiser of \mathcal{J}_{\text{red}} in \mathcal{U}_{\text{ad}} . Proof. We argue by contradiction in the same spirit of [ 8 , Theorem 4.1] . Suppose that \overline{\lambda}_{0}\in\mathcal{U}_{\text{ad}} is an optimal control satisfying ( 4.56 ) and ( 5.27 ), but not ( 5.28 ). Then, there must exist a sequence of controls \{\lambda_{0}^{n}\}_{n\in\mathbb{N}}\subset\mathcal{U}_{\text{ad}} such that \lambda_{0}^{n}\neq\overline{\lambda}_{0} for any n\in\mathbb{N} , \lambda_{0}^{n}\to\overline{\lambda}_{0} strongly in L^{2}(\Omega\setminus D) and \mathcal{J}_{\text{red}}(\lambda_{0}^{n})<\mathcal{J}_{\text{red}}(\overline{\lambda}_{0})+\frac{1}{n}\lVert\lambda_{0}^{n}-\overline{\lambda}_{0}\rVert^{2}_{L^{2}(\Omega\setminus D)}\hskip 10.00002pt\hbox{for any $n\in\mathbb{N}$.} (5.29) Let us set, for any n\in\mathbb{N} , h_{0}^{n}:=\frac{\lambda_{0}^{n}-\overline{\lambda}_{0}}{\lVert\lambda_{0}^{n}-\overline{\lambda}_{0}\rVert_{L^{2}(\Omega\setminus D)}}\in L^{\infty}(\Omega\setminus D). (5.30) Since \lVert h_{0}^{n}\rVert_{L^{2}(\Omega\setminus D)}=1 for any n\in\mathbb{N} , we can extract a (not relabelled) subsequence such that h_{0}^{n}\rightharpoonup\overline{h}_{0}\hskip 10.00002pt\hbox{weakly in $L^{2}(\Omega\setminus D)$, for some $\overline{h}_{0}\in L^{2}(\Omega\setminus D)$.} Step 1. We first want to show that \mathrm{D}\mathcal{J}_{\text{red}}(\overline{\lambda}_{0})[\overline{h}_{0}]=0 . For any n\in\mathbb{N} , we call \varphi_{n}=\mathcal{S}_{1}(\lambda_{0}^{n}) and p_{n}=\mathcal{T}_{1}(\lambda_{0}^{n}) the forward and adjoint states corresponding to \lambda_{0}^{n} , and we set \overline{\varphi}:=\mathcal{S}_{1}(\overline{\lambda}_{0}) and \overline{p}:=\mathcal{T}_{1}(\overline{\lambda}_{0}) . Moreover, we observe that by Theorem 2.6 and Proposition 5.1 the operators \mathcal{S} and \mathcal{T} are both continuous from L^{2}(\Omega\setminus D) to \mathbb{Y} . Thus, if \lambda_{0}^{n}\to\overline{\lambda}_{0} strongly in L^{2}(\Omega\setminus D) , then we can immediately conclude that \varphi_{n}\to\overline{\varphi}\hskip 10.00002pt\text{and}\hskip 10.00002ptp_{n}\to\overline{p}\hskip 10.00002pt\hbox{strongly in }H^{1}(0,T;H)\cap L^{\infty}(0,T;W)\cap L^{2}(0,T;H^{4}(\Omega)). Then, by looking at ( 5.24 ), since h_{0}^{n}\rightharpoonup\overline{h}_{0} weakly in L^{2}(\Omega\setminus D) , it is a standard matter to show that \displaystyle\int_{0}^{T}\int_{\Omega\setminus D}p_{n}(f-\varphi_{n})h_{0}^{n}\,\mathrm{d}x\,\mathrm{d}t\to\int_{0}^{T}\int_{\Omega\setminus D}\overline{p}(f-\overline{\varphi})\overline{h}_{0}\,\mathrm{d}x\,\mathrm{d}t, \displaystyle\int_{\Omega\setminus D}\frac{\beta}{(\lambda_{0}^{n})^{3}}h_{0}^{n}\,\mathrm{d}x\to\int_{\Omega\setminus D}\frac{\beta}{\overline{\lambda}_{0}^{3}}\overline{h}_{0}\,\mathrm{d}x. In particular, observe that in the second limit we used that 1/(\lambda_{0}^{n})^{3}\to 1/\overline{\lambda}_{0}^{3} strongly in L^{2}(\Omega\setminus D) , which follows from the strong convergence of \lambda_{0}^{n}\to\overline{\lambda}_{0} in L^{2}(\Omega\setminus D) and the fact that \lambda_{0}^{n}\in\mathcal{U}_{\text{ad}}\subset L^{\infty}(\Omega\setminus D) uniformly. The limits above imply that \lim_{n\to+\infty}\mathrm{D}\mathcal{J}(\lambda_{0}^{n})[h_{0}^{n}]=\mathrm{D}\mathcal{J}(\overline{\lambda}_{0})[\overline{h}_{0}]. (5.31) Next, by Taylor expansion, we can write \mathcal{J}_{\text{red}}(\lambda_{0}^{n})=\mathcal{J}_{\text{red}}(\overline{\lambda}_{0})+\int_{0}^{1}\mathrm{D}\mathcal{J}_{\text{red}}(z\lambda_{0}^{n}+(1-z)\overline{\lambda}_{0})[\lambda_{0}^{n}-\overline{\lambda}_{0}]\,\mathrm{d}z, which, by comparison with our assumption ( 5.29 ), gives \int_{0}^{1}\mathrm{D}\mathcal{J}_{\text{red}}(z\lambda_{0}^{n}+(1-z)\overline{\lambda}_{0})[\lambda_{0}^{n}-\overline{\lambda}_{0}]\,\mathrm{d}z<\frac{1}{n}\lVert\lambda_{0}^{n}-\overline{\lambda}_{0}\rVert^{2}_{L^{2}(\Omega\setminus D)}\to 0,\hskip 10.00002pt\hbox{as $n\to+\infty$.} Thus, by combining this fact with ( 5.30 )–( 5.31 ) and the continuity of \mathrm{D}\mathcal{J}_{\text{red}} , we infer that \mathrm{D}\mathcal{J}_{\text{red}}(\overline{\lambda}_{0})[\overline{h}]\leq 0 . On the other hand, since \lambda_{0}^{n}\in\mathcal{U}_{\text{ad}} and h_{0}^{n} is defined by ( 5.30 ), it follows from the optimality condition ( 4.56 ) that \mathrm{D}\mathcal{J}_{\text{red}}(\overline{\lambda}_{0})[h_{0}^{n}]\geq 0 . Then, by continuity, we deduce that \mathrm{D}\mathcal{J}_{\text{red}}(\overline{\lambda}_{0})[\overline{h}]\geq 0 . Hence, we get \mathrm{D}\mathcal{J}_{\text{red}}(\overline{\lambda}_{0})[\overline{h}_{0}]=0. (5.32) Step 2. Here we show that \overline{h}_{0}\in\mathcal{C}_{0}(\overline{\lambda}_{0}) . To do this, we have to verify that \overline{h}_{0} satisfies the sign conditions ( 5.26 ). First of all, we observe that the set of functions in L^{2}(\Omega\setminus D) that are non-negative if \overline{\lambda}_{0}(x)=\lambda_{\text{min}}(x) and non-positive if \overline{\lambda}_{0}(x)=\lambda_{\text{max}}(x) , almost everywhere, is closed and convex. Thus, it is also weakly closed in L^{2}(\Omega\setminus D) . Moreover, it is clear that, since \lambda_{0}^{n}\in\mathcal{U}_{\text{ad}} , \lambda_{0}^{n}-\overline{\lambda}_{0} belongs to this set for any n\in\mathbb{N} . Then, by its definition ( 5.30 ), h_{0}^{n} belongs to the same set for any n\in\mathbb{N} and \overline{h}_{0} does as well, due to the weak closedness. At this point, by Step 1 , we know that \mathrm{D}\mathcal{J}_{\text{red}}(\overline{\lambda}_{0})[\overline{h}_{0}]=\int_{\Omega\setminus D}\left(\int_{0}^{T}\overline{p}(x,t)(\overline{\varphi}(x,t)-f)\,\mathrm{d}t-\frac{\beta}{\overline{\lambda}_{0}(x)^{3}}\right)\overline{h}_{0}(x)\,\mathrm{d}x=0, which immediately implies that \overline{h}_{0}(x)=0 if x\in A_{0}(\overline{\lambda}_{0}) . Consequently, \overline{h}_{0} satisfies the sign conditions ( 5.26 ), so it belongs to \mathcal{C}_{0}(\overline{\lambda}_{0}) . Step 3. Our next aim is to show that \overline{h}_{0}\equiv 0 . To do this, it is enough to prove that \mathrm{D}^{2}\mathcal{J}_{\text{red}}(\overline{\lambda}_{0})[\overline{h}_{0},\overline{h}_{0}]\leq 0. (5.33) Indeed, if ( 5.33 ) holds, since \overline{h}_{0}\in\mathcal{C}_{0}(\overline{\lambda}_{0}) by Step 2 and \overline{\lambda}_{0} satisfies ( 5.27 ), the only possibility is that \overline{h}_{0}\equiv 0 . Hence, we now show ( 5.33 ). First, for any n\in\mathbb{N} we set \xi_{n}:=\mathrm{D}\mathcal{S}(\overline{\lambda}_{0})[h_{0}^{n}],\hskip 10.00002ptP_{n}:=\mathrm{D}\mathcal{T}(\overline{\lambda}_{0})[h_{0}^{n}],\hskip 10.00002pt\overline{\xi}:=\mathrm{D}\mathcal{S}(\overline{\lambda}_{0})[\overline{h}_{0}],\hskip 10.00002pt\overline{P}:=\mathrm{D}\mathcal{T}(\overline{\lambda}_{0})[\overline{h}_{0}]. Next, by the weak convergence h_{0}^{n}\rightharpoonup\overline{h}_{0} and the fact that, for fixed \overline{\lambda}_{0} , \mathrm{D}\mathcal{S}(\overline{\lambda}_{0}) and \mathrm{D}\mathcal{T}(\overline{\lambda}_{0}) are linear bounded operators, we infer that \xi_{n}\to\overline{\xi}\hskip 10.00002pt\text{and}\hskip 10.00002ptP_{n}\to\overline{P}\hskip 10.00002pt\hbox{weakly in $H^{1}(0,T;H)\cap L^{2}(0,T;H^{4}(\Omega))$}. Then, by well-known compact embeddings (cf. [ 35 , Section 8, Corollary 4] ), it follows that, up to a subsequence, \xi_{n}\to\overline{\xi}\hskip 10.00002pt\text{and}\hskip 10.00002ptP_{n}\to\overline{P}\hskip 10.00002pt\hbox{strongly in $C^{0}(\overline{Q_{T}})$.} Thus, by exploiting the weak and strong convergences highlighted above as well as the explicit expression ( 5.25 ) of the second derivative of \mathcal{J}_{\text{red}} , it is easy to see that \displaystyle\int_{0}^{T}\int_{\Omega\setminus D}P_{n}(f-\overline{\varphi})h_{0}^{n}\,\mathrm{d}x\,\mathrm{d}t\to\int_{0}^{T}\int_{\Omega\setminus D}\overline{P}(f-\overline{\varphi})\overline{h}_{0}\,\mathrm{d}x\,\mathrm{d}t, \displaystyle\int_{0}^{T}\int_{\Omega\setminus D}\overline{p}\xi_{n}h_{0}^{n}\,\mathrm{d}x\,\mathrm{d}t\to\int_{0}^{T}\int_{\Omega\setminus D}\overline{p}\overline{\xi}\,\overline{h}_{0}\,\mathrm{d}x\,\mathrm{d}t, \displaystyle\int_{\Omega\setminus D}\frac{3\beta}{\overline{\lambda}_{0}^{4}}h_{0}^{n}\,\mathrm{d}x\to\int_{\Omega\setminus D}\frac{3\beta}{\overline{\lambda}_{0}^{4}}\overline{h}_{0}\,\mathrm{d}x. Consequently, we conclude that \lim_{n\to+\infty}\mathrm{D}^{2}\mathcal{J}_{\text{red}}(\overline{\lambda}_{0})[h_{0}^{n},h_{0}^{n}]=\mathrm{D}^{2}\mathcal{J}_{\text{red}}(\overline{\lambda}_{0})[\overline{h}_{0},\overline{h}_{0}]. (5.34) We now use a second-order Taylor expansion, which, on account of the linearity of the derivatives and recalling that, by ( 5.30 ), \lambda_{0}^{n}-\overline{\lambda}_{0}=\lVert\lambda_{0}^{n}-\overline{\lambda}_{0}\rVert_{L^{2}(\Omega\setminus D)}h_{0}^{n} , yields \displaystyle\mathcal{J}_{\text{red}}(\lambda_{0}^{n}) \displaystyle=\mathcal{J}_{\text{red}}(\overline{\lambda}_{0})+\mathrm{D}\mathcal{J}_{\text{red}}(\overline{\lambda}_{0})(\lambda_{0}^{n}-\overline{\lambda}_{0}) \displaystyle\hskip 10.00002pt+\frac{1}{2}\lVert\lambda_{0}^{n}-\overline{\lambda}_{0}\rVert^{2}_{L^{2}(\Omega\setminus D)}\int_{0}^{1}\mathrm{D}^{2}\mathcal{J}_{\text{red}}(z\lambda_{0}^{n}+(1-z)\overline{\lambda}_{0})[h_{0}^{n},h_{0}^{n}]\,\mathrm{d}z. Therefore, since, by the optimality condition ( 4.56 ), \mathrm{D}\mathcal{J}_{\text{red}}(\overline{\lambda}_{0})(\lambda_{0}^{n}-\overline{\lambda}_{0})\geq 0 , by comparing the above expression with ( 5.29 ), we deduce that \int_{0}^{1}\mathrm{D}^{2}\mathcal{J}_{\text{red}}(z\lambda_{0}^{n}+(1-z)\overline{\lambda}_{0})[h_{0}^{n},h_{0}^{n}]\,\mathrm{d}z<\frac{2}{n}. (5.35) Moreover, the strong convergence \lambda_{0}^{n}\to\overline{\lambda}_{0} in L^{2}(\Omega\setminus D) combined with the fact that \mathcal{J}_{\text{red}} is of class \mathcal{C}^{2} (cf. Theorems 4.3 and 5.3 ), entails that \left\lvert\int_{0}^{1}\mathrm{D}^{2}\mathcal{J}_{\text{red}}(z\lambda_{0}^{n}+(1-z)\overline{\lambda}_{0})[h_{0}^{n},h_{0}^{n}]\,\mathrm{d}z-\mathrm{D}^{2}\mathcal{J}_{\text{red}}(\overline{\lambda}_{0})[h_{0}^{n},h_{0}^{n}]\right\rvert\to 0,\hskip 10.00002pt\text{as }n\to+\infty. This limit and ( 5.34 )–( 5.35 ) imply that \displaystyle\mathrm{D}^{2}\mathcal{J}_{\text{red}}(\overline{\lambda}_{0})[\overline{h}_{0},\overline{h}_{0}] \displaystyle=\lim_{n\to+\infty}\mathrm{D}^{2}\mathcal{J}_{\text{red}}(\overline{\lambda}_{0})[h_{0}^{n},h_{0}^{n}] \displaystyle\leq\limsup_{n\to+\infty}\int_{0}^{1}\mathrm{D}^{2}\mathcal{J}_{\text{red}}(z\lambda_{0}^{n}+(1-z)\overline{\lambda})[h_{0}^{n},h_{0}^{n}]\,\mathrm{d}z \displaystyle\hskip 10.00002pt+\lim_{n\to+\infty}\left(\mathrm{D}^{2}\mathcal{J}_{\text{red}}(\overline{\lambda}_{0})[h_{0}^{n},h_{0}^{n}]-\int_{0}^{1}\mathrm{D}^{2}\mathcal{J}_{\text{red}}(z\lambda_{0}^{n}+(1-z)\overline{\lambda})[h_{0}^{n},h_{0}^{n}]\,\mathrm{d}z\right) \displaystyle\leq 0. Thus ( 5.33 ) holds so that \overline{h}_{0}\equiv 0 . Step 4. By Step 3 we now know that h_{0}^{n}\rightharpoonup\overline{h}_{0}\equiv 0 weakly in L^{2}(\Omega\setminus D) . Then, by the linearity of \mathrm{D}\mathcal{S}(\overline{\lambda}_{0}) and \mathrm{D}\mathcal{T}(\overline{\lambda}_{0}) , we deduce that \overline{\xi}=\mathrm{D}\mathcal{S}(\overline{\lambda}_{0})[\overline{h}_{0}]=0 and \overline{P}=\mathrm{D}\mathcal{T}(\overline{\lambda}_{0})[\overline{h}_{0}]=0 . Also, by the strong convergences highlighted above, we have that \xi_{n}\to 0 and P_{n}\to 0 strongly in C^{0}(\overline{Q_{T}}) . Finally, by using the facts that \beta>0 , \overline{\lambda}_{0}\in\mathcal{U}_{\text{ad}} and \lVert h_{0}^{n}\rVert_{L^{2}(\Omega\setminus D)}=1 for any n\in\mathbb{N} , together with ( 5.25 ) and ( 5.33 ), we conclude that \displaystyle 0 \displaystyle<\frac{3\beta}{\lVert\overline{\lambda}_{0}^{4}\rVert_{L^{\infty}(\Omega\setminus D)}}=\frac{3\beta}{\lVert\overline{\lambda}_{0}^{4}\rVert_{L^{\infty}(\Omega\setminus D)}}\lim_{n\to+\infty}\lVert h_{0}^{n}\rVert^{2}_{L^{2}(\Omega)} \displaystyle\leq\lim_{n\to+\infty}\int_{\Omega\setminus D}\frac{3\beta}{\overline{\lambda}_{0}^{4}}(h_{0}^{n})^{2}\,\mathrm{d}x \displaystyle=\lim_{n\to+\infty}\mathrm{D}^{2}\mathcal{J}_{\text{red}}(\overline{\lambda}_{0})[h_{0}^{n},h_{0}^{n}]-\lim_{n\to+\infty}\int_{0}^{T}\int_{\Omega\setminus D}P_{n}\,(f-\overline{\varphi})h_{0}^{n}\,\mathrm{d}x\,\mathrm{d}t \displaystyle\hskip 10.00002pt-\lim_{n\to+\infty}\int_{0}^{T}\int_{\Omega\setminus D}\overline{p}\,\xi_{n}\,h_{0}^{n}\,\mathrm{d}x\,\mathrm{d}t \displaystyle=\mathrm{D}^{2}\mathcal{J}_{\text{red}}(\overline{\lambda}_{0})[\overline{h}_{0},\overline{h}_{0}]\leq 0, which leads to a contradiction. The proof is now complete. ∎ 6 Conclusions In this paper, we introduced and studied an optimal control approach to the image inpainting model proposed by Bertozzi, Esedoglu, and Gillette. Our primary focus was on determining a suitable fidelity coefficient \lambda to achieve faithful reconstruction of a damaged image f . By moving from the original polynomial double-well potential to a physically relevant logarithmic-type potential, we ensured that solutions to our evolutionary system remained strictly within the interval [-1,1] , thus preserving the range of the inpainted image at all times. After establishing the well-posedness of the state system, we formulated an optimal control problem whose goal was twofold: maintain fidelity to the undamaged image f in \Omega\backslash D and promote sufficiently large values of \lambda where fine details of the image need to be restored. We proved the existence of an optimal control \lambda under the proposed constraints and then derived first-order necessary optimality conditions using an adjoint system. Subsequently, we addressed second-order sufficient conditions, which provide deeper insight into the local optimality of solutions. Overall, our results clarify the role of the fidelity parameter in the context of Cahn–Hilliard-type inpainting and highlight how optimal control strategies can be designed to tune the reconstruction process. These theoretical findings can be of direct use in numerical algorithms, where spatially varying fidelity weights are beneficial in capturing local image features and enhancing the visual quality of the restored regions. Possible directions for future work include: to extend the analysis to grayscale or colour images, to develop, based on our approach, a reconstruction procedure, to incorporate additional regularization or anisotropic effects in the fidelity term to better handle images with sharp edges or specific textures and, finally, to investigate dynamic control strategies in both space and time, potentially allowing the fidelity parameter to adapt continuously as the inpainting evolves. We believe that these extensions, alongside the theoretical framework established here, will further promote the applicability and robustness of PDE-based image inpainting models in real-world scenarios. Appendix A Appendix To provide further motivation on why it is important to choose the values of \lambda large enough, we complement the results obtained in [ 4 ] with an additional one describing the behaviour of the solution to ( 1.7 )–( 1.10 ) in the undamaged domain \Omega\setminus D . We recall that, if f\in C^{2}(\overline{\Omega}) and F is a regular polynomial double-well potential, in [ 4 ] it was shown that, if \lambda_{0}\to+\infty , the stationary solutions to ( 1.7 )–( 1.10 ) converge in D to the solutions of the following boundary value problem: \displaystyle-\Delta\left(-\varepsilon\Delta\varphi+\frac{1}{\varepsilon}F^{\prime}(\varphi)\right)=0\hskip 20.00003pt \displaystyle\hbox{in $D$}, \displaystyle\varphi=f \displaystyle\hbox{on $\partial D$}, \displaystyle\partial_{\mathbf{n}}\varphi=\partial_{\mathbf{n}}f \displaystyle\hbox{on $\partial D$}. At the same time, the stationary solution exactly matches f in the undamaged domain \Omega\setminus D . This means that, as \lambda_{0} grows larger, one can expect a better inpainting result. In particular, we stress that here f is supposed to be regular: for instance, it can be seen as an approximation of the original image f\in L^{\infty}(\Omega) with a regularising convolution kernel. With the following Proposition A.1 we show that also the solution to the evolutionary inpainting model ( 1.7 )–( 1.10 ) stays close to the original image in \Omega\setminus D as time grows larger, if the fidelity coefficient \lambda_{0} is chosen large enough. Also in this case it is necessary to regularise the given image f in some way. In particular, we assume to be in possession of an inpainted image \overline{\varphi} in D and, looking at our equation, we regularise f as a solution \tilde{f} to the following elliptic boundary value problem: \displaystyle-\Delta\left(-\varepsilon\Delta\tilde{f}+\frac{1}{\varepsilon}F^{\prime}(\tilde{f})\right)=0\hskip 20.00003pt \displaystyle\hbox{in $\Omega\setminus D$}, (A.1) \displaystyle\partial_{\mathbf{n}}\tilde{f}=\partial_{\mathbf{n}}\left(-\varepsilon\Delta\tilde{f}+\frac{1}{\varepsilon}F^{\prime}(\tilde{f})\right)=0\hskip 10.00002pt \displaystyle\hbox{on $\partial\Omega$}, (A.2) \displaystyle\tilde{f}=\overline{\varphi},\hskip 10.00002pt\partial_{\mathbf{n}}\tilde{f}=\partial_{\mathbf{n}}\overline{\varphi} \displaystyle\hbox{on $\partial D$}. (A.3) We argue that this is a good phase-field approximation of the original image f as it can be seen as a solution to the Euler–Lagrange equation associated with the Ginzburg–Landau energy. Hence, we show the following result. Proposition A.1 . Let A1 – A2 and A5 hold and let \lambda_{0}>0 be a constant. Assume that (\varphi,\mu) is a weak solution to the following evolutionary problem in \Omega\setminus D : \displaystyle\partial_{t}\tilde{\varphi}-\Delta\tilde{\mu}=\lambda_{0}(\tilde{f}-\tilde{\varphi})\hskip 20.00003pt \displaystyle\hbox{in $(\Omega\setminus D)\times(0,+\infty)$}, (A.4) \displaystyle\tilde{\mu}=-\varepsilon\Delta\tilde{\varphi}+\frac{1}{\varepsilon}F^{\prime}(\tilde{\varphi}) \displaystyle\hbox{in $(\Omega\setminus D)\times(0,+\infty)$}, (A.5) \displaystyle\partial_{\mathbf{n}}\tilde{\varphi}=\partial_{\mathbf{n}}\tilde{\mu}=0 \displaystyle\hbox{on $\partial\Omega\times(0,+\infty)$}, (A.6) \displaystyle\tilde{\varphi}=\overline{\varphi},\hskip 10.00002pt\partial_{\mathbf{n}}\tilde{\varphi}=\partial_{\mathbf{n}}\overline{\varphi} \displaystyle\hbox{on $\partial D\times(0,+\infty)$}. (A.7) \displaystyle\tilde{\varphi}(0)=\tilde{\varphi}_{0} \displaystyle\hbox{in $\Omega\setminus D$}, (A.8) with regularities \displaystyle\tilde{\varphi}\in H^{1}(0,T;(H^{1}(\Omega\setminus D))^{*})\cap L^{2}(0,T;H^{2}(\Omega\setminus D)), \displaystyle\tilde{\mu}\in L^{2}(0,T;H^{1}(\Omega\setminus D)), for any positive time T>0 . Finally, let \tilde{f}\in H^{2}(\Omega\setminus D) be a weak solution to ( A.1 )–( A.3 ) in the variational sense. Then, if \lambda_{0} is chosen such that \lambda_{0}>\frac{K}{\varepsilon^{3}}, where the constant K>0 depends only on the parameters of the system, we have that \lVert\tilde{\varphi}(t)-\tilde{f}\rVert_{(H^{1}(\Omega\setminus D))^{*}}\to 0\hskip 10.00002pt\hbox{exponentially as $t\to+\infty$.} Proof. We start by subtracting equations ( A.1 )–( A.3 ) for the approximated image \tilde{f} to equations ( A.4 )–( A.8 ). In order to use a more compact notation, we introduce the new variables \psi:=\tilde{\varphi}-\tilde{f},\hskip 10.00002pt\zeta:=\tilde{\mu}-\left(-\varepsilon\Delta\tilde{f}+\frac{1}{\varepsilon}F^{\prime}(\tilde{f})\right). Then, by recalling that \tilde{f} does not depend on time, we see that they satisfy the following system: \displaystyle\partial_{t}\psi-\Delta\zeta+\lambda_{0}\psi=0\hskip 20.00003pt \displaystyle\hbox{in $(\Omega\setminus D)\times(0,+\infty)$}, (A.9) \displaystyle\zeta=-\varepsilon\Delta\psi+\frac{1}{\varepsilon}(F^{\prime}(\tilde{\varphi})-F^{\prime}(\tilde{f}))\hskip 10.00002pt \displaystyle\hbox{in $(\Omega\setminus D)\times(0,+\infty)$}, (A.10) \displaystyle\partial_{\mathbf{n}}\psi=\partial_{\mathbf{n}}\zeta=0 \displaystyle\hbox{on $\partial\Omega\times(0,+\infty)$}, (A.11) \displaystyle\psi=0,\hskip 10.00002pt\partial_{\mathbf{n}}\psi=0 \displaystyle\hbox{on $\partial D\times(0,+\infty)$}. (A.12) \displaystyle\psi(0)=\tilde{\varphi}_{0} \displaystyle\hbox{in $\Omega\setminus D$}. (A.13) Now we observe that \psi satisfies homogeneous Neumann boundary conditions on all of \partial(\Omega\setminus D) for any positive time t\in(0,+\infty) . Then, the inverse Neumann–Laplacian operator \mathcal{N}^{-1}\psi(t) is well-defined for any t\in(0,+\infty) . Thus, we can multiply equation ( A.9 ) by \mathcal{N}^{-1}\psi and integrate over \Omega\setminus D to obtain that \frac{1}{2}\frac{\mathrm{d}}{\mathrm{d}t}\lVert\psi\rVert^{2}_{(H^{1}(\Omega\setminus D))^{*}}+\lambda_{0}\lVert\psi\rVert^{2}_{(H^{1}(\Omega\setminus D))^{*}}+\int_{\Omega\setminus D}\zeta\psi\,\mathrm{d}x=0. (A.14) Now, by using equation ( A.10 ), the boundary conditions ( A.11 )–( A.12 ) and hypothesis A2 on F , we infer that \displaystyle\int_{\Omega\setminus D}\zeta\psi\,\mathrm{d}x=\varepsilon\int_{\Omega\setminus D}\lvert\nabla\psi\rvert^{2}\,\mathrm{d}x+\frac{1}{\varepsilon}\int_{\Omega\setminus D}(F^{\prime}(\tilde{\varphi})-F^{\prime}(\tilde{f}))(\tilde{\varphi}-\tilde{f})\,\mathrm{d}x \displaystyle\hskip 10.00002pt=\varepsilon\int_{\Omega\setminus D}\lvert\nabla\psi\rvert^{2}\,\mathrm{d}x+\frac{1}{\varepsilon}\int_{\Omega\setminus D}\underbrace{(F_{0}^{\prime}(\tilde{\varphi})-F_{0}^{\prime}(\tilde{f}))(\tilde{\varphi}-\tilde{f})}_{\geq\,0}\,\mathrm{d}x+\frac{1}{\varepsilon}\int_{\Omega\setminus D}(F_{1}^{\prime}(\tilde{\varphi})-F_{1}^{\prime}(\tilde{f}))(\tilde{\varphi}-\tilde{f})\,\mathrm{d}x \displaystyle\hskip 10.00002pt\geq\varepsilon\int_{\Omega\setminus D}\lvert\nabla\psi\rvert^{2}\,\mathrm{d}x-\frac{\theta}{\varepsilon}\int_{\Omega\setminus D}\lvert\psi\rvert^{2}\,\mathrm{d}x, where \theta>0 is given by A2 . Next, we observe that, by interpolation inequalities and Young’s inequality with some \sigma>0 , \displaystyle\frac{\theta}{\varepsilon}\int_{\Omega\setminus D}\lvert\psi\rvert^{2}\,\mathrm{d}x \displaystyle\leq\frac{\theta}{\varepsilon}C_{\Omega\setminus D}\lVert\nabla\psi\rVert^{2}_{L^{2}(\Omega\setminus D)}\lVert\psi\rVert^{2}_{(H^{1}(\Omega\setminus D))^{*}} \displaystyle\leq\frac{\theta C_{\Omega\setminus D}}{2\varepsilon}\sigma\lVert\nabla\psi\rVert^{2}_{L^{2}(\Omega\setminus D)}+\frac{\theta C_{\Omega\setminus D}}{2\varepsilon\sigma}\lVert\psi\rVert^{2}_{(H^{1}(\Omega\setminus D))^{*}}, where the constant C_{\Omega\setminus D}>0 depends only on the set \Omega\setminus D\subset\mathbb{R}^{2} . Consequently, from ( A.14 ) we obtain that \frac{1}{2}\frac{\mathrm{d}}{\mathrm{d}t}\lVert\psi\rVert^{2}_{(H^{1}(\Omega\setminus D))^{*}}+\left(\lambda_{0}-\frac{\theta C_{\Omega\setminus D}}{2\varepsilon\sigma}\right)\lVert\psi\rVert^{2}_{(H^{1}(\Omega\setminus D))^{*}}+\left(\varepsilon-\frac{\theta C_{\Omega\setminus D}}{2\varepsilon}\sigma\right)\lVert\nabla\psi\rVert^{2}_{L^{2}(\Omega\setminus D)}\leq 0. Then, if we choose \sigma>0 such that \sigma=\frac{\varepsilon^{2}}{\theta C_{\Omega\setminus D}}, we conclude that \frac{1}{2}\frac{\mathrm{d}}{\mathrm{d}t}\lVert\psi\rVert^{2}_{(H^{1}(\Omega\setminus D))^{*}}+\left(\lambda_{0}-\frac{\theta^{2}C^{2}_{\Omega\setminus D}}{2\varepsilon^{3}}\right)\lVert\psi\rVert^{2}_{(H^{1}(\Omega\setminus D))^{*}}+\frac{\varepsilon}{2}\lVert\nabla\psi\rVert^{2}_{L^{2}(\Omega\setminus D)}\leq 0, (A.15) for any t\in(0,+\infty) . From ( A.15 ), by application of Gronwall’s inequality, we immediately deduce that, if \lambda_{0}>\frac{\theta^{2}C^{2}_{\Omega\setminus D}}{2\varepsilon^{3}}, then \lVert\tilde{\varphi}(t)-\tilde{f}\rVert^{2}_{(H^{1}(\Omega\setminus D))^{*}}\to 0\hskip 10.00002pt\hbox{exponentially as $t\to+\infty$,} by recalling the definition of \psi as \tilde{\varphi}-\tilde{f} . ∎ Remark A.2 . We mention that Proposition A.1 is a formal result, in the sense that we assume the existence of a solution to ( A.4 )–( A.8 ) without actually proving it. However, our aim was to show that, under suitable assumptions, large values of \lambda_{0} guarantee that the inpainted image stays close to a suitable phase-field approximation of the original image for all times. This gives some further motivation on why it is crucial to find optimal large values of \lambda_{0} , for instance through our proposed optimal control procedure. Acknowledgments. The authors wish to thank the anonymous reviewers, who carefully read the manuscript and provided many comments that improved the quality of the paper. C. Cavaterra, M. Fornoni, and M. Grasselli are members of GNAMPA (Gruppo Nazionale per l’Analisi Matematica, la Probabilità e le loro Applicazioni) of INdAM (Istituto Nazionale di Alta Matematica). C. Cavaterra, M. Fornoni and M. Grasselli have been partially supported by the MIUR-PRIN Grant 2020F3NCPX “Mathematics for Industry 4.0 (Math4I4)”. C. Cavaterra has been partially supported by the MIUR-PRIN Grant 2022 “Partial differential equations and related geometric-functional inequalities”. Elena Beretta’s research has been partially supported by NYUAD Science Program Project Fund AD364. This research is part of the activities of “Dipartimento di Eccellenza 2023-2027” of Università degli Studi di Milano (C. Cavaterra) and Politecnico di Milano (M. Grasselli).