A partial differential equation involves an unknown function of several variables, such as the temperature $u(x, t)$ at position $x$ along a rod at time $t$. The main method for linear PDEs on simple regions splits one PDE into two ODEs, one of which is a boundary value problem.
🔑 Key idea
For a linear, homogeneous PDE with homogeneous boundary conditions, try a product solution $u = X(x)T(t)$. For the heat equation $u_t = ku_{xx}$: $$\frac{T'}{kT} = \frac{X''}{X} = -\lambda,$$ so $X'' + \lambda X = 0$ (with the boundary conditions) and $T' + k\lambda T = 0$. With $u = 0$ at $x = 0$ and $x = L$: $u_n = e^{-k\lambda_nt}\sin\frac{n\pi x}{L}$, $\lambda_n = \left(\frac{n\pi}{L}\right)^{2}$. By superposition, any sum $\sum b_nu_n$ is also a solution.
💡 Why it works
Substituting $u = XT$ gives $XT' = kX''T$; divide by $kXT$. The left side depends only on $t$ and the right only on $x$. If you change $x$ and hold $t$ fixed, the left side does not change, so the right side cannot either: both equal a constant, written $-\lambda$ so that the eigenvalues come out positive. The boundary condition $u(0, t) = X(0)T(t) = 0$ for all $t$ means $X(0) = 0$ (otherwise $T \equiv 0$), so the conditions pass to $X$. That is why the conditions must be homogeneous: $u(0, t) = 5$ would not split this way. Linearity plus zero boundary values make sums of solutions solutions.
The initial shape is the single mode $n = 2$, so $\lambda = 4$ and $T' + 8T = 0$: $T = e^{-8t}$.
Answer: $u = e^{-8t}\sin 2x$
✏️ Worked example: Separating the wave equation
Separate $u_{tt} = 9u_{xx}$.
$XT'' = 9X''T$, so $\frac{T''}{9T} = \frac{X''}{X} = -\lambda$.
Answer: $X'' + \lambda X = 0$ and $T'' + 9\lambda T = 0$: the time part oscillates instead of decaying
✏️ Worked example: Does it separate?
Which of these separate with $u = X(x)T(t)$: (a) $u_t = u_{xx} - 3u$, (b) $u_t = u_{xx} + x$?
(a) $XT' = X''T - 3XT$; divide by $XT$: $\frac{T'}{T} = \frac{X''}{X} - 3$, one side in $t$, one in $x$.
(b) $XT' = X''T + x$: dividing by $XT$ leaves $\frac{x}{XT}$, which mixes both variables.
Answer: (a) separates; (b) does not, because the source term $x$ makes the equation nonhomogeneous (subtract a steady state first)
The constant must be the same for every $x$ and $t$, but different constants give different product solutions. The boundary conditions pick out the allowed values $\lambda_n$, and the initial condition then picks the combination $\sum b_n\sin\frac{n\pi x}{L}$, a sine series.
Two product solutions added together: $e^{-t}\sin x + 0.6e^{-9t}\sin 3x$. Each mode keeps its shape and only shrinks, the faster one nine times as fast; play it or drag the time slider and watch the sum turn into a single hump.
Practice
Pass with 3 right answers, the last 2 in a row. Each right answer earns 3 XP.