Heat Equation identity with dirichlet boundary condition Show an energy identity for the heat equation with convection and Dirichlet boundary condition.
$$u_t -ku_{xx}+Vu_x=0 \qquad 0<x<1, t>0$$
$$u(0,t) = u(1,t)=0 \qquad t>0$$
$$u(x,0) = \phi(x) \qquad 0<x<1$$
Attempt: I think I can apply maximum principle, but dont know how to approach it. 
Thanks!!
 A: You can use the separation of variables techniques, but you should pay more attention about choosing the suitable separation parameter.
Let $u(x,t)=X(x)T(t)$ ,
Then $X(x)T'(t)-kX''(x)T(t)+VX'(x)T(t)=0$
$X(x)T'(t)=kX''(x)T(t)-VX'(x)T(t)$
$X(x)T'(t)=(kX''(x)-VX'(x))T(t)$
$\dfrac{T'(t)}{T(t)}=\dfrac{kX''(x)-VX'(x)}{X(x)}=-\dfrac{4k^2n^2\pi^2+V^2}{4k}$
$\begin{cases}\dfrac{T'(t)}{T(t)}=-\dfrac{4k^2n^2\pi^2+V^2}{4k}\\kX''(x)-VX'(x)+\dfrac{4k^2n^2\pi^2+V^2}{4k}X(x)=0\end{cases}$
$\begin{cases}T(t)=c_3(s)e^{-\frac{t(4k^2n^2\pi^2+V^2)}{4k}}\\X(x)=\begin{cases}c_1(s)e^{\frac{Vx}{2k}}\sin n\pi x+c_2(s)e^{\frac{Vx}{2k}}\cos n\pi x&\text{when}~n\neq0\\c_1xe^{\frac{Vx}{2k}}+c_2e^{\frac{Vx}{2k}}&\text{when}~n=0\end{cases}\end{cases}$
$\therefore u(x,t)=C_1xe^{\frac{2Vx-V^2t}{4k}}+C_2e^{\frac{2Vx-V^2t}{4k}}+\sum\limits_{n=0}^\infty C_3(n)e^{\frac{2Vx-t(4k^2n^2\pi^2+V^2)}{4k}}\sin n\pi x+\sum\limits_{n=0}^\infty C_4(n)e^{\frac{2Vx-t(4k^2n^2\pi^2+V^2)}{4k}}\cos n\pi x$
$u(0,t)=0$ :
$C_2e^{-\frac{V^2t}{4k}}+\sum\limits_{n=0}^\infty C_4(n)e^{-\frac{t(4k^2n^2\pi^2+V^2)}{4k}}=0$
$\sum\limits_{n=0}^\infty C_4(n)e^{-\frac{t(4k^2n^2\pi^2+V^2)}{4k}}=-C_2e^{-\frac{V^2t}{4k}}$
$\sum\limits_{n=0}^\infty C_4(n)e^{-kn^2\pi^2t}=-C_2$
$C_4(n)=\begin{cases}-C_2&\text{when}~n=0\\0&\text{otherwise}\end{cases}$
$\therefore u(x,t)=C_1xe^{\frac{2Vx-V^2t}{4k}}+C_2e^{\frac{2Vx-V^2t}{4k}}+\sum\limits_{n=0}^\infty C_3(n)e^{\frac{2Vx-t(4k^2n^2\pi^2+V^2)}{4k}}\sin n\pi x-C_2e^{\frac{2Vx-V^2t}{4k}}=C_1xe^{\frac{2Vx-V^2t}{4k}}+\sum\limits_{n=1}^\infty C_3(n)e^{\frac{2Vx-t(4k^2n^2\pi^2+V^2)}{4k}}\sin n\pi x$
$u(1,t)=0$ :
$C_1e^{\frac{2V-V^2t}{4k}}=0$
$C_1=0$
$\therefore u(x,t)=\sum\limits_{n=1}^\infty C_3(n)e^{\frac{2Vx-t(4k^2n^2\pi^2+V^2)}{4k}}\sin n\pi x$
$u(x,0)=\phi(x)$ :
$\sum\limits_{n=1}^\infty C_3(n)e^{\frac{Vx}{2k}}\sin n\pi x=\phi(x)$
$\sum\limits_{n=1}^\infty C_3(n)\sin n\pi x=\phi(x)e^{-\frac{Vx}{2k}}$
$C_3(n)=2\int_0^1\phi(x)e^{-\frac{Vx}{2k}}\sin n\pi x~dx$
$\therefore u(x,t)=2\sum\limits_{n=1}^\infty\int_0^1\phi(x)e^{-\frac{Vx}{2k}}\sin n\pi x~dx~e^{\frac{2Vx-t(4k^2n^2\pi^2+V^2)}{4k}}\sin n\pi x$
A: You can use the separation of variables techniques. Basically, we assume the solution to have the form 

$$ u(x,t)= X(x)F(t), $$

and subs back in the pde to get the following ode's 

$$ X'' \left( x \right) = \frac{V }{k} X'\left( x \right)+\frac{\lambda}{k} X(x),\quad F'(t)=\lambda F(t).  $$

Now, you can follow the technique in this problem.
