Optimal control for a conserved phase field system with a possibly singular potential

In this paper we study a distributed control problem for a phase-field system of conserved type with a possibly singular potential. We mainly handle two cases: the case of a viscous Cahn-Hilliard type dynamics for the phase variable in case of a logarithmic-type potential with bounded domain and the case of a standard Cahn-Hilliard equation in case of a regular potential with unbounded domain, like the classical double-well potential, for example. Necessary first order conditions of optimality are derived under natural assumptions on the data.


Introduction
The present contribution is concerned with the study of a distributed control problem for a conserved phase field type PDE system (cf. [7] and [8]) in Q T := (0, T ) × Ω ∂ t ϑ + ℓ∂ t ϕ − ∆ϑ = u and ∂ t ϕ − ∆µ = 0, µ = τ ∂ t ϕ − ∆ϕ + W ′ (ϕ) − γϑ (1.1) where Ω is the domain where the evolution takes place, T is some final time, ϑ denotes the relative temperature around some critical value that is taken to be 0 without loss of generality, and ϕ is the order parameter. Moreover, ℓ and γ are positive coefficients proportional to the latent heat, and u is some source term, playing the role of the distributed control here. The parameter τ ∈ [0, 1] denotes a viscosity coefficient that will be taken to be strictly positive or non-negative in the subsequent analysis in view of different results. Finally, W ′ represents the derivative of a double-well potential W, and the typical example is the classical regular potential W reg defined by W reg (r) = 1 4 (r 2 − 1) 2 , r ∈ R. (1.2) However, different choices of W are possible, and a thermodynamically significant example is given by the so-called logarithmic double-well potential, namely W log (r) = (1 + r) ln(1 + r) + (1 − r) ln(1 − r) − cr 2 , r ∈ (−1, 1) (1. 3) where c > 0 is large enough in order to kill convexity. More generally, the potential W could be just the sum W = β + π, where β is a convex function that is now allowed to take the value +∞ in our case and π is a smooth perturbation (not necessarily concave).
The mathematical literature on the well-posedness of the PDE system (1.1) is quite vast and so we quote here only the papers [5], [9,28,29], and [24] dealing respectively with the cases of regular, singular, and non-smooth potentials and also with the long-time behavior of solutions.
Moreover, initial conditions like ϑ(0) = ϑ 0 and ϕ(0) = ϕ 0 and suitable boundary conditions must complement the above equations. As far as the latter are concerned, we take for simplicity the homogeneous Neumann boundary conditions, respectively, that are ∂ n ϑ = ∂ n ϕ = ∂ n µ = 0 on Σ T := (0, T ) × Γ (1.4) where Γ is the boundary of Ω and ∂ n is the (say, outward) normal derivative. We note that the last two boundary conditions are very common in the literature and that the first one could be replaced by an inhomogeneous one, for example. Let us note that by using the third boundary condition in (1.4) we obtain a classical feature of the Cahn-Hilliard equations, that is the so-called mass conservation: The aim of this paper is to study a related optimal control problem for the system (1.1), (1.4), the control being associated to the forcing term u that appears on the right-hand side of the first equation (1.1), and it is supposed to vary in some control box U ad . We would like to force the averaged temperature and phase variable to be closed to some fixed values ϑ Q and ϕ Q and their final values at time T to be closed to ϑ Ω and ϕ Ω , respectively. In order to do that we choose the following cost functional 3 2 Ω (ϑ(T ) − ϑ Ω ) 2 + κ 4 2 Ω (ϕ(T ) − ϕ Ω ) 2 (1. 5) where (ϑ, ϕ) is the state corresponding to the control u, and the desired temperatures ϑ Q ∈ L 2 (Q), ϑ Ω ∈ L 2 (Ω), the target phases ϕ Q ∈ L 2 (Q), ϕ Ω ∈ L 2 (Ω), and the constants κ i ≥ 0, i = 1, . . . , 4, are given. In this case, the optimal control (if it exists) balances the smallness of the various differences depending on the value of the coefficients κ i .
Thus, the control problem we address in this paper consists in minimizing the cost functional J depending on the state variables ϑ and ϕ, which satisfy the above state system, over all the controls belonging to the control box U ad := u ∈ L ∞ (Q) : u min ≤ u ≤ u max a.e. in Q (1.6) where u min and u max are given bounded functions.
The main novelty of the present contribution consists in the fact that we can deal with quite general potentials W (even singular) in the phase equation and with a quite general cost functional J. Up to our knowledge, indeed, the literature on optimal control for Caginalp type phase field models is quite poor and often restricted to the case of regular potentials, or dealing with approximating problems when first order optimality conditions are discussed. In this framework, let us quote the papers [22,23] and references therein, as well as [2, 3, 12-14, 18-20, 26, 30, 32] for different types of phase field models. Moreover, up to our knowledge, no optimal control analysis has been performed yet in the literature in case of conserved Capinalp type systems. However we can quote the recent results [10,16,17] handling single Cahn-Hilliard type dynamics with different boundary conditions and also singular or non-smooth potentials.
The paper is organized as follows. In the next section, we list our assumptions, state the problem in a precise form and present our results. In Sections 3 and 4, respectively, we show the well-posedness and regularity results of the state and linearized systems and the existence of an optimal control. The rest (and main part) of the paper is devoted to the derivation of first order necessary conditions for optimality.

