# A derivation of the heat equation

## Branko Ćurgus

The derivation below is analogous to the derivation of the diffusion equation.
Mathematical facts used in the derivation
• The Fundamental theorem of calculus: Let $f$ be a continuous real-valued function defined on an open interval which includes a real number $x$. Then $\lim_{\Delta x \to 0} \frac{1}{\Delta x} \int_{x}^{x+\Delta x} \!\!\! f(\xi)\, d\xi = f(x).$
• Leibniz's rule for differentiation under the integral sign: Let $F$ be a function of two independent variables $x$ and $t$ which is defined on a rectangle $(a,b)\times(c,d)$. Assume that the functions $F$ and $\displaystyle \frac{\partial F}{\partial t}$ are continuous. Let $x_1, x_2 \in (a,b)$. Then $\frac{d}{d t} \int_{x_1}^{x_2} F(\xi,t) d\xi = \int_{x_1}^{x_2} \frac{\partial F}{\partial t}(\xi,t) d\xi, \quad \text{for all} \quad t \in (c,d).$
The physical quantities at play in conduction of heat
• Notation:
• Temperature of the rod at the position $x$ at time $t$ is $T(x,t)$.
• Mass density of the rod at the position $x$ is $\rho(x)$.
• Heat flux. At the position $x$ at time $t$ the heat energy flows from left to right at the rate of $\phi(x,t)$ per unit time per unit area.
• Definitions:
• Heat energy is a quantity that changes temperature. It is measured, for example, in calories: $1$ calorie is the amount of heat energy needed to raise the temperature of $1$ gram of water by $1^\circ$C.
• Specific heat. For a given substance its specific heat is the amount of heat energy needed to raise the temperature of $1$ gram of that substance by $1^\circ$C. By $c(x)$ we denote the specific heat of the substance at position $x$ of the rod.
• A consequence of the definitions:
• Heat energy of a slice of rod (of uniform cross-sectional area equal to $1$) between the points $x_1$ and $x_2$ is $\int_{x_1}^{x_2} c(\xi) \rho(\xi) T(\xi,t) d\xi$
• Definition:
• Heat energy density at position $x$ at time $t$ is the quantity $e(x,t) = c(x) \rho(x) T(x,t)$.
The physical laws that govern conduction of heat
• The conservation of heat energy: The rate of change of the amount of heat energy in a region equals the difference between the total inflow and the total outflow of the heat energy. That is: $\frac{d}{d t} \int_{x_1}^{x_2} e(\xi,t)d\xi = -\bigl(\phi(x_2,t) - \phi(x_1,t)\bigr).$
• Fourier's law: The heat energy flows from the region of higher temperature to the region of lower temperature. More precisely, the heat flux is proportional to the difference in temperature. Or, even more precisely, $\phi(x,t) = -K_0\, \frac{\partial T}{\partial x}(x,t), \quad K_0 > 0.$ The above equation assumes that heat is being conducted in a uniform medium. If the medium is nonuniform, then $K_0$ might depend on $x$: $\phi(x,t) = -K_0(x)\, \frac{\partial T}{\partial x}(x,t), \quad K_0(x) > 0.$
Putting things together
• The first two steps:  $\displaystyle \int_{x}^{x+\Delta x} \frac{\partial e}{\partial t}(\xi,t)d\xi$ $\displaystyle = \frac{d}{dt} \int_{x}^{x+\Delta x} e(\xi,t)d\xi$ by Leibniz's rule $\displaystyle = -\bigl(\phi\bigl(x+\Delta x,t\bigr) - \phi(x,t)\bigr) \quad$ by the conservation of heat energy
• Divide the first and the last expression in the previous item by $\Delta x \neq 0$: $\frac{1}{\Delta x} \int_{x}^{x+\Delta x} \frac{\partial e}{\partial t}(\xi,t)d\xi = - \frac{1}{\Delta x} \bigl(\phi(x+\Delta x,t) - \phi(x,t) \bigr) .$
• Let $\Delta x \to 0$ in the previous identity and use the Fundamental theorem of calculus and the definition of the partial derivative to get $\frac{\partial e}{\partial t}(x,t) = - \frac{\partial \phi}{\partial x}(x,t).$
• Substituting Fourier's law and the definition of $e(x,t)$ into the last equation we get $c(x) \rho(x) \frac{\partial T}{\partial t}(x,t) = \frac{\partial }{\partial x} \left( K_0(x) \frac{\partial T}{\partial x}(x,t) \right).$ This is the heat equation.