Generator of $C_0$-semigroup I had asked a similar question before but I realized there was something wrong with it, so I'm re-asking the question.
Consider,
Let $X= L^2[0,l]$
$$\frac{\partial u}{\partial t} = c^2 \frac{\partial^2 u}{\partial x^2},    0\leq x\leq l$$
$$u(x,0)=f(x)$$
Then solution of the equation is,
$$u(x,t)=\sum e^{-\lambda_n^2t}<f,u_n>u_n(x)$$
where,
$$u_n(x)=\sqrt{\frac{2}{l}} \ sin(\frac{n\pi x}{l})$$ and,
$$\lambda_n=\frac{n \pi c}{l}$$
Let $T(t)f(x):=u(x,t)$. Then $(T(t))_{t\geq 0}$ is a $C_0$-semigroup.
I would like to show that generator of this semigroup is $Af := f''$.
I'm having trouble showing this. Any help is appreciated.
Edit: I have tried something and I think I might be right. Please let me know if there are any mistakes.
Let $D(A)=\{f \in X : f(0)=f(l)=0\}$. Then $A^*f=f''$ where $A^*$ is adjoint of $A$.
Consider
$$\frac{T(t)f-f}{t} = \sum \frac{[e^{-\lambda_n^2t}-1]}{t}<f,u_n>u_n(x)$$
Then
\begin{equation}
\begin{split}
\lim_{t\downarrow 0}\frac{T(t)f-f}{t} & =-\sum\lambda_n^2<f,u_n>u_n(x)\\
& = c^2 \sum <f,u_n''>u_n(x) \\
& = c^2 \sum <f'',u_n>u_n(x) \\
& = c^2 f''
\end{split}
\end{equation}
Thus $Af=c^2 f''$
Is this correct? I think I read somewhere that generator has to be $f''$, I may be wrong.
 A: The functions
$$
               u_n(x)=\sqrt{\frac{2}{l}}\sin\left(\frac{n\pi x}{l}\right)
$$
form an orthonormal basis of $L^2[0,l]$. Define
$$
     (T(t)f)(x) = \sum_{n=1}^{\infty}e^{-\lambda_n^2 t}\langle f,u_n\rangle u_n(x),\;\;\; t \ge 0,\; f\in L^2[0,l].