Statement of the problem and results
In this section, we describe the problem under investigation and present our results. As in the Introduction, Ω is the body where the evolution takes place. We assume Ω ⊂ R 3 to be open, bounded, connected, of class C 1,1 , and we write |Ω| for its Lebesgue measure. Moreover, Γ and ∂ n still stand for the boundary of Ω and the outward normal derivative, respectively. Given a finite final time T > 0, we set for convenience Q t := (0, t) × Ω and Σ t := (0, t) × Γ for every t ∈ (0, T ] (2.1) Q := Q T , and Σ := Σ T . (2.2) Now, we specify the assumptions on the structure of our system. We assume that β : R → [0, +∞] is convex and lower semicontinuous function with β (0) = 0, (2.3) π : R → R is a C 3 function and π ′ is Lipschitz continuous (2.4) and observe that (2.4) implies that | π(r)| ≤ c (r 2 + 1) for every r ∈ R (2.5) with a precise constant c. We set for convenience W := β + π, β := β ′ and π := π ′ (2.6) and denote by D(β) and D( β ) the domains of β and β , respectively. We assume then that We remark that both the regular potential (1.2) and the logarithmic potential (1.3) satisfy the above assumptions on β and π. Another possible choice of β is given by for r > − 1 (2.8) and it corresponds to the function β defined by β (r) := r − ln(r + 1) if r > −1 and β (r) := +∞ otherwise (2.9) with β taking the minimum 0 at 0, as required by assumption (2.3). Such an operator β yields an example of a different behavior for negative and positive values, singular near −1 and with a somehow linear growth at +∞.
Moreover, if β ε denotes the Yosida regularization of β at level ε, it is well known that both β and β ε are maximal monotone operators and that β ε is even Lipschitz continuous in the whole of R. Furthermore (see, e.g., [4, Prop. 2.6, p. 28]), we have |β ε (r)| ≤ |β(r)| and β ε (r) → β(r) for r ∈ D(β). (2.10) Next, in order to simplify notations, we set and endow these spaces with their natural norms. We have the dense and continuous We denote by ·, · X ′ ,X the duality pairing between two Banach spaces X ′ and X, by (·, ·) Y the scalar product in a generic Hilbert space Y , and by (·, ·) the scalar product in H. Then, we have u, v V ′ ,V = (u, v) and u, w W ′ ,W = (u, w) for all u ∈ H, v ∈ V , and w ∈ W . The symbol · X stands for the norm in a generic Banach space X or in power of it, while · p is the usual norm in both L p (Ω) and L p (Q), for 1 ≤ p ≤ ∞. Finally, for v ∈ L 2 (0, T ; X) the function 1 * v is defined by (note that the symbol * is usually employed for convolution products).
Secondly, we introduce a well-known tool, which is useful to deal with a Cahn-Hilliard type equation (see, e.g., [11,Sect. 2]). We define the operator (2.14) Recalling our assumption on Ω, namely, boundedness, smoothness, and connectedness, we see that the restriction of A to the set of functions v ∈ V satisfying v Ω = 0 (see (2.14)) is one-to-one and thatv ∈ V ′ belongs to the range of A if and only ifv Ω = 0. Therefore, we can define by setting: forv ∈ dom N and v ∈ V with v Ω = 0, the equality v = Nv means Av =v, i.e., Nv is the solution v to the generalized Neumann problem for −∆ with datumv that satisfies v Ω = 0. This yields a well-defined isomorphism, and the following relations hold The first inequality in (2.18) is related to the following Poincaré inequality At this point, in order to get useful results both for the state system and the linearized one, that we will need later for the optimal control analysis, we introduce the following (more general) PDE system which contains the state system as particular case.
Given ϑ 0 and ϕ 0 such that we look for a triplet (ϑ, ϕ, µ) satisfying Our first result, whose proof is sketched in Section 3, ensures well-posedness with the prescribed regularity, stability and continuous dependence in suitable topologies.
Some further regularity of the solution is stated in the next result, whose proof is given in Section 3.
Theorem 2.2. The following properties hold true. (2.37) Then, the unique solution (ϑ, ϕ, µ) given by Theorem 2.1 also satisfies and the initial value (pointwise) problem Besides, the following estimates hold true for some constants C 2 , C 3 , C 4 that depend only on Ω, T , the structure (2.3)-(2.7) of the system, the norms of the initial data, v ∞ , λ H 1 (0,T ;H)∩L ∞ (Q) and the norms of the data in (2.36)-(2.37).
ii) By further assuming that either D(β) ≡ R or τ > 0 and β(ϕ 0 ) ∈ L ∞ (Ω), we have that β(ϕ) ∈ L ∞ (Q) and with a constant C 5 that depends on C 3 , C 4 , and even on τ and are the corresponding solutions, then the estimate holds true for some constant C ′′′ that depends only on only on ℓ, γ, Ω, T , C 3 , C 5 , β and π.
By applying Theorem 2.1 and the points i) and ii) of Theorem 2.2 in case v = u and λ = 1, we deduce the following existence, uniqueness and regularity results for the state system (1.1) coupled with boundary conditions (1.4) and initial conditions (2.32).
The well-posedness result for problem (2.50)-(2.53) given by Corollary 2.3 allows us to introduce the control-to-state mapping S and to address the corresponding control problem. We define Next, in order to introduce the control box and the cost functional, we assume that and define U ad and J according to the Introduction. Namely, we set Here is our first result on the control problem; for the proof we refer to Section 4.
Our next aim is to formulate the first order necessary optimality conditions. As U ad is convex, the desired necessary condition for optimality is provided that the derivative DJ(u * ) exists at least in the Gâteaux sense in L 2 (Q). Then, the natural approach consists in proving that S is Fréchet differentiable at u * and applying the chain rule to J = F • S. We can properly tackle this project under further assumptions on the nonlinearities β and π.
Since assumptions (2.3)-(2.7) force β(r) to tend to ±∞ as r tends to a finite end-point of D(β), if any, we see that combining the further requirements on the initial data with the boundedness properties of ϕ and β(ϕ) stated by Corollary 2.3 immediately yields the following result.
As we shall see in Section 5, the computation of the Fréchet derivative of S leads to the linearized problem that we describe at once and that can be stated starting from a generic element u ∈ X. Let u ∈ X and h ∈ X be given. We set (ϑ, ϕ) := S(u). Then the linearized problem consists in finding (Θ, Φ, Z) satisfying and solving the following problem (2.70) Applying Theorem 2.2 in the case v = h, λ = W ′′ (ϕ), β(ϕ) = 0, π(ϕ) = ϕ, ϑ 0 = 0 and ϕ 0 = 0, we deduce the existence, uniqueness and regularity results for the linearized system described above. In view of (2.3)-(2.7), the reader can check that W ′′ (ϕ) complies with (2.24).
Proposition 2.6. Let the assumptions of Theorem 2.2 ii) hold true and let u ∈ X and (ϑ, ϕ) = S(u). Then, for every h ∈ X, there exists a unique triplet (Θ, Φ, Z) satisfying (2.63)-(2.65) and solving the linearized problem (2.66)-(2.70). Moreover, the inequality holds true with a constant C 6 that depend only on Ω, T , the structure (2.3)-(2.7) of the system, the norms of the initial data associated to (2.22)-(2.23), the norms u ∞ , ϑ 0 ∞ , and even on τ and β(ϕ 0 ) ∞ if τ > 0. In particular, the linear map In fact, we shall prove that the Fréchet derivative DS(u) ∈ L(X, Y) actually exists and coincides with the map D introduced in the last statement. This will be done in Section 5. Once this is established, we may use the chain rule with u := u * to prove that the necessary condition (2.61) for optimality takes the form where (ϑ * , ϕ * ) = S(u * ) and, for any given u ∈ U ad , the pair (Θ, Φ) is the solution to the linearized problem corresponding to h = u − u * .
The final step then consists in eliminating the pair (Θ, Φ) from (2.72). This will be done by introducing the so-called adjoint problem.
Theorem 2.7. Let the assumptions of Theorem 2.2 ii) hold true and let u * and (ϑ * , ϕ * ) = S(u * ) be an optimal control and the corresponding state. Then there exists a unique solution (q, p) with the regularity properties The proof of the following result will be given in Section 6.
Remark 2.8. Notice that a strong formulation of (2.76)-(2.78) consists in the following system Our last result, also proved in Section 6, establishes optimality conditions. Theorem 2.9. Let u * be an optimal control. Moreover, let (ϑ * , ϕ * ) = S(u * ) and (q, p) be the associate state and the unique solution to the adjoint problem (2.76)-(2.78) given by Theorem 2.7. Then we have Q (u * − u)q ≤ 0 for every u ∈ U ad . (2.83) In particular, we have −q ∈ N K (u * ), where K = [u min , u max ] and N K is the normal cone to the convex set K.
A straightforward consequence of Theorem 2.9 is here stated. elsewhere.
In the remainder of the paper, we often owe to the Hölder inequality and to the elementary Young inequalities ab ≤ α a 1/α + (1 − α) b 1/(1−α) and ab ≤ δa 2 + 1 4δ b 2 for every a, b ≥ 0, α ∈ (0, 1) and δ > 0 (2.84) in performing our a priori estimates. To this regard, in order to avoid a boring notation, we use the following general rule to denote constants. The small-case symbol c stands for different constants which depend only on Ω, the final time T , the shape of the nonlinearities and the constants and norms of the functions involved in the assumptions of our statements. A small-case c with a subscript like c δ indicates that the constant might depend on the parameter δ, in addition. Hence, the meaning of c and c δ might change from line to line and even in the same chain of equalities or inequalities. On the contrary, different symbols (e.g., capital letters) stand for precise constants which we can refer to.

