Let us recall that a partial differential equation or PDE is an equation containing the partial derivatives with respect to several independent variables. Solving PDEs will be our main application of Fourier series.
A PDE is said to be linear if the dependent variable and its derivatives appear at most to the first power and in no functions. We will only talk about linear PDEs. Together with a PDE, we usually have specified some boundary conditions, where the value of the solution or its derivatives is specified along the boundary of a region, and/or some initial conditions where the value of the solution or its derivatives is specified for some initial time. Sometimes such conditions are mixed together and we will refer to them simply as side conditions.
We will study three specific partial differential equations, each one representing a more general class of equations. First, we will study the heat equation, which is an example of a parabolic PDE. Next, we will study the wave equation, which is an example of a hyperbolic PDE. Finally, we will study the Laplace equation, which is an example of an elliptic PDE. Each of our examples will illustrate behavior that is typical for the whole class.
Heat on an Insulated Wire
Let us first study the heat equation. Suppose that we have a wire (or a thin metal rod) of length \(L\) that is insulated except at the endpoints. Let \(x\) denote the position along the wire and let \(t\) denote time. See Figure \(\PageIndex{1}\).
Let \(u(x,t)\) denote the temperature at point \(x\) at time \(t\). The equation governing this setup is the so-called one-dimensional heat equation:
\[\frac{\partial u}{\partial t} = k \frac{\partial^2 u}{\partial x^2}, \nonumber \]
where \(k>0\) is a constant (the thermal conductivity of the material). That is, the change in heat at a specific point is proportional to the second derivative of the heat along the wire. This makes sense; if at a fixed \(t\) the graph of the heat distribution has a maximum (the graph is concave down), then heat flows away from the maximum. And vice-versa.
We will generally use a more convenient notation for partial derivatives. We will write \(u_t\) instead of \( \frac{\partial u}{\partial t}\), and we will write \(u_{xx}\) instead of \(\frac{\partial^2 u}{\partial x^2} \). With this notation the heat equation becomes
\[ u_t=ku_{xx}. \nonumber \]
For the heat equation, we must also have some boundary conditions. We assume that the ends of the wire are either exposed and touching some body of constant heat, or the ends are insulated. For example, if the ends of the wire are kept at temperature 0, then we must have the conditions
Let us see why that is so. If \(u_{x}\) is positive at some point \(x_{0}\), then at a particular time, \(u\) is smaller to the left of \(x_{0}\), and higher to the right of \(x_{0}\). Heat is flowing from high heat to low heat, that is to the left. On the other hand if \(u_{x}\) is negative then heat is again flowing from high heat to low heat, that is to the right. So when \(u_{x}\) is zero, that is a point through which heat is not flowing. In other words, \(u_{x}(0,t)=0\) means no heat is flowing in or out of the wire at the point \(x=0\).
We have two conditions along the \(x\)-axis as there are two derivatives in the \(x\) direction. These side conditions are said to be homogeneous (i.e., \(u\) or a derivative of \(u\) is set to zero).
We also need an initial condition—the temperature distribution at time \(t=0\). That is,
\[ u(x,0)=f(x), \nonumber \]
for some known function \(f(x)\). This initial condition is not a homogeneous side condition.
Separation of Variables
The heat equation is linear as \(u\) and its derivatives do not appear to any powers or in any functions. Thus the principle of superposition still applies for the heat equation (without side conditions). If \(u_1\) and \(u_2\) are solutions and \(c_1,c_2\) are constants, then \( u= c_1u_1+c_2u_2\) is also a solution.
Exercise \(\PageIndex{1}\)
Verify the principle of superposition for the heat equation.
Superposition also preserves some of the side conditions. In particular, if \(u_1\) and \(u_2\) are solutions that satisfy \(u(0,t)=0\) and \(u_(L,t)=0\), and \(c_1,\: c_2\) are constants, then \( u= c_1u_1+c_2u_2\) is still a solution that satisfies \(u(0,t)=0\) and\(u_(L,t)=0\). Similarly for the side conditions \(u_x(0,t)=0\) and \(u_x(L,t)=0\). In general, superposition preserves all homogeneous side conditions.
The method of separation of variables is to try to find solutions that are sums or products of functions of one variable. For example, for the heat equation, we try to find solutions of the form
\[ u(x,t)=X(x)T(t). \nonumber \]
That the desired solution we are looking for is of this form is too much to hope for. What is perfectly reasonable to ask, however, is to find enough “building-block” solutions of the form \( u(x,t)=X(x)T(t)\) using this procedure so that the desired solution to the PDE is somehow constructed from these building blocks by the use of superposition.
Let us guess \(u(x,t)=X(x)T(t)\). We will try to make this guess satisfy the differential equation, \(u_{t}=ku_{xx}\), and the homogeneous side conditions, \(u(0,t)=0\) and \(u(L,t)=0\). Then, as superposition preserves the differential equation and the homogeneous side conditions, we will try to build up a solution from these building blocks to solve the nonhomogeneous initial condition \(u(x,0)=f(x)\).
First we plug \(u(x,t)=X(x)T(t)\) into the heat equation to obtain
\[ X(x)T'(t)=kX''(x)T(t). \nonumber \]
We rewrite as \[ \frac{T'(t)}{kT(t)}= \frac{X''(x)}{X(x)}. \nonumber \]
This equation must hold for all \(x\) and all \(t\). But the left hand side does not depend on \(x\) and the right hand side does not depend on \(t\). Hence, each side must be a constant. Let us call this constant \(- \lambda\) (the minus sign is for convenience later). We obtain the two equations
The boundary condition \(u(0,t)=0\) implies \( X(0)T(t)=0\). We are looking for a nontrivial solution and so we can assume that \(T(t)\) is not identically zero. Hence \(X(0)=0\). Similarly, \(u(L,t)=0\) implies \(X(L)=0\). We are looking for nontrivial solutions \(X\) of the eigenvalue problem \( X'' + \lambda X = 0, X(0)=0, X(L)=0\). We have previously found that the only eigenvalues are \( \lambda_n = \frac{n^2 \pi^2}{L^2}\), for integers \( n \geq 1\), where eigenfunctions are \( \sin \left( \frac{n \pi}{L}x \right)\). Hence, let us pick the solutions
That is, we find the Fourier series of the odd periodic extension of \(f(x)\). We used the sine series as it corresponds to the eigenvalue problem for \(X(x)\) above. Finally, we use superposition to write the solution as
Why does this solution work? First note that it is a solution to the heat equation by superposition. It satisfies \(u(0,t)=0\) and \(u(L,t)=0\), because \(x=0\) or \(x=L\) makes all the sines vanish. Finally, plugging in \(t=0\), we notice that \(T_n(0)=1\) and so
Suppose that we have an insulated wire of length \(1\), such that the ends of the wire are embedded in ice (temperature 0). Let \(k=0.003\). Then suppose that initial heat distribution is \(u(x,0)=50x(1-x)\). See Figure \(\PageIndex{2}\).
We want to find the temperature function \(u(x,t)\). Let us suppose we also want to find when (at what \(t\)) does the maximum temperature in the wire drop to one half of the initial maximum of \(12.5\).
Finally, let us answer the question about the maximum temperature. It is relatively easy to see that the maximum temperature will always be at \(x=0.5\), in the middle of the wire. The plot of \(u(x,t)\) confirms this intuition.
For \(n=3\) and higher (remember \(n\) is only odd), the terms of the series are insignificant compared to the first term. The first term in the series is already a very good approximation of the function. Hence
The approximation gets better and better as \(t\) gets larger as the other terms decay much faster. Let us plot the function \(0.5,t\), the temperature at the midpoint of the wire at time \(t\), in Figure \(\PageIndex{4}\). The figure also plots the approximation by the first term.
After \(t=5\) or so it would be hard to tell the difference between the first term of the series for \(u(x,t)\) and the real solution \(u(x,t)\). This behavior is a general feature of solving the heat equation. If you are interested in behavior for large enough \(t\), only the first one or two terms may be necessary.
Let us get back to the question of when is the maximum temperature one half of the initial maximum temperature. That is, when is the temperature at the midpoint \(12.5/2=6.25\). We notice on the graph that if we use the approximation by the first term we will be close enough. We solve
So the maximum temperature drops to half at about \(t=24.5\).
We mention an interesting behavior of the solution to the heat equation. The heat equation “smoothes” out the function \(f(x)\) as \(t\) grows. For a fixed \(t\), the solution is a Fourier series with coefficients \(b_n e^{\frac{-n^2 \pi^2}{L^2}kt}\). If \(t>0\), then these coefficients go to zero faster than any \(\frac{1}{n^P}\) for any power \(p\). In other words, the Fourier series has infinitely many derivatives everywhere. Thus even if the function \(f(x)\) has jumps and corners, then for a fixed \(t>0\), the solution \(u(x,t)\) as a function of \(x\) is as smooth as we want it to be.
Example \(\PageIndex{2}\)
When the initial condition is already a sine series, then there is no need to compute anything, you just need to plug in. Consider \[u_t = 0.3 \, u_{xx}, \qquad u(0,t)=u(1,t)=0, \qquad u(x,0) = 0.1 \sin(\pi t) + \sin(2\pi t) . \nonumber \] The solution is then \[u(x,t) = 0.1 \sin(\pi t) e^{- 0.3 \pi^2 t} + \sin(2 \pi t) e^{- 1.2 \pi^2 t} . \nonumber \]
Insulated Ends
Now suppose the ends of the wire are insulated. In this case, we are solving the equation
Yet again we try a solution of the form \(u(x,t)=X(x)T(t)\). By the same procedure as before we plug into the heat equation and arrive at the following two equations
At this point the story changes slightly. The boundary condition \(u_x(0,t)=0\) implies \(X'(0)T(t)=0\). Hence \(X'(0)=0\). Similarly, \(u_x(L,t)=0\) implies \(X'(L)=0\). We are looking for nontrivial solutions \(X\) of the eigenvalue problem \(X''+ \lambda X=0,\) \(X'(0)=0,\) \(X'(L)=0,\). We have previously found that the only eigenvalues are \(\lambda_n=\frac{n^2 \pi^2}{L^2}\), for integers \( n \geq 0\), where eigenfunctions are \(\cos(\frac{n \pi}{L})X\) (we include the constant eigenfunction). Hence, let us pick solutions
Note in the graph that the temperature evens out across the wire. Eventually, all the terms except the constant die out, and you will be left with a uniform temperature of \(\frac{25}{3} \approx{8.33}\) along the entire length of the wire.
Let us expand on the last point. The constant term in the series is \[\frac{a_0}{2} = \frac{1}{L} \int_0^L f(x) \, dx . \nonumber \] In other words, \(\frac{a_0}{2}\) is the average value of \(f(x)\), that is, the average of the initial temperature. As the wire is insulated everywhere, no heat can get out, no heat can get in. So the temperature tries to distribute evenly over time, and the average temperature must always be the same, in particular it is always \(\frac{a_0}{2}\). As time goes to infinity, the temperature goes to the constant \(\frac{a_0}{2}\) everywhere.