1 Introduction

Let \(\mathbb{R}_{+}=(0,+\infty)\), and let Ω be a nonempty open bounded domain in \(\mathbb{R}^{N}\) (\(N\geq1\)) with smooth boundary Ω. Let \(\Gamma\subset\partial\Omega\) be a nonempty and open subset of Ω. Consider the following controlled system:

$$ \textstyle\begin{cases} \partial_{t} y-\Delta y=0 &\mbox{in } \Omega\times\mathbb{R}_{+}, \\ y=u &\mbox{on } \Gamma\times\mathbb{R}_{+}, \\ y=0 &\mbox{on }(\partial\Omega-\Gamma)\times\mathbb{R}_{+}, \\ y(0)=y_{0} &\mbox{in } \Omega. \end{cases} $$
(1.1)

Here, \(y_{0}\in L^{2}(\Omega)\) is a given function, and \(u\in L^{\infty}(\mathbb{R}_{+}; L^{2}(\Gamma))\) is the control. We denote the solution to (1.1) as \(y(\cdot; y_{0},u)\).

In this paper, we let

$$L^{\infty}_{+}(\mathbb{R}_{+})\triangleq \bigl\{ v\in L^{\infty}(\mathbb {R}_{+})\bigm| v(t)>0 \mbox{ a.e. } t\in\mathbb{R}_{+} \bigr\} . $$

Denote the norm and inner product of \(L^{2}(\Omega)\) or \(L^{2}(\Gamma)\) as \(\|\cdot\|\) and \(\langle\cdot, \cdot\rangle\), respectively, and the open (or closed) ball of \(L^{2}(\Omega)\), with a center at 0 and a radius of \(r>0\), as \(B(0,r)\) (or \(\bar{B}(0,r)\)).

In industry and engineering, temperature control is a kind of important control, and time optimal control of heat equation is a typical case for temperature control. There are some optimal control problems: time optimal control problem and norm optimal control problem. They are important and interesting problems of optimal control theory. In [1], these optimal control problems have been considered.

Time optimal control problems was discussed by Egorov in 1963 and he proved a bang–bang property for his problem (see [2]), Fattorini discussed it independently in 1964 (see [3]). Then Balakrishnan proved a maximal principle for the optimal control and which can imply the bang–bang property (see [4]), Friedman discussed the time optimal control problem on Banach spaces (see [5]), Fattorini proved that the maximal principle in 1974 for some special Banach spaces. There are many other authors considering the time optimal control problem (see, e.g., [1, 615]). Regarding stochastic cases, norm optimal control problems were considered in [16, 17] for stochastic ordinary differential equations and in [18] for stochastic heat equations.

The reader can also refer to [1921] for the equivalence of three kinds of optimal control problems. For some other interesting work, we refer the reader to [2224]. The approximate controllability of system (1.1) has been studied in much work (see, e.g., [14, 2528]). It is clear that, for each \(\varepsilon >0\), we have \(\|y(T; y_{0},0)\|\leq \varepsilon \) when T is large enough.

The bang–bang property has been studied in much work (see, e.g., [1, 11, 13, 14, 2932]). However, regarding the time-varying bang–bang property, particularly in infinite-dimensional cases, there is only one paper [19] in which the authors considered a kind of time optimal control problem that involves an interior subset.

In this paper, we consider the time-varying bang–bang property of the heat equation that affects the boundary.

For a given function \(M(\cdot )\in L^{\infty}_{+}(\mathbb{R}_{+})\), we define

$$ \mathcal{U}_{M(\cdot)}\triangleq \bigl\{ v\in L^{\infty}\bigl(\mathbb {R}_{+}; L^{2}(\Gamma) \bigr)\bigm| \bigl\| v(t)\bigr\| _{L^{2}(\Gamma)} \leq M(t) \mbox{ for a.e. } t\in\mathbb{R}_{+} \bigr\} $$
(1.2)

and

$$ \mathcal{R}(y_{0},T) \triangleq \bigl\{ y(T;y_{0},u)\bigm| u\in\mathcal {U}_{M(\cdot)} \bigr\} \quad \mbox{for each } T\in\mathbb{R}_{+}. $$

