# Heat equation with nonhomogeneous boundary conditions

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}}$.

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.

• That was exactly what I have done. But then further solving for $v$, I got $\sin \left( \frac{\text{n}\pi }{\text{L}}\text{x} \right)$ term which could not conclude the relation ${{u}_{L1}}\left( x,t \right)\le {{u}_{L2}}\left( x,t \right)$ . – Patrick Windance Dec 27 '15 at 11:35
• look at it now – Michael Medvinsky Dec 27 '15 at 13:50
• I composed $w$ too but could not finish. It is clear now. – Patrick Windance Dec 27 '15 at 14:21