Consider a bar with a rectangular cross section subject to both temperature and heat flux boundary conditions.
The governing equation and boundary conditions in dimensionless form are:
(continuity of heat flux at the
(constant temperature at the
(same constant temperature at the
(different constant temperature at the
The Chebyshev orthogonal collocation method implemented in Mathematica
collocation points gives the temperature distribution in the bar represented in the snapshots for user-set values of
The analytical solution of the differential equation obtained using the separation of variables technique  is given by:
We have found excellent agreement between our numerical solution and the analytical solution.
 T. Bennett, Transport by Advection and Diffusion
, New York: Wiley, 2012.