The state and the linearized systems
This section is devoted to the proofs of Theorems 2.1 and 2.2, which, in turn, imply the validity of Corollary 2.3 and Proposition 2.6. As far as Theorem 2.1 is concerned, we notice that the initial-boundary value problem under study is a quite standard phase field system and that a number of results on it can be found in the literature (see, e.g., [5][6][7]21,28], and references therein). Nevertheless, we prefer to sketch the basic a priori estimates that correspond to the regularity (2.25)-(2.28) of the solution and to the stability estimate (2.34), for the reader's convenience. A complete existence proof can be obtained by regularizing the problem, performing similar estimates on the corresponding solution, and passing to the limit through compactness and monotonicity arguments. In particular the potential β should be replaced by its Moreau-Yosida approximation β ε , but, since all estimates we deduce are formal and independent of ε, we skip the index hereby most of the times.
Concerning the treatment of the unusual term λ(t, x)π(ϕ) in the equation (2.43), we refer the reader to the analysis carried out in [15] for a Cahn-Hilliard system with dynamic boundary conditions. We also give a short proof of (2.35) and (2.49) (whence uniqueness follows as a consequence) and conclude the discussion on Theorem 2.2.
As already mentioned, we derive just formal a priori estimates. Let's define the auxiliary variable e := ϑ + ℓϕ. We take z = e in (2.29); then we test (2.30) by LN(∂ t ϕ) and (2.31) by −L∂ t ϕ, being L a positive constant to be chosen later. Moreover we add to both members of the resulting equality the term L 2 ϕ(t) 2 H + Qt |ϑ| 2 ; finally, we sum up and integrate over Q t with t ∈ (0, T ). As the terms involving the product µ ∂ t ϕ cancel out, we obtain We can now proceed by estimating the six integrals on the right hand side in (3.1). Indeed, the last integral on the left-hand side is nonnegative thanks to (2.3) and the first three terms on the right-hand side are under control, due to (2.22)-(2.23). By applying the Young inequality we deduce the estimates We treat the third integral by integration by parts in time and taking advantage of the continuous embedding V ⊂ L 4 (Ω). Moreover, we account for (2.5) and explicitly write the corresponding constant c in some terms, for clarity. By allowing the values of c to depend on L as well, we obtain We notice at once that the first summand of the last line is proportional to the term I 5 we introduce and treat later on. Next, in view of (2.19), we have It remains to estimate I 5 := (L/2) ϕ(t) 2 H and the proportional term of (3.4). We observe that Thus, we have In view of (2.33), we can now test (2.30) by N(ϕ − m 0 ) and subtract (2.31) tested by ϕ − m 0 . Two terms cancel out and we can integrate by parts in the term containing −∆ϕ.
By rearranging a little, we obtain for a.a. t ∈ (0, T ) Now, we use the fact that m 0 lies in the interior of D(β) and consequently (cf. for every r ∈ R and some positive constants δ 0 and C that do not depend on ε. Hence, thanks to (3.8) we have that β ε (ϕ) L 2 (0,T ;L 1 (Ω)) ≤ c .
Next, we proceed proving estimate (2.35). We first integrate (2.29) with respect to time and get the equation in (0, T ). (3.13) Now, we fix v i ∈ L 2 (Q), i = 1, 2, and consider two corresponding solutions (ϑ i , ϕ i , µ i ) with the same initial data. We write (3.13) for both of them and test the difference by γϑ/ℓ, where ϑ := ϑ 1 − ϑ 2 . At the same time, we write (2.30) for both solutions, take the difference and choose z = Nϕ, where ϕ := ϕ 1 − ϕ 2 . Finally, we take (2.31) for the two solutions and test the difference by −ϕ. Then, we add the resulting equalities and integrate over (0, t). Note that two pairs of corresponding terms cancel. Hence, by setting v := v 1 − v 2 for brevity, and using the monotonicity of β, the Lipschitz continuity of π and the boundedness of λ, we have (3.14) Now, we exploit a standard compactness inequality, which states that for any δ > 0 there is some constant c δ > 0 such that Indeed, by using it to estimate the last term of (3.14) and owing also to (2.18), we have that Then, by combining it with (3.14) and applying the standard Gronwall lemma, we obtain the desired estimate (2.35). Now, we prove Theorem 2.2. First take the equation (2.29) and test it by ∂ t ϑ, then differentiate (2.30) and test it by N(∂ t ϕ) and finally take the time derivative of (2.31) and test it by −∂ t ϕ. Summing up the resulting equations, a cancellation occurs. So, by integrating over (0, t), we obtain The monotonicity of β ε implies that the last term on the left-hand side is nonnegative. With the help of (2.36)-(2.37) we find out that the norms of the initial data on the right hand side are bounded: indeed, write (2.30), (2.31) at the time t = 0, take z = N(∂ t ϕ(0)) in (2.30) and test (2.31) by −∂ t ϕ(0), then sum up and obtain We can then estimate the next term on the right hand side of (3.16) by the elementary Young inequality and the compactness inequality (3.15). Hence, we easily have that The last two integrals in (3.16) can be treated by means of the regularity assumptions on λ and π along with the compactness inequality applied to the embedding V ⊂ L 4 (Ω) as well. We infer that Consequently, taking δ small enough we obtain it is straightforward to infer that In view of (3.17) and recalling the estimates (3.10)-(3.12) we easily conclude that β ε (ϕ) L ∞ (0,T ;L 1 (Ω)) + µ L ∞ (0,T ;V ) ≤ c .
For the second statement ii), we can write (2.31) in the form 3.18) and observe that τ 1/2 f is bounded in L ∞ (Q) on account of the result i) just proved. Then, we can use the same estimate already performed in [13], i.e., we can multiply the approximation of (3.18) by |ξ ε | p−1 sign ξ ε , where β ε is the Yosida regularization of β at level ε > 0 and p > 2 is arbitrary, and integrate over Q t . Indeed, a standard argument shows that ϕ ε converges to ϕ in the proper topology as ε tends to zero, so that ii) immediately follows whenever we prove that ξ ε is bounded in L ∞ (Q) uniformly with respect to ε. This estimate leads plainly to Hence, in case τ > 0, the proof of ii) of Theorem 2.2 is completed. In case τ = 0 and assuming that D(β) ≡ R, the boundedness of β(ϕ) L ∞ (Q) is an easy consequence of the facts that ϕ is bounded in C 0 (Q) and the real function β is bounded on bounded sets.
We need now to prove iii), that is the continuous dependence estimate (2.49), and a preliminary remark is needed. As pointed out before its statement, Corollary 2.3 depends only on Theorem 2.1 and on the points i) and ii) of Theorem 2.2. The same holds for Corollary 2.5 as a consequence. Therefore, in proving (2.49), we can use (2.62) for every solution. In particular, we can assume W ′ and W ′′ to be Lipschitz continuous and bounded without loss of generality. Let's define v := v 1 − v 2 . We test the difference of (2.29) corresponding to different solutions (ϑ i , ϕ i ), i = 1, 2, by ϑ := ϑ 1 − ϑ 2 , the difference of (2.30) corresponding to different solutions (ϑ i , ϕ i ), i = 1, 2, by MN(∂ t ϕ) := MN(∂ t (ϕ 1 − ϕ 2 )), the difference of (2.31) corresponding to different solutions (ϑ i , ϕ i ), i = 1, 2, by −M∂ t ϕ := −M∂ t (ϕ 1 − ϕ 2 ), with M chosen equal to ℓ/γ in order to cancel two terms in the sum. We integrate over (0, t) and sum the three resulting equations up, thus obtaining Hence, thanks to the already shown estimate (2.35), from (3.20) we infer that Then, by applying the Gronwall lemma we end up with the desired estimate (2.49). This concludes the proof of Theorem 2.2.