The time optimal control problem considered is as follows:

$$ T^{*}\triangleq\inf_{T\in\mathbb{R}_{+}} \bigl\{ T\bigm| y(T;y_{0}, u)\in \bar{B}(0,\varepsilon ), u\in\mathcal{U}_{M(\cdot)} \bigr\} , $$
(1.3)

where \(\varepsilon>0\). In this problem, if \(u\in\mathcal{U}_{M(\cdot )}\) and \(y(T;y_{0}, u)\in\bar{B}(0,\varepsilon )\) for some \(t\in\mathbb{R}_{+}\), we call u an admissible control; if \(T^{*}\in\mathbb{R}_{+}\) and \(u^{*}\in\mathcal{U}_{M(\cdot)}\) satisfy \(y(T^{*};y_{0}, u^{*})\in\bar{B}(0,\varepsilon )\), we call \(T^{*}\) and \(u^{*}\) the optimal time and a time optimal control, respectively.

If \(y_{0}\in\bar{B}(0,\varepsilon )\), taking the control \(u=0\), then it is obvious that the optimal time \(T^{*}=0\), this is trivial. Hence, throughout this paper, we assume that

$$ y_{0}\notin\bar{B}(0,\varepsilon ), $$

from which we see that if \(T^{*}\) exists, then \(T^{*}>0\).

The main result of this paper is in establishing the following time-varying bang–bang property of problem (1.3).

Theorem 1.1

Assume that \(M(\cdot )\in L^{\infty}_{+}(\mathbb{R}_{+})\) and \(\varepsilon >0\). Then the following two conclusions are true:

  1. (i)

    There exist at least one optimal time and time optimal control for problem (1.3);

  2. (ii)

    Any time optimal control \(u^{*}\) for problem (1.3) satisfies the following time-varying bang–bang property:

    $$ \bigl\Vert u^{*}(t) \bigr\Vert _{L^{2}(\Gamma)}=M(t) \quad \textit{for a.e. } t\in \bigl(0, T^{*} \bigr) $$
    (1.4)

    and

    $$ \bigl\Vert y \bigl(T^{*};y_{0}, u^{*} \bigr) \bigr\Vert _{L^{2}(\Omega)}= \varepsilon. $$
    (1.5)

We organize this paper as follows. In Sect. 2, we prove the existence of optimal controls for problem (1.3) and discuss some properties of the optimal controls (see Lemma 2.1). Then we prove Theorem 1.1.

2 Existence of optimal control for (1.3) and its properties

Lemma 2.1

For problem (1.3), the following two conclusions are true:

  1. (i)

    There exists at least one optimal time \(T^{*}\) and time optimal control \(u^{*}\) for problem (1.3).

  2. (ii)

    Any time optimal control \(u^{*}\) for problem (1.3) satisfies the following property:

    $$ \bigl\Vert u^{*}(t) \bigr\Vert _{L^{2}(\Gamma)}=M(t)\quad \textit{for a.e. } t\in \bigl(0, T^{*} \bigr). $$
    (2.1)

Proof

Let \(u=0\). Then, by the property of the heat equation, we have \(\| e^{\Delta T}y_{0}\|_{L^{2}(\Omega)}\rightarrow0\) as \(T\rightarrow\infty \), which implies that \(T^{*}<+\infty\) by the definition of \(T^{*}\) (see (1.3)).

Let \(\{T_{n}\}_{n=1}^{\infty}\), with \(T_{n}\geq T_{n+1}\) for all \(n\in \mathbb{N}\) such that

$$ T_{n}\rightarrow T^{*}, $$

where \(T^{*}\) is defined as (1.3). Then there exists a sequence \(\{u_{n}\}_{n\geq1}\subset\mathcal {U}_{M(\cdot)}\) such that

$$ \bigl\Vert y(T_{n};y_{0}, u_{n}) \bigr\Vert \leq \varepsilon \quad \mbox{as } n\rightarrow\infty. $$
(2.2)

Denote

