Consider the heat equation below:

$\displaystyle u_t = \alpha^2 u_xx, 0<x<\frac{1}{2}$

$\displaystyle u(0,t) = 1, u(\frac{1}{2}, t) = 4$

$\displaystyle u(x,0) = 0$, $\displaystyle 0<x<\frac{1}{4}$

$\displaystyle u(x,0) = 1$, $\displaystyle \frac{1}{4}<x<\frac{1}{2}$

By first finding the steady state solution $\displaystyle u_\infty (x)$ and then considering $\displaystyle v(x,t) = u(x,t)- u_\infty (x)$, using separation of variables to determine the solution for $\displaystyle u$. You will have to determine the coefficients of a Fourier sine series.