Consider the problem of unsteady-state heat conduction in a rod, as governed by the heat equation:
The initial and boundary conditions are:
, for and for ,
where is the temperature, is time, and is the position.
This problem has an analytical solution in the form of a Fourier series after separation of variables:
This Demonstration plots the solution . The numerical solution obtained using Chebyshev orthogonal collocation is given by the red dots. The analytical solution is given by the blue curve. Excellent agreement between the two solutions is observed. You can vary the value of as well as the number of Chebyshev collocation points, .