$$ \tilde{u}_{n}(t)= \textstyle\begin{cases} u_{n}(t) &\mbox{in } (0,T_{n}), \\ 0 &\mbox{in } [T_{n},T_{1}]. \end{cases} $$

Then

$$ \bigl\Vert y(t; y_{0},\tilde{u}_{n}) \bigr\Vert _{L^{2}(\Omega)}\leq \varepsilon \quad \mbox{for all } t\in[T_{n},T_{1}]. $$

Since

$$ \bigl\Vert \tilde{u}_{n}(t) \bigr\Vert _{L^{2}(\Gamma)}\leq M(t) \leq \Vert M \Vert _{L^{\infty}(0,T_{1})} \quad \mbox{for a.e. } t \in(0,T_{1}], $$

there exists a subsequence of \(\{\tilde{u}_{n}\}_{n\geq1}\), still denoted thus, and \(v^{*}\in L^{\infty}(0,T_{1};L^{2}(\Gamma))\) such that

$$ \tilde{u}_{n}\rightarrow\tilde{v}^{*} \quad \mbox{weakly star in } L^{\infty}\bigl(0,T_{1};L^{2}(\Gamma) \bigr). $$
(2.3)

According to (2.3), there is a subsequence of \(\{\tilde{u}_{n}\} _{n\geq1}\), still denoted thus, such that

$$ y(\cdot;y_{0}, \tilde{u}_{n})\rightarrow y \bigl(\cdot;y_{0}, \tilde{v}^{*} \bigr)\quad \mbox{strongly in } C \bigl([0,T_{1}];L^{2}(\Omega) \bigr), $$
(2.4)

where \(y(\cdot; y_{0},\tilde{v}^{*})\) is the solution to the following system:

$$ \textstyle\begin{cases} \partial_{t} y-\Delta y=0 &\mbox{in } \Omega\times(0,T_{1}), \\ y=\tilde{v}^{*} &\mbox{on }\Gamma\times(0,T_{1}), \\ y=0 &\mbox{on } (\partial\Omega-\Gamma)\times(0,T_{1}), \\ y(0)=y_{0} &\mbox{in }\Omega. \end{cases} $$

It follows from (2.2) and (2.4) that

$$ \bigl\Vert y \bigl(T_{n};y_{0},\tilde{v}^{*} \bigr) \bigr\Vert _{L^{2}(\Omega)}\leq \varepsilon . $$
(2.5)

Letting \(n\rightarrow\infty\), we obtain

$$ \bigl\Vert y \bigl(T^{*}; y_{0},\tilde{v}^{*} \bigr) \bigr\Vert _{L^{2}(\Omega)}\leq \varepsilon , $$

which shows that \(v^{*}=\tilde{v}^{*}|_{(0,T^{*})}\) is an optimal control.

Next, we show that

$$ \bigl\Vert \tilde{v}^{*}(t) \bigr\Vert _{L^{2}(\Gamma)}\leq M(t) \quad \mbox{a.e. } t\in \bigl(0,T^{*} \bigr). $$
(2.6)

By contradiction, there exist \(\delta_{0}>0\) and a measurable set \(E_{0}\subset(0,T^{*})\), with \(|E_{0}|>0\), such that

$$ \bigl\Vert \tilde{v}^{*}(t) \bigr\Vert _{L^{2}(\Gamma)}>M(t)+ \delta_{0},\quad \forall t\in E_{0}, $$
(2.7)

where \(|E_{0}|\) is the Lebesgue measure of \(E_{0}\). Then we have

$$ \int_{E_{0}} \bigl\Vert v^{*}(t) \bigr\Vert _{L^{2}(\Gamma)}\, \mathrm{d}t\geq \int_{E_{0}} M(t)\, \mathrm{d}t+\delta_{0} |E_{0}|. $$
(2.8)

According to (2.7), we can set

$$ \zeta(t)\triangleq \textstyle\begin{cases} 0,&t\in(0,T)\setminus E_{0}, \\ \frac{v^{*}(t)}{\|v^{*}(t)\|},&t\in E_{0}. \end{cases} $$
(2.9)