$$
Then $\langle T(t)f,u_n\rangle = e^{-\lambda_n^2 t}\langle f,u_n\rangle$ implies
\begin{align}
     (T(t)T(t')f)(x) & = \sum_{n=1}^{\infty} e^{-\lambda_n^2 t}\langle T(t')f,u_n\rangle u_n(x) \\
    & = \sum_{n=1}^{\infty}e^{-\lambda_n^2 t}e^{-\lambda_n^2 t'}\langle f,u_n\rangle u_n(x) \\
    & = (T(t+t')f)(x).
\end{align}
Because $\{ u_n \}$ is an orthonormal basis of $L^2$, then $T(0)=I$. So $T$ is a semigroup. Also,
\begin{align}
          \|T(t)f\|^2 & = \left\| \sum_{n=1}^{\infty}e^{-\lambda_n^2 t}\langle f,u_n\rangle u_n\right\|^2 \\
    & = \sum_{n=1}^{\infty}e^{-2\lambda_n^2 t}|\langle f,u_n\rangle|^2 \\
    & \le e^{-2\lambda_1^2 t}\sum_{n=1}^{\infty}|\langle f,u_n\rangle|^2 \\
    & = e^{-2\lambda_1^2 t}\|f\|^2.
\end{align}
So $T(t)$ is a semigroup of contractions, with $\|T(t)\| \le e^{-\lambda_1^2 t} \le 1$, for all $t \ge 0$. To see that $T$ is a $C_0$ semigroup, it must be shown that $\lim_{t\downarrow 0}\|T(t)f-f\|=0$. This follows from the Lebesgue bounded convergence theorem applied to the discrete sum:
\begin{align}
        \lim_{t\downarrow 0}\|T(t)f-f\|^2 & = 
        \lim_{t\downarrow 0}\left\|\sum_{n=1}^{\infty}(e^{-\lambda_n^2 t}-1)\langle f,u_n\rangle u_n\right\|^2 \\
    &= \lim_{t\downarrow 0}\sum_{n=1}^{\infty}(e^{-\lambda_n^2 t}-1)^2|\langle f,u_n\rangle|^2 = 0.
\end{align} 
Therefore $T$ is a $C_0$ semigroup on $L^2[0,l]$. The domain of the generator $A$ consists of all $f \in L^2$ for which the following exists
$$
         L^2\mbox{-}\lim_{t\downarrow 0}\frac{1}{t}(T(t)f-f)
$$
The generator $A$ is defined so that $Af$ is the above limit for all $f\in\mathcal{D}(A)$ for which the limit exists. The generator is always a closed densely-defined linear operator. The domain contains all finite linear combinations of the $\{ u_n \}$ because
$$
            \lim_{t\downarrow 0}\frac{1}{t}(T(t)u_n - u_n) = \lim_{t\downarrow 0}\frac{e^{-\lambda_n^2 t}-1}{t}u_n = -\lambda_n^2 u_n.
$$
So it is reasonable to conjecture that
$$
           \mathcal{D}(A) = \left\{ f \in L^2 : \sum_{n=1}^{\infty}\lambda_n^4|\langle f,u_n\rangle|^2 < \infty \right\}, \\
          Af = -\sum_{n=1}^{\infty}\lambda_n^2 \langle f,u_n\rangle u_n.
$$
To see that every $f\in \mathcal{D}(A)$ satisfies the above condition, note that the following limit exists for every $f\in\mathcal{D}(A)$ by the monotone convergence theorem applied to the sum:
\begin{align}
      \lim_{t\downarrow 0}\left\|\frac{1}{t}(T(t)-I)f\right\|^2 
  & = \lim_{t\downarrow 0}\left\|\sum_{n=1}^{\infty}\frac{e^{-\lambda_n^2 t}-1}{t}\langle f,u_n\rangle u_n\right\|^2 \\
  & = \lim_{t\downarrow 0}\left\|\sum_{n=1}^{\infty}\lambda_n^2\frac{1}{t}\int_{0}^{t}e^{-\lambda_n^2 u}du\langle f,u_n\rangle u_n\right\|^2 \\
  & = \lim_{t\downarrow 0}\sum_{n=1}^{\infty}\lambda_n^4\left(\frac{1}{t}\int_{0}^{t}e^{-\lambda_n^2 u}du\right)^2|\langle f,u_n\rangle|^2 \\
  & = \sum_{n=1}^{\infty}\lambda_n^4|\langle f,u_n \rangle|^2.
\end{align}
So it is necessary that the sum on the right be finite if $f\in\mathcal{D}(A)$. It is also sufficient because you can show that, if $f$ satisfies the stated condition, the following limit is $0$:
$$
   \lim_{t\downarrow 0}\left\|\frac{1}{t}(T(t)f-f)-\sum_{n=1}^{\infty}(-\lambda_n^2)\langle f,u_n\rangle u_n\right\| = 0
$$
Hence, the generator $A$ is
$$
          Af = -\sum_{n=1}^{\infty}\lambda_n^2 \langle f,u_n\rangle u_n,
$$
where the domain $\mathcal{D}(A)$ is as described above.
Note that $T(t)f$ is infinitely differentiable in $x$ for all $t > 0$. This is because the sum $u(t,x)=\sum_{n=1}^{\infty} e^{-\lambda_n^2 t}\langle f,u_n \rangle u_n(x)$ is infinitely differentiable in $x$ for $t > 0$. Furthermore, if $f\in\mathcal{D}(A)$ then the following have limits in $L^2$ and $t\downarrow 0$, which can be seen from their sum representations.
$$
       T(t)f, \;\; \frac{d}{dx}T(t)f,\;\; \frac{d^2}{dx^2}T(t)f.
$$
That's enough to show that $f$ has two weak derivatives, both derivatives are in $L^2$, and $f(0)=f(l)=0$. I'll leave this last part to you. Then, conversely, if $f$ has two such weak derivatives with $f(0)=f(l)=0$, then you can show that
$$
           \langle f'',u_n\rangle = -\lambda_n^2 \langle f,u_n\rangle,
$$
which is enough to prove that $f\in\mathcal{D}(A)$ because of the characterization of $\mathcal{D}(A)$ given in the previous paragraph. So the following are equivalent for a given $f\in L^2[0,l]$:
\begin{align}
      1. & \;\;  L^2\mbox{-}\lim_{t\downarrow 0}\frac{1}{t}(T(t)f-f) \mbox{ exists. } \\
      2. & \;\;  \sum_{n=1}^{\infty}\lambda_n^4 |\langle f,u_n\rangle|^2 < \infty. \\
      3. & \;\; f \in L^2 \mbox{ has two } L^2 \mbox{ weak derivatives, and } f(0)=f(l)=0.
\end{align}