Existence of an optimal control
The following section is devoted to the proof of Theorem 2.4. We use the direct method, observing first that U ad is nonempty. Then, we let {u n } be a minimizing sequence for the optimization problem and, for any n, we take the corresponding solution (ϕ n , ϑ n , µ n ) to problem (2.41)-(2.44). Then, {u n } is bounded in L ∞ (Q) and estimates (2.45)-(2.47) hold for (ϕ n , ϑ n , µ n ). Therefore, we have for a subsequence and β(ϕ n ) converges to some ξ weakly star in L ∞ (0, T ; H). Then, in view of (2.58) it is clear that u ∈ U ad , the initial conditions for ϑ and ϕ are satisfied, and we can easily conclude by standard arguments. Very shortly, {ϕ n } converges strongly, e.g., in L 2 (Q) and a.e. in Q (for a subsequence) by the Aubin-Lions compactness lemma (see, e.g., [27,Thm. 5.1,p. 58]), whence π(ϕ n ) converges to π(ϕ) is the same topology and β(ϕ n ) → ξ = β(ϕ) by the weak-strong convergence property (see, e.g., [1,Lemma 1.3,p. 42]). Thus, (ϑ, ϕ, µ) satisfies problem (2.41)-(2.44). On the other hand, F(ϑ n , ϕ n ) converges both to the infimum of J and to F(ϑ, ϕ). Therefore, u is an optimal control.