It is obvious that \(\zeta\in L^{\infty}(0,T; L^{2}(\Gamma))\). From (2.3), it is easily verified that

$$\begin{aligned} \begin{aligned}[b] \int_{E_{0}} \bigl\langle u_{n}(t),\zeta(t) \bigr\rangle _{L^{2}(\Gamma)} \,\mathrm{d}t&= \int_{0}^{T} \bigl\langle u_{n}(t), \chi_{E_{0}}(t)\zeta(t) \bigr\rangle _{L^{2}(\Gamma )} \,\mathrm{d}t \\ &\rightarrow \int_{0}^{T} \bigl\langle \chi_{E_{0}}(t)v^{*}(t), \zeta(t) \bigr\rangle _{L^{2}(\Gamma)} \, \mathrm{d}t. \end{aligned} \end{aligned}$$
(2.10)

Since \(\|u_{n}(t)\|_{L^{2}(\Gamma)}\leq M(t)\) and \(\|\zeta(t)\| _{L^{2}(\Gamma)}\leq1\) for a.e. \(t\in(0,T^{*})\), it follows from (2.9) and (2.10) that

$$ \int_{E_{0}} \bigl\Vert v^{*}(t) \bigr\Vert _{L^{2}(\Gamma)}\, \mathrm{d}t=\lim_{n\rightarrow \infty} \int_{E_{0}} \bigl\langle u_{n}(t),\zeta(t) \bigr\rangle _{L^{2}(\Gamma)} \,\mathrm{d}t \leq \int_{E_{0}}M(t)\,\mathrm{d}t, $$

which contradicts (2.8).

Finally, let \(u^{*}\triangleq v^{*}\). Then (i) of this lemma follows from (2.5) and (2.6).

(ii) Since \(y_{0}\notin\bar{B}(0,\varepsilon )\), we see that \(T^{*}>0\). The proof is carried out in the following three steps.

Step 1. We show that \(y(T^{*}; y_{0}, u^{*})\in\partial B(0,\varepsilon )\).

Otherwise, we have \(y(T^{*}; y_{0},u^{*})\in B(0,\varepsilon )\), i.e., \(\|y(T^{*}; y_{0},u^{*})\|_{L^{2}(\Omega)}<\varepsilon \). For each \(\delta>0\), we have

$$\begin{aligned} \bigl\Vert y \bigl(T^{*}-\delta; y_{0},u^{*} \bigr)-y \bigl(T^{*}; y_{0}, u^{*} \bigr) \bigr\Vert _{L^{2}(\Omega)} =& \biggl\Vert \biggl[e^{\Delta(T^{*}-\delta)}y_{0}+ \int_{0}^{T^{*}-\delta} e^{\Delta(T^{*}-\delta-s)}\chi_{\Gamma}u^{*}(s)\,\mathrm{d}s \biggr] \\ &{}- \biggl[e^{\Delta T^{*}}y_{0}+ \int_{0}^{T^{*}}e^{\Delta(T^{*}-s)}\chi_{\Gamma}u^{*}(s)\,\mathrm{d}s \biggr] \biggr\Vert _{L^{2}(\Omega)} \\ \leq& \bigl\Vert e^{\Delta(T^{*}-\delta)} \bigl(I-e^{\Delta\delta } \bigr)y_{0} \bigr\Vert _{L^{2}(\Omega)} \\ &{} + \biggl\Vert \int_{0}^{T^{*}-\delta} \bigl(I-e^{\Delta\delta} \bigr)e^{\Delta(T^{*}-\delta-s)}\chi_{\Gamma}u(s)\,\mathrm{d}s \biggr\Vert _{L^{2}(\Omega)} \\ &{}+ \biggl\Vert \int_{T^{*}-\delta}^{T^{*}}e^{\Delta(T^{*}-s)}\chi_{\Gamma}u^{*}(s)\,\mathrm{d}s \biggr\Vert _{L^{2}(\Omega)}. \end{aligned}$$

Noting that

