Section 7.2 The Heat Equation
In this very short investigation of PDEs, I will present at two equations. The first is the heat equation. It concerns a function \(u(x,t)\) which depends on position and time. \(u(x,t)\) measures the heat in a one-dimensional object (usually a rod, rail, wire, stick or something similar). The heat varies in position along the object as well, as well as in time. I let \(x \in [0,l]\) where \(l\) is the length of the rod. For convenience (by choosing appropriate units), we will set \(l = \pi\text{.}\) (The reasons for chosing \(\pi\) will present themselves in the solution.)
The question I want to ask is this: how does the heat distribution along the rod develop over time? What happens to the heat at various positions and times? Where does the heat flow, increase, decrease and diffuse? The heat equation tries to answer these questions.
Thermodynamics says that heat wants to diffuse. Diffusion is the equalizing of differences, so the greater the difference in heat, the greater the inclination for difussions. How do I measure this? The measurement must be local, since heat cannot jump discontinuously. The local description that measures this heat difference is the concavity of the heat distribution function. Moreover, concave down regions want to equalize downward and concave up regions want to equalize upwards, as in Figure 7.2.1. Therefore, the heat diffusion should be proportional to the concavity with a positive proportionality constant.
I translate these thermodynamic realities into a partial differential equation. The second derivative in position measure concavity and the first derivative in time measures the change in heat resulting from the diffusion. The above set-up shows that these should be proportional to each other. Let \(k\) be a positive constant that measure this proportionality.
\begin{equation*}
\frac{\del u}{\del t} = k \frac{\del^2 u}{\del x^2}
\end{equation*}
This is called the heat equation. Though I’ve defined it by talking about heat, it is a very general equation and applies to any system that involves diffusion. It is sometimes also called the diffusion equation.
Subsection 7.2.1 Initial and Boundary Conditions
With ordinary differential equations, initial conditions are needed to get a particular solution. The same it true with PDEs, but the initial assumptions are more complicated. At a specific time, say \(t=0\text{,}\) the function \(u(x,0)\) is still a function of \(x\text{.}\) The initial condition, then, is an entire function: \(u(x,0) = f(x)\text{.}\)
The initial condition determines the situation at the starting time. However, I also need to control the behaviour of position. For position, instead of initial conditions, there are boundary conditions. These describe the behaviour of the system at its boundaries. For the heat equation on a rod, the domain is \(x\in [0,\pi]\text{,}\) so the boundary contitions are determination of \(u(0,t)\) and \(u(\pi,t)\text{.}\) These themselves can be functions of \(t\text{.}\) However, for present purposes, I’ll set the boundary contitions to be constant. If I set the units of temperature reasonably, I can scale so that the boundary conditions are \(u(0,t) = u(\pi,t) = 0\text{.}\) These boundary conditions mean that there is a constant temperature at both ends of the rod at all moments in time. (In physical terms, there are perfect instantaneous heat-sinks at each end of the rod which equalize it to the ambient temperature of zero).
Subsection 7.2.2 Solving the Heat Equation
The method of approach we use to solve the equation is a common one for PDE and is called separation of variables. I make the assumption (eventually justified!) that I can pull apart the two variables, \(x\) and \(t\text{,}\) and deal with the separately. I assume that \(u\) is a product of two single variables functions.
\begin{equation*}
u(x,t) = T(t) X(x)\text{.}
\end{equation*}
Like most the assumptions about DEs, I use my assumping by simply puting it back into the equation and seeing what happens.
\begin{align*}
\frac{\del^2 u}{\del x^2} \amp = X^{\prime \prime}(x) T(t)\\
\frac{\del u}{\del t} \amp = T^{\prime}(t) X(x)\\
k X^{\prime \prime} T(t) \amp = X(t) T^\prime(t)\\
\frac{X^{\prime \prime}(x)}{X(x)} \amp = \frac{1}{k}
\frac{T^\prime(t)}{T(t)}
\end{align*}
I’ve brought all the terms involving \(x\) to one side and all those involving \(t\) to the other. Since the left is equal to the right and they involve different variables, both sides must be constant. I’ll call this constant \(\alpha\text{.}\) This completes the separation of variables, giving me two ordinary differential equations.
\begin{align*}
\frac{X^{\prime \prime}(x)}{X(x)} \amp = \alpha\\
\frac{1}{k} \frac{T^\prime(t)}{T(t)} \amp = \alpha
\end{align*}
Now, to solve the heat equation with separation of variables, I solve these two ODEs separately. The \(T\) solutions are easy.
\begin{equation*}
T^\prime(t) = \alpha k T(t) \implies T(t) = T(0) e^{\alpha kt}
\end{equation*}
I have written the initial constant as \(T(0)\text{.}\) The time function is just exponential growth/decay, but \(X\) solutions depend more carefully on the boundary conditions.
The \(X\) equation is a second order linear equation: \(X^{\prime \prime}(x) - \alpha X(x) = 0\text{.}\) If \(\alpha >
0\) then I expect exponential solutions \(X(x) = c_1
e^{\alpha x} + c_2e^{\alpha x}\text{.}\) However, the boundary conditions apply. \(X(0) = X(\pi) = 0\) implies that \(c_1
= c_2 = 0\text{;}\) the only solution here is the trivial solution \(X(x) = 0\text{.}\) Therefore, to get solutions that actually mean somthing, \(\alpha\) cannot be positive. If \(\alpha =
0\) then the result must be\(X = Ax + B\text{.}\) Again, the boundary conditions give \(A=B=0\text{,}\) so I only get the zero solution. Therefore, only \(\alpha \lt 0\) gives interesting solutions.
(This \(\alpha \lt 0\) also effects the \(T\) solutions, which relied on the same \(\alpha\text{.}\) The fact that \(\alpha
\lt 0\) means that the \(T\) solutions must be decaying exponentials instead of growing exponentials. This is physically expected, since over time the heat should diffuse.)
Let \(\alpha = -n^2\) for \(n > 0\) a real number. From the study of second order linear equations, the solutions are
\begin{equation*}
X(x) = A \cos nx + B \sin nx\text{.}
\end{equation*}
Again, I go back to the boundary conditions. \(X(0) = 0\) implies \(A=0\text{,}\) so I am left with \(X(x) = B \sin nx\text{.}\) Then \(X(\pi) = 0\) implies \(B \sin n\pi = 0\) which is only satisfied if \(n \in \NN\text{.}\) In conclusion, matching the boundary conditions means that the only possible \(X\) solutions are \(X(x) = B \sin nx\) for \(n \in \NN\) (and the zero solution).
Then I put the solutions together.
\begin{equation*}
u(x,t) = T(0) e^{-n^2kt} \sin (nx)
\end{equation*}
In these solutions, I see sine waves decaying over time. The integer \(n\) gives the number of osscilations of the wave in on the rod, and the exponential terms give a decay in amplitude over time. Figure 7.2.2 shows the decay of a simple sine wave with \(n=5\text{.}\)
Now I consider the initial conditions \(u(x,0) = f(x)\text{.}\) For each \(n\text{,}\) the separable solution is a sine wave \(\sin (nx)\text{.}\) This is great if \(f(x)\) happened to be such a sine wave, but I would like the theory to work with more general initial conditions. The key observation here is that the heat equation is linear: if there two solutions to the heat equation, their sum is also a solution. Therefore, I could add up these separable solutions. For example, a possible solution could be this function.
\begin{equation*}
u(x,t) = 4e^{-9kt} \sin 3t + 6e^{-25kt} \sin 5t
\end{equation*}
This isn’t strictly separable anymore, but it is the sum of separable pieces. (This justifies the original assumption! I don’t get all possibility as separable solutions, but I will get all reasonable solutions as the sum of various separable pieces.) The initial value \(u(x,0)\) also isn’t a simple sine wave anymore, since it is the function \(f(x) =
4\sin 3t + .6 \sin 5t\text{.}\) Figure 7.2.3 shows the decay of this initial condition.
In theory, I could add any number of the separable solutions together. Therefore, in full generality, a solution could look like an arbitrary sum.
\begin{equation*}
u(x,t) = \sum_{n=1}^\infty T_n(0) e^{-n^2kt} \sin (nx)
\end{equation*}
This is a series solution, but the series has \(\sin nx\) instead of \(x^n\) as the series terms. I try to match the initial condition \(u(x,0) = f(x)\) with this series.
\begin{equation*}
u(x,0) = \sum_{n=1}^\infty T_n(0) \sin (nx) = f(x)
\end{equation*}
As long as I can find coefficients \(T_n(0)\) that make this series work, I can solve the heat equation. That leads to this question: which functions \(f(x)\) can be expressed as a series in \(\sin (nx)\) in this way? Once I know that, I can have a full, general solution to the heat equation (with constant zero boundary conditions).