Solving the heat equation with boundary condition and zero initial condition

209 Views Asked by At

I'm having trouble trying to solve this PDE:

\begin{aligned} &u_{t}-k^{2} u_{x x}=0 ; \quad 0<x<l, \quad 0<t, \quad(0<k), \\ &u(0, t)=\cos (t) ; \quad 0 \leq t, \\ &u(l, t)=\sin (t) ; \quad 0 \leq t, \\ &u(x, 0)=0 ; \quad 0<x<l . \end{aligned}

This is my line of reasoning so far: write $u= v + W$, where $W(x,t)= \frac{\sin(t)-\cos(t)}{l}x + \cos(t)$. With this, I reach a new problem that I have to solve:

\begin{aligned} &v_{t}-k^{2} v_{x x}=-W_t ; \quad 0<x<l, \quad 0<t, \quad(0<k), \\ &v(0, t)= 0 ; \quad 0 \leq t, \\ &v(l, t)=0 ; \quad 0 \leq t, \\ &v(x, 0)=-W(x,0) ; \quad 0<x<l . \end{aligned}

My problem is that now I have a nonhomogeneous PDE. How would I go on to solve this?