$$ \bigl\Vert e^{\Delta(T^{*}-\delta)} \bigl(I-e^{\Delta\delta} \bigr)y_{0} \bigr\Vert _{L^{2}(\Omega)}\leq \bigl\Vert \bigl(I-e^{\Delta\delta } \bigr)y_{0} \bigr\Vert _{L^{2}(\Omega)}\rightarrow0 $$

as \(\delta\rightarrow0\),

$$\begin{aligned} \biggl\Vert \int_{0}^{T^{*}-\delta} \bigl(I-e^{\Delta\delta} \bigr)e^{\Delta(T^{*}-\delta-s)}\chi_{\Gamma}u(s)\,\mathrm{d}s \biggr\Vert _{L^{2}(\Omega)} &= \biggl\Vert \bigl(I-e^{\Delta\delta} \bigr) \int_{0}^{T^{*}-\delta} e^{\Delta(T^{*}-\delta-s)}\chi_{\Gamma}u(s) \,\mathrm{d}s \biggr\Vert _{L^{2}(\Omega)} \\ &\rightarrow0 \end{aligned}$$

as \(\delta\rightarrow0\) and

$$ \biggl\Vert \int_{T^{*}-\delta}^{T^{*}}e^{\Delta(T^{*}-s)}\chi_{\Gamma}u^{*}(s)\,\mathrm{d}s \biggr\Vert _{L^{2}(\Omega)}\leq\delta \bigl\Vert M(\cdot) \bigr\Vert _{L^{\infty}(0,T^{*})}\rightarrow0 $$

as \(\delta\rightarrow0\), we obtain

$$ \bigl\Vert y \bigl(T^{*}-\delta; y_{0},u^{*} \bigr)-y \bigl(T^{*}; y_{0},u^{*} \bigr) \bigr\Vert _{L^{2}(\Omega)}\rightarrow0 \quad \mbox{as } \delta \rightarrow0. $$

This, together with \(y(T^{*}; y_{0},u^{*})\in B(0,\varepsilon )\), implies that, for a sufficiently small \(\delta>0\), we have

$$ y \bigl(T^{*}-\delta; y_{0}, u^{*} \bigr)\in B(0,\varepsilon ). $$

This shows that \(T^{*}-\delta\) is also an optimal time in (1.3), which contradicts the definition of \(T^{*}\).

Step 2. We show that \(\mathcal{R}(y_{0},T^{*})\cap\bar{B}(0,\varepsilon )\) has only one point.

Otherwise, there exist \(u_{1}, u_{2}\in\mathcal{U}_{M(\cdot)}\) such that

$$ \bigl\Vert y \bigl(T^{*};y_{0}, u_{1} \bigr) \bigr\Vert _{L^{2}(\Omega)}= \bigl\Vert y \bigl(T^{*};y_{0}, u_{2} \bigr) \bigr\Vert _{L^{2}(\Omega)}= \varepsilon $$
(2.11)

and

$$ y \bigl(T^{*};y_{0}, u_{1} \bigr)\neq y \bigl(T^{*};y_{0}, u_{2} \bigr). $$
(2.12)

Denote

$$ {\hat{u}}(\cdot)\triangleq\frac{u_{1}(\cdot)+u_{2}(\cdot)}{2}\quad \mbox{and} \quad \hat{y}(\cdot)\triangleq\frac{y_{1}(\cdot;y_{0}, u_{1})+y(\cdot;y_{0}, u_{2})}{2}. $$
(2.13)

It is clear that \({\hat{u}}\in\mathcal{U}_{M(\cdot)}\) and that

$$ \textstyle\begin{cases} \partial_{t} \hat{y}-\Delta \hat{y}=0 &\mbox{in } \Omega\times (0,T^{*}), \\ \hat{y}=\hat{u} & \mbox{on }\Gamma\times(0,T^{*}) \\ \hat{y}=0 &\mbox{on }(\partial\Omega-\Gamma)\times(0,T^{*}), \\ \hat{y}(0)=y_{0}&\mbox{in } \Omega. \end{cases} $$
(2.14)

Note that \(\bar{B}(0,\varepsilon )\) is a strictly convex subset of \(L^{2}(\Omega)\). Based on (2.11), (2.12) and (2.13), we have

