1. ## Heat Equation Derivation

Solve the heat equation $u_t = u_{xx}$ with the boundary conditions $u(0, t) = u(\pi, t) = 0$ and the following initial condition: $u(x, 0) = T$.

Now, the question itself isn't a problem, its the actual derivation of the heat equation that is (its not asked in the question but we're told that in an exam it would be).

So I'm looking to derive this. $u(x, t) = \sum_1^\infty b_n e^{-n^2t} \sin(nx)$ where $bn = \frac{2}{\pi} \int_0^{\pi} u(x, 0) \sin(nx) dx$.

So i start by doing seperation of variables to get $T'X = X''T, ... , X'' = \lambda X$ and $T' = \lambda T$.

Now at this point I think I should use eigenfunctions then superposition to solve it but i cant see where the $e^{-n^2 t}$ or the $b_n$ come from?

Solve the heat equation $u_t = u_{xx}$ with the boundary conditions $u(0, t) = u(\pi, t) = 0$ and the following initial condition: $u(x, 0) = T$.

Now, the question itself isn't a problem, its the actual derivation of the heat equation that is (its not asked in the question but we're told that in an exam it would be).

So I'm looking to derive this. $u(x, t) = \sum_1^\infty b_n e^{-n^2t} \sin(nx)$ where $bn = \frac{2}{\pi} \int_0^{\pi} u(x, 0) \sin(nx) dx$.

So i start by doing separation of variables to get $T'X = X''T, ... , X'' = \lambda X$ and $T' = \lambda T$.

Now at this point I think I should use eigenfunctions then superposition to solve it but i cant see where the $e^{-n^2 t}$ or the $b_n$ come from?

Start with the x equation $X'' = \lambda X$. This has the solution $X = A\cos(\omega x) + B\sin(\omega x)$, where $\omega^2=-\lambda$. The boundary conditions $X(0) = X(\pi) = 0$ tell you that $A=0$ and $\omega = n$ (an integer). Thus $\lambda = -n^2$.
The t equation then becomes $T' = -n^2T$, which has the solution $T(t) = b_ne^{-n^2 t}$ (where $b_n$ is a constant). You then have to use Fourier theory to get the right vaues of the $b_n$s to satisfy the initial condition when the eigenfunction solutions are superimposed.