The control-to-state mapping
As sketched in Section 2, the main point is the Fréchet differentiability of the control-tostate mapping S. This involves the linearized problem (2.66)-(2.70), whose well-posedness is stated in Proposition 2.6.
Here is the main result of this section. Proof. We fix u ∈ X and the corresponding state (ϑ, ϕ) and, for h ∈ X with h X ≤ Λ, for some positive constant Λ, we set where (Θ, Φ, Z) is the solution to the linearized problem corresponding to h. We have to prove that (ζ h , η h ) Y / h X tends to zero as h X tends to zero. More precisely, we show that for some constant c, and this is even stronger than necessary. First of all, we fix one fact. As both u ∞ and u + h ∞ are bounded by u ∞ + Λ, we can apply Corollary 2.5 and find constants ϕ • , ϕ • ∈ D(β) such that Now, let us prove (5.1) by writing the problem solved by (ζ h , η h ). We clearly have where we have defined ϕ h being some function whose values lie between those of ϕ h andφ. In particular, the analogue of (5.2) holds forφ h , so that W ′′′ (φ h ) is bounded. The same is true for W ′′ (ϕ). Now we can deduce an estimate for the right-hand side of (5.6) by accounting for the Young and Hölder inequalities, the compactness inequality (3.15) and the continuous embedding V ⊂ L 4 (Ω). We first observe that Therefore, lettingl > ℓ 2 /2, setting L =l − ℓ 2 /2, defining e h = ζ h + ℓη h and adding the term L Qt |η h | 2 to both sides, we have that Now, we recall that estimate (2.49) holds for the pair of controls u + h and u and for the corresponding states (ϑ h , ϕ h ) and (ϑ, ϕ). Therefore, we can proceed and obtain Then, the application of the Gronwall lemma closes the estimate and yields for a.a. t ∈ (0, T ). In order to conclude the proof of (5.1), we need an estimate in C 0 ([0, T ]; H) and so we test (5.4) by η h and add it to (5.5) tested by ∆η h . Integrating over (0, t) and using Young's inequality with (5.7), we obtain and by comparison, we also get for a.a. t ∈ (0, T ), which concludes the proof since h L 2 (Q) ≤ c h X .
Remark 5.2. We have choosen X = L ∞ (Q) by (2.54). However, the L ∞ norm has been used just at the beginning of the proof and some modification is possible. In particular, we can make the more suitable choice X = L 2 (Q) and perform the same argument to prove the directional differentiability of S in all the directions h ∈ L ∞ (Q). Indeed, u ∈ L ∞ (Q) since u ∈ U ad . We point out that this modification does not have any bad consequence in the results of the next section, since the necessary condition we prove only uses the directional differentiability of J = F • S, which still holds in the modified framework.