$$ \bigl\Vert \hat{y} \bigl(T^{*}; y_{0},u^{*} \bigr) \bigr\Vert _{L^{2}(\Omega)}< \varepsilon $$
(2.15)

since \({\hat{u}}\in\mathcal{U}_{M(\cdot)}\) according to (2.14) and (2.15), which contradicts the optimality of ε.

Step 3. We prove that any time optimal control \(u^{*}\) satisfies (2.1).

In fact, since \(\mathcal{R}(y_{0},T^{*})\cap\bar{B}(0,\varepsilon )\) has only one point, \(\{y(T;y_{0}, u^{*})\}=\mathcal{R}(y_{0},T^{*})\cap\bar{B}(0,\varepsilon )\). Since \(\mathcal{R}(y_{0},T^{*})\) and \(\bar{B}(0,\varepsilon )\) are two convex sets, according to the Hahn–Banach theorem, there exists \(\eta^{*}\in L^{2}(\Omega)\setminus\{0\}\) such that

$$ \sup_{y\in\mathcal{R}(y_{0},T^{*})} \bigl\langle y, \eta^{*} \bigr\rangle _{L^{2}(\Omega)}\leq \inf_{z\in\bar{B}(0,\varepsilon )} \bigl\langle z, \eta^{*} \bigr\rangle _{L^{2}(\Omega )}\leq \bigl\langle \eta^{*}, y \bigl(T^{*};y_{0},u^{*} \bigr) \bigr\rangle _{L^{2}(\Omega)}. $$
(2.16)

This shows that

$$\begin{aligned} \begin{aligned} &\sup_{u\in\mathcal{U}_{1}} \int_{0}^{T^{*}} \bigl\langle e^{\Delta (T^{*}-\sigma)} \chi_{\Gamma}M(\sigma)u(\sigma), \eta^{*} \bigr\rangle _{L^{2}(\Omega)}\,\mathrm {d}\sigma \\ &\quad \leq \int_{0}^{T^{*}} \bigl\langle e^{\Delta (T^{*}-\sigma)} \chi_{\Gamma}M(\sigma) \widetilde{u}^{*}(\sigma), \eta ^{*} \bigr\rangle _{L^{2}(\Omega)}\,\mathrm {d}\sigma, \end{aligned} \end{aligned}$$

i.e.,

$$\begin{aligned}& \sup_{u\in\mathcal{U}_{1}} \int_{0}^{T^{*}} \bigl\langle u(\sigma),\chi _{\Gamma}M(\sigma) e^{\Delta^{*}(T^{*}-\sigma)} \eta^{*} \bigr\rangle _{L^{2}(\Gamma)}\,\mathrm {d}\sigma \\& \quad \leq \int_{0}^{T^{*}} \bigl\langle \widetilde{u}^{*}(\sigma), \chi_{\Gamma}M(\sigma) e^{\Delta^{*}(T^{*}-\sigma)} \eta ^{*} \bigr\rangle _{L^{2}(\Gamma)} \,\mathrm {d}\sigma. \end{aligned}$$
(2.17)

Here,

$$ \widetilde{u}^{*}\in\mathcal{U}_{1}\triangleq \bigl\{ u\in L^{\infty}\bigl(0,T^{*}; L^{2}(\Gamma) \bigr)\bigm| \bigl\Vert u(t) \bigr\Vert _{L^{2}(\Gamma)}\leq1 \mbox{ for a.e. } t\in \bigl(0, T^{*} \bigr) \bigr\} $$

and

$$ u^{*}(t)=M(t)\widetilde{u}^{*}(t)\quad \mbox{for a.e. } t\in \bigl(0,T^{*} \bigr). $$
(2.18)

Let \(E_{0}\) be the set of the Lebesgue points of \(\widetilde{u}^{*}(\cdot)\) and \(M(\cdot)\) in \((0, T^{*})\). For each \(t_{0}\in E_{0}\), let

$$ {\widetilde{u}}_{\lambda}(t)\triangleq \textstyle\begin{cases} \widetilde{u}^{*}(t),&t\in(0, T^{*})\setminus(t_{0}-\lambda, t_{0}+\lambda ), \\ \zeta,&t\in(t_{0}-\lambda, t_{0}+\lambda), \end{cases} $$

