TITLE: An inequality about linear PDE
QUESTION [6 upvotes]: I am trying to solve the following problem:

Let $\Omega$ be a bounded smooth domain in $\mathbb{R}^n, \ n\geq 2$. Let $u\in C^2(\overline{\Omega})$ be a solution of 
  $$\left\{\begin{array}{ll}u_t-\Delta u=f(x)& \text{in } \Omega\times(0,\infty)\\ u=0&\text{on }\partial \Omega\times (0,\infty) \\ u=g(x) & \text{on } \Omega\times\{0\}\end{array}\right.$$
  Show that 
  $$\max_{0\leq t\leq T} \int_\Omega u^2(x,t)dx+\int_0^T\int_\Omega|\nabla u(x,t)|^2dx\, dt\leq C\left(\int_\Omega g^2(x)dx+\int_0^T|f(x)|^2 dx\,dt\right)$$
  for some constant $C$ independent of $f,\ g$ and $u$.


My attempt:
Multiplying the first equation by $u$ and taking integration on $\Omega$, we have
$$\frac{1}{2}\frac{d}{dt}||u||^2_{L^2}+\int_\Omega \nabla u\cdot \nabla u=\int_\Omega fu.$$
(Here we also use the Green's identity and the boundary condition of $u$)
Taking integration on $[0,s]$ where $s\leq T$. Then we have 
$$\frac{1}{2}||u(x,s)||^2_{L^2}+\int_0^s\int_\Omega|\nabla u(x,t)|^2dx\, dt= \frac{1}{2} \int_\Omega g^2(x)dx+\int_0^s\int_\Omega fu\ dt$$
where 
$$\int_\Omega fu\leq ||f||_{L^2} ||u||_{L^2}\leq \epsilon ||u||_{L^2}^2 + C(\epsilon ) ||f||_{L^2}$$
Then we have 
$$(\frac{1}{2}-s\epsilon )||u(x,s)||^2_{L^2}+\int_0^s\int_\Omega|\nabla u(x,t)|^2dx\, dt
\leq \frac{1}{2} \int_\Omega g^2(x)dx+\int_0^s C(\epsilon ) ||f||_{L^2} dt$$
Then I was stuck here. I don't know where can I derive the part 
$$\max_{0\leq t\leq T}||u(x,t)||.$$
Also, I am struggling how to make the two coefficients before the two terms on the left the same so that we can get the desired inequality.

REPLY [2 votes]: What I did above tells us that 
$$||u(x,s)||^2_{L^2}+\frac{1}{\frac{1}{2}-s\epsilon}\int_0^s\int_\Omega|\nabla u(x,t)|^2dx\, dt
\leq \frac{1}{\frac{1}{2}-s\epsilon}\left(\frac{1}{2} \int_\Omega g^2(x)dx+\int_0^s C(\epsilon ) ||f||_{L^2} dt \right) $$
for any $s>0$.
Now, pick up an appropriate $\epsilon>0$ such that 
$$\frac{1}{2}-\epsilon>0$$
and 
$$\int_0^T\int_\Omega |\nabla u|^2 \ dx\ dt\leq \frac{1}{\frac{1}{2}-\epsilon}\int_0^{t_0}\int_\Omega |\nabla u|^2 \ dx\ dt$$
where $t_0$ is the point where $||u(x,t)||^2_{L^2}$ obtain the maximum. Then we have 
$$\begin{eqnarray}||u(x,t_0)||^2_{L^2}+\int_0^T\int_\Omega |\nabla u|^2 \ dx\ dt &\leq& ||u(x,t_0)||^2_{L^2} + \frac{1}{\frac{1}{2}-\epsilon}\int_0^{t_0}\int_\Omega |\nabla u|^2 \ dx\ dt\\
&\leq& \frac{1}{\frac{1}{2}-\epsilon}\left(\frac{1}{2} \int_\Omega g^2(x)dx+\int_0^T C(\epsilon ) ||f||_{L^2} dt\right)\\
&\leq&  C'\left( \int_\Omega g^2(x)dx+\int_0^T C(\epsilon ) ||f||_{L^2} dt\right)
 \end{eqnarray}$$
for some constant $C'$.