Return to computing page for the first course APMA0330
Return to computing page for the second course APMA0340
Return to computing page for the fourth course APMA0360
Return to Mathematica tutorial for the first course APMA0330
Return to Mathematica tutorial for the second course APMA0340
Return to Mathematica tutorial for the fourth course APMA0360
Return to the main page for the course APMA0330
Return to the main page for the course APMA0340
Return to the main page for the course APMA0360
Introduction to Linear Algebra with Mathematica

Heat Equation


Let us consider the one-dimensional heat equation

\begin{equation} \label{EqHeat.1} \frac{\partial u}{\partial t} = \alpha\,\frac{\partial^2 u}{\partial x^2} , \qquad x \in \mathbb{R} , \quad 0 < t < \infty . . \end{equation}
Assuming t > 0, we introduce a new variable
\[ \xi = \frac{x}{\alpha\sqrt{t}} \]
Then
\[ \frac{\partial u}{\partial t} = \frac{\partial \xi}{\partial t}\, \frac{\partial u}{\partial \xi} = - \frac{x}{2\alpha\,t^{3/2}} \, \frac{\partial u}{\partial \xi} \]
and
\[ \frac{\partial u}{\partial x} = \frac{1}{\alpha\sqrt{t}}\, \frac{\partial u}{\partial \xi} \quad \Longrightarrow \quad \frac{\partial^2 u}{\partial x^2} = \left( \frac{1}{\alpha\sqrt{t}}\right)^2 \frac{\partial^2 u}{\partial \xi^2} . \]
Substituting these formulas into heat equation \eqref{EqHeat.1}, we obtain the ordinary differential equation
\[ - \frac{x}{2\alpha\,t\,\sqrt{t}} \, \frac{{\text d}u}{{\text d}\xi} = \frac{1}{\alpha \,t}\, \frac{{\text d}^2 u}{{\text d} \xi^2} . \]
Upon cancelation of common terms, we obtain the differential equation
\[ \frac{{\text d}^2 u}{{\text d} \xi^2} + \frac{\alpha}{2}\,\xi \,\frac{{\text d}u}{{\text d}\xi} = 0 . \]
Setting v to be the drivative of the unknown function, v = u ′, we get a first order differential equation
\[ \frac{{\text d}v}{{\text d}\xi} + \frac{\alpha}{2}\,\xi \,v = 0 \qquad \Longrightarrow \qquad \frac{{\text d}v}{v} = - \frac{\alpha}{2}\,\xi \,{\text d}\xi . \]
So we separate variables and integration yields
\[ \ln |v| = - \frac{\alpha}{4}\,\xi^2 + c \qquad \Longrightarrow \qquad \frac{{\text d}u}{{\text d}\xi} = v = C_1 e^{- \alpha \xi^2 /4} , \]
where C₁ is a constant of integration. Next integration provides the general solution
\begin{equation} \label{EqHeat.2} u(x, t) = C_1 \mbox{erf} \left( \frac{x}{2 \sqrt{\alpha\, t}} \right) + C_2 , \end{equation}
where C₁ and C₂ are arbitrary constants and erf(·) is the error function
\[ \mbox{erf}(z) = \frac{2}{\sqrt{\pi}} \,\int_0^z e^{-t^2} {\text d} t . \]
Unless C₁ = 0, function \eqref{EqHeat.2} has no limit as t → +0.

IVPs for Heat Equation


 

  1. Boyd, J.P. and Flyer, N., Compatibility conditions for time-dependent partial differential equations and the rate of convergence of Chebyshev and Fourier spectral methods, Computer Methods in Applied Mechanics and Engineering, 1999, Volume 175, Issues 3–4, Pages 281--309. https://doi.org/10.1016/S0045-7825(98)00358-2
  2. Chatziafratis, A., Boundary behaviour of the solution of the heat equation on the half line via the Fokas unified transform method, 2024, https://doi.org/10.48550/arXiv.2401.08331
  3. Chatziafratis, A., Fokas, A., Aifantis, E.C., Variations of heat equation on the half-line via the Fokas method, 2024, First published: 08 September 2024 https://doi.org/10.1002/mma.10303
  4. Chatziafratis, A., Mantzavinos, D., Boundary behavior for the heat equation on the half-line, 2022, https://doi.org/10.1002/mma.8245

 

Return to Mathematica page
Return to the main page (APMA0340)
Return to the Part 1 Basic Concepts
Return to the Part 2 Fourier Series
Return to the Part 3 Integral Transformations
Return to the Part 4 Parabolic PDEs
Return to the Part 5 Hyperbolic PDEs
Return to the Part 6 Elliptic PDEs
Return to the Part 6P Potential Theory
Return to the Part 7 Numerical Methods