where \(\zeta\in L^{2}(\Gamma)\), with \(\|\zeta\|_{L^{2}(\Gamma)}\leq1\), and \(\lambda \in(0,\min\{t_{0},T^{*}-t_{0}\})\). By (2.17), we have

$$ \int_{t_{0}-\lambda}^{t_{0}+\lambda} \bigl\langle \zeta, \chi_{\Gamma}M(\sigma) e^{\Delta^{*} (T^{*}-\sigma)} \eta^{*} \bigr\rangle _{L^{2}(\Gamma)} \,\mathrm{d}\sigma \leq \int_{t_{0}-\lambda}^{t_{0}+\lambda} \bigl\langle \widetilde{u}^{*}(\sigma ), \chi_{\Gamma}M(\sigma) e^{\Delta^{*}(T^{*}-\sigma)} \eta^{*} \bigr\rangle _{L^{2}(\Gamma)} \,\mathrm{d}\sigma. $$

Letting \(\lambda\rightarrow0+\), we obtain

$$ \bigl\langle \zeta,\chi_{\Gamma}M(t_{0}) e^{\Delta^{*} (T^{*}-t_{0})} \eta ^{*} \bigr\rangle _{L^{2}(\Gamma)}\leq \bigl\langle \widetilde{u}^{*}(t_{0}), \chi_{\Gamma}M(t_{0}) e^{\Delta^{*}(T^{*}-t_{0})} \eta^{*} \bigr\rangle _{L^{2}(\Gamma)}. $$

This implies that

$$ \sup_{\|\zeta\|_{L^{2}(\Gamma)}\leq1} \bigl\langle \zeta, \chi _{\Gamma}M(t_{0})e^{\Delta^{*}(T-t_{0})}\eta^{*} \bigr\rangle _{L^{2}(\Gamma )}\leq \bigl\langle \widetilde{u}^{*}(t_{0}), \chi_{\Gamma}M(t_{0})e^{\Delta ^{*}(T-t_{0})} \eta^{*} \bigr\rangle _{L^{2}(\Gamma)}, $$

from which we obtain

$$ \bigl\Vert \chi_{\omega}M(t_{0})e^{\Delta^{*}(T-t_{0})} \eta^{*} \bigr\Vert _{L^{2}(\Gamma)} \leq \bigl\Vert \widetilde{u}^{*}(t_{0}) \bigr\Vert _{L^{2}(\Omega)} \bigl\Vert \chi_{\omega}M(t_{0})e^{\Delta^{*}(T-t_{0})} \eta^{*} \bigr\Vert _{L^{2}(\Gamma)}. $$
(2.19)

Noting that \({\widetilde{u}}^{*}\in\mathcal{U}_{1}\) and \(\eta^{*}\neq0\), according to (2.18) and (2.19), we obtain

$$ \bigl\Vert u^{*}(t) \bigr\Vert _{L^{2}(\Gamma)}=M(t)\quad \mbox{for a.e. } t\in \bigl(0, T^{*} \bigr). $$

This completes the proof of this lemma. □

Based on Lemma 2.1, we have the following result.

Corollary 2.2

Let and \(u_{2}^{*}\) be two optimal controls for problem (1.3). Then \(u_{1}^{*}= u_{2}^{*}\).

Following from Lemma 2.1, we can now prove Theorem 1.1.

Proof of Theorem 1.1

From (i) and (ii) of Lemma 2.1, we obtain (i) and (ii) of Theorem 1.1.

Finally, we show that \(\|y(T^{*}; y_{0}, u^{*})\|_{L^{2}(\Omega)}=\varepsilon \).

By contradiction, we suppose that \(y(T^{*}; y_{0},u^{*})\in B(0,\varepsilon )\), i.e., \(\|y(T^{*}; y_{0},u^{*})\|_{L^{2}(\Omega)}<\varepsilon \). For \(\delta>0\), we obtain