Necessary optimality conditions
In this section, we derive the optimality condition (2.83) stated in Theorem 2.9. We start from (2.61) and first prove (2.72).
Proof. This is essentially due to the chain rule for Fréchet derivatives, as already said in Section 2, and we just provide some detail.
It follows that F is Fréchet differentiable in Z := C 0 ([0, T ]; H) × C 0 ([0, T ]; H) and that its Fréchet derivative [DF](ϑ, ϕ) at any point (ϑ, ϕ) ∈ Z acts as follows Therefore, Theorem 5.1 and the chain rule ensure that J is Fréchet differentiable at u * and that its Fréchet derivative [DJ](u * ) at any optimal control u * is specified by where (Θ, Φ) is the solution to the linearized problem corresponding to h. Therefore, (2.72) immediately follows from (2.61). The next step is the proof of Theorem 2.7. As far as existence is concerned, we can derive a basic formal estimate. We take as test functions z = q in (2.76), w = p in (2.77) and add the equalities we obtain. Then, we integrate over (t, T ) using the final conditions (2.78 Therefore, we can apply the Gronwall lemma and deduce that This procedure implies in particular the uniqueness of the solution, due to the linearity of the problem: indeed, we can replace all g i 's in (6.1) by 0 for the difference of two solutions. Moreover, in the light of (6.2) we can compare the terms of (2.76) and (2.77) and deduce the estimate ∂ t q L 2 (0,T ;V ′ ) + ∂ t p + τ ∆∂ t p L 2 (0,T ;W ′ ) ≤ c (6.3) which enables us to recover the full regularity of the solution in (2.73)-(2.75). Therefore, it is clear how to give a rigorous proof based on a Faedo-Galerkin scheme, by choosing a basis of eigenfuntions related to the operator −∆ with Neumann homogeneous boundary conditions (cf. (2.13)). This approximation scheme would provide a sequence {(q n , p n )} of approximating solutions obtained by solving just linear systems of ordinary differential equations. Namely, by performing the above estimates on (q n , p n ) exactly in the same way as we did, and using standard compactness results, one finds a weak limit (q, p) in the topologies associated to (6.2), (6.3) and it is immediately clear that (q, p) is a variational solution of the problem we want to solve. Hence, Theorem 2.7 actually holds.
At this point, we are ready to prove Theorem 2.9 on optimality, i.e., the necessary condition (2.83) for u * to be an optimal control in terms of the solution (q, p) of the adjoint problem (2.76)-(2.78). So, we fix an arbitrary u ∈ U ad and use the variational formulations of both the linearized problem (corresponding to h = u − u * ) and the adjoint problem.
We test (2.66) by q, (2.67) by p, use (2.68), and we take z = −Θ in (2.76) and w = −Φ in (2.77), respectively. Then, we add all the equalities we obtain to each other. Most of the terms cancel out and we infer that As u ∈ U ad is arbitrary, this implies the pointwise inequality (2.83) and the proof of Theorem 2.9 is complete.