Heat Equation
The heat equation is
$$ \frac{\partial}{\partial t} T = \alpha \nabla^2 T $$where the Laplacian \( \nabla^2 \) in cartesian coordinates is
$$ \nabla^2 = \frac{\partial^2}{\partial x^2} + \frac{\partial^2}{\partial y^2} + \frac{\partial^2}{\partial z^2}$$It describes how heat diffuses over time.
The one-dimensional heat equation is given by
$$ \frac{\partial}{\partial t} T(x,t) = \alpha \frac{\partial^2}{\partial x^2} T(x,t) $$This describes the time evolution of a temperature profile \( T(x,t) \) along, for example, a thin metal rod. If the ends of the rod are insulated, then
$$ \partial_x T(0,t) = \partial_x T(L,t) = 0 $$These conditions mean there is no heat flow through the ends of the rod.
Here, however, we focus on the case where the ends of the rod are held in thermal contact with a heat bath at temperature zero:
$$ T(0,t) = T(L,t) = 0 $$Suppose the initial temperature is constant
$$ T(x,0) = T_0 $$Separation of variables, \( \, T(x,t) = f(x)g(t), \, \) leads to the eigenvalue problem with the symmetric operator \( \partial_x^2 \)
$$ f''(x) = \lambda f(x), \quad f(0) = f(L) = 0 $$with eigenfunctions
$$ f_n(x) = \sin\left(\frac{n\pi x}{L}\right) $$ $$ \lambda_n = -\left(\frac{n\pi}{L}\right)^2, \quad n = 1,2,3,\dots $$The spatial boundary conditions therefore determine the allowed temperature modes.
The time equation is
$$ g'(t) = \alpha \lambda g(t) $$so the corresponding time-dependent solutions are
$$ g_n(t) \propto e^{\alpha \lambda_n t} $$Since \( \lambda_n < 0 \) each mode decays exponentially in time.
The general solution is
$$ T(x,t) = \sum_{n=1}^{\infty} c_n \sin\left(\frac{n\pi x}{L}\right) e^{\alpha \lambda_n t} $$The solution is therefore a superposition of independently decaying temperature modes.
An alternative way to derive the same result is to start with the most general expansion
$$ T(x,t) = \sum_{n=1}^{\infty} G_n(t)f_n(x) $$Substitute this into the differential equation
$$ \dot{T} = \alpha \partial_x^2 T $$ $$ \sum_{n=1}^{\infty} \dot{G}_n(t)f_n(x) = \alpha \sum_{n=1}^{\infty} \lambda_n G_n(t)f_n(x) \quad \text{as} \quad \partial_x^2 f_n = \lambda_n f_n $$Hence
$$ \dot{G}_n(t) = \alpha \lambda_n G_n(t) $$ $$ \therefore \, G_n(t) = c_n e^{\alpha \lambda_n t} $$and so
$$ T(x,t) = \sum_{n=1}^{\infty} c_n \sin\left(\frac{n\pi x}{L}\right) e^{\alpha \lambda_n t} $$At \( t = 0 \),
$$ T(x,0) = \sum_{n=1}^{\infty} c_n f_n(x) = T_0 $$The functions \( \displaystyle f_n(x) = \sin\left(\frac{n\pi x}{L}\right) \) are eigenvectors of the symmetric operator \( \partial_x^2 \) with distinct eigenvalues, so they form an orthogonal basis. Thus
$$ \langle f_n, f_m \rangle = \delta_{nm}\|f_n\|^2 $$ $$ c_n = \frac{\langle f_n, T_0 \rangle}{\langle f_n, f_n \rangle} $$Orthogonality allows each coefficient to be isolated independently.
First compute
$$ \langle f_n, f_n \rangle = \int_{0}^{L} \sin^2\left(\frac{n\pi x}{L}\right)\,dx = \frac{L}{2} $$Next,
$$ \langle f_n, T_0 \rangle = T_0 \int_{0}^{L} \sin\left(\frac{n\pi x}{L}\right)\,dx $$ $$ = \frac{T_0 L}{n\pi}\left(1 - \cos(n\pi)\right) $$Hence
$$ c_n = \frac{2T_0}{n\pi}\left(1 - \cos(n\pi)\right) $$That is,
$$ c_n = \begin{cases} \dfrac{4T_0}{n\pi} & n \text{ odd} \\[0.4em] \; \; \, 0 & n \text{ even} \end{cases} $$Only odd sine modes contribute to the temperature profile.
Therefore the solution is
$$ T(x,t) = \frac{4T_0}{\pi} \sum_{\substack{n=1 \\ n \text{ odd}}}^{\infty} \frac{1}{n} \sin\left(\frac{n\pi x}{L}\right) e^{\alpha \lambda_n t} \quad \text{where} \quad \lambda_n = - \left(\frac{n\pi}{L}\right)^2, \quad n = 1,2,3,\dots $$Let \( n = 2k+1 \), where \( k = 0,1,2,\dots \). Then
$$ T(x,t) = \frac{4T_0}{\pi} \sum_{k=0}^{\infty} \frac{1}{2k+1} \sin\left(\frac{(2k+1)\pi x}{L}\right) e^{- \left( \frac{2k+1}{L} \right)^2 \pi^2 \alpha t} $$Higher-frequency modes decay more rapidly, so the temperature distribution gradually smooths out over time.
To see a different heat equation problem click here.