Can anyone help me with (b)(i)? I've done the first part of it. I've tried putting some boundary conditions in but cannot find $B_n$ What fact should I use?
An infinite slab of material, of constant thermoconductivity $\kappa$, occupies the region of $\mathbb{R}^3$ defined by $0 \leq x \leq a$. Initially the temperature $T(x,t)$ of the slab is given by $$T(x,0) = 0.$$ Subsequently the face at $x = 0$ is kept at zero temperature and the face at $x = a$ is kept at unit temperature.
(a) Write down the boundary conditions satisfied by $T$. Show that $$U(x,t) = T(x,t) - \frac{x}{a},$$ satisfies the heat equation $$\frac{\partial{U}}{\partial{t}} = \kappa\,\frac{\partial^2{U}}{\partial{x^2}},$$ and deduce the boundary conditions on $U$.
(b) (i) Show that, for $t > 0$, $$T(x,t) = \frac{x}{a} + \sum_{n=1}^\infty B_n \exp\left(-\frac{n^2 \pi^2 \kappa t}{a^2}\right) \sin\left(\frac{n\pi x}{a}\right)$$ and give an explicit expression for the constants $B_n$.
Note that the initial condition on $T$ is $T(x,0)=0$. But the equation you are really solving is for $U$, which has initial condition $U(x,0)=-x/a$. Thus, assuming you could derive
$$U(x,t) = \sum_{n=1}^{\infty} B_n e^{-n^2 \pi^2 \kappa t/a^2} \sin{\left ( \frac{n \pi x}{a}\right )}$$
then
$$U(x,0) = \sum_{n=1}^{\infty} B_n \sin{\left ( \frac{n \pi x}{a}\right )}$$
which means that $u$ is being represented by a Fourier sine series and the $B_n$ are given by corresponding Fourier sine coefficients. These are given by
$$B_n = \frac{2}{a} \int_0^a dx \, \left ( -\frac{x}{a} \right ) \sin{\left ( \frac{n \pi x}{a}\right )} = -\frac{2}{a^2} \int_0^a dx \; x \sin{\left ( \frac{n \pi x}{a}\right )}$$
I'll leave it to you to evaluate the integral.