1 Introduction

A classical problem in the optimal design of materials consists in finding the optimal arrangement of two materials in the sense that it minimizes a certain cost functional [1, 26, 31]. In this way, assuming that we are dealing with two isotropic conductive materials given by their diffusion constants \(0<\alpha <\beta \), a model problem is given by

$$\begin{aligned} \begin{array}{c}\displaystyle \min _{\omega \subset \Omega \ \hbox {measurable}}\int _\Omega F(x,u)\,dx\\ \displaystyle \left\{ \begin{array}{l}-\textrm{div}\big ((\alpha \chi _\omega +\beta \chi _{\Omega {\setminus }\omega })\nabla u\big )=f\ \hbox { in }\Omega \\ \displaystyle u=0\ \hbox { on }\partial \Omega ,\end{array}\right. \end{array} \end{aligned}$$
(1.1)

where \(\Omega \) is a bounded open set of \(\mathbb R^N\) and f a given source. The control variable corresponds to the measurable set \(\omega \subset \Omega \) where we place the material \(\alpha \) in the mixture. Clearly, we can consider other boundary conditions and more general cost functionals depending for example on the gradient of the solution. It is also usual to add a constraint in the measure of \(\omega \). It means that one of the materials is better than the other one, but it is also more expensive and thus we want to use a limited amount. It is known that this kind of problems has no solution in general [24]. Thus, it is usual to deal with a relaxed formulation, which can be found using the homogenization theory for elliptic linear equations with varying coefficients [1, 23, 25, 26, 28, 30, 31].

Another classical problem in optimal design is when we only have one conductive material, but the open set where the diffusion equation is posed can be freely chosen. Similarly to (1.1), the model problem is given by

$$\begin{aligned} \begin{array}{c}\displaystyle \min _{\omega \subset \Omega \ \hbox { open}}\int _\Omega F(x,u)\,dx\\ \displaystyle \left\{ \begin{array}{l}-\Delta u=f\ \hbox { in }\omega \\ \displaystyle u=0\ \hbox { on }\partial \omega .\end{array}\right. \end{array} \end{aligned}$$
(1.2)

This kind of problems has been studied for example in [4, 5]. Analogously to (1.1), the problem has no solution in general and thus, it is usual to work with a relaxed formulation which can be found using the homogenization theory for Dirichlet linear elliptic problems in varying domains [11, 14,15,16].

Our purpose in the present work is to consider the case, where analogously to (1.1), we look for the optimal distribution of two conductive materials and, similarly to (1.2), we can choose the set where the diffusion equations holds. Adding a restriction on the amounts of the materials used in the mixture, the problem reads as

$$\begin{aligned} \begin{array}{c}\displaystyle \min \int _\Omega F(x,u)\,dx\\ \displaystyle \left\{ \begin{array}{l}-\textrm{div}\big ((\alpha \chi _{\omega ^\alpha }+\beta \chi _{\omega ^\beta })\nabla u\big )=f\ \hbox { in }\omega ^\alpha \cup \omega ^\beta \\ \displaystyle u=0\ \hbox { on }\partial (\omega ^\alpha \cup \omega ^\beta )\\ \displaystyle \omega ^\alpha ,\omega ^\beta \subset \Omega \ \hbox { measurable},\ \omega ^\alpha \cup \omega ^\beta \ \hbox { open, }\ |\omega ^\alpha |\le \kappa ^\alpha ,\ \ |\omega ^\beta |\le \kappa ^\beta , \end{array}\right. \end{array} \end{aligned}$$
(1.3)

with \(\kappa ^\alpha \), \(\kappa ^\beta \) two positive constants. Observe that assuming \(\kappa ^\alpha \) or \(\kappa ^\beta \) bigger than \(|\Omega |\) is equivalent to assume that there is no restriction on the amount of the corresponding material. As we commented above for problems (1.1) and (1.2), it is better to work with a relaxed formulation.

The paper is organized as follows:

In Sect. 2 we get the relaxed formulation for (1.3) mentioned above. It will be obtained as a consequence of the results proved in [17]. In this paper we carry out the homogenization of Dirichlet linear elliptic problems where both the coefficients and the open sets where the equations are posed vary (see also [8] for nonlinear problems). For completeness, we recall at the beginning of this section the results on homogenization theory that we will need. Our main result proves that a relaxed formulation of (1.3) is given by problem (2.18) below. In the corresponding state equation, the diffusion term \(-\textrm{div}\big ((\alpha \chi _{\omega ^\alpha }+\beta \chi _{\omega ^\beta })\nabla u\big )\) is replaced by \(-\textrm{div} (A\nabla u)\), where the matrix function A corresponds to a homogenized material obtained as a microscopic mixture of \(\alpha \) and \(\beta \) with proportions \(\theta \) and \(1-\theta \). Moreover, in (2.18), instead of a homogeneous Dirichlet problem in the open set \(\omega ^\alpha \cup \omega ^\beta \), we have a homogeneous Dirichlet problem in the whole open set \(\Omega \). This new equation contains a zero order term \(\mu u\), with \(\mu \) a nonnegative Borel measure vanishing on the sets of null capacity. It is the “strange term” in the Cioranescu–Murat terminology, [14]. Equation (1.3) is a particular case of (2.18) corresponding to \(\mu =\infty \chi _{\Omega {\setminus } (\omega ^\alpha \cup \omega ^\beta )}\).

In Sect. 3 we get a system of optimality conditions for the relaxed formulation (2.18) of problem (1.3). As a consequence we get Theorem 3.2 which proves that if F is concave in the second variable then, the optimal measure \(\mu \) can be chosen as \(\infty \chi _E\) for some quasi-closed set \(E\subset \Omega \).

Section 4 is devoted to the numerical resolution of problem (2.18). For this purpose, we introduce the approximation of this problem given by (4.1). Essentially the idea is to replace the nonnegative measure \(\mu \) in (2.18) which can take the value \(+\infty \) in arbitrary subsets of \(\Omega \) by a function, still denoted by \(\mu \), in \(L^\infty (\Omega ;[0,n])\), with n large (see also [6, 7]). In order to get the existence of solution, we also need to conveniently adapt the volume constraints in (2.18). Theorem 4.1 proves the convergence of the solutions of (4.1) to those of (2.18) when n goes to infinity. With respect to the numerical computation of (4.1) we propose an algorithm based on the gradient descent method adapted to our problem. The minimization of the corresponding derivative uses the Uzawa method to deal with the volume constraints combined with Proposition 4.2, which provides an explicit solution of this minimization problem once the corresponding Lagrange multipliers are known. We finish the section with some numerical experiments.

As a first example we consider the maximization of the potential energy, i.e. \(F(x,u)=-u\). It is a classical example in the case where either the coefficients or the set where the equation is posed vary [5, 20, 26]. Taking into account the invariance by rotations of the problem, we take a particular choice of the volume constraints \(\kappa ^\alpha \) and \(\kappa ^\beta \) in (1.3) in such a way that the solution is unique and explicitly known. We show that our algorithm provides a good approximation of such solution which, as expected, is better when n increases. We also consider the case where the amount of both materials is big enough to fulfill the whole of \(\Omega \). Then, the solution must agree with the classical one in which the equation is posed in a fixed domain (see [1, 10, 19, 22]). This is corroborated by the results that we find.

In the second example we consider a case that has been studied in [7] when only a material is available. In the results obtained in [7], the volume constraint is not saturated. The optimal domain obtained by our algorithm agrees with the one obtained in this paper. It also provides the distribution of the materials \(\alpha ,\beta \) in this domain.

To finish this introduction we refer to [1,2,3, 19, 20, 27, 29] for other algorithms used in the resolution of optimal design problems related to the one studied here.

2 Statement of the problem and relaxed formulation

We consider a bounded open set \(\Omega \subset \mathbb R^N\), a distribution \(f\in H^{-1}(\Omega )\) and a function \(F:\Omega \times \mathbb R\rightarrow \mathbb R\) satisfying

$$\begin{aligned} & F(\cdot ,s)\ \hbox { is measurable in }\Omega ,\ \forall \,s\in \mathbb R, \end{aligned}$$
(2.1)
$$\begin{aligned} & F(x,\cdot )\ \hbox { is continuous in }\mathbb R,\ \hbox { a.e. }x\in \Omega , \end{aligned}$$
(2.2)
$$\begin{aligned} & \exists \,r\in L^1(\Omega ),\ \gamma >0,\ \hbox { such that } |F(x,s)|\le r(x)+\gamma |s|^2,\quad \forall \,s\in \mathbb R,\ \hbox { a.e. }x\in \Omega .\nonumber \\ \end{aligned}$$
(2.3)

For four positive constants \(\alpha ,\beta ,\kappa ^\alpha ,\kappa ^\beta \), with \(\alpha <\beta \), we are interested in the optimal design problem

$$\begin{aligned} \begin{array}{c}\displaystyle \min \int _\Omega F(x,u)\,dx\\ \left\{ \begin{array}{l} -\textrm{div}\big (\big (\alpha \chi _{\omega ^\alpha }+\beta \chi _{\omega ^\beta }\big )\nabla u\big )=f\ \hbox { in }\omega ^\alpha \cup \omega ^\beta \\ \displaystyle u=0\ \hbox { on }\overline{\Omega }{\setminus } (\omega ^\alpha \cup \omega ^\beta )\\ \displaystyle \omega ^\alpha ,\omega ^\beta \subset \Omega \hbox { measurable,}\ \omega ^\alpha \cup \omega ^\beta \ \hbox {open},\ | \omega ^\alpha |\le \kappa ^\alpha ,\ |\omega ^\beta |\le \kappa ^\beta ,\ |\omega ^\alpha \cap \omega ^\beta |=0. \\ \end{array}\right. \end{array} \end{aligned}$$
(2.4)

From the application point of view, it can be interpreted in the following way. The constants \(\alpha ,\beta \) represent the diffusion coefficients of two conductive materials (electric or thermical). Using these materials we consider a mixture of them consisting in taking the material \(\alpha \) in a certain measurable subset \(\omega ^\alpha \subset \Omega \), and the material \(\beta \) in another measurable set \(\omega ^\beta \subset \Omega \). Our problem is to choose these sets in such a way that the temperature or the electric potential u in \(\omega ^\alpha \cup \omega ^\beta \) minimizes the functional

$$\begin{aligned} u\mapsto \int _\Omega F(x,u)\,dx. \end{aligned}$$

The amount of the materials \(\alpha \) and \(\beta \) are limited by \(\kappa ^\alpha \) and \(\kappa ^\beta \) respectively. Observe that \(\kappa ^\alpha \ge |\Omega |\) or \(\kappa ^\beta \ge |\Omega |\) means that no restriction on the amount of the corresponding material is imposed.

Problem (2.4) has been widely studied in the case where \(\omega ^\alpha \cup \omega ^\beta =\Omega \) or the case \(\alpha =\beta \). In the first case [1, 9, 10, 12, 19, 20, 22, 24, 26] the problem is to distribute two materials in a given set in an optimal way. In the second one [2, 4,5,6,7] we only dispose of one material and the problem is to get an optimal shape \(\omega \) containing such material. The novelty in the present work is to combine these two problems.

From the above references, we know that problem (2.4) has no solution in general. Therefore, it is necessary to work with a relaxed formulation, which is usually obtained using the homogenization theory. We recall the main tools we need of such theory in order to get this formulation. We start with the following theorem

Theorem 2.1

Let \(\Omega \subset \mathbb R^N\) be a bounded open set, and \(A_n\in L^\infty (\Omega )^{N\times N}\) a sequence of symmetric matrix functions such that there exist \(\alpha ,\beta >0\) satisfying

$$\begin{aligned} \alpha |\xi |^2\le A_n(x)\xi \cdot \xi \le \beta |\xi |^2,\quad \forall \, \xi \in \mathbb R^N,\ \hbox { a.e. }x\in \Omega . \end{aligned}$$
(2.5)

Then, for a subsequence of n, still denoted by n, there exists a symmetric matrix function \(A\in L^\infty (\Omega )^{N\times N}\), which also satisfies (2.5), such that for every \(f\in H^{-1}(\Omega )\), the solution \(u_n\) of

$$\begin{aligned} \left\{ \begin{array}{l}\displaystyle -\textrm{div}(A_n\nabla u_n)=f\ \hbox { in }\Omega \\ \displaystyle u_n\in H^1_0(\Omega ),\end{array}\right. \end{aligned}$$

satisfies

$$\begin{aligned} u_n\rightharpoonup u\ \hbox { in }H^1_0(\Omega ),\qquad A_n\nabla u_n\rightharpoonup A\nabla u\ \hbox { in }L^2(\Omega )^N, \end{aligned}$$

with u the solution of

$$\begin{aligned} \left\{ \begin{array}{l}\displaystyle -\textrm{div}(A\nabla u)=f\ \hbox { in }\Omega \\ \displaystyle u\in H^1_0(\Omega ).\end{array}\right. \end{aligned}$$

We say that \(A_n\) H-converges to A and we write \(A_n{\mathop {\rightharpoonup }\limits ^{H}}A\).

Remark 2.2

More generally, in the definition of H-convergence it is not necessary to assume \(A_n\) symmetric. The classical result for the H-convergence proved by Murat and Tartar [25, 31] also provides a corrector for \(\nabla u_n\), i.e. an approximation in the strong topology of \(L^2(\Omega )^N\) which we will not need here. The version given in Theorem 2.1 was previously obtained by S. Spagnolo in [28] who used the denomination of G-convergence instead of H-convergence.

Theorem 2.1 describes the asymptotic behavior of a sequence of elliptic equations where the coefficients vary. More generally, we are interested in the case where the open set \(\Omega \) also varies. This is given by Theorem 2.7 below due to Dal Maso and Murat [17]. We also refer to [14, 15] and [16] for the case where \(\Omega \) varies but \(A_n\) is independent of n, and to [8, 11] to some extensions for nonlinear problems. In order to state Theorem 2.7 we need to recall some results about the capacity.

Definition 2.3

For a bounded open set \(\Omega \subset \mathbb R^N\) and \(E\subset \Omega \), we define the capacity of E in \(\Omega \) as

$$\begin{aligned} \textrm{Cap}(E,\Omega ):=\inf \left\{ \int _\Omega |\nabla \varphi |^2dx:\ \varphi \in H^1_0(\Omega ),\ \varphi \ge 1\ \hbox { a.e. in a neighbourhood of }E\right\} . \end{aligned}$$

Some of the main properties of the capacity are given in the following remark (see e.g. [18])

Remark 2.4

As a function of E, the capacity is an outer measure over the class of subsets of \(\Omega \). Although the definition of capacity depends on \(\Omega \), for every bounded open sets \(\Omega _1,\Omega _2\subset \mathbb R^N\) and every \(E\subset \Omega _1\cap \Omega _2\), we have

$$\begin{aligned} \textrm{Cap}(E,\Omega _1)=0\iff \textrm{Cap}(E,\Omega _2)=0, \end{aligned}$$

and therefore the sets of null capacity do not depend on \(\Omega \).

Every set \(E\subset \mathbb R^N\) with null capacity has Hausdorff dimension at most \(N-2\) and conversely, every set E with finite \((N-2)\)-Hausdorff measure has null capacity.

We will say that a property holds quasi-everywhere (q.e.) if it holds up to a set of null capacity.

Every function \(u\in H^1(\Omega )\) has a representative which is defined q.e. in \(\Omega \).

Definition 2.5

A set \(U\subset \Omega \) is said to be quasi-open if for every \(\varepsilon >0\), there exists \(G\subset \Omega \) open such that \(\textrm{Cap}(U\Delta G,\Omega )<\varepsilon \). The complementary in \(\Omega \) of a quasi-open set U is said to be quasi-closed.

We define \({{\mathcal {M}}}_0(\Omega )\) as the set of non-negative Borel measures which vanish on the null-capacity sets of \(\Omega \) and satisfy

$$\begin{aligned} \mu (E)=\inf \Big \{\mu (U):\ E\subset U,\ U \hbox { quasi-open}\Big \}. \end{aligned}$$

Remark 2.6

The elements \(\mu \) of \({{\mathcal {M}}}_0(\Omega )\) are not necessarily Radon measures, i.e. it can exist a compact set \(K\subset \Omega \) such that \(\mu (K)=\infty .\) For every measure \(\mu \in {{\mathcal {M}}}_0(\Omega )\), there exists a unique quasi-closed set \({{\mathcal {C}}}_\mu \) such that

$$\begin{aligned} \mu =\infty _{{{\mathcal {C}}}_\mu }\ \hbox { in }{{\mathcal {C}}}_\mu ,\qquad \mu \ \hbox { is }\sigma \hbox {-finite in }\Omega {\setminus } {{\mathcal {C}}}_\mu , \end{aligned}$$

where \(\infty _{{{\mathcal {C}}}_\mu }\) is the measure in \({{\mathcal {M}}}_0(\Omega )\) defined as

$$\begin{aligned} \infty _{{{\mathcal {C}}}_\mu }(E)=\left\{ \begin{array}{ll} \infty & \hbox { if }\textrm{Cap}(E\cap {{\mathcal {C}}}_\mu ,\Omega )>0\\ \displaystyle 0 & \hbox { if }\textrm{Cap}(E\cap {{\mathcal {C}}}_\mu ,\Omega )=0.\end{array}\right. \end{aligned}$$

Recalling that by Remark 2.4, the functions in \(H^1(\Omega )\) are well defined for the elements of \({{\mathcal {M}}}_0(\Omega )\), we get that for every open set \(\omega \subset \Omega \), every \(A\in L^\infty (\omega )^{N\times N}\) uniformly elliptic and every \(f\in H^{-1}(\Omega )\), the problem

$$\begin{aligned} \left\{ \begin{array}{l}\displaystyle -\textrm{div}(A\nabla u)=f\ \hbox { in }\omega \\ \displaystyle u\in H^1_0(\omega ),\end{array}\right. \end{aligned}$$

is equivalent to

$$\begin{aligned} \left\{ \begin{array}{l}\displaystyle u\in H^1_0(\Omega )\cap L^2_\mu (\Omega )\\ \displaystyle \int _\Omega A\nabla u\cdot \nabla v\,dx+\int _\Omega uv\,d\mu =\langle f,v\rangle ,\quad \forall \, v\in H^1_0(\Omega )\cap L^2_\mu (\Omega ),\end{array}\right. \end{aligned}$$
(2.6)

with \(\mu =\infty _{\Omega {\setminus }\omega }\). For a general measure \(\mu \in {{\mathcal {M}}}_0(\Omega )\), we usually write (2.6) as

$$\begin{aligned} \left\{ \begin{array}{l}\displaystyle -\textrm{div}(A\nabla u)+\mu u=f\ \hbox { in }\Omega \\ \displaystyle u\in H^1_0(\Omega )\cap L^2_\mu (\Omega ).\end{array}\right. \end{aligned}$$
(2.7)

Remark that the equation is not necessarily satisfied in the distributions sense because the set of test functions in (2.6) does not contain in general the set \(C^\infty _c(\Omega )\).

The following result is due to G. Dal Maso and F. Murat, [17]. Similarly to Theorem 2.1 this paper also contains a corrector result but we will not need it in the following. Moreover it holds for matrices \(A_n\) not necessarily symmetric.

Theorem 2.7

Assume \(\Omega \subset \mathbb R^N\) a bounded open set, \(A_n\in L^\infty (\Omega )^{N\times N}\) symmetric, which satisfies (2.5) and \(\mu _n\in {{\mathcal {M}}}_0(\Omega )\). Then, for a subsequence of n still denoted by n, there exits a symmetric matrix \(A\in L^\infty (\Omega )^{N\times N}\) and a measure \(\mu \in {{\mathcal {M}}}_0(\Omega )\) such that \(A_n\) H-converges to A and for every \(f\in H^{-1}(\Omega )\) the sequence of solutions of

$$\begin{aligned} \left\{ \begin{array}{l}\displaystyle -\textrm{div}(A_n\nabla u_n)+\mu _n u_n=f\ \hbox { in }\Omega \\ \displaystyle u_n\in H^1_0(\Omega )\cap L^2_{\mu _n}(\Omega )\end{array}\right. \end{aligned}$$
(2.8)

converges weakly in \(H^1_0(\Omega )\) to the unique solution of (2.7). We will write

$$\begin{aligned} (A_n,\mu _n){\mathop {\rightharpoonup }\limits ^{H\gamma }}(A,\mu ). \end{aligned}$$
(2.9)

Remark 2.8

Taking in particular \(\mu _n=\infty _{\Omega _n}\) with \(\Omega _n\) a sequence of open sets contained in \(\Omega \), Theorem 2.7 provides the limit equation of a sequence of elliptic problems with homogeneous Dirichlet conditions with varying coefficients and domains.

In the present work we are interested in the case of a two-phase material. In this case A is obtained as the mixture of two isotropic materials \(A=\alpha \chi _\omega +\beta \chi _{\Omega {\setminus }\omega }\) with \(\omega \) a measurable subset of \(\Omega \) and \(0<\alpha <\beta \), the diffusion constants of each material. It is well known [1, 26, 28, 31] that this set is not closed for the H-convergence. Thus, it is interesting to replace it by its H-closure, which provides the set of materials obtained by mixing \(\alpha \) and \(\beta \) microscopically. To describe this set we introduce

Definition 2.9

For \(p\in [0,1]\), we denote by \(m^-(p)\) and \(m^+(p)\) the harmonic and arithmetic mean values of \(\alpha \) and \(\beta \) with proportions p and \(1-p\) respectively, i.e.

$$\begin{aligned} m^-(p)=\left( {p\over \alpha }+{1-p\over \beta }\right) ^{-1},\qquad m^+(p)=p\alpha +(1-p)\beta . \end{aligned}$$
(2.10)

We also define K(p) as the set of symmetric matrices \(M\in \mathbb R^{N\times N}\) such that their eigenvalues \(\lambda _1\le \cdots \le \lambda _N\) satisfy

$$\begin{aligned} \left\{ \begin{array}{l}\displaystyle m^-(p)\le \lambda _i\le m^+(p),\ 1\le i\le N\\ \displaystyle \sum _{i=1}^N{1\over \lambda _i-\alpha }\le {1\over m^-(p)-\alpha }+{N-1\over m^+(p)-\alpha }\\ \displaystyle \sum _{i=1}^N{1\over \beta -\lambda _i}\le {1\over \beta -m^-(p)}+{N-1\over \beta -m^+(p)}.\end{array}\right. \end{aligned}$$
(2.11)

The following result has been proved in [23] (for \(N=2\)) and [30].

Theorem 2.10

Assume \(\Omega \subset \mathbb R^N\) a bounded open set and \(A\in L^\infty (\Omega )^{N\times N}\). Then, there exist \(\theta \in L^\infty (\Omega ;[0,1])\) and a sequence of measurable sets \(\omega _n\subset \Omega \) such that

$$\begin{aligned} \chi _{\omega _n}{\mathop {\rightharpoonup }\limits ^{*}}\theta \ \hbox { in }L^\infty (\Omega ),\qquad \big (\alpha \chi _{\omega _n}+\beta \chi _{\Omega {\setminus }\omega _n}\big )I{\mathop {\rightharpoonup }\limits ^{H}}A, \end{aligned}$$

if and only if \(A\in K(\theta )\) a.e. in \(\Omega \).

Remark 2.11

In the previous result, the function \(\theta \) represents the proportion of the material \(\alpha \) that we are using in the mixture. For our purpose, it would be sufficient to work with the set

$$\begin{aligned} K(p)\xi :=\big \{M\xi : M\in K(p)\big \}= B\Big ({m^+(p)+m^-(p)\over 2}\xi ,{m^+(p)-m^-(p)\over 2}|\xi |\Big ),\quad \forall \, \xi \in \mathbb R^N, \end{aligned}$$

where B(xr) denotes the ball in \(\mathbb R^N\) of center x and radius \(r>0\).

Having in mind problem (2.4), the following adaptation of Theorem 2.7 is more convenient.

Theorem 2.12

Assume \(\Omega \subset \mathbb R^N\) a bounded open set, \(\mu _n\in \mathcal{M}_0(\Omega )\), \(\theta _n^\alpha ,\theta _n^\beta \in L^\infty (\Omega ;[0,1])\), and \(A_n\in L^\infty (\Omega {\setminus } \mathcal{C}_{\mu _n})^{N\times N}\) such that

$$\begin{aligned} \theta _n^\alpha +\theta _n^\beta \le 1\ \hbox { a.e. in }\Omega ,\quad \theta _n^\alpha +\theta _n^\beta =1\ \hbox { a.e. in }\Omega {\setminus } \mathcal{C}_{\mu _n},\quad A_n\in K(\theta _n^\alpha )\ \hbox { a.e. in }\Omega {\setminus } \mathcal{C}_{\mu _n}.\qquad \end{aligned}$$
(2.12)

Then, there exist a subsequence of n, still denoted by n, \(\mu \in \mathcal{M}_0(\Omega )\), \(\theta ^\alpha ,\theta ^\beta \in L^\infty (\Omega ,[0,1])\), and \(A\in L^\infty (\Omega {\setminus } \mathcal{C}_\mu )^{N\times N}\), satisfying

$$\begin{aligned} \theta ^\alpha +\theta ^\beta \le 1\ \hbox { a.e. in }\Omega ,\quad \theta ^\alpha +\theta ^\beta =1\ \hbox { a.e. in }\Omega {\setminus }\mathcal{C}_\mu ,\quad A\in K(\theta ^\alpha )\ \hbox { a.e. in }\Omega {\setminus }\mathcal{C}_\mu ,\qquad \end{aligned}$$
(2.13)

such that

$$\begin{aligned} \theta ^\alpha _n{\mathop {\rightharpoonup }\limits ^{*}}\theta ^\alpha ,\quad \theta ^\beta _n{\mathop {\rightharpoonup }\limits ^{*}}\theta ^\beta \qquad \hbox {in }L^\infty (\Omega ), \end{aligned}$$
(2.14)

and such that for every \(f\in H^{-1}(\Omega )\), the sequence of solutions \(u_n\) of (2.8) converges weakly in \(H^1_0(\Omega )\) to the solution u of (2.7).

Proof

Taking a subsequence of n, we can assume that there exist \(\theta ^\alpha \), \(\theta ^\beta \) satisfying (2.14), such that \(\theta ^\alpha +\theta ^\beta \le 1\) a.e. in \(\Omega \).

Let \(w_n\) be the solution of

$$\begin{aligned} \left\{ \begin{array}{l} -\Delta w_n+\mu _n w_n=1\ \hbox { in }\Omega \\ \displaystyle w_n\in H^1_0(\Omega )\cap L^2_{\mu _n}(\Omega ). \end{array}\right. \end{aligned}$$

From [16], there exist a subsequence of n, still denoted by n, \(w\in H^1_0(\Omega )\cap L^\infty (\Omega )\) and \(\hat{\mu }\in \mathcal{M}_0(\Omega )\), such that \(w>0\) q.e. in \(\Omega {\setminus }\mathcal{C}_{\hat{\mu }}\), \(w=0\) q.e. in \( \mathcal{C}_{\hat{\mu }}\), and \(w_n\) converges weakly to w in \(H^1_0(\Omega )\) and weakly-\(*\) in \(L^\infty (\Omega )\). By the Rellich–Kondrachov theorem we can pass to the limit in

$$\begin{aligned} \int _\Omega w_n\varphi \,dx=\int _\Omega (\theta _n^\alpha +\theta _n^\beta )w_n\varphi \,dx,\quad \forall \, \varphi \in L^1(\Omega ), \end{aligned}$$

in order to obtain

$$\begin{aligned} \int _\Omega w\varphi \,dx=\int _\Omega (\theta ^\alpha +\theta ^\beta )w\varphi \,dx,\quad \forall \, \varphi \in L^1(\Omega ), \end{aligned}$$

and then that \(\theta ^\alpha +\theta ^\beta =1\) a.e. in \(\Omega {\setminus } \mathcal{C}_{\hat{\mu }}\).

Now, for \(\hat{\theta }_n=1-\theta _n^\beta \) and \({\hat{A}}_n\in L^\infty (\Omega )^{N\times N}\), with \({\hat{A}}_n\in K(\hat{\theta }_n)\) a.e. in \(\Omega \), defined as

$$\begin{aligned} {\hat{A}}_n=A_n\ \hbox { in }\Omega {\setminus } \mathcal{C}_{\mu _n}, \quad {\hat{A}}_n=m^+(\hat{\theta }_n)(I-e_N\otimes e_N)+m^-(\hat{\theta }_n)e_N\otimes e_N\ \hbox { in }\mathcal{C}_{\mu _n}, \end{aligned}$$

with \(e_N\) the last vector of the canonical basis in \(\mathbb R^N\), we apply Theorem 2.7 combined to

$$\begin{aligned} H^1_0(\Omega )\cap L^2_{\mu _n}(\Omega )\subset \big \{u_n\in H^1_0(\Omega ):\ u_n=0\ \hbox { q.e. in }\mathcal{C}_{\mu _n}\big \}, \end{aligned}$$

to deduce that, up to a subsequence, there exist \(A,\mu \) such that for every \(f\in H^{-1}(\Omega )\) the solution \(u_n\) of (2.8) converges weakly in \(H^1_0(\Omega )\) to the solution u of (2.7). By [11], it is known that there exist \(c,C>0\) such that

$$\begin{aligned} c\hat{\mu }\le \mu \le C\hat{\mu }\ \hbox { in }\Omega , \end{aligned}$$

and thus \(\mathcal{C}_\mu =\mathcal{C}_{\hat{\mu }}\). Moreover, by Theorem 2.10, we also have that \(A\in K(\hat{\theta })\) a.e. in \(\Omega \), with \(\hat{\theta }\) the limit of \(\hat{\theta }_n\) in the weak-\(*\) topology of \(L^\infty (\Omega )\). On the other hand, taking \(\varphi \in L^1(\Omega )\), we can pass to the limit in

$$\begin{aligned} \int _\Omega \hat{\theta }_n w_n\varphi \,dx=\int _\Omega \theta _n^\alpha w_n\varphi \,dx \end{aligned}$$

to get

$$\begin{aligned} \int _\Omega \hat{\theta } w\varphi \,dx=\int _\Omega \theta ^\alpha w\varphi \,dx. \end{aligned}$$

This proves that \(\hat{\theta }=\theta ^\alpha \) a.e. in \(\Omega {\setminus } \mathcal{C}_\mu \), and \(A\in K(\theta ^\alpha )\) a.e. in \(\Omega {\setminus }\mathcal{C}_\mu \). \(\square \)

Taking into account Theorem 2.12 we can now prove

Theorem 2.13

Under the assumptions at the beginning of this section, a relaxed formulation of (2.4) is given by

$$\begin{aligned} \begin{array}{c} \displaystyle \min \int _\Omega F(x,u)dx\\ \displaystyle \left\{ \begin{array}{l} -\textrm{div}(A\nabla u)+\mu u=f\ \hbox { in }\Omega ,\quad u\in H^1_0(\Omega )\cap L^2_{\mu }(\Omega )\\ \displaystyle \mu \in \mathcal{M}_0(\Omega ),\quad \theta ^\alpha , \theta ^\beta \in L^\infty (\Omega ;[0,1]),\quad A\in K(\theta ^\alpha )\hbox { a.e. in }\Omega {\setminus }\mathcal{C}_\mu \\ \displaystyle \theta ^\alpha +\theta ^\beta =1\ \hbox { a.e. in }\Omega {\setminus } \mathcal{C}_\mu ,\ \theta ^\alpha +\theta ^\beta \le 1\ \hbox { in }\Omega ,\ \int _\Omega \theta ^\alpha dx\le \kappa ^\alpha ,\ \int _\Omega \theta ^\beta \le \kappa ^\beta .\end{array}\right. \end{array} \end{aligned}$$
(2.15)

Proof

Taking into account Theorem 2.12 and Rellich–Kondrachov’s theorem, the direct method of the Calculus of Variations immediately proves the existence of a solution for (2.15). Now, we observe that the controls in (2.4) belong to the set of controls in (2.15) and that the functional in (2.15) only depends on u and it is sequentially continuous for the weak topology in \(H^1_0(\Omega )\). By means of these remarks, in order to finish the proof of the theorem, it is enough to show that for every control \((\theta ^\alpha ,\theta ^\beta ,A,\mu )\) satisfying the constraints in (2.15) there exists two sequences of measurable sets \(\omega ^\alpha _n\), \(\omega ^\beta _n\) satisfying the constraints in (2.4) such that the sequence of solutions \(u_n\) of

$$\begin{aligned} \left\{ \begin{array}{l} -\textrm{div}\big (\big (\alpha \chi _{\omega ^\alpha _n}+\beta \chi _{\omega ^\beta _n}\big )\nabla u_n\big )=f\ \hbox { in }\omega ^\alpha _n\cup \omega ^\beta _n\\ \displaystyle u_n=0\ \hbox { on }\overline{\Omega }{\setminus } (\omega ^\alpha _n\cup \omega ^\beta _n)\end{array}\right. \end{aligned}$$
(2.16)

converges weakly in \(H^1_0(\Omega )\) to the solution u of

$$\begin{aligned} \left\{ \begin{array}{l} -\textrm{div}\big (A\nabla u\big )+\mu u=f\ \hbox { in }\Omega \\ \displaystyle u\in H^1_0(\Omega )\cap L^2_{\mu }(\Omega ),\end{array}\right. \end{aligned}$$
(2.17)

and

$$\begin{aligned} \chi _{\omega _n^\alpha }{\mathop {\rightharpoonup }\limits ^{*}}\theta ^\alpha \quad \chi _{\omega _n^\beta }{\mathop {\rightharpoonup }\limits ^{*}}\theta ^\beta ,\quad \hbox { in }L^\infty (\Omega ). \end{aligned}$$

First, we consider the case where \(\mu \) belongs to \(L^\infty (\Omega )\) and A is of the form \(A=(\alpha \chi _{\omega ^\alpha }+\beta \chi _{\omega ^\beta })I\) with \(|\omega ^\alpha |\le \kappa ^\alpha \), \(|\omega ^\beta |\le \kappa ^{\beta }\). Then, using the classical construction by D. Cioranescu and F. Murat [14] we can build a sequence of holes \(Q_n\subset \Omega \) such that \(\omega _n^\alpha =\omega ^\alpha {\setminus } Q_n\), \(\omega _n^\beta =\omega ^\beta {\setminus } Q_n\) meets the required conditions.

Second, we consider the case where \(\mu \) is in \(L^\infty (\Omega )\) and A is an arbitrary measurable function with values in \(K(\theta ^\alpha )\). Then, Theorem 2.10 allows us to approximate the solution of (2.17) by the solutions of

$$\begin{aligned} \left\{ \begin{array}{l} -\textrm{div}\big (\big (\alpha \chi _{\tilde{\omega }^\alpha _n}+\beta \chi _{\tilde{\omega }^\beta _n}\big )\nabla u_n\big )+\mu u_n=f\ \hbox { in }\tilde{\omega }^\alpha _n\cup \tilde{\omega }^\beta _n\\ \displaystyle u_n=0\ \hbox { on }\overline{\Omega }{\setminus } (\tilde{\omega }^\alpha _n\cup \tilde{\omega }^\beta _n),\end{array}\right. \end{aligned}$$

where \(\tilde{\omega }^\alpha _n\), \(\tilde{\omega }_n^\beta \) satisfy the restrictions in (2.4). This allows us to use the previous case to finish the proof.

Third, we assume that \(\mu \) is in \(H^{-1}(\Omega )\). In this case, the density of \(L^\infty (\Omega )\) in \(H^{-1}(\Omega )\) and the second case give the result.

Fourth, we consider the case where \(\theta ^\alpha +\theta ^\beta =1\) a.e. in \(\Omega \). Then, we know by [16] that there exist a nonnegative bounded measure \(\nu \in H^{-1}(\Omega )\) and a non-negative \(\mu \)-measurable function g finite \(\mu \)-a.e. in \(\Omega \) such that \(\mu =g\nu +\infty _{\mathcal{C}_\mu }\). Replacing \(\mu \) by \(T_n(g)\nu +n\chi _{\mathcal{C}_\mu }\) where \(T_n\) denotes the usual truncation at the height \(n\in \mathbb N\), taking the limit when n tends to infinity, and using the third case we get the result.

For the general case, \(\theta ^\alpha +\theta ^\beta \le 1\) a.e. in \(\Omega \), we use that the fourth case provides two sequences \( \omega _n^\alpha \) and \( \omega _n^\beta \) satisfying the required conditions for \(\tilde{\theta }^\beta \) replaced by \(1-\theta ^\alpha \). On the other hand, it is well known that there exits a sequence of measurable sets \(\tilde{\omega }_n^\beta \subset \mathcal{C}_\mu \) such that

$$\begin{aligned} \chi _{\tilde{\omega }_n^\beta }{\mathop {\rightharpoonup }\limits ^{*}}\theta ^\beta \ \hbox { in }L^\infty (\mathcal{C}_\mu ),\quad |\tilde{\omega }_n^\beta |\le \int _{\mathcal{C}_\mu }\theta ^\beta \,dx. \end{aligned}$$

Replacing \(\omega _n^\beta \) by \((\omega _n^\beta {\setminus } \mathcal{C}_\mu )\cup \tilde{\omega }_n^\beta \) and taking into account that this does not change the solution of (2.16) we finish the proof. \(\square \)

Remark 2.14

Since in (2.15) we only need to know the values of the matrix function A in the direction of \(\nabla u\), we can replace the condition \(A\in K(\theta ^\alpha )\) a.e. in \(\Omega {\setminus } \mathcal{C}_\mu \) by

$$\begin{aligned} \textrm{Sp}(A)\subset \big [m^-(\theta ^\alpha ),m^+(\theta ^\alpha )\big ]\ \hbox { a.e. in }\Omega {\setminus } \mathcal{C}_\mu , \end{aligned}$$

with \(\textrm{Sp}(A)\) the spectrum of A. Moreover, replacing \(\theta ^\alpha \) and \(\theta ^\beta \) in (2.15) by \(\theta ^\alpha \chi _{\Omega {\setminus } \mathcal{C}_\mu }\) and \(\theta ^\beta \chi _{\Omega {\setminus } \mathcal{C}_\mu }\), which does not change the solution of the state equation, we can assume that \(\theta ^\alpha \) and \(\theta ^\beta \) vanish on \(\mathcal{C}_\mu \), and then that they are only defined in \(\Omega {\setminus } \mathcal{C}_\mu \). In the same way, we can also assume that A is only defined in \(\Omega {\setminus }\mathcal{C}_\mu \).

With these observations, problem (2.15) can be replaced by

$$\begin{aligned} \begin{array}{c}\displaystyle \min \int _\Omega F(x,u)dx\\ \displaystyle \left\{ \begin{array}{l} -\textrm{div}(A\nabla u)+\mu u=f\ \hbox { in }\Omega ,\quad u\in H^1_0(\Omega )\cap L^2_{\mu }(\Omega )\\ \displaystyle \mu \in \mathcal{M}_0(\Omega ),\quad \theta ^\alpha \in L^\infty (\Omega {\setminus } \mathcal{C}_\mu ;[0,1]),\quad A\in L^\infty (\Omega {\setminus }\mathcal{C}_\mu )^{N\times N}\ \hbox { symmetric}\\ \displaystyle \textrm{Sp}(A)\subset [m^-(\theta ^\alpha ),m^+(\theta ^\alpha )]\hbox { a.e. in }\Omega {\setminus }\mathcal{C}_\mu ,\quad |\Omega {\setminus } \mathcal{C}_\mu |-\kappa ^\beta \le \int _{\Omega {\setminus } \mathcal{C}_\mu }\theta ^\alpha dx\le \kappa ^\alpha .\end{array}\right. \end{array} \end{aligned}$$
(2.18)

3 Optimality conditions

In the present section, assuming further regularity on F, we provide a system of optimality conditions for the solutions of (2.18). Namely, we assume that F satisfies (2.1) and

$$\begin{aligned} & F(\cdot ,0)\in L^1(\Omega ),\end{aligned}$$
(3.1)
$$\begin{aligned} & \left\{ \begin{array}{l} F(x,\cdot )\in C^1(\mathbb R),\ \hbox { a.e. }x\in \Omega \\ \displaystyle \exists k\in L^2(\Omega ),\ k\ge 0,\ \lambda \in \mathbb R,\ \lambda \ge 0\\ \displaystyle \qquad |\partial _sF(x,s)|\le k(x)+\lambda |s|,\quad \forall \, s\in \mathbb R,\hbox { a.e. }x\in \Omega .\end{array}\right. \end{aligned}$$
(3.2)

Observe that (3.1) and (3.2) imply (2.2) and (2.3). We have

Theorem 3.1

Assume \(\Omega \subset \mathbb R^N\) a bounded open set, \(F:\Omega \times \mathbb R\rightarrow \mathbb R\) satisfying (2.1), (3.1) and (3.2), \(\alpha ,\beta ,\kappa ^\alpha ,\kappa ^\beta >0\), \(\alpha <\beta \), and \((\hat{\theta }^\alpha ,{\hat{A}},\hat{\mu })\) a solution of (2.18). Then, if \({\hat{u}}\) is the corresponding state function, and \({\hat{q}}\) is the adjoint state, solution of

$$\begin{aligned} \left\{ \begin{array}{l}\displaystyle -\textrm{div}({\hat{A}}\nabla {\hat{q}})+\hat{\mu }{\hat{q}}=\partial _sF(x,{\hat{u}})\ \hbox { in }\Omega \\ \displaystyle {\hat{q}}\in H^1_0(\Omega )\cap L^2_{\hat{\mu }}(\Omega ),\end{array}\right. \end{aligned}$$
(3.3)

we have

$$\begin{aligned} & {\hat{u}}{\hat{q}}\le 0\ \hbox { q.e. in }\Omega ,\quad {\hat{u}}{\hat{q}}=0 \ \ \hat{\mu }\hbox {-a.e. in }\Omega ,\end{aligned}$$
(3.4)
$$\begin{aligned} & \left\{ \begin{array}{l}\displaystyle {\hat{A}}\nabla {\hat{u}}={m^+(\hat{\theta }^\alpha )+m^-(\hat{\theta }^\alpha )\over 2}\nabla {\hat{u}}+{m^+(\hat{\theta }^\alpha )-m^-(\hat{\theta }^\alpha )\over 2}{|\nabla \hat{u}|\over |\nabla \hat{q}|}\nabla {\hat{q}}\ \hbox { a.e. in }\{\nabla \hat{q}\not =0\}\\ \displaystyle {\hat{A}}\nabla \hat{q}={m^+(\hat{\theta }^\alpha )+m^-(\hat{\theta }^\alpha )\over 2}\nabla {\hat{q}}+{m^+(\hat{\theta }^\alpha )-m^-(\hat{\theta }^\alpha )\over 2}{|\nabla \hat{q}|\over |\nabla \hat{u}|}\nabla \hat{u}\ \hbox { a.e. in }\{\nabla \hat{u}\not =0\}. \end{array}\right. \nonumber \\ \end{aligned}$$
(3.5)

Moreover there exists \(\tau \in \mathbb R\) such that defining

$$\begin{aligned} E^+:={|\nabla {\hat{q}}||\nabla \hat{u}|+\nabla {\hat{u}}\cdot \nabla {\hat{q}}\over 2},\quad E^-:={|\nabla {\hat{q}}||\nabla {\hat{u}}|-\nabla {\hat{u}}\cdot \nabla {\hat{q}}\over 2}, \end{aligned}$$
(3.6)

we have a.e. in \(\Omega {\setminus } \mathcal{C}_{\hat{\mu }}\)

$$\begin{aligned} \begin{array}{l}\displaystyle \hat{\theta }^\alpha =\left\{ \begin{array}{cl}\displaystyle 0& \displaystyle \hbox { if }{\beta \over \alpha }E^-<E^++\tau \\ \displaystyle \Psi \Big ({\alpha \beta E^-\over E^++\tau }\Big ) & \displaystyle \hbox { if }{\alpha \over \beta }E^-\le E^++\tau \le {\beta \over \alpha }E^- \\ \displaystyle 1& \displaystyle \hbox { if }E^++\tau <{\alpha \over \beta }E^-,\end{array}\right. \end{array} \end{aligned}$$
(3.7)

with

$$\begin{aligned} \Psi (s)={\sqrt{s}-\alpha \over \beta -\alpha },\quad \forall \, s\ge 0. \end{aligned}$$
(3.8)

Proof

We take \(z_{\hat{\mu }}\in L^\infty _{\hat{\mu }}(\Omega ),\) \(z_{\hat{\mu }}\ge 0\) \(\hat{\mu }\)-a.e. in \(\Omega \), \(z\in L^\infty (\Omega )\), \(z\ge 0\) a.e. in \(\Omega \), \(\theta ^\alpha \in L^\infty (\Omega {\setminus } \mathcal{C}_{\hat{\mu }};[0,1])\) and \(A\in L^\infty (\Omega {\setminus } \mathcal{C}_{\hat{\mu }})^{N\times N}\) symmetric such that

$$\begin{aligned} |\Omega {\setminus } \mathcal{C}_{\hat{\mu }}|-\kappa ^\beta \le \int _{\Omega \setminus \mathcal{C}_{\hat{\mu }}}\theta ^\alpha dx\le \kappa ^\alpha ,\qquad \textrm{Sp}(A)\subset \big [m^-(\theta ^\alpha ),m^+(\theta ^\alpha )]\ \hbox { a.e. in }\Omega {\setminus }\mathcal{C}_{\hat{\mu }}.\qquad \end{aligned}$$
(3.9)

Then, for \(\varepsilon \in [0,1]\) we define

$$\begin{aligned} \theta ^\alpha _\varepsilon =(1-\varepsilon )\hat{\theta }^\alpha +\varepsilon \theta ^\alpha ,\quad A_\varepsilon =(1-\varepsilon ){\hat{A}}+\varepsilon A,\quad \mu _\varepsilon =(1-\varepsilon )\hat{\mu }+\varepsilon (z_{\hat{\mu }}\hat{\mu }+ z), \end{aligned}$$

which satisfy the constraints in (2.18). Thus, since \((\hat{\theta }^\alpha ,{\hat{A}},\hat{\mu })\) is a solution of (2.18), we have

$$\begin{aligned} \int _\Omega F(x,{\hat{u}})\,dx\le \int _\Omega F(x,u_\varepsilon )\,dx, \end{aligned}$$
(3.10)

with \(u_\varepsilon \) the solution of

$$\begin{aligned} \left\{ \begin{array}{l}\displaystyle -\textrm{div}\big (A_\varepsilon \nabla u_\varepsilon \big )+\mu _\varepsilon u_\varepsilon =f\ \hbox { in }\Omega \\ \displaystyle u_\varepsilon \in H^1_0(\Omega )\cap L^2_{\mu _\varepsilon }(\Omega ).\end{array}\right. \end{aligned}$$
(3.11)

Using that \(H^1_0(\Omega )\cap L^2_{\mu _\varepsilon }(\Omega )=H^1_0(\Omega )\cap L^2_{\hat{\mu }}(\Omega ),\) we can derive in (3.11) to conclude

$$\begin{aligned} \lim _{\varepsilon \searrow 0}{u_\varepsilon -{\hat{u}}\over \varepsilon }= u'\ \hbox { in }H^1_0(\Omega )\cap L^2_{\hat{\mu }}(\Omega ), \end{aligned}$$
(3.12)

with \(u'\) the solution of

$$\begin{aligned} \left\{ \begin{array}{l}\displaystyle -\textrm{div}({\hat{A}}\nabla u'+(A-{\hat{A}})\nabla {\hat{u}})+\hat{\mu }u'+z{\hat{u}} +\hat{\mu }(z_{\hat{\mu }}-1) {\hat{u}}=0\ \hbox { in }\Omega \\ \displaystyle u'\in H^1_0(\Omega )\cap L^2_{\hat{\mu }}(\Omega ).\end{array}\right. \end{aligned}$$
(3.13)

Thus, taking into account (3.10) and (3.2), we get

$$\begin{aligned} \int _\Omega \partial _s F(x,{\hat{u}})u'dx\ge 0, \end{aligned}$$
(3.14)

which using the definition (3.3) of \({\hat{q}}\) and (3.13) proves

$$\begin{aligned} \begin{aligned}\displaystyle 0&\le \int _\Omega \partial _s F(x,{\hat{u}})u'dx=\int _\Omega \hat{A}\nabla {\hat{q}}\cdot \nabla u'\,dx+\int _\Omega {\hat{q}}u'\,d\hat{\mu }\\ \displaystyle&=\int _\Omega ({\hat{A}}- A)\nabla {\hat{u}}\cdot \nabla {\hat{q}}\,dx-\int _\Omega z{\hat{u}}{\hat{q}}\,dx-\int _\Omega {\hat{u}}{\hat{q}}(z_{\hat{\mu }}-1)\,d\hat{\mu },\end{aligned} \end{aligned}$$
(3.15)

for every \(z_{\hat{\mu }}\in L^\infty _{\hat{\mu }}(\Omega ),\) \(z\in L^\infty (\Omega )\), \(z_{\hat{\mu }},z\ge 0\), \(\theta ^\alpha \in L^\infty (\Omega {\setminus }\mathcal{C}_{\hat{\mu }};[0,1])\) and \(A\in L^\infty (\Omega {\setminus }\mathcal{C}_{\hat{\mu }})^{N\times N}\) symmetric, satisfying (3.9).

Let us now take in (3.15), \(\theta ^\alpha =\hat{\theta }^\alpha \), \(A={\hat{A}}\).

Taking \(z_{\hat{\mu }}=1\) we deduce

$$\begin{aligned} \int _\Omega z{\hat{u}}{\hat{q}}\,dx\le 0,\ \forall \,z\in L^\infty (\Omega ),\ z\ge 0\Longrightarrow {\hat{u}}{\hat{q}}\le 0\ \hbox { q.e. in }\Omega . \end{aligned}$$
(3.16)

On the other hand, taking \(z=z_{\hat{\mu }}=0\), we get

$$\begin{aligned} 0\le \int _\Omega {\hat{u}}{\hat{q}}d\hat{\mu }, \end{aligned}$$

which by (3.16) proves \({\hat{u}}{\hat{q}}=0\) \(\hat{\mu }\)-a.e. in \(\Omega \).

Now, we take in (3.15) \(\theta ^\alpha =\hat{\theta }^\alpha \), \(z_{\hat{\mu }}=1\), \(z=0\), and \(A={\hat{A}}\) a.e. in \((\Omega {\setminus } (\omega \cup \mathcal{C}_{\hat{\mu }}))\) with \(\omega \subset \Omega {\setminus } \mathcal{C}_{\hat{\mu }}\) measurable. This gives

$$\begin{aligned} 0\le \int _\omega ({\hat{A}}- A)\nabla {\hat{u}}\cdot \nabla {\hat{q}}\,dx, \end{aligned}$$

for every \(\omega \subset \Omega {\setminus } \mathcal{C}_{\hat{\mu }}\) measurable, and every \(A\in L^\infty (\omega )^{N\times N}\) with \(\textrm{Sp}(A)\subset [m^-(\hat{\theta }^\alpha ),m^+(\hat{\theta }^\beta )]\), a.e. in \(\omega .\) This proves

$$\begin{aligned} {\hat{A}}\nabla {\hat{u}}\cdot \nabla {\hat{q}}\ge & A\nabla {\hat{u}}\cdot \nabla {\hat{q}},\quad \forall \, A\in \mathbb R^{N\times N}\ \hbox { symmetric},\ \ \textrm{Sp}(A)\subset \big [m^-(\hat{\theta }^\alpha ),m^+(\hat{\theta }^\alpha )]\\ & \qquad \hbox { a.e. in }\Omega {\setminus }\mathcal{C}_{\hat{\mu }}, \end{aligned}$$

and then that (3.5) holds. Finally, taking into account (3.5), we take in (3.15), \(z_{\hat{\mu }}=1\), \(z=0\), and A such that

$$\begin{aligned} \left\{ \begin{array}{l}\displaystyle A\nabla \hat{u}={m^+(\theta ^\alpha )+m^-(\theta ^\alpha )\over 2}\nabla {\hat{u}}+{m^+(\theta ^\alpha )-m^-(\theta ^\alpha )\over 2}{|\nabla {\hat{u}}|\over |\nabla {\hat{q}}|}\nabla {\hat{q}}\ \hbox { a.e. in }\{\nabla {\hat{q}}\not =0\}\\ \displaystyle A\nabla {\hat{q}}={m^+(\theta ^\alpha )+m^-(\theta ^\alpha )\over 2}\nabla {\hat{q}}+{m^+(\theta ^\alpha )-m^-(\theta ^\alpha )\over 2}{|\nabla {\hat{q}}|\over |\nabla {\hat{u}}|}\nabla {\hat{u}}\ \hbox { a.e. in }\{\nabla {\hat{u}}\not =0\}, \end{array}\right. \end{aligned}$$
(3.17)

we deduce that \(\hat{\theta }^\alpha \) is a solution of the convex minimization problem

$$\begin{aligned} \min _{\theta ^\alpha \in L^\infty (\Omega {\setminus }\mathcal{C}_{\hat{\mu }};[0,1])}\Bigg \{\int _\Omega \Big (-E^+ m^+(\theta ^\alpha ) +E^-m^-(\theta ^\alpha )\Big )dx: |\Omega {\setminus } \mathcal{C}_{\hat{\mu }}|-\kappa ^\beta \le \int _{\Omega {\setminus } \mathcal{C}_{\hat{\mu }}}\theta ^\alpha dx\le \kappa ^\alpha \Bigg \}, \end{aligned}$$

with \(E^+\) and \(E^-\) defined by (3.6). By Kuhn-Tucker’s theorem this proves the existence of \(\tau ^\alpha ,\tau ^\beta \ge 0\), with

$$\begin{aligned} \tau ^\alpha \left( \int _{\Omega {\setminus } \mathcal{C}_{\hat{\mu }}}\hat{\theta }^\alpha dx-\kappa ^\alpha \right) = \tau ^\beta \left( |\Omega {\setminus } \mathcal{C}_{\hat{\mu }}|-\kappa ^\beta - \int _{\Omega {\setminus } \mathcal{C}_{\hat{\mu }}}\hat{\theta }^\alpha dx\right) =0, \end{aligned}$$
(3.18)

such that \(\hat{\theta }^\alpha \) is also a solution of

$$\begin{aligned} \min _{\theta ^\alpha \in L^\infty (\Omega {\setminus }\mathcal{C}_{\hat{\mu }};[0,1])}\Bigg \{\int _\Omega \Big (-E^+ m^+(\theta ^\alpha ) +E^-m^-(\theta ^\alpha )\Big )dx+(\tau ^\alpha -\tau ^\beta )\int _{\Omega {\setminus } \mathcal{C}_{\hat{\mu }}}\theta ^\alpha dx\Bigg \}. \end{aligned}$$

Thus, denoting \(\tau =(\tau ^\alpha -\tau ^\beta )/(\beta -\alpha )\), we have that for a.e. \(x\in \Omega {\setminus }\mathcal{C}_{\hat{\mu }}\), \(\hat{\theta }^\alpha (x)\) is a solution of

$$\begin{aligned} \min _{p\in [0,1]}\Big \{-E^+ m^+(p) +E^-m^-(p)+\tau (\beta -\alpha ) p\Big \}. \end{aligned}$$

Using here the definitions (2.10) of \(m^-\) and \(m^+\), we easily conclude that \(\hat{\theta }^\alpha \) satisfies (3.7).

\(\square \)

As an application of the optimality conditions obtained in Theorem 3.1, let us prove that assuming F(xs) concave in s, we can choose the optimal measure \(\hat{\mu }\) in (2.18) as \(\hat{\mu }=\infty _C,\) for some quasi-closed set \(C\subset \Omega .\) In particular, this applies for F(xs) linear in s.

Theorem 3.2

Under the assumptions of Theorem 3.1, if \(F=F(x,s)\) is concave in s, then there exists a solution \((\hat{\theta }^\alpha ,{\hat{A}}, \hat{\mu })\) of (2.18), such that \(\hat{\mu }=\infty _C\) for some quasi-closed set \(C\subset \Omega .\)

Proof

We take \((\tilde{\theta }^\alpha ,{\tilde{A}},\tilde{\mu })\) a solution of (2.18), and \({\tilde{u}}\) the solution of the corresponding state equation. Replacing \(\tilde{\mu }\) by \(\tilde{\mu }+\infty _{\{{\tilde{u}}=0\}}\), which does not change the solution \({\tilde{u}}\) of the state equation, we can always assume

$$\begin{aligned} {\tilde{u}}\not =0\quad \tilde{\mu }\hbox { a.e. in }\Omega {\setminus } \mathcal{C}_{\tilde{\mu }}. \end{aligned}$$
(3.19)

Now, we define \({\tilde{q}}\), the adjoint state, as the solution of

$$\begin{aligned} \left\{ \begin{array}{l}\displaystyle -\textrm{div}({\tilde{A}}\nabla {\tilde{q}})+\tilde{\mu }{\tilde{q}}=\partial _sF(x,{\tilde{u}})\ \hbox { in }\Omega \\ \displaystyle {\tilde{q}}\in H^1_0(\Omega )\cap L^2_{\tilde{\mu }}(\Omega ).\end{array}\right. \end{aligned}$$
(3.20)

We observe that (3.4), \({\tilde{q}}\in L^2_{\tilde{\mu }}(\Omega )\) and (3.19) imply

$$\begin{aligned} {\tilde{q}}=0\ \ \tilde{\mu }\hbox {-a.e. in }\Omega . \end{aligned}$$
(3.21)

We define \(\hat{\mu }=\infty _{\{{\tilde{q}}=0\}}\) which thanks to (3.21), satisfies

$$\begin{aligned} \hat{\mu }\ge \tilde{\mu }\ \hbox { in }\Omega . \end{aligned}$$
(3.22)

We also define \(\hat{\theta }^\alpha \), \({\hat{A}}\) as the restrictions of \(\tilde{\theta }^\alpha \) and \({\tilde{A}}\) to \(\Omega {\setminus } \{{\tilde{q}}=0\}\), and \({\hat{u}}\) as the solution of

$$\begin{aligned} \left\{ \begin{array}{l}\displaystyle -\textrm{div}({\hat{A}}\nabla {\hat{u}})+\hat{\mu }{\hat{u}}=f\ \hbox { in }\Omega \\ \displaystyle {\hat{u}}\in H^1_0(\Omega )\cap L^2_{\hat{\mu }}(\Omega ).\end{array}\right. \end{aligned}$$

Since F is concave, we have

$$\begin{aligned} F(x,{\tilde{u}})\ge F(x,{\hat{u}})+\partial _sF(x,{\tilde{u}})({\tilde{u}}-{\hat{u}})\ \hbox { q.e. in }\Omega . \end{aligned}$$
(3.23)

Thanks to (3.22) we can take \({\tilde{u}}-{\hat{u}}\) as test function in (3.20). Using also (3.21) we get

$$\begin{aligned} \int _\Omega \partial _sF(x,{\tilde{u}})({\tilde{u}}-{\hat{u}})\,dx=\int _\Omega {\tilde{A}}\nabla {\tilde{q}}\cdot \nabla ({\tilde{u}}-{\hat{u}})\,dx. \end{aligned}$$

On the other hand, we can also take \({\tilde{q}}\) as test function in the equations for \({\tilde{u}}\) and \({\hat{u}}\), which, using the definition of \({\hat{A}}\), provides

$$\begin{aligned} \int _\Omega {\tilde{A}}\nabla {\tilde{q}}\cdot \nabla ({\tilde{u}}-{\hat{u}})\,dx=0. \end{aligned}$$

Therefore, integrating in \(\Omega \) in (3.23) we conclude

$$\begin{aligned} \int _\Omega F(x,{\tilde{u}})\,dx\ge \int _\Omega F(x,{\hat{u}})\,dx, \end{aligned}$$

which proves that \((\hat{\theta }^\alpha ,{\hat{A}}, \hat{\mu })\) is a solution of (2.18). \(\square \)

4 A discrete approximation and some numerical simulations

In this section we are interested in the numerical resolution of (2.18). The idea we use is to replace the control measure \(\mu \), which can take the value \(+\infty \) in arbitrary compact subsets of \(\Omega \), by a non-negative function still denoted by \(\mu \) with values in an interval [0, n], n large. This idea has also been used in [6] and [7].

In this sense the set \(\mathcal{C}_\mu \) would be replaced by \(\{\mu =n\}\) and the constraint

$$\begin{aligned} |\Omega {\setminus }\mathcal{C}_\mu |-\kappa ^\beta \le \int _{\Omega {\setminus } \mathcal{C}_\mu }\theta ^\alpha dx\le \kappa ^\alpha , \end{aligned}$$

would be replaced by

$$\begin{aligned} |\{\mu<n\}|-\kappa ^\beta \le \int _{\{\mu<n\}}\theta ^\alpha dx\le \kappa ^\alpha \iff \int _{\{\mu<n\}}\theta ^\alpha dx\le \kappa ^\alpha ,\ \int _{\{\mu <n\}}(1-\theta ^\alpha ) dx\le \kappa ^\beta . \end{aligned}$$

However these conditions are not convex and then, it is not clear that the corresponding optimization problem has a solution. Taking into account that the convex hull of the function

$$\begin{aligned} (s,\mu )\in [0,1]\times [0,\infty )\rightarrow s\chi _{\{[0,n)\}}(\mu ) \end{aligned}$$

is given by

$$\begin{aligned} (s,\mu )\in [0,1]\times [0,\infty )\rightarrow \Big (s-{\mu \over n}\Big )^+, \end{aligned}$$

we propose the approximation

$$\begin{aligned} \begin{array}{c}\displaystyle \min \int _\Omega F(x,u)dx\\ \displaystyle \left\{ \begin{array}{l} -\textrm{div}(A\nabla u)+\mu u=f\ \hbox { in }\Omega ,\quad u\in H^1_0(\Omega )\\ \displaystyle \mu \in L^\infty (\Omega ;[0,n]),\quad \theta \in L^\infty (\Omega ;[0,1]),\quad A\in L^\infty (\Omega )^{N\times N}\ \hbox { symmetric}\\ \displaystyle \textrm{Sp}(A)\subset [m^-(\theta ),m^+(\theta )]\hbox { a.e. in }\Omega \\ \displaystyle \int _\Omega \Big (\theta -{\mu \over n}\Big )^+dx\le \kappa ^\alpha ,\quad \int _\Omega \Big (1-\theta -{\mu \over n}\Big )^+dx\le \kappa ^\beta .\end{array}\right. \end{array} \end{aligned}$$
(4.1)

We have

Theorem 4.1

Problem (4.1) has at least one solution for every \(n\in \mathbb N\). Moreover, for every sequence of solutions \((\theta _n,A_n,\mu _n)\) of (4.1), there exist a subsequence, still denoted by n, and a solution \((\hat{\theta }^\alpha ,\hat{\theta }^\beta ,{\hat{A}},\hat{\mu })\) of (2.15) such that denoting by \(u_n\) and \({\hat{u}}\) the solutions of the respective state equations, we have

$$\begin{aligned} \left\{ \begin{array}{l}\displaystyle u_n\rightharpoonup {\hat{u}}\ \hbox { in }H^1_0(\Omega ),\quad (A_n,\mu _n){\mathop {\rightharpoonup }\limits ^{H\gamma }}({\hat{A}},\hat{\mu })\\ \displaystyle \Big (\theta _n-{\mu _n\over n}\Big )^+{\mathop {\rightharpoonup }\limits ^{*}}\hat{\theta }^\alpha ,\quad \Big (1-\theta _n-{\mu _n\over n}\Big )^+{\mathop {\rightharpoonup }\limits ^{*}}\hat{\theta }^\beta \quad \ \hbox { in }L^\infty (\Omega ).\end{array}\right. \end{aligned}$$
(4.2)

Moreover

$$\begin{aligned} \lim _{n\rightarrow \infty } \int _\Omega F(x,u_n)\,dx=\int _\Omega F(x,{\hat{u}})\,dx. \end{aligned}$$
(4.3)

Proof

The existence of solution for (4.1) just follows from Theorem 2.1 combined with the convexity of the functions \(\theta \mapsto (\theta -{\mu \over n})^+\) and \(\theta \mapsto (1-\theta -{\mu \over n})^+\).

Assume \((\theta _n,A_n,\mu _n)\) a solution of (4.1) and \(u_n\) the solution of the corresponding state equation. From Theorem 2.12, with \(\theta _n^\alpha =\theta _n\), \(\theta _n^\beta =1-\theta _n\), there exist a subsequence of n, still denoted by n, \(\hat{\theta }\in L^\infty (\Omega ; [0,1])\), \(\hat{\mu }\in \mathcal{M}_0(\Omega )\) and \({\hat{A}}\in K(\hat{\theta })\) a.e. in \(\Omega {\setminus } \mathcal{C}_{\hat{\mu }}, \) such that

$$\begin{aligned} \theta _n{\mathop {\rightharpoonup }\limits ^{*}}\hat{\theta }\ \hbox { in }L^\infty (\Omega ),\quad u_n\rightharpoonup {\hat{u}}\ \hbox { in }H^1_0(\Omega ), \end{aligned}$$

with \({\hat{u}}\) the solution of

$$\begin{aligned} \left\{ \begin{array}{l}\displaystyle -\textrm{div}\,({\hat{A}}\nabla {\hat{u}})+\hat{\mu }{\hat{u}}=f\ \hbox { in }\Omega \\ \displaystyle {\hat{u}}\in H^1_0(\Omega )\cap L^2_{\hat{\mu }}(\Omega ).\end{array}\right. \end{aligned}$$

On the other hand, we can also assume the existence of \(\hat{\theta }^\alpha ,\hat{\theta }^\beta \in L^\infty (\Omega ;[0,1])\) such that

$$\begin{aligned} \Big (\theta _n-{\mu _n\over n}\Big )^+{\mathop {\rightharpoonup }\limits ^{*}}\hat{\theta }^\alpha ,\ \ \Big (1-\theta _n-{\mu _n\over n}\Big )^+{\mathop {\rightharpoonup }\limits ^{*}}\hat{\theta }^\beta \quad \hbox { in }L^\infty (\Omega ). \end{aligned}$$

Clearly

$$\begin{aligned} \int _\Omega \hat{\theta }^\alpha \,dx\le \kappa ^\alpha ,\quad \int _\Omega \hat{\theta }^\beta dx\le \kappa ^\beta . \end{aligned}$$

Since \((\theta _n-{\mu _n\over n})^+\le \theta _n\), \((1-\theta _n-{\mu _n\over n})^+\le 1-\theta _n\), we also get

$$\begin{aligned} \hat{\theta }^\alpha \le \hat{\theta },\quad \hat{\theta }^\beta \le 1-\hat{\theta },\quad \hbox { a.e. }x\in \Omega . \end{aligned}$$

Now, we observe that thanks to Rellick–Kondrachov’s compactness theorem we have

$$\begin{aligned} \lim _{n\rightarrow \infty } \int _\Omega |u_n|^2\Big (\theta _n-\Big (\theta _n-{\mu _n\over n}\Big )^+\Big )dx=\int _\Omega |{\hat{u}}|^2(\hat{\theta }-\hat{\theta }^\alpha )\,dx. \end{aligned}$$
(4.4)

On the other hand, using that the function \(s\rightarrow s^+\) has constant Lipschitz equals one, we have

$$\begin{aligned} 0\le \int _\Omega |u_n|^2\Big (\theta _n-\Big (\theta _n-{\mu _n\over n}\Big )^+\Big )dx\le {1\over n}\int _\Omega |u_n|^2\mu _n\,dx. \end{aligned}$$
(4.5)

Combined with the energy equality

$$\begin{aligned} \int _\Omega A_n\nabla u_n\cdot \nabla u_n\,dx+\int _\Omega |u_n|^2\mu _n\,dx=\langle f,u_n\rangle , \end{aligned}$$

which implies that \(|u_n|^2\mu _n\) is bounded in \(L^1(\Omega )\), inequality (4.5) proves

$$\begin{aligned} \lim _{n\rightarrow \infty } \int _\Omega |u_n|^2\Big (\theta _n-\Big (\theta _n-{\mu _n\over n}\Big )^+\Big )dx=0. \end{aligned}$$

Therefore, (4.4) provides

$$\begin{aligned} \hat{\theta }=\hat{\theta }^\alpha \ \hbox { a.e. in }\{{\hat{u}}\not =0\}. \end{aligned}$$

A similar reasoning also proves

$$\begin{aligned} 1-\hat{\theta }=\hat{\theta }^\beta =1-\hat{\theta }^\alpha \ \hbox { a.e. in }\{{\hat{u}}\not =0\}. \end{aligned}$$

Using

$$\begin{aligned} \Big (\theta _n-{\mu _n\over n}\Big )^++\Big (1-\theta _n-{\mu _n\over n}\Big )^+\le 1\ \hbox { a.e. in }\Omega , \end{aligned}$$

we also get

$$\begin{aligned} \hat{\theta }^\alpha +\hat{\theta }^\beta \le 1\ \hbox { a.e. in }\Omega . \end{aligned}$$

Thus, \((\hat{\theta }^\alpha ,\hat{\theta }^\beta ,{\hat{A}},\hat{\mu })\) satisfies the constraints in (2.15).

By the Rellich–Kondrachov’s compactness theorem, we also have

$$\begin{aligned} \lim _{n\rightarrow \infty }\int _\Omega F(x,u_n)\,dx=\int _\Omega F(x,{\hat{u}})\,dx\ge \mathcal{I}, \end{aligned}$$
(4.6)

with \(\mathcal{I}\) the minimum in (2.15).

In order to finish the proof of Theorem 4.1 we consider \((\tilde{\theta }^\alpha ,{\tilde{A}},\tilde{\mu })\) giving the minimum in (2.18), and \({\tilde{u}} \) the solution of the corresponding state equation, then (see the proof of Theorem 2.13), there exists \(\tilde{\mu }_n\in L^\infty (\Omega ,[0,n])\), such that the solution \({\tilde{u}}_n\) of

$$\begin{aligned} \left\{ \begin{array}{l}\displaystyle -\textrm{div}\, ({\tilde{A}}\nabla {\tilde{u}}_n)+\tilde{\mu }_n {\tilde{u}}_n=f\ \hbox { in }\Omega \\ \displaystyle {\tilde{u}}_n\in H^1_0(\Omega ),\end{array}\right. \end{aligned}$$

converges strongly in \(H^1_0(\Omega )\) to the solution \({\tilde{u}}\) of

$$\begin{aligned} \left\{ \begin{array}{l}\displaystyle -\textrm{div}\, ({\tilde{A}}\nabla {\tilde{u}})+\tilde{\mu }{\tilde{u}}=f\ \hbox { in }\Omega \\ \displaystyle {\tilde{u}}\in H^1_0(\Omega )\cap L^2_{\tilde{\mu }}(\Omega ).\end{array}\right. \end{aligned}$$

Since \(\tilde{\mu }=\infty _{\mathcal{C}_{\tilde{\mu }}}\) in \(\mathcal{C}_{\tilde{\mu }}\), we can always assume \(\tilde{\mu }_n=n\) in \(\mathcal{C}_{\tilde{\mu }}.\) Extending \(\tilde{\theta }^\alpha \) by zero (for example) in \(\mathcal{C}_{\tilde{\mu }}\), we have

$$\begin{aligned} \int _\Omega \Big (\tilde{\theta }^\alpha -{\tilde{\mu }_n\over n}\Big )^+dx\le \int _\Omega \tilde{\theta }^\alpha dx\le \kappa ^\alpha ,\quad \int _\Omega \Big (1-\tilde{\theta }^\alpha -{\tilde{\mu }_n\over n}\Big )^+\le \int _{\Omega {\setminus } \mathcal{C}_{\tilde{\mu }}}(1-\tilde{\theta }^\alpha )dx\le \kappa ^\beta . \end{aligned}$$

Therefore \((\tilde{\theta }^\alpha ,{\tilde{A}},\tilde{\mu })\) satisfies the constraints in (4.1). Thus, since the sequence \((\theta _n,A_n,\mu _n)\) at the beginning of the proof was a solution of (4.1), we have

$$\begin{aligned} \mathcal{I}=\int _\Omega F(x,{\tilde{u}})\,dx=\lim _{n\rightarrow \infty }\int _\Omega F(x,{\tilde{u}}_n)\,dx\ge \lim _{n\rightarrow \infty }\int _\Omega F(x, u_n)\,dx, \end{aligned}$$

which combined with (4.6) proves that \((\hat{\theta }^\alpha ,\hat{\theta }^\beta ,{\hat{A}},\hat{\mu })\) is a solution to (2.15). \(\square \)

By Theorem 4.1, in order to solve numerically (2.18), we must provide an algorithm to solve (4.1). Let us look for a descent gradient method. Namely, we assume that F satisfies conditions (3.1) and (3.2), and that we have found an approximation \((\theta _k,A_k,\mu _k)\) of a solution of (4.1), which satisfies the constraints in this problem. Taking into account the convexity of the set of controls, we look for another approximation

$$\begin{aligned} \theta _{k+1}=\theta _k+\varepsilon _k(\hat{\theta }-\theta _k),\quad A_{k+1}=A_k+\varepsilon _k({\hat{A}}-A_k),\quad \mu _{k+1}=\mu _k+\varepsilon _k(\hat{\mu }-\mu _k),\,\, \end{aligned}$$
(4.7)

which decreases the cost functional. Here \(\hat{\theta }\), \({\hat{A}}\), \(\hat{\mu }\) must also satisfy the constraints in (4.1), while the step \(\varepsilon _k\) belongs to (0, 1]. Denoting by \(u_k\) the solution of the state problem

$$\begin{aligned} \left\{ \begin{array}{l} -\textrm{div}(A_k\nabla u_k)+\mu _k u_k=f\ \hbox { in }\Omega \\ \displaystyle u_k\in H^1_0(\Omega ),\end{array}\right. \end{aligned}$$
(4.8)

and assuming \(\varepsilon _k\) small, we have the Taylor approximation

$$\begin{aligned} \int _\Omega F(x,u_{k+1})\,dx\sim \int _\Omega F(x,u_k)\,dx+\varepsilon _k\int _\Omega \partial _sF(x,u_k)u'_kdx, \end{aligned}$$
(4.9)

with \(u'_k\) the solution of

$$\begin{aligned} \left\{ \begin{array}{l} -\textrm{div}(A_k\nabla u'_k)+\mu _k u'_k -\textrm{div}(({\hat{A}}-A_k)\nabla u_k)+(\hat{\mu }-\mu _k) u_k=0\ \hbox { in }\Omega \\ \displaystyle u'_k\in H^1_0(\Omega ).\end{array}\right. \end{aligned}$$
(4.10)

Defining the adjoint state \(p_k\) by

$$\begin{aligned} \left\{ \begin{array}{l} -\textrm{div}(A_k\nabla p_k)+\mu _k p_k=\partial _sF(x,u_k)\ \hbox { in }\Omega \\ \displaystyle p_k\in H^1_0(\Omega ),\end{array}\right. \end{aligned}$$
(4.11)

one has

$$\begin{aligned} \int _\Omega \partial _sF(x,u_k)u'_kdx=\int _\Omega (A_k-{\hat{A}})\nabla u_k\cdot \nabla p_k\,dx+\int _\Omega (\mu _k-\hat{\mu })u_kp_kdx. \end{aligned}$$
(4.12)

Therefore, taking into account (4.9), the idea is to choose \((\hat{\theta },{\hat{A}},\hat{\mu })\) as a solution of

$$\begin{aligned} \begin{array}{c}\displaystyle \max \int _\Omega \big (A\nabla u_k\cdot \nabla p_k+\mu u_kp_k\big )dx\\ \displaystyle \left\{ \begin{array}{l} \mu \in L^\infty (\Omega ;[0,n]),\quad \theta \in L^\infty (\Omega ;[0,1]),\quad \textrm{Sp}(A)\subset [m^-(\theta ),m^+(\theta )]\ \hbox { a.e. in }\Omega \\ \displaystyle \int _\Omega \Big (\theta -{\mu \over n}\Big )^+dx\le \kappa ^\alpha ,\quad \int _\Omega \Big (1-\theta -{\mu \over n}\Big )^+dx\le \kappa ^\beta .\end{array}\right. \end{array} \end{aligned}$$
(4.13)

Let us show that this problem can be solved almost explicitly.

Assuming that \((\hat{\mu },\hat{\theta })\) is known, and taking the maximum in A we have

$$\begin{aligned} \left\{ \begin{array}{ll}\displaystyle {\hat{A}}\nabla u_k={m^+(\hat{\theta })+m^-(\hat{\theta })\over 2}\nabla u_k+{m^+(\hat{\theta })-m^-(\hat{\theta })\over 2}{|\nabla u_k|\over |\nabla p_k|}\nabla p_k & \hbox {a.e. in }\{\nabla p_k\not =0\}\\ \displaystyle {\hat{A}}\nabla p_k={m^+(\hat{\theta })+m^-(\hat{\theta })\over 2}\nabla p_k+{m^+(\hat{\theta })-m^-(\hat{\theta })\over 2}{|\nabla p_k|\over |\nabla u_k|}\nabla u_k & \hbox {a.e. in }\{\nabla u_k\not =0\}\ .\end{array}\right. \end{aligned}$$
(4.14)

Replacing this expression in (4.13) we get that \((\hat{\theta },\hat{\mu })\) is a solution of

$$\begin{aligned} \begin{array}{c}\displaystyle \min \left\{ \int _\Omega \big (E^-_km^-(\theta )-E^+_km^+(\theta )\big )dx-\int _\Omega \mu u_kp_kdx\right\} \\ \displaystyle \left\{ \begin{array}{l} \mu \in L^\infty (\Omega ;[0,n]),\quad \theta \in L^\infty (\Omega ;[0,1]),\\ \displaystyle \int _\Omega \Big (\theta -{\mu \over n}\Big )^+dx\le \kappa ^\alpha ,\quad \int _\Omega \Big (1-\theta -{\mu \over n}\Big )^+dx\le \kappa ^\beta ,\end{array}\right. \end{array} \end{aligned}$$
(4.15)

with

$$\begin{aligned} E^+_k={|\nabla u_k||\nabla p_k|+\nabla u_k\cdot \nabla p_k\over 2},\quad E^-_k={|\nabla u_k||\nabla p_k|-\nabla u_k\cdot \nabla p_k\over 2}. \end{aligned}$$
(4.16)

Applying Kuhn-Tucker’s theorem to this convex problem, we deduce that solving (4.15) is equivalent to solving the max-min problem

$$\begin{aligned} \begin{array}{c}\displaystyle \max _{\lambda _1,\lambda _2\ge 0}\min _{\begin{array}{c} \mu \in L^\infty (\Omega ;[0,n])\\ \theta \in L^\infty (\Omega ;[0,1]) \end{array}} \Bigg \{\int _\Omega \big (E^-_km^-(\theta )-E^+_km^+(\theta )\big )dx-\int _\Omega \mu u_kp_kdx\\ \displaystyle \qquad \qquad \qquad \qquad +\lambda _1\left( \int _\Omega \Big (\theta -{\mu \over n}\Big )^+dx-\kappa ^\alpha \right) +\lambda _2\left( \int _\Omega \Big (1-\theta -{\mu \over n}\Big )^+dx-\kappa ^\beta \right) \Bigg \}.\end{array} \end{aligned}$$
(4.17)

Let us solve this problem using Uzawa’s method (see e.g. [13] Chapter 9.4). It consists in applying the gradient method to the maximization problem. Namely, starting from \((\lambda ^0_{k,1},\lambda ^0_{k,2})\), we construct a sequence \((\lambda ^j_{k,1},\lambda ^j_{k,2})\) as

$$\begin{aligned} \left\{ \begin{array}{l}\displaystyle \lambda ^{j+1}_{k,1}=\Bigg (\lambda ^j_{k,1}+\rho \Big (\int _\Omega \Big (\theta ^j_k-{\mu ^j_k\over n}\Big )^+dx-\kappa ^\alpha \Big )\Bigg )^+\\ \displaystyle \lambda ^{j+1}_{k,2}=\Bigg (\lambda ^j_{k,2}+\rho \Big (\int _\Omega \Big (1-\theta ^j_k-{\mu ^j_k\over n}\Big )^+dx-\kappa ^\beta \Big )\Bigg )^+,\end{array}\right. \end{aligned}$$
(4.18)

with \(\rho >0\) small, and \((\theta ^j_k,\mu ^j_k)\) solution of

$$\begin{aligned} \begin{array}{l}\displaystyle \min _{\begin{array}{c} \mu \in L^\infty (\Omega ;[0,n])\\ \theta \in L^\infty (\Omega ;[0,1]) \end{array}} \Bigg \{\int _\Omega \big (E^-_km^-(\theta )-E^+_km^+(\theta )\big )dx-\int _\Omega \mu u_kp_kdx\\ \displaystyle \qquad \qquad \qquad +\lambda ^j_{k,1}\left( \int _\Omega \Big (\theta -{\mu \over n}\Big )^+dx-\kappa ^\alpha \right) +\lambda ^j_{k,2}\left( \int _\Omega \Big (1-\theta -{\mu \over n}\Big )^+dx-\kappa ^\beta \right) \Bigg \}.\end{array} \end{aligned}$$
(4.19)

Then, an approximated solution of (4.15) is given by \((\mu ^j_k,\theta ^j_k)\) with j large enough.

For every jk problem (4.19) can be solved as follows:

We assume that \(\theta ^j_k\) is known. Then for a.e. \(x\in \Omega \), \(\mu ^j_k(x)\) solves

$$\begin{aligned} \min _{\mu \in [0,n]} \Big \{-\mu u_kp_k+\lambda ^j_{k,1}\Big (\theta ^j_k-{\mu \over n}\Big )^++ \lambda ^j_{k,2}\Big (1-\theta ^j_k-{\mu \over n}\Big )^+\Big \}. \end{aligned}$$
(4.20)

Since the function to minimize is piecewise linear, we can find a particular solution taking its values in the set of vertices of the constraint set, i.e. \(\{0, n\theta ^j_k, n(1-\theta ^j_k), n\}\). Replacing in (4.19) \(\mu \) by this solution we get an optimization problem for \(\theta ^j_k\). The resolution of this problem is a simple but tedious calculation and thus, we just give the result in the following proposition without proof.

Proposition 4.2

We denote

$$\begin{aligned} D_k=-{nu_kp_k\over \beta -\alpha },\quad \tilde{\lambda }_1={\lambda ^j_{k,1}\over \beta -\alpha },\quad \tilde{\lambda }_2={\lambda ^j_{k,2}\over \beta -\alpha },\quad \gamma ={4\alpha \beta \over (\alpha +\beta )^2}, \end{aligned}$$

then, for \(\Psi \) defined by (3.8), we have that a particular solution of (4.19) is given by

  1. 1.

    Assume \(D_k\le 0\). Then

    $$\begin{aligned} \left\{ \begin{array}{ll}\displaystyle \hbox {If }E^-_k\le {\alpha \over \beta }E^+_k& \displaystyle \Rightarrow \theta ^j_k=0,\mu ^j_k=n \\ \displaystyle \hbox {If }{\alpha \over \beta }E^+_k\le E^-_k\le {\beta \over \alpha }E^+_k& \displaystyle \Rightarrow \theta ^j_k=\Psi \Big ({\alpha \beta \,E^-_k\over E^+_k}\Big ), \mu ^j_k=n\\ \displaystyle \hbox {If }{\beta \over \alpha }E^+_k\le E^-_k& \Rightarrow \theta ^j_k=1,\mu ^j_k=n.\end{array}\right. \end{aligned}$$
  2. 2.

    Assume \(0\le D_k\le \min \{\tilde{\lambda }_1,\tilde{\lambda }_2\}\). Then

    $$\begin{aligned} \left\{ \begin{array}{ll}\displaystyle \hbox {If }D_k\le E^+_k-{\beta \over \alpha }E^-_k& \displaystyle \Rightarrow \theta ^j_k=0,\mu ^j_k=n\\ \displaystyle \hbox {If }E^+_k-{\beta \over \alpha }E^-_k\le D_k\le E^+_k-\gamma E^-_k& \Rightarrow \displaystyle \theta ^j_k= \Psi \Big ({\alpha \beta E^-_k\over E^+_k-D_k}\Big ),\mu ^j_k=n(1-\theta ^j_k)\\ \displaystyle \hbox {If }\Big |E^+_k-\gamma E^-_k\Big |\le D_k& \displaystyle \Rightarrow \theta ^j_k={1\over 2},\mu ^j_k={n\over 2}\\ \displaystyle \hbox {If } {\alpha \over \beta }E^-_k-E^+_k\le D_k\le \gamma E^-_k-E^+_k& \displaystyle \Rightarrow \theta ^j_k=\Psi \Big ({\alpha \beta E^-_k\over E^+_k+D_k}\Big ),\mu ^j_k=n\theta ^j_k\\ \displaystyle \hbox {If }D_k\le {\alpha \over \beta }E^-_k-E^+_k& \displaystyle \Rightarrow \theta ^j_k=1,\mu ^j_k=n\end{array}\right. \end{aligned}$$
  3. 3.

    Assume \(\tilde{\lambda }_1\le D_k\le \tilde{\lambda }_2\). Then

    $$\begin{aligned} \left\{ \begin{array}{ll} \displaystyle \hbox {If }D_k\le E^+_k-{\beta \over \alpha }E^-_k& \displaystyle \Rightarrow \theta ^j_k=0,\mu ^j_k=n\\ \displaystyle \hbox {If }E^+_k-{\beta \over \alpha }E^-_k\le D_k\le E^+_k-\gamma E^-_k& \displaystyle \Rightarrow \left\{ \begin{array}{l}\displaystyle \theta ^j_k=\Psi \Big ({\alpha \beta E^-_k\over E^+_k-D_k}\Big )\\ \displaystyle \mu ^j_k=n(1-\theta ^j_k)\end{array}\right. \\ \displaystyle \hbox {If } E^+_k-\gamma E^-_k\le D_k\le E^+_k-\gamma E^-_k+2\tilde{\lambda }_1 & \displaystyle \Rightarrow \theta ^j_k={1\over 2},\mu ^j_k={n\over 2}\\ \displaystyle \hbox {If } E^+_k-\gamma E^-_k+2\tilde{\lambda }_1 \le D_k\le E^+_k-{\alpha \over \beta }E^-_k+2\tilde{\lambda }_1& \displaystyle \Rightarrow \left\{ \begin{array}{l}\displaystyle \theta ^j_k=\Psi \Big ({\alpha \beta E^-_k\over E^+_k-D_k+2\tilde{\lambda }_1}\Big )\\ \displaystyle \mu ^j_k=n(1-\theta ^j_k)\end{array}\right. \\ \displaystyle \hbox {If }E^+_k-{\alpha \over \beta }E^-_k+2\tilde{\lambda }_1\le D_k & \displaystyle \Rightarrow \theta ^j_k=1,\mu ^j_k=0 \end{array}\right. \end{aligned}$$
  4. 4.

    Assume \(\tilde{\lambda }_2\le D_k\le \tilde{\lambda }_1\). Then

    $$\begin{aligned} \left\{ \begin{array}{ll}\displaystyle \hbox {If }D_k\ge {\beta \over \alpha }E^-_k-E^+_k+2\tilde{\lambda }_2& \displaystyle \Rightarrow \theta ^j_k=0,\mu ^j_k=0\\ \displaystyle \hbox {If }{\beta \over \alpha }E^-_k-E^+_k+2\tilde{\lambda }_2\ge D_k\ge \gamma E^-_k-E^+_k+2\tilde{\lambda }_2& \displaystyle \Rightarrow \left\{ \begin{array}{l}\displaystyle \theta ^j_k=\Psi \Big ({\alpha \beta E^-_k\over E^+_k+D_k-2\tilde{\lambda }_2}\Big ) \\ \displaystyle \mu ^j_k=n\theta ^j_k\end{array}\right. \\ \displaystyle \hbox {If }\gamma E^-_k-E^+_k+2\tilde{\lambda }_2\ge D_k \ge \gamma E^-_k-E^+_k& \displaystyle \Rightarrow \theta ^j_k={1\over 2},\mu ^j_k={n\over 2}\\ \displaystyle \hbox {If } \gamma E^-_k-E^+_k \ge D_k\ge {\alpha \over \beta }E^-_k-E^+_k& \displaystyle \Rightarrow \theta ^j_k=\Psi \Big ({\alpha \beta E^-_k\over E^+_k+D_k}\Big ),\mu ^j_k=n\theta ^j_k\\ \displaystyle \hbox {If }{\alpha \over \beta }E^-_k-E^+_k\ge D_k& \displaystyle \Rightarrow \theta ^j_k=1,\mu ^j_k=n\end{array}\right. \end{aligned}$$
  5. 5.

    Assume \(\max \{\tilde{\lambda }_1,\tilde{\lambda }_2\}\le D_k\le \tilde{\lambda }_1+\tilde{\lambda }_2\). Then

    $$\begin{aligned} \left\{ \begin{array}{ll}\displaystyle \hbox {If }D_k\ge {\beta \over \alpha }E^-_k-E^+_k+2\tilde{\lambda }_2& \displaystyle \Rightarrow \theta ^j_k=0,\mu ^j_k=0\\ \displaystyle \hbox {If }{\beta \over \alpha }E^-_k-E^+_k+2\tilde{\lambda }_2\ge D_k\ge \gamma E^-_k-E^+_k+2\tilde{\lambda }_2 & \displaystyle \Rightarrow \left\{ \begin{array}{l}\displaystyle \theta ^j_k=\Psi \Big ({\alpha \beta E^-_k\over E^+_k+D_k-2\tilde{\lambda }_2}\Big )\\ \displaystyle \mu ^j_k=n\theta ^j_k\end{array}\right. \\ \displaystyle \hbox {If } D_k\le \min \Big \{\gamma E^-_k-E^+_k+2\tilde{\lambda }_2,E^+_k-\gamma E^-_k+2\tilde{\lambda }_1\Big \} & \displaystyle \Rightarrow \theta ^j_k={1\over 2},\mu ^j_k={n\over 2}\\ \displaystyle \hbox {If } E^+_k-\gamma E^-_k+2\tilde{\lambda }_1 \le D_k \le E^+_k-{\alpha \over \beta }E^-_k+2\tilde{\lambda }_1& \displaystyle \Rightarrow \left\{ \begin{array}{l}\displaystyle \theta ^j_k=\Psi \Big ({\alpha \beta E^-_k\over E^+_k-D_k+2\tilde{\lambda }_1}\Big )\\ \displaystyle \mu ^j_k=n(1-\theta ^j_k)\end{array}\right. \\ \displaystyle \hbox {If } D_k\ge E^+_k-{\alpha \over \beta }E^-_k+2\tilde{\lambda }_1& \displaystyle \Rightarrow \theta ^j_k=1,\mu ^j_k=0 \end{array}\right. \end{aligned}$$
  6. 6.

    Assume \(\tilde{\lambda }_1+\tilde{\lambda }_2\le D_k\). Then

    $$\begin{aligned} \left\{ \begin{array}{ll}\displaystyle \hbox {If }\tilde{\lambda }_2-\tilde{\lambda }_1\le E^+_k-{\beta \over \alpha }E^-_k& \displaystyle \Rightarrow \theta ^j_k=0,\mu ^j_k=0\\ \displaystyle \hbox {If } E^+_k-{\beta \over \alpha }E^-_k\le \tilde{\lambda }_2-\tilde{\lambda }_1\le E^+_k-{\alpha \over \beta }E^-_k & \displaystyle \Rightarrow \theta ^j_k=\Psi \Big ({\alpha \beta E^-_k\over E^+_k+\tilde{\lambda }_1-\tilde{\lambda }_2}\Big ),\mu ^j_k=0\\ \displaystyle \hbox {If }\tilde{\lambda }_2-\tilde{\lambda }_1\ge E^+_k-{\alpha \over \beta }E^-_k & \displaystyle \Rightarrow \theta ^j_k=1,\mu ^j_k=0.\end{array}\right. \end{aligned}$$

Following the above description, we propose the following algorithm:

Algorithm.

  1. 1.

    Take \(\rho >0\) small, and \({\bar{j}}\in \mathbb N\).

  2. 2.

    Take \(\lambda _{0,1},\lambda _{0,2}\ge 0\), \(\theta _0\in L^\infty (\Omega ;[0,1])\), \(\mu _0\in L^\infty (\Omega ;[0,n])\), \(A_0\in L^\infty (\Omega )^{N\times N}\) symmetric such that

    $$\begin{aligned} \left\{ \begin{array}{l}\displaystyle \int _\Omega \Big (\theta _0-{\mu _0\over n}\Big )^+dx\le \kappa ^\alpha ,\quad \int _\Omega \Big (1-\theta _0-{\mu _0\over n}\Big )^+\le \kappa ^\beta \\ \displaystyle \textrm{Sp}(A_0)\subset \big [m^-(\theta _0),m^+(\theta _0)\big ]\hbox { a.e. in }\Omega .\end{array}\right. \end{aligned}$$
    (4.21)
  3. 3.

    Assume we have constructed \(\lambda _{k,1},\lambda _{k,2}\ge 0\), \(\theta _k\in L^\infty (\Omega ;[0,n])\), \(\mu _k\in L^\infty (\Omega ;[0,n])\), \(A_k\in L^\infty (\Omega )^{N\times N}\) symmetric, satisfying the analogous to (4.21).

  4. 4.

    We compute the solutions \(u_k\), \(p_k\) of (4.8) and (4.11) respectively. Then, we define \(E_k^+\), \(E_k^-\) by (4.16).

  5. 5.

    We denote \(\lambda ^0_{k,1}=\lambda _{k,1}\), \(\lambda ^0_{k,2}=\lambda _{k,2},\) then for \(j\le {\bar{j}}-1\), we define \((\lambda _{k,1}^{j+1},\lambda _{k,2}^{j+1})\) by (4.18) where \(\theta ^j_k\), \(\mu ^j_k\) are defined by Proposition 4.2.

  6. 6.

    We take \(\lambda _{k,1}=\lambda _{k,1}^{{\bar{j}}}\), \(\lambda _{k,2}=\lambda _{k,2}^{{\bar{j}}}\), \(\hat{\theta }=\theta ^{{\bar{j}}}_k\), \(\hat{\mu }=\mu ^{{\bar{j}}}_k\) and \({\hat{A}}\) as a symmetric matrix function in \(L^\infty (\Omega )^{N\times N}\) satisfying (4.14) and such that \(\textrm{Sp}({\hat{A}})\subset [m^-(\hat{\theta }),m^+(\hat{\theta })]\), a.e. in \(\Omega \).

  7. 7.

    For a choice of \(\varepsilon _k\in (0,1]\) (see Remark 4.3), we define \(\theta _{k+1}\), \(A_{k+1}\), \(\mu _{k+1}\) by (4.7).

Remark 4.3

In order to implement the previous algorithm it is necessary to provide a rule to choose \(\varepsilon _k\). We propose three strategies for this purpose. For the second and third one, we need to assume

$$\begin{aligned} F(x,\cdot )\in C^2(\mathbb R),\ \hbox { a.e. }x\in \Omega ,\quad \partial ^2_{ss}F\in L^\infty (\Omega \times \mathbb R). \end{aligned}$$
(4.22)
  1. 1.

    Take \(\varepsilon _k=\varepsilon \) a small fixed number in (0, 1]. More generally one can adapt \(\varepsilon _k\) after a certain number of iterations.

  2. 2.

    By (4.22), it is not difficult to show that for every pair of controls \((\theta ,A,\mu )\) and \((\hat{\theta },{\hat{A}}, \hat{\mu })\) satisfying the constraints in (4.1) the function \(\Phi :[0,1]\rightarrow \mathbb R\), defined by

    $$\begin{aligned} \Phi (\varepsilon )=\int _\Omega F(x,u_\varepsilon )\,dx, \end{aligned}$$
    (4.23)

    with \(u_\varepsilon \) the solution of

    $$\begin{aligned} \left\{ \begin{array}{l}\displaystyle -\textrm{div}\big ((A+\varepsilon ({\hat{A}}- A))\nabla u_\varepsilon \big )+\big (\mu +\varepsilon (\hat{\mu }-\mu ))u_\varepsilon =f\ \hbox { in }\Omega \\ u_\varepsilon \in H^1_0(\Omega ),\end{array}\right. \end{aligned}$$
    (4.24)

    belongs to \(C^2([0,1])\). Moreover, there exists \(C>0\) which does not depend on \((\theta ,A,\mu )\) and \((\hat{\theta },{\hat{A}}, \hat{\mu })\) (but it depends on n) such that

    $$\begin{aligned} |\Phi ''(\varepsilon )|\le C,\quad \forall \,\varepsilon \in [0,1]. \end{aligned}$$
    (4.25)

    Therefore, instead of (4.9), we can write

    $$\begin{aligned} \int _\Omega F(x,u_{k+1})dx\le \int _\Omega F(x,u_k)dx+\varepsilon _k\int _\Omega \partial _sF(x,u_k)u'_k\,dx+{C\over 2}\varepsilon _k^2. \end{aligned}$$

    The idea is to choose \(\varepsilon _k\) minimizing the right-hand side. By (4.12), this gives

    $$\begin{aligned} \varepsilon _k=\min \left\{ {D_k\over C},1\right\} ,\ \hbox { with }D_k:=\int _\Omega ({\hat{A}}-A_k)\nabla u_k\cdot \nabla p_k\,dx+\int _\Omega (\hat{\mu }-\mu _k)u_kp_k\,dx. \end{aligned}$$

    Here we recall that \((\hat{\theta },{\hat{A}}, \hat{\mu })\) is chosen as a solution of (4.13) and thus \(D_k\ge 0\). With this choice, we have

    $$\begin{aligned} \int _\Omega F(x,u_{k+1})dx\le \int _\Omega F(x,u_k)dx-\left\{ \begin{array}{cl}\displaystyle {D_k^2\over 2C} & \hbox { if }D_k<C\\ \displaystyle D_k-{C\over 2} & \hbox { if }D_k\ge C.\end{array}\right. \end{aligned}$$

    This implies that \(\sum _{k=0}^\infty D_k^2<\infty \), and therefore that \(D_k\) tends to zero. In this point, it is interesting to observe that the computation done above to get the direction of maximum descent shows that an optimality condition to be satisfied by the solutions \((\hat{\theta },{\hat{A}},\hat{\mu })\) of (4.1) is given by \((\hat{\theta },{\hat{A}}, \hat{\mu })\) a solution of

    $$\begin{aligned} \begin{array}{c}\displaystyle \max \int _\Omega \big (A\nabla {\hat{u}}\cdot \nabla {\hat{p}}+ \mu {\hat{u}}{\hat{p}}\big )dx\\ \displaystyle \left\{ \begin{array}{l} \mu \in L^\infty (\Omega ;[0,n]),\quad \theta \in L^\infty (\Omega ;[0,1]),\quad \textrm{Sp}(A)\subset [m^-(\theta ),m^+(\theta )]\ \hbox { a.e. in }\Omega \\ \displaystyle \int _\Omega \Big (\theta -{\mu \over n}\Big )^+dx\le \kappa ^\alpha ,\quad \int _\Omega \Big (1-\theta -{\mu \over n}\Big )^+dx\le \kappa ^\beta .\end{array}\right. \end{array} \end{aligned}$$

    with \({\hat{u}}\), \({\hat{p}}\) the solutions of

    $$\begin{aligned} \left\{ \begin{array}{l} -\textrm{div}({\hat{A}}\nabla {\hat{u}})+\hat{\mu }{\hat{u}}=f\ \hbox { in }\Omega \\ \displaystyle {\hat{u}}\in H^1_0(\Omega ),\end{array}\right. \qquad \left\{ \begin{array}{l} -\textrm{div}({\hat{A}}\nabla {\hat{p}})+\hat{\mu }{\hat{p}}=\partial _sF(x,{\hat{u}})\ \hbox { in }\Omega \\ \displaystyle {\hat{p}}\in H^1_0(\Omega ).\end{array}\right. \end{aligned}$$
  3. 3.

    Defining \(\Phi \) by (4.23) with \((\theta ,A,\mu )=(\theta _k,A_k,\mu _k)\) and \((\hat{\theta },{\hat{A}},\hat{\mu })\) solution of (4.13), we can replace (4.9) by the Taylor expansion of second order

    $$\begin{aligned} \int _\Omega F(x,u_k)dx+\varepsilon _k\int _\Omega \partial _sF(x,u_k)u'_kdx+{1\over 2}\Phi ''(0)\varepsilon _k^2. \end{aligned}$$
    (4.26)

    Now, a simple calculation shows

    $$\begin{aligned} \Phi ''(0)=\int _\Omega \Big (\partial ^2_{ss}F(x,u_k)|u'_k|^2+2 (A-{\hat{A}})\nabla u'_k\cdot \nabla p_k\,dx+2(\mu -\hat{\mu })u'_kp_k\Big )dx, \end{aligned}$$

    with \(u'_k\) and \(p_k\) the solutions of (4.10) and (4.11) respectively. Therefore, we can choose \(\varepsilon _k\) minimizing (4.26) in [0, 1]. This needs to compute \(u'_k\) in each iteration.

We finish this section showing some numerical experiments for solving (2.15) based on the approximation given by (4.1) and the algorithm described above. The computation has been carried out using FreeFem++ v4.4-3 ([21], http://www.freefem.org).

First example We have chosen a classical example given by \(\Omega =(0,1)^2\), \(F(x,u)=-u\), \(f=1\), \(\alpha =1\), \(\beta =2\) and some particular choices of \(\kappa ^\alpha \) and \(\kappa ^\beta \). This problem appears in the optimal arrangement of two elastic materials in the cross section of a beam in order to minimize the torsion [9, 23, 26]. It is well known that the problem is equivalent to

$$\begin{aligned} \begin{array}{c}\displaystyle \min \left\{ {1\over 2}\int _\Omega A\nabla u\cdot \nabla u\,dx+{1\over 2}\int _\Omega u^2d\mu -\int _\Omega u\,dx\right\} \\ \displaystyle \mu \in \mathcal{M}_0(\Omega ),\ \theta ^\alpha \in L^\infty (\Omega {\setminus } \mathcal{C}_\mu ;[0,1]), \ u\in H^1_0(\Omega )\cap L^2_\mu (\Omega ),\ A\in L^\infty (\Omega )^{N\times N}\hbox { symmetric}\\ \displaystyle \textrm{Sp}(A)\subset [m^-(\theta ^\alpha ),m^+(\theta ^\alpha )]\hbox { a.e. in }\Omega {\setminus }\mathcal{C}_\mu ,\quad |\Omega {\setminus } \mathcal{C}_\mu |-\kappa ^\beta \le \int _{\Omega {\setminus } \mathcal{C}_\mu }\theta ^\alpha dx\le \kappa ^\alpha . \end{array} \end{aligned}$$
(4.27)

Using this formulation and Theorem 3.2, we have the existence of a quasi-closed set \(C\subset \Omega \), such that

$$\begin{aligned} \mu =\infty _C,\qquad |C|=\min \{\kappa ^\alpha +\kappa ^\beta ,|\Omega |\},\quad A=m^-(\theta ^\alpha )I. \end{aligned}$$

We have numerically solved the problem, using the above algorithm, in two cases:

First case We take \(\kappa ^\alpha =\kappa ^\beta =\pi /8\). With this choice, it is not difficult to check that the solution of (2.15) is unique, and it is given by

$$\begin{aligned} \mu =\infty \chi _{\{|x-({1\over 2},{1\over 2})|>{1\over 2}\}},\quad \theta ^\alpha =\chi _{\{{1\over 2\sqrt{2}}<|x-({1\over 2},{1\over 2})|<{1\over 2}\}}. \end{aligned}$$

In Figs. 1 and 2, we represent the functions \(\theta \) and \(\mu \) obtained numerically for \(n=10^3\) and \(n=10^5\) respectively. Just as expected the results for \(n=10^5\) are more accurate.

Fig. 1
figure 1

First example, \(\kappa ^\alpha =\kappa ^\beta ={\pi \over 8}\): Optimal \(\mu \) (left), and optimal \( \theta \) (right), \(n=10^3\)

Fig. 2
figure 2

First example, \(\kappa ^\alpha =\kappa ^\beta ={\pi \over 8}\): Optimal \(\mu \) (left), and optimal \( \theta \) (right), \(n=10^5\)

Second case We take \(\kappa ^\alpha =\kappa ^\beta =1/2\). Then \(\mu \) is the null function and the problem is reduced to

$$\begin{aligned} \begin{array}{c}\displaystyle \min \left\{ \int _\Omega {|\nabla u|^2\over 1+\theta ^\alpha }dx-\int _\Omega u\,dx\right\} \\ \displaystyle \theta ^\alpha \in L^\infty (\Omega ;[0,1]), \ u\in H^1_0(\Omega ),\ \int _{\Omega }\theta ^\alpha dx\le \kappa ^\alpha . \end{array} \end{aligned}$$
(4.28)

The solution of this problem is not analytically known, but it has been numerically solved by several authors (see e.g. [1] Chapter 5, [10] Chapter 3, [19, 22] ). Our results agree with those obtained by them and have been obtained solving directly problem (4.1). In Fig. 3 we show the optimal proportion \(\theta ^\alpha \) obtained solving (4.1) with \(n=10^4\). Indeed, since in this case the optimal measure \(\hat{\mu }\) in (2.15) is the null measure, the choice of n is not relevant.

Fig. 3
figure 3

First example, \(\kappa ^\alpha =\kappa ^\beta ={1\over 2}\): optimal \( \theta \)

Second example We take \(\Omega =(0,1)^2\), \(\alpha =1\), \(\beta =2\), \(\kappa ^\alpha =0.2\), \(\kappa ^\beta =0.3\), \(F(x,u)=u\), and \(f=-\chi _K+\chi _{\Omega {\setminus } K}\), with K the non-symmetric cross given by (see Fig. 4 left)

$$\begin{aligned} K=\big ([0.15,0.45]\times [0.45,0.55]\big )\cup \big ([0.45, 0.55]\times [0.15,0.85]\big )\cup \big ([0.55,0.85]\times [0.4,0.6]\big ). \end{aligned}$$

A related problem to this one has been numerically solved in [7]. Namely, it is considered

$$\begin{aligned} \begin{array}{c}\displaystyle \min \int _\Omega u\,dx\\ \left\{ \begin{array}{l} -\Delta u=f\ \hbox { in }\omega \\ \displaystyle u=0\ \hbox { on }\overline{\Omega }{\setminus } \omega \\ \displaystyle \omega \subset \Omega \hbox { open,}\ | \omega |\le 0.5, \\ \end{array}\right. \end{array} \end{aligned}$$
(4.29)

which corresponds to (2.4) with \(\alpha =\beta =1\). Indeed, in [7], it is considered the approximated formulation

$$\begin{aligned} \begin{array}{c}\displaystyle \min \int _\Omega u\,dx\\ \displaystyle \left\{ \begin{array}{l} -\Delta u+u\mu =f\ \hbox { in }\Omega ,\quad u\in H^1_0(\Omega )\\ \displaystyle \mu \in L^\infty (\Omega ;[0,n]),\quad \int _\Omega e^{-\varepsilon \mu }\,dx\le 0.5,\end{array}\right. \end{array} \end{aligned}$$
(4.30)

with \(\varepsilon >0\) small and \(n>0\) large (in [7] \(n=10^4\), \(\varepsilon =3\cdot 10^{-4}\)). Observe that in order to minimize (4.29), we want u to be negative, and then we hope \(\omega \) to be a certain neighborhood of the set K, where f is negative. In the numerical computation in [7], the constraint \(|\omega |\le 0.5\) is not saturated. This is because if \(\omega \) is large then u becomes positive in a part of \(\omega \).

In our case, we solve problem (2.4) using formulation (4.1). Such as we hope by Theorem 3.2, the function \(\mu \) we get is essentially a characteristic function, which is given by Fig. 4 right. It is very similar to that obtained in [7] solving (4.30). The function \(\theta ^\alpha \) is given in Fig. 5 left. We recall that the value of \(\theta ^\alpha \) where \(\mu \) is very large is no relevant. Thus, we represent in Fig. 5 right, the function \(\theta ^\alpha \) restricted to the set where \(\mu \) is close to zero. Since the material \(\alpha \) is better than \(\beta \) for this problem, we get that the constraint

$$\begin{aligned} \int _\Omega \Big (\theta -{\mu \over n}\Big )^+dx\le 0.2 \end{aligned}$$

is saturated. The optimal solution completes the set obtained in [7] using the material \(\beta \). Thus, the constraint

$$\begin{aligned} \int _\Omega \Big (1-\theta -{\mu \over n}\Big )^+dx\le 0.3 \end{aligned}$$

is not saturated.

Finally, in Fig. 6 we show the cost evolution of the minimization algorithm, in order to check the decreasing process. The evolution in the other examples is similar.

Fig. 4
figure 4

Second example: right-hand side function f (left), Optimal \(\mu \) (right)

Fig. 5
figure 5

Second example: computed optimal \( \theta \) (left), restricted optimal \( \theta \) (right)

Fig. 6
figure 6

Second example: Cost evolution in minimization process