# Heat equation. Find $B_n$ (using boundary conditions?)

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

## 2 Answers

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.

• That makes sense! I've been taught fourier series first and we just started learning about heat equation. I struggled to see the relationship between those two. Do you mind explaining how they're related? Other than cases like this? – user120227 Feb 14 '14 at 21:03
• @user120227: The boundary values provide the eigenvalues and eigenfunctions which become the Fourier series expansion. Here, the zero BC's at either end imply a sine solution. The initial conditions therefore provide the coefficients of the Fourier series as I demonstrated. This of course works when you have finite BC's because you have a second-order equation in $x$. – Ron Gordon Feb 14 '14 at 21:32
• THank you. This sounds stupid but why do I put in $U(x,0)$ in the place of where $f(x)$ goes for fourier series? – user120227 Feb 14 '14 at 21:49
• @user120227: All I can say is, exactly. You can say that the initial condition is $U(x,0)=f(x)$ if that makes you more comfortable. – Ron Gordon Feb 14 '14 at 23:27

Fourier coefficients of the initial data  $U(x,0)=-x/a$  will be the desired constants $$\begin{gather} B_n=\frac{2}{a}\int\limits_0^a U(x,0)\sin{\biggl(\frac{n{\pi}x}{a}\biggr)}dx= -\frac{2}{a^2}\int\limits_0^a x\sin{\biggl(\frac{n{\pi}x}{a}\biggr)}dx=\\ =\frac{2}{an\pi}\int\limits_0^a x\,d\cos{\biggl(\frac{n{\pi}x}{a}\biggr)}= \frac{2}{an\pi}x\cos{\biggl(\frac{n{\pi}x}{a}\biggr)}\biggr|_0^a-\frac{2}{an\pi} \int\limits_0^a \cos{\biggl(\frac{n{\pi}x}{a}\biggr)}dx=\\ =\frac{2}{n\pi}\cos{(n\pi)}-\frac{2}{n^2{\pi}^2}\sin{\biggl(\frac{n{\pi}x}{a}\biggr)} \biggr|_0^a=\frac{2(-1)^n}{n\pi}. \end{gather}$$

• @Ron Gordon: Thanx Ron. This was a typical TeX-copy-paste slip of the keyboard. If I had noticed that you posted your answer I would not have posted mine. – mkl314 Feb 14 '14 at 23:09