Let ${{Q}_{L}}=\left( 0,L \right)\times \left( 0,T \right]\subset {{R}^{2}}$ and ${{u}_{L}}\in C\left( {{{\bar{Q}}}_{L}} \right)\cap {{C}^{2}}\left( {{Q}_{L}} \right)$ be a solution of the initial-boundary value problem
$$\left\{ \begin{align}
& {{\partial }_{t}}u={{\partial }_{xx}}u\text{ }\left( x,t \right)\in {{Q}_{L}} \\
& u\left( 0,t \right)=g\left( t \right),\text{ }u\left( L,t \right)=0\text{ }\forall t\in \left[ 0,T \right] \\
& u\left( x,0 \right)=0\text{ }\forall x\in \left[ 0,L \right], \\
\end{align} \right.$$
where $g\left( t \right)\ge 0$. Show that if ${{L}_{1}}<{{L}_{2}}$, then ${{u}_{L1}}\left( x,t \right)\le {{u}_{L2}}\left( x,t \right)$ for $\left( x,t \right)\in {{Q}_{L1}}$.
I tried separation of variables and the energy method. Neither will lead to the requested proof. Please help.
Let $L_1<L_2$, and let $u_{L_1}$,$u_{L_2}$ be solution to the given heat equation in ${Q}_{L_1}$, ${Q}_{L_2}$ respectively.
Define, $w=u_{L_2}-u_{L_1}$. Obviously $w$ solves the following equation
$$\left\{ \begin{align} & {{\partial }_{t}}w={{\partial }_{xx}}u\text{ }\left( x,t \right)\in {{Q}_{L_1}} \\ & w\left( 0,t \right)=0,\text{ }w\left( L_1,t \right)=u_{L_2}\left( L_1,t \right)\text{ }\forall t\in \left[ 0,T \right] \\ & w\left( x,0 \right)=0\text{ }\forall x\in \left[ 0,L_1 \right], \\ \end{align} \right.$$
Due to maximum principle the maximum and minumum of $w$ is on the boundary, thus $$\min\{u_{L_2}( L_1,t ),0\}\le w(x,t)\le \max\{u_{L_2}( L_1,t ),0\}$$
Similarly
$$0=\min\{g(t),0\}\le u_{L_2}( L_1,t )\le \max\{g(t),0\}=g(t)$$
Conclude that for all $(x,t)\in Q_{L_1}$ $$w(x,t)\ge0$$ and therefore $$u_{L_2}(x,t)-u_{L_1}(x,t)>0$$ which gives $$u_{L_2}(x,t)\ge u_{L_1}(x,t)$$ as required.