$$\begin{aligned} \bigl\Vert y \bigl(T^{*}-\delta; y_{0},u^{*} \bigr)-y \bigl(T^{*}; y_{0}, u^{*} \bigr) \bigr\Vert _{L^{2}(\Omega)} =& \biggl\Vert \biggl[e^{\Delta(T^{*}-\delta)}y_{0}+ \int_{0}^{T^{*}-\delta} e^{\Delta(T^{*}-\delta-s)}\chi_{\Gamma}u^{*}(s)\,\mathrm{d}s \biggr] \\ &{}- \biggl[e^{\Delta T^{*}}y_{0}+ \int_{0}^{T^{*}}e^{\Delta(T^{*}-s)}\chi_{\Gamma}u^{*}(s)\,\mathrm{d}s \biggr] \biggr\Vert _{L^{2}(\Omega)} \\ \leq& \bigl\Vert e^{\Delta(T^{*}-\delta)} \bigl(I-e^{\Delta\delta } \bigr)y_{0} \bigr\Vert _{L^{2}(\Omega)} \\ &{} + \biggl\Vert \int_{0}^{T^{*}-\delta} \bigl(I-e^{\Delta\delta} \bigr)e^{\Delta(T^{*}-\delta-s)}\chi_{\Gamma}u(s)\,\mathrm{d}s \biggr\Vert _{L^{2}(\Omega)} \\ &{}+ \biggl\Vert \int_{T^{*}-\delta}^{T^{*}}e^{\Delta(T^{*}-s)}\chi_{\Gamma}u^{*}(s)\,\mathrm{d}s \biggr\Vert _{L^{2}(\Omega)}. \end{aligned}$$

Noting that

$$ \bigl\Vert e^{\Delta(T^{*}-\delta)} \bigl(I-e^{\Delta\delta} \bigr)y_{0} \bigr\Vert _{L^{2}(\Omega)}\leq \bigl\Vert \bigl(I-e^{\Delta\delta } \bigr)y_{0} \bigr\Vert _{L^{2}(\Omega)}\rightarrow0 $$

as \(\delta\rightarrow0\),

$$\begin{aligned} \biggl\Vert \int_{0}^{T^{*}-\delta} \bigl(I-e^{\Delta\delta} \bigr)e^{\Delta(T^{*}-\delta-s)}\chi_{\Gamma}u(s)\,\mathrm{d}s \biggr\Vert _{L^{2}(\Omega)} &= \biggl\Vert \bigl(I-e^{\Delta\delta} \bigr) \int_{0}^{T^{*}-\delta} e^{\Delta(T^{*}-\delta-s)}\chi_{\Gamma}u(s) \,\mathrm{d}s \biggr\Vert _{L^{2}(\Omega)} \\ &\rightarrow0 \end{aligned}$$

as \(\delta\rightarrow0\) and

$$ \biggl\Vert \int_{T^{*}-\delta}^{T^{*}}e^{\Delta(T^{*}-s)}\chi_{\Gamma}u^{*}(s)\,\mathrm{d}s \biggr\Vert _{L^{2}(\Omega)}\leq\delta \bigl\Vert M(\cdot) \bigr\Vert _{L^{\infty}(0,T^{*})}\rightarrow0 $$

as \(\delta\rightarrow0\), we obtain

$$ \bigl\Vert y \bigl(T^{*}-\delta; y_{0},u^{*} \bigr)-y \bigl(T^{*}; y_{0},u^{*} \bigr) \bigr\Vert _{L^{2}(\Omega)}\rightarrow0 \quad \mbox{as } \delta \rightarrow0. $$

This, together with \(y(T^{*}; y_{0},u^{*})\in B(0,\varepsilon )\), implies that, for a sufficiently small \(\delta>0\), we have

$$ y \bigl(T^{*}-\delta; y_{0}, u^{*} \bigr)\in B(0,\varepsilon ). $$

This shows that \(T^{*}-\delta\) is also an optimal time in (1.3), which contradicts the definition of \(T^{*}\). Hence, \(\|y(T^{*}; y_{0},u^{*})\|_{L^{2}(\Omega)}=\varepsilon \). □