The Heat Equation
Solved by Joseph Fourier in 1822, the heat equation is typically the first PDE students are introduced to, due to its nice and intuitive nature. In one dimension, we seek a function, that essentially has its first time derivative equal to its second spatial derivative (for preliminary intuition, we can ignore the \(\alpha^2\) term). The question now, is how do we go about solving for the function or functions that satisfy this equation.
Intuitively this should feel like a more daunting task than solving for a variable in a traditional algebraic equation. This intuition is correct, without additional information, this equation has an infinite number of solutions. For example, any constant value satisfies this equation, any linear polynomial in \(x\) with arbitrary coefficients will satisfy this equation, as well as many other functions. This leads us to our typical boundary conditions.
Note: The parameter \(\alpha\) is usually called the diffusivity constant, which is a measure of how "fast" heat can move through a material.
Boundary Conditions on the Heat Equation
The most basic boundary conditions are called Dirichlet boundary conditions. These are boundary conditions that explicitly specify the value of the function at the spatial boundaries. If we consider a metal rod of length 1, then the Dirichlet boundary conditions would be the value of \(u\) at \(x = 0\) and \(x = 1\).
Initial Condition on the Heat Equation
As mentioned, the initial condition is the function or behavior of the function, defined at time 0 (when \(t = 0\)). For example, if we consider that our initial condition is: \(u(x, 0) = 0\), this implies that there is initially no heat on the metal rod.
Separation of Variables
This is a very powerful and straight forward method to solving PDEs, and requires us to make an assumption on the form of the solution and separating the \(x\) and \(t\) variables. Once we separate the variables, we arrive at ODEs in those variables, whose solutions are well known (through ODE theory).
Note: We must have linear-homogenous boundary conditions and a linear-homogenous PDE (in the case of the heat equation) to do separation of variables.
So, How do we Begin to Solve it?
We begin by making an assumption, this assumption is not random and does come from strong intuition. We assume that the solution takes the form,
Why Make this Assumption?
As mentioned, this assumption is not random. We could skip trying to assume that the solution has the form \(u(x,t) = T(t) + X(x)\) since a solution of this form will have \(u_t = T'(t)\) and \(u_{xx} = X^{''}(x)\), and plugging that into the PDE will give:
Back to Solving the PDE
Now with our assumption in hand, we can rewrite our PDE. If \(u(x,t) = T(t)X(x)\), then \(u_t = T'(t)X(x)\) and \(u_{xx} = X^{''}(x)T(t)\), you can verify this by basic differentiation. We now rewrite our PDE by replacing \(u\) with our assumed form, in doing this we get that the PDE is
For simplicity in future computation, I will also move the \(\alpha^2\) term to the left hand side of the equation by dividing both sides by \(\alpha^2\). At last, we have the equation
Here, we come to a very important conclusion. Since the left hand side of the equation is strictly in terms of \(t\) and the right hand side is strictly in terms of \(x\), then for example, if we allow \(t\) to vary, the right hand side of of the equation:
We are now in a position to start finding functions that satisfy this equation. Now we will treat our previous equation, as two separate equations, that is
By integrating (using separation of variables for the ODE), we find:
Now here we can make a very important observation, if \(k > 0\) then \(T(t)\) will be \(e\) raised to a positive power. However, this also implies that as time increases (\(t \rightarrow \infty\)), then \(T \rightarrow \infty\), from a physical point of view, this is contradictory, since we cannot have unbounded heat with no source of heat. So we conclude that \(k < 0\).
The Spatial Equation
Now to tackle the second order ODE \(X^{''}(x) - kX(x) = 0\). The characteristic equation is \(\lambda^2 - k = 0\). In our scenario the solution is complex since \(k\) is negative (\(\sqrt{k} = \sqrt{-k}i\)). This gives us the oscillating solution:
Thus the general solution to the heat equation is:
Applying Boundary Conditions
With homogenous Dirichlet conditions \(u(0,t) = 0\) and \(u(1,t) = 0\), we find that \(A=0\) (since \(\cos(0)=1\)). This leaves us with:
The specific solutions for each \(n\) are:
Initial Condition and Superposition
By The Law of Superposition, the final solution is the sum of these modes. We use Fourier series to match the initial condition \(\phi(x)\):