% =============================================================================
% ch13_wave_and_laplace.tex
% Chapter 13: Wave Equation and Laplace's Equation
% =============================================================================

\section{Wave and Laplace Equations}
\label{ch:wave_and_laplace}

This chapter covers two fundamental second-order PDEs: the \textbf{wave equation}, which governs vibrations and wave propagation, and \textbf{Laplace's equation}, which describes steady-state phenomena in electrostatics, fluid flow, and heat conduction. Both arise naturally from the separation of variables method developed in \cref{ch:heat_equation}, but they exhibit qualitatively different behavior --- oscillatory versus decaying.

\subsection{Wave Equation Derivation}
\label{sec:ch13_wave_derivation}

We derive the one-dimensional wave equation from the physics of a vibrating string.

\paragraph{Physical setup.} Consider a taut, flexible string stretched along the $x$-axis, fixed at its endpoints. Let $y(x,t)$ denote the transverse displacement of the string at position $x$ and time $t$. We assume:

\begin{itemize}
  \item The string is perfectly flexible (no resistance to bending).
  \item The motion is purely transverse (horizontal displacements are negligible).
  \item The tension $T$ in the string is uniform and remains constant during vibration.
  \item The string has a uniform linear mass density $\rho$ (mass per unit length).
  \item Displacements are small, so the angle $\theta$ between the string and the horizontal satisfies $\tan\theta \approx \sin\theta \approx \theta$.
\end{itemize}

\paragraph{Newton's second law for a string element.} Consider a small segment of the string from $x$ to $x + \Delta x$. The mass of this segment is $m = \rho\,\Delta x$. The forces acting on it are the tensions at the two endpoints, directed tangent to the string. Let $\theta$ and $\theta + \Delta\theta$ denote the angles the string makes with the horizontal at the left and right endpoints of the segment, respectively.

The net transverse force on the segment is
\[
  F_y = T\sin(\theta + \Delta\theta) - T\sin(\theta).
\]
Applying Newton's second law in the transverse direction:
\[
  \rho\,\Delta x \cdot \frac{\partial^2 y}{\partial t^2} = T\sin(\theta + \Delta\theta) - T\sin(\theta).
\]

\paragraph{Small-angle approximation.} For small displacements, the slope of the string at any point is the tangent of the angle:
\[
  \tan\theta \approx \sin\theta = \pd{y}{x}(x,t).
\]
Similarly, at the right endpoint:
\[
  \sin(\theta + \Delta\theta) \approx \pd{y}{x}(x+\Delta x, t).
\]
Substituting into the force equation:
\[
  \rho\,\Delta x \cdot \frac{\partial^2 y}{\partial t^2}
  = T\left[\pd{y}{x}(x+\Delta x, t) - \pd{y}{x}(x,t)\right].
\]
Divide both sides by $\rho\,\Delta x$:
\[
  \frac{\partial^2 y}{\partial t^2}
  = \frac{T}{\rho}\cdot\frac{\pd{y}{x}(x+\Delta x, t) - \pd{y}{x}(x,t)}{\Delta x}.
\]
Taking the limit $\Delta x \to 0$, the difference quotient becomes a derivative:
\[
  \frac{\partial^2 y}{\partial t^2} = \frac{T}{\rho}\,\frac{\partial^2 y}{\partial x^2}.
\]

\paragraph{The wave equation.} Define the wave speed
\[
  c = \sqrt{\frac{T}{\rho}},
\]
which has units of velocity. The one-dimensional wave equation is
\begin{equation}
  \label{eq:wave_equation}
  \frac{\partial^2 y}{\partial t^2} = c^2\,\frac{\partial^2 y}{\partial x^2}, \qquad -\infty < x < \infty, \;\; t > 0.
\end{equation}

\begin{keyresult}
  \textbf{Wave speed.} The speed $c = \sqrt{T/\rho}$ depends only on the physical properties of the string. Increasing the tension $T$ increases the wave speed (tighter strings transmit vibrations faster). Increasing the linear density $\rho$ decreases the wave speed (heavier strings respond more sluggishly).
\end{keyresult}

\begin{figure}[htbp]
  \centering
  \begin{tikzpicture}[scale=0.8]
    % Horizontal axis
    \draw[->] (-0.5,0) -- (7,0) node[right, font=\small] {$x$};
    % Equilibrium position (dashed)
    \draw[dashed, gray] (-0.2,0) -- (6.5,0);
    % String at time t: a wave profile
    \draw[thick, blue!70] (0,0)
      .. controls (0.8,1.2) and (1.5,1.4) .. (2,1.2)
      .. controls (2.5,0.9) and (3,0) .. (3.5,-1.0)
      .. controls (4,-1.5) and (4.5,-1.3) .. (5,-0.8)
      .. controls (5.4,-0.3) .. (6,0);

    % String element segment
    \draw[thick, red] (2.2,0.6) -- (2.8,0.3);
    \draw[dotted, red, thin] (2.2,0.6) -- (2.2,0);
    \draw[dotted, red, thin] (2.8,0.3) -- (2.8,0);
    \node[font=\footnotesize, red, below] at (2.5,-0.15) {$\Delta x$};

    % Tension vectors at left endpoint of element
    \draw[-{Stealth[length=4mm]}, thick, red] (2.2,0.6) -- +(0.4,0.5)
      node[font=\footnotesize, red, right] {$T$};
    \draw[-{Stealth[length=4mm]}, thick, red] (2.2,0.6) -- +(-0.35,-0.45)
      node[font=\footnotesize, red, below left] {$T$};

    % Tension vectors at right endpoint of element
    \draw[-{Stealth[length=4mm]}, thick, red] (2.8,0.3) -- +(0.45,0.35)
      node[font=\footnotesize, red, above right] {$T$};
    \draw[-{Stealth[length=4mm]}, thick, red] (2.8,0.3) -- +(-0.4,-0.4)
      node[font=\footnotesize, red, below left] {$T$};

    % Displacement arrow
    \draw[->, >=stealth, thick, teal] (1.0,0) -- (1.0,1.3);
    \node[font=\small, teal, right] at (1.1,0.7) {$y(x,t)$};

    % Angles
    \draw (2.0,0) arc (0:25:0.5);
    \node[font=\footnotesize] at (2.5,0.2) {$\theta$};
    \draw (2.6,0) arc (0:15:0.5);
    \node[font=\footnotesize] at (3.15,0.15) {$\theta+\Delta\theta$};

    % Label
    \node[font=\small, anchor=south] at (3,-1.8) {Taut string element};
  \end{tikzpicture}
  \caption{Derivation of the wave equation. A small segment of the string of length $\Delta x$ is subject to tension forces at its endpoints. The net transverse force drives the vertical acceleration, leading to the wave equation.}
  \label{fig:string_derivation}
\end{figure}

\paragraph{Initial conditions.} To obtain a unique solution, the wave equation requires two initial conditions: the initial displacement and the initial velocity:
\begin{equation}
  \label{eq:wave_initial_conditions}
  y(x,0) = f(x), \qquad \pd{y}{t}(x,0) = g(x),
\end{equation}
where $f(x)$ and $g(x)$ are given functions. This is natural for a second-order equation in time: we need both the position and velocity at $t=0$.

\subsection{d'Alembert's Solution}
\label{sec:ch13_dalembert}

For the wave equation on an infinite string ($-\infty < x < \infty$), there is a closed-form solution known as d'Alembert's formula. The key insight is that the wave equation naturally factors into two independent propagation directions.

\paragraph{Characteristic coordinates.} Define new variables
\[
  \xi = x - ct, \qquad \eta = x + ct.
\]
These are the \textbf{characteristic coordinates}. The coordinate $\xi$ is constant along lines moving to the right with speed $c$, while $\eta$ is constant along lines moving to the left with speed $c$.

We express the partial derivatives in terms of $\xi$ and $\eta$. By the chain rule:
\begin{align*}
  \pd{y}{x} &= \pd{y}{\xi}\,\frac{\partial\xi}{\partial x} + \pd{y}{\eta}\,\frac{\partial\eta}{\partial x}
            = \pd{y}{\xi} + \pd{y}{\eta}, \\[6pt]
  \pd{y}{t} &= \pd{y}{\xi}\,\frac{\partial\xi}{\partial t} + \pd{y}{\eta}\,\frac{\partial\eta}{\partial t}
            = -c\,\pd{y}{\xi} + c\,\pd{y}{\eta}.
\end{align*}
Computing the second derivatives:
\begin{align*}
  \frac{\partial^2 y}{\partial x^2}
  &= \frac{\partial}{\partial x}\Bigl(\pd{y}{\xi} + \pd{y}{\eta}\Bigr)
   = \frac{\partial^2 y}{\partial \xi^2} + 2\,\frac{\partial^2 y}{\partial \xi\,\partial \eta}
     + \frac{\partial^2 y}{\partial \eta^2}, \\[6pt]
  \frac{\partial^2 y}{\partial t^2}
  &= \frac{\partial}{\partial t}\Bigl(-c\,\pd{y}{\xi} + c\,\pd{y}{\eta}\Bigr)
   = -c\Bigl(-c\,\frac{\partial^2 y}{\partial \xi^2} + c\,\frac{\partial^2 y}{\partial \xi\,\partial \eta}\Bigr)
     + c\Bigl(-c\,\frac{\partial^2 y}{\partial \eta\,\partial \xi} + c\,\frac{\partial^2 y}{\partial \eta^2}\Bigr) \\[6pt]
  &= c^2\,\frac{\partial^2 y}{\partial \xi^2} - 2c^2\,\frac{\partial^2 y}{\partial \xi\,\partial \eta}
     + c^2\,\frac{\partial^2 y}{\partial \eta^2}.
\end{align*}
Substitute into the wave equation $\dfrac{\partial^2 y}{\partial t^2} = c^2\,\dfrac{\partial^2 y}{\partial x^2}$:
\[
  c^2\Bigl(y_{\xi\xi} - 2y_{\xi\eta} + y_{\eta\eta}\Bigr)
  = c^2\Bigl(y_{\xi\xi} + 2y_{\xi\eta} + y_{\eta\eta}\Bigr).
\]
Cancel $c^2$ and the matching terms $y_{\xi\xi}$ and $y_{\eta\eta}$:
\[
  -2y_{\xi\eta} = 2y_{\xi\eta}
  \quad\Longrightarrow\quad
  4y_{\xi\eta} = 0
  \quad\Longrightarrow\quad
  \frac{\partial^2 y}{\partial \xi\,\partial \eta} = 0.
\]

\paragraph{Integration.} The reduced equation $y_{\xi\eta} = 0$ is very simple. Integrate with respect to $\eta$:
\[
  \pd{y}{\xi} = F'(\xi),
\]
where $F'(\xi)$ is an arbitrary function of $\xi$ alone. Now integrate with respect to $\xi$:
\[
  y(\xi, \eta) = F(\xi) + G(\eta),
\]
where $G(\eta)$ is another arbitrary function (the ``constant of integration'' when integrating with respect to $\xi$). Converting back to $x$ and $t$:
\[
  y(x,t) = F(x - ct) + G(x + ct).
\]

\begin{keyresult}
  \textbf{General solution of the wave equation.} The general solution of \cref{eq:wave_equation} on an infinite string is
  \[
    y(x,t) = F(x - ct) + G(x + ct),
  \]
  where $F$ and $G$ are arbitrary twice-differentiable functions. The term $F(x-ct)$ represents a \textbf{right-traveling wave} (shape $F$ propagating to the right at speed $c$), and $G(x+ct)$ represents a \textbf{left-traveling wave} (shape $G$ propagating to the left at speed $c$).
\end{keyresult}

\paragraph{Applying the initial conditions.} We now determine $F$ and $G$ from \cref{eq:wave_initial_conditions}:
\begin{align}
  y(x,0) = F(x) + G(x) &= f(x), \label{eq:IC1} \\[6pt]
  \pd{y}{t}(x,0) = -c\,F'(x) + c\,G'(x) &= g(x). \label{eq:IC2}
\end{align}
Integrate \cref{eq:IC2} from some fixed point $x_0$ to $x$:
\[
  -c\bigl[F(x) - F(x_0)\bigr] + c\bigl[G(x) - G(x_0)\bigr]
  = \int_{x_0}^{x} g(s)\,\diff s.
\]
Divide by $c$:
\[
  -F(x) + G(x) + \bigl[F(x_0) - G(x_0)\bigr] = \frac{1}{c}\int_{x_0}^{x} g(s)\,\diff s.
\]
Let $C = F(x_0) - G(x_0)$ be a constant. Now we have a system of two equations:
\[
  \begin{cases}
    F(x) + G(x) = f(x), \\[4pt]
    -F(x) + G(x) = \dfrac{1}{c}\displaystyle\int_{x_0}^{x} g(s)\,\diff s - C.
  \end{cases}
\]
Adding and subtracting:
\[
  G(x) = \frac{1}{2}\,f(x) + \frac{1}{2c}\int_{x_0}^{x} g(s)\,\diff s - \frac{C}{2},
  \qquad
  F(x) = \frac{1}{2}\,f(x) - \frac{1}{2c}\int_{x_0}^{x} g(s)\,\diff s + \frac{C}{2}.
\]
Substitute into $y(x,t) = F(x-ct) + G(x+ct)$:
\[
  y(x,t) = \frac{1}{2}\Bigl[f(x-ct) + f(x+ct)\Bigr]
           + \frac{1}{2c}\Biggl[\int_{x_0}^{x+ct} g(s)\,\diff s
           - \int_{x_0}^{x-ct} g(s)\,\diff s\Biggr].
\]
The two integrals combine:
\[
  \int_{x_0}^{x+ct} g(s)\,\diff s - \int_{x_0}^{x-ct} g(s)\,\diff s
  = \int_{x-ct}^{x+ct} g(s)\,\diff s.
\]

\begin{keyresult}
  \label{key:dalembert}
  \textbf{d'Alembert's formula.} For the initial value problem
  \[
    \frac{\partial^2 y}{\partial t^2} = c^2\,\frac{\partial^2 y}{\partial x^2},
    \qquad y(x,0) = f(x), \;\; \pd{y}{t}(x,0) = g(x),
  \]
  the solution is
  \begin{equation}
    \label{eq:dalembert_formula}
    y(x,t) = \frac{1}{2}\Bigl[f(x-ct) + f(x+ct)\Bigr]
             + \frac{1}{2c}\int_{x-ct}^{x+ct} g(s)\,\diff s.
  \end{equation}
\end{keyresult}

\paragraph{Interpretation of the formula.} The first term, $\frac{1}{2}[f(x-ct) + f(x+ct)]$, splits the initial displacement into two copies, each traveling in opposite directions at speed $c$. The second term accounts for the initial velocity: it averages the initial velocity over the interval $[x-ct, x+ct]$ and distributes its effect to point $x$.

\begin{theorem}[Domain of Dependence]
  \label{thm:domain_of_dependence}
  The value of the solution $y(x,t)$ at any point $(x,t)$ depends only on the initial data $f(s)$ and $g(s)$ in the interval
  \[
    [x-ct,\; x+ct].
  \]
  This interval is called the \textbf{domain of dependence} of the point $(x,t)$. Information travels at the finite speed $c$; disturbances outside this interval have no influence on the solution at $(x,t)$.
\end{theorem}

\begin{figure}[htbp]
  \centering
  \begin{tikzpicture}[scale=0.9]
    % Axes
    \draw[->] (-0.5,0) -- (7,0) node[right, font=\small] {$x$};
    \draw[->] (0,-0.5) -- (0,5) node[above, font=\small] {$t$};

    % Characteristic lines from (x*, t*)
    \coordinate (P) at (3.5,4);
    \coordinate (L) at (0.5,0);
    \coordinate (R) at (6.5,0);

    % Characteristic cone (shaded)
    \fill[red!10] (P) -- (L) -- (R) -- cycle;

    % Characteristic lines
    \draw[dashed, thick, red] (L) -- (P) node[midway, left, font=\footnotesize, red] {$x-ct$};
    \draw[dashed, thick, red] (R) -- (P) node[midway, right, font=\footnotesize, red] {$x+ct$};

    % Domain of dependence interval on t=0
    \draw[thick, red] (L) -- (R);
    \node[font=\footnotesize, red, below] at (3.5,-0.15) {$[x-ct,\, x+ct]$};

    % Point (x, t)
    \filldraw[red] (P) circle (2pt);
    \node[font=\small, red, anchor=south west] at (P) {$\quad(x,t)$};

    % T=0 label
    \node[font=\small, below left] at (0,0) {$t=0$};

    % Arrows showing wave propagation
    \draw[->, >=stealth, thick, blue!60] (1.5,0.15) -- (2.5,1.2)
      node[font=\footnotesize, blue!60, below right] {right wave};
    \draw[->, >=stealth, thick, blue!60] (5.5,0.15) -- (4.5,1.2)
      node[font=\footnotesize, blue!60, below left] {left wave};

    % Label
    \node[font=\small, anchor=south] at (3.5,-1.2) {Characteristic cone and domain of dependence};
  \end{tikzpicture}
  \caption{Domain of dependence for d'Alembert's solution. The solution at point $(x,t)$ depends only on initial data in the interval $[x-ct,\, x+ct]$ on the $x$-axis. The dashed red lines are the characteristic lines $x-ct = \text{const}$ and $x+ct = \text{const}$.}
  \label{fig:characteristic_cone}
\end{figure}

\paragraph{Worked examples.}

\begin{workedexample}
  A string is initially at rest in the shape $f(x) = e^{-x^2}$. Find the solution for $t > 0$.

  \textbf{Solution.} Here $f(x) = e^{-x^2}$ and $g(x) = 0$ (the string is initially at rest). By d'Alembert's formula:
  \[
    y(x,t) = \frac{1}{2}\Bigl[e^{-(x-ct)^2} + e^{-(x+ct)^2}\Bigr].
  \]
  \textbf{Interpretation.} The initial Gaussian bump splits into two identical bumps of half the original amplitude. One travels to the right at speed $c$, the other to the left. As $t$ increases, the two bumps separate and the amplitude at any fixed point decays to zero (since the bumps move away).
\end{workedexample}

\begin{workedexample}
  A string initially flat ($f(x) = 0$) receives an impulse: the initial velocity is
  \[
    g(x) = \begin{cases}
      v_0, & 0 < x < L, \\
      0, & \text{otherwise},
    \end{cases}
  \]
  where $v_0$ is a constant. Find $y(x,t)$ using d'Alembert's formula.

  \textbf{Solution.} Since $f(x) = 0$, only the second term survives:
  \[
    y(x,t) = \frac{1}{2c}\int_{x-ct}^{x+ct} g(s)\,\diff s.
  \]
  The integral picks up contributions only where $s \in (0,L)$. The intersection of $[x-ct,\, x+ct]$ with $[0,L]$ depends on the position of the interval relative to $[0,L]$. Consider the case where the entire interval $[x-ct,\, x+ct]$ lies within $[0,L]$, i.e., $0 \leq x-ct$ and $x+ct \leq L$. Then:
  \[
    y(x,t) = \frac{1}{2c}\int_{x-ct}^{x+ct} v_0\,\diff s
           = \frac{v_0}{2c}\cdot 2ct = v_0\,t.
  \]
  In this region, the displacement grows linearly with time.

  For the case where $x-ct < 0$ but $x+ct < L$ (left edge of the wave is outside the impulse region):
  \[
    y(x,t) = \frac{1}{2c}\int_{0}^{x+ct} v_0\,\diff s
           = \frac{v_0}{2c}(x+ct).
  \]

  The full piecewise solution depends on the relative positions of the interval endpoints. The key takeaway: the impulse generates a trapezoidal wave profile that spreads out at speed $c$ in both directions.
\end{workedexample}

\subsection{Finite String and Standing Waves}
\label{sec:ch13_finite_string}

When the string has finite length $L$ and is fixed at both ends, waves cannot propagate to infinity. Instead, they reflect at the boundaries, and the superposition of right- and left-traveling waves produces \textbf{standing waves} (normal modes).

\paragraph{Problem statement.} Consider a string of length $L$ fixed at both ends:
\begin{equation}
  \label{eq:finite_string_problem}
  \begin{cases}
    \dfrac{\partial^2 y}{\partial t^2} = c^2\,\dfrac{\partial^2 y}{\partial x^2}, & 0 < x < L, \;\; t > 0, \\[10pt]
    y(0,t) = 0, \;\; y(L,t) = 0, & t > 0, \\[6pt]
    y(x,0) = f(x), \;\; \pd{y}{t}(x,0) = g(x), & 0 < x < L.
  \end{cases}
\end{equation}

\paragraph{Separation of variables.} We seek product solutions $y(x,t) = X(x)\,T(t)$. Substituting into the wave equation:
\[
  X(x)\,T''(t) = c^2\,X''(x)\,T(t).
\]
Divide by $c^2 X(x)\,T(t)$:
\[
  \frac{T''(t)}{c^2\,T(t)} = \frac{X''(x)}{X(x)} = -\lambda.
\]
This separates into two ODEs:
\begin{align}
  X''(x) + \lambda\,X(x) &= 0, \label{eq:string_space} \\[6pt]
  T''(t) + c^2\lambda\,T(t) &= 0. \label{eq:string_time}
\end{align}

The boundary conditions $y(0,t) = 0$ and $y(L,t) = 0$ imply $X(0) = 0$ and $X(L) = 0$. The spatial equation \cref{eq:string_space} with these boundary conditions is exactly the Dirichlet eigenvalue problem studied in \cref{sec:ch11_eigenvalue_problems}. The eigenvalues and eigenfunctions are
\[
  \lambda_n = \left(\frac{n\pi}{L}\right)^{\!2},
  \qquad
  X_n(x) = \sin\!\left(\frac{n\pi x}{L}\right),
  \qquad n = 1, 2, 3, \dots
\]

For each $\lambda_n$, the temporal equation \cref{eq:string_time} becomes
\[
  T_n''(t) + \omega_n^2\,T_n(t) = 0,
  \qquad \text{where } \omega_n = c\sqrt{\lambda_n} = \frac{n\pi c}{L}.
\]
The general solution is
\[
  T_n(t) = A_n\cos(\omega_n t) + B_n\sin(\omega_n t).
\]

\paragraph{General solution.} The product solutions $y_n(x,t) = X_n(x)\,T_n(t)$ are
\[
  y_n(x,t) = \sin\!\left(\frac{n\pi x}{L}\right)\Bigl[A_n\cos\!\left(\frac{n\pi c t}{L}\right)
                        + B_n\sin\!\left(\frac{n\pi c t}{L}\right)\Bigr].
\]
By linearity, the general solution is the infinite sum:
\begin{equation}
  \label{eq:finite_string_solution}
  y(x,t) = \sum_{n=1}^{\infty} \sin\!\left(\frac{n\pi x}{L}\right)
           \Bigl[A_n\cos\!\left(\frac{n\pi c t}{L}\right)
           + B_n\sin\!\left(\frac{n\pi c t}{L}\right)\Bigr].
\end{equation}

\paragraph{Determining the coefficients.} The initial conditions determine $A_n$ and $B_n$. At $t = 0$:
\[
  y(x,0) = \sum_{n=1}^{\infty} A_n\,\sin\!\left(\frac{n\pi x}{L}\right) = f(x).
\]
This is a Fourier sine series for $f(x)$ on $[0,L]$. By orthogonality:
\begin{equation}
  \label{eq:An_coefficient}
  A_n = \frac{2}{L}\int_0^L f(x)\,\sin\!\left(\frac{n\pi x}{L}\right)\,\diff x.
\end{equation}

For the velocity, differentiate \cref{eq:finite_string_solution} with respect to $t$:
\[
  \pd{y}{t}(x,t) = \sum_{n=1}^{\infty} \sin\!\left(\frac{n\pi x}{L}\right)
                   \Bigl[-A_n\frac{n\pi c}{L}\sin\!\left(\frac{n\pi c t}{L}\right)
                   + B_n\frac{n\pi c}{L}\cos\!\left(\frac{n\pi c t}{L}\right)\Bigr].
\]
At $t = 0$:
\[
  \pd{y}{t}(x,0) = \sum_{n=1}^{\infty} B_n\,\frac{n\pi c}{L}\,\sin\!\left(\frac{n\pi x}{L}\right) = g(x).
\]
By orthogonality:
\begin{equation}
  \label{eq:Bn_coefficient}
  B_n = \frac{2}{cn\pi}\int_0^L g(x)\,\sin\!\left(\frac{n\pi x}{L}\right)\,\diff x.
\end{equation}

\begin{keyresult}
  \textbf{Finite string with fixed ends.} The solution to \cref{eq:finite_string_problem} is \cref{eq:finite_string_solution} with coefficients given by \cref{eq:An_coefficient} and \cref{eq:Bn_coefficient}.
\end{keyresult}

\paragraph{Normal modes and harmonics.} Each term $n$ in the series \cref{eq:finite_string_solution} is a \textbf{normal mode}:
\[
  y_n(x,t) = \sin\!\left(\frac{n\pi x}{L}\right)\Bigl[A_n\cos(\omega_n t) + B_n\sin(\omega_n t)\Bigr].
\]
Key properties:
\begin{itemize}
  \item The spatial shape $\sin(n\pi x/L)$ is fixed; the amplitude oscillates in time with angular frequency $\omega_n = n\pi c/L$.
  \item The nodes (points of zero displacement) are at $x = 0, L/n, 2L/n, \dots, L$. The $n$-th mode has exactly $n-1$ interior nodes.
  \item The \textbf{fundamental frequency} (first harmonic) is $\omega_1 = \pi c/L$. The $n$-th harmonic has frequency $\omega_n = n\,\omega_1$. This integer relationship is responsible for the musical harmonics we hear from strings.
\end{itemize}

\begin{figure}[htbp]
  \centering
  \begin{tikzpicture}[scale=0.6]
    % Mode 1: Fundamental
    \begin{scope}[shift={(0,0)}]
      \draw[thick, blue!70] (0,0) .. controls (0.5,3) and (1.5,3) .. (2,0);
      \draw[dashed, gray] (0,0) -- (2,0);
      \node[font=\small] at (1,-0.5) {\textbf{Mode 1:} $\sin(\pi x/L)$};
      \node[font=\footnotesize, gray] at (1,-1.0) {1 antinode};
    \end{scope}

    % Mode 2: Second harmonic
    \begin{scope}[shift={(0,-2)}]
      \draw[thick, blue!70] (0,0) .. controls (0.25,2) and (0.75,2) .. (1,0)
                            .. controls (1.25,-2) and (1.75,-2) .. (2,0);
      \draw[dashed, gray] (0,0) -- (2,0);
      \node[font=\small] at (1,-0.5) {\textbf{Mode 2:} $\sin(2\pi x/L)$};
      \node[font=\footnotesize, gray] at (1,-1.0) {2 antinodes, 1 interior node};
    \end{scope}

    % Mode 3: Third harmonic
    \begin{scope}[shift={(0,-4)}]
      \draw[thick, blue!70] (0,0)
        .. controls (0.17,1.8) and (0.5,1.8) .. (0.67,0)
        .. controls (0.83,-1.8) and (1.17,-1.8) .. (1.33,0)
        .. controls (1.5,1.8) and (1.83,1.8) .. (2,0);
      \draw[dashed, gray] (0,0) -- (2,0);
      \node[font=\small] at (1,-0.5) {\textbf{Mode 3:} $\sin(3\pi x/L)$};
      \node[font=\footnotesize, gray] at (1,-1.0) {3 antinodes, 2 interior nodes};
    \end{scope}

    % Mode 4: Fourth harmonic
    \begin{scope}[shift={(0,-6)}]
      \draw[thick, blue!70] (0,0)
        .. controls (0.125,1.5) and (0.375,1.5) .. (0.5,0)
        .. controls (0.625,-1.5) and (0.875,-1.5) .. (1,0)
        .. controls (1.125,1.5) and (1.375,1.5) .. (1.5,0)
        .. controls (1.625,-1.5) and (1.875,-1.5) .. (2,0);
      \draw[dashed, gray] (0,0) -- (2,0);
      \node[font=\small] at (1,-0.5) {\textbf{Mode 4:} $\sin(4\pi x/L)$};
      \node[font=\footnotesize, gray] at (1,-1.0) {4 antinodes, 3 interior nodes};
    \end{scope}

    % Axis labels
    \node[font=\small, rotate=90, anchor=south] at (-0.5,-3) {$y$};
    \node[font=\small, anchor=north] at (2.5,-0.15) {$x$};
  \end{tikzpicture}
  \caption{Normal mode shapes for a string of length $L$ fixed at both ends. The $n$-th mode has the shape $\sin(n\pi x/L)$ with $n$ antinodes and $n-1$ interior nodes. Higher modes oscillate at higher frequencies $\omega_n = n\omega_1$.}
  \label{fig:normal_modes}
\end{figure}

\paragraph{Worked examples.}

\begin{workedexample}
  A guitar string of length $L$ is plucked into a triangular shape:
  \[
    f(x) = \begin{cases}
      \dfrac{2h}{L}\,x, & 0 \leq x \leq \dfrac{L}{2}, \\[10pt]
      \dfrac{2h}{L}\,(L-x), & \dfrac{L}{2} \leq x \leq L,
    \end{cases}
  \]
  and released from rest ($g(x) = 0$). Find the solution $y(x,t)$.

  \textbf{Solution.} Since $g(x) = 0$, all $B_n = 0$. The solution reduces to
  \[
    y(x,t) = \sum_{n=1}^{\infty} A_n\,\sin\!\left(\frac{n\pi x}{L}\right)\cos\!\left(\frac{n\pi c t}{L}\right),
  \]
  with
  \[
    A_n = \frac{2}{L}\int_0^L f(x)\,\sin\!\left(\frac{n\pi x}{L}\right)\,\diff x.
  \]
  Split the integral at $x = L/2$:
  \[
    A_n = \frac{2}{L}\left[\frac{2h}{L}\int_0^{L/2} x\,\sin\!\left(\frac{n\pi x}{L}\right)\,\diff x
          + \frac{2h}{L}\int_{L/2}^{L} (L-x)\,\sin\!\left(\frac{n\pi x}{L}\right)\,\diff x\right].
  \]
  Let $k = n\pi/L$ for brevity. Compute the first integral by parts ($u = x$, $\diff v = \sin(kx)\,\diff x$):
  \[
    \int_0^{L/2} x\sin(kx)\,\diff x
    = \Bigl[-\frac{x}{k}\cos(kx)\Bigr]_0^{L/2} + \frac{1}{k}\int_0^{L/2}\cos(kx)\,\diff x
    = -\frac{L}{2k}\cos\!\left(\frac{n\pi}{2}\right) + \frac{1}{k^2}\sin\!\left(\frac{n\pi}{2}\right).
  \]
  For the second integral, substitute $u = L-x$ ($\diff u = -\diff x$):
  \[
    \int_{L/2}^{L}(L-x)\sin(kx)\,\diff x
    = \int_0^{L/2} u\sin(k(L-u))\,\diff u.
  \]
  Since $\sin(k(L-u)) = \sin(n\pi - ku) = \sin(n\pi)\cos(ku) - \cos(n\pi)\sin(ku) = (-1)^{n+1}\sin(ku)$, the second integral is $(-1)^{n+1}$ times the first. For a symmetric triangular pluck, the result simplifies to:
  \[
    A_n = \frac{8h}{n^2\pi^2}\sin\!\left(\frac{n\pi}{2}\right).
  \]
  This is nonzero only for \textbf{odd} $n$ (since $\sin(n\pi/2) = 0$ for even $n$). For $n$ odd, $\sin(n\pi/2) = (-1)^{(n-1)/2}$. Therefore:
  \[
    A_n = \begin{cases}
      \dfrac{8h}{n^2\pi^2}\,(-1)^{(n-1)/2}, & n \text{ odd}, \\[10pt]
      0, & n \text{ even}.
    \end{cases}
  \]
  The final solution is
  \[
    y(x,t) = \frac{8h}{\pi^2}\sum_{k=0}^{\infty}
              \frac{(-1)^k}{(2k+1)^2}\,
              \sin\!\left(\frac{(2k+1)\pi x}{L}\right)
              \cos\!\left(\frac{(2k+1)\pi c t}{L}\right).
  \]
  Notice that only odd harmonics are present. This is a general property: symmetric initial conditions excite only odd modes. The amplitude of the $n$-th mode decays as $1/n^2$, so the fundamental dominates strongly.
\end{workedexample}

\begin{workedexample}
  A string of length $L = \pi$ is fixed at both ends. At $t = 0$ it is at its equilibrium position but given an initial velocity $g(x) = \sin(3x)$. Find $y(x,t)$.

  \textbf{Solution.} Here $f(x) = 0$ and $g(x) = \sin(3x)$, so $A_n = 0$ for all $n$. We only need $B_n$:
  \[
    B_n = \frac{2}{cn\pi}\int_0^{\pi} \sin(3x)\,\sin(nx)\,\diff x.
  \]
  By the orthogonality of sines, this integral is zero unless $n = 3$. For $n = 3$:
  \[
    B_3 = \frac{2}{3c\pi}\int_0^{\pi} \sin^2(3x)\,\diff x
        = \frac{2}{3c\pi}\cdot\frac{\pi}{2} = \frac{1}{3c}.
  \]
  The solution is a single mode:
  \[
    y(x,t) = \frac{1}{3c}\,\sin(3x)\,\sin(3ct).
  \]
  \textbf{Interpretation.} The initial velocity profile already has the shape of the third normal mode, so only the third mode is excited. The string oscillates at the third harmonic frequency $\omega_3 = 3c$ with amplitude $1/(3c)$. The two nodes at $x = 0$ and $x = \pi$ are fixed, and there is one additional node at $x = \pi/3$ and $x = 2\pi/3$.
\end{workedexample}

\subsection{Two-Dimensional Wave Equation}
\label{sec:ch13_2d_wave}

The wave equation generalizes to two spatial dimensions to describe the transverse vibration of a membrane (e.g., a drumhead). Let $u(x,y,t)$ be the displacement of the membrane at position $(x,y)$ and time $t$.

\begin{equation}
  \label{eq:wave_2d}
  \frac{\partial^2 u}{\partial t^2} = c^2\left(\frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2}\right)
  = c^2\,\nabla^2 u,
\end{equation}
where $\nabla^2$ is the two-dimensional Laplacian.

\paragraph{Separation on a rectangular membrane.} Consider a rectangular membrane $0 < x < a$, $0 < y < b$ with fixed edges:
\[
  u(0,y,t) = u(a,y,t) = u(x,0,t) = u(x,b,t) = 0.
\]
We seek product solutions $u(x,y,t) = X(x)\,Y(y)\,T(t)$. Substituting into \cref{eq:wave_2d}:
\[
  X\,Y\,T'' = c^2\,(X''\,Y\,T + X\,Y''\,T).
\]
Divide by $c^2 X Y T$:
\[
  \frac{T''}{c^2\,T} = \frac{X''}{X} + \frac{Y''}{Y}.
\]
Since the left side depends only on $t$ and the right side depends only on $x$ and $y$, both must equal a separation constant, which we take as $-\lambda$:
\[
  T'' + c^2\lambda\,T = 0,
  \qquad
  \frac{X''}{X} + \frac{Y''}{Y} = -\lambda.
\]
The spatial equation further separates:
\[
  \frac{X''}{X} = -\mu, \qquad \frac{Y''}{Y} = -\nu, \qquad \mu + \nu = \lambda.
\]
With fixed edges, we have:
\begin{align*}
  X'' + \mu X &= 0, \;\; X(0) = X(a) = 0
  \quad\Longrightarrow\quad
  \mu_m = \left(\frac{m\pi}{a}\right)^{\!2}, \;\; X_m(x) = \sin\!\left(\frac{m\pi x}{a}\right), \\[8pt]
  Y'' + \nu Y &= 0, \;\; Y(0) = Y(b) = 0
  \quad\Longrightarrow\quad
  \nu_n = \left(\frac{n\pi}{b}\right)^{\!2}, \;\; Y_n(y) = \sin\!\left(\frac{n\pi y}{b}\right),
\end{align*}
for $m, n = 1, 2, 3, \dots$.

The eigenvalues are
\[
  \lambda_{mn} = \mu_m + \nu_n = \pi^2\left(\frac{m^2}{a^2} + \frac{n^2}{b^2}\right),
\]
and the angular frequencies are
\[
  \omega_{mn} = c\sqrt{\lambda_{mn}} = c\pi\sqrt{\frac{m^2}{a^2} + \frac{n^2}{b^2}}.
\]

\begin{keyresult}
  \textbf{Rectangular membrane.} The general solution is
  \[
    u(x,y,t) = \sum_{m=1}^{\infty}\sum_{n=1}^{\infty}
               \sin\!\left(\frac{m\pi x}{a}\right)\sin\!\left(\frac{n\pi y}{b}\right)
               \Bigl[A_{mn}\cos(\omega_{mn}t) + B_{mn}\sin(\omega_{mn}t)\Bigr],
  \]
  where $\omega_{mn} = c\pi\sqrt{m^2/a^2 + n^2/b^2}$ and the coefficients are determined by the initial displacement and velocity.
\end{keyresult}

\begin{workedexample}
  A rectangular membrane of size $a \times b$ is fixed on all edges. The initial displacement is $u(x,y,0) = \sin(\pi x/a)\sin(\pi y/b)$ and the initial velocity is $u_t(x,y,0) = 0$. Find the solution $u(x,y,t)$.

  \textbf{Solution.} The general solution for a rectangular membrane with fixed edges is
  \[
    u(x,y,t) = \sum_{m=1}^{\infty}\sum_{n=1}^{\infty}
               \sin\!\left(\frac{m\pi x}{a}\right)\sin\!\left(\frac{n\pi y}{b}\right)
               \Bigl[A_{mn}\cos(\omega_{mn}t) + B_{mn}\sin(\omega_{mn}t)\Bigr],
  \]
  where $\omega_{mn} = c\pi\sqrt{m^2/a^2 + n^2/b^2}$.

  The initial velocity condition gives
  \[
    u_t(x,y,0) = \sum_{m=1}^{\infty}\sum_{n=1}^{\infty}
                 \omega_{mn}\,B_{mn}\,
                 \sin\!\left(\frac{m\pi x}{a}\right)\sin\!\left(\frac{n\pi y}{b}\right) = 0,
  \]
  so by the orthogonality of sine products, $B_{mn} = 0$ for all $m, n$.

  The initial displacement condition gives
  \[
    u(x,y,0) = \sum_{m=1}^{\infty}\sum_{n=1}^{\infty}
               A_{mn}\,\sin\!\left(\frac{m\pi x}{a}\right)\sin\!\left(\frac{n\pi y}{b}\right)
               = \sin\!\left(\frac{\pi x}{a}\right)\sin\!\left(\frac{\pi y}{b}\right).
  \]
  Again by orthogonality, $A_{11} = 1$ and $A_{mn} = 0$ for all $(m,n) \neq (1,1)$.

  The solution is a single mode:
  \[
    u(x,y,t) = \sin\!\left(\frac{\pi x}{a}\right)\sin\!\left(\frac{\pi y}{b}\right)
               \cos\!\left(c\pi\sqrt{\frac{1}{a^2} + \frac{1}{b^2}}\,t\right).
  \]

  \textbf{Interpretation.} The initial displacement already has the shape of the fundamental mode $(m,n) = (1,1)$, so only the fundamental mode is excited. The membrane oscillates at its lowest eigenfrequency $\omega_{11} = c\pi\sqrt{1/a^2 + 1/b^2}$ with unit amplitude. If the initial displacement had contained higher modes (e.g., a sum of several products of sines), each mode would oscillate independently at its own frequency.
\end{workedexample}

\paragraph{Discussion.} Unlike the one-dimensional string, the frequencies of a rectangular membrane are \emph{not} integer multiples of a fundamental. The ratio $\omega_{mn}/\omega_{11} = \sqrt{m^2 a^2 + n^2 b^2}\,/\,\sqrt{a^2 + b^2}$ is generally irrational. This is why a drum produces a sound with no clear fundamental pitch --- a \textbf{non-harmonic} spectrum.

\subsection{Laplace's Equation in Rectangles}
\label{sec:ch13_laplace_rectangles}

We now turn to \textbf{Laplace's equation}, the prototypical elliptic PDE:
\begin{equation}
  \label{eq:laplace}
  \nabla^2 u = \frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2} = 0.
\end{equation}
Solutions of Laplace's equation are called \textbf{harmonic functions}. They describe steady-state temperature distributions (no time dependence in the heat equation), electrostatic potentials (no charges), and incompressible, irrotational fluid flow.

\paragraph{Rectangular domain.} Consider Laplace's equation on a rectangle $0 < x < a$, $0 < y < b$. We need four boundary conditions, one on each edge. A common and pedagogically useful case has three edges held at zero and one edge given by a prescribed function:
\begin{equation}
  \label{eq:laplace_rect_problem}
  \begin{cases}
    \dfrac{\partial^2 u}{\partial x^2} + \dfrac{\partial^2 u}{\partial y^2} = 0, & 0 < x < a, \;\; 0 < y < b, \\[10pt]
    u(0,y) = 0, \;\; u(a,y) = 0, & 0 < y < b, \\[6pt]
    u(x,0) = 0, & 0 < x < a, \\[6pt]
    u(x,b) = f(x), & 0 < x < a.
  \end{cases}
\end{equation}

\paragraph{Separation of variables.} Seek $u(x,y) = X(x)\,Y(y)$. Substituting into Laplace's equation:
\[
  X''\,Y + X\,Y'' = 0
  \quad\Longrightarrow\quad
  \frac{X''}{X} = -\frac{Y''}{Y} = -\lambda.
\]
The spatial ODEs are:
\begin{align}
  X'' + \lambda X &= 0, \qquad X(0) = 0, \;\; X(a) = 0, \label{eq:laplace_X} \\[6pt]
  Y'' - \lambda Y &= 0, \qquad Y(0) = 0. \label{eq:laplace_Y}
\end{align}

Equation \cref{eq:laplace_X} is the familiar Dirichlet eigenvalue problem on $[0,a]$. The eigenvalues and eigenfunctions are
\[
  \lambda_n = \left(\frac{n\pi}{a}\right)^{\!2},
  \qquad
  X_n(x) = \sin\!\left(\frac{n\pi x}{a}\right),
  \qquad n = 1, 2, 3, \dots
\]

For each $\lambda_n$, equation \cref{eq:laplace_Y} becomes
\[
  Y_n'' - \left(\frac{n\pi}{a}\right)^{\!2} Y_n = 0.
\]
The general solution is
\[
  Y_n(y) = A_n\cosh\!\left(\frac{n\pi y}{a}\right) + B_n\sinh\!\left(\frac{n\pi y}{a}\right).
\]
The boundary condition $Y(0) = 0$ forces $A_n = 0$, so
\[
  Y_n(y) = B_n\sinh\!\left(\frac{n\pi y}{a}\right).
\]

\paragraph{General solution.} The product solutions are $u_n(x,y) = \sin(n\pi x/a)\,\sinh(n\pi y/a)$. By linearity:
\begin{equation}
  \label{eq:laplace_rect_solution}
  u(x,y) = \sum_{n=1}^{\infty} A_n\,\sin\!\left(\frac{n\pi x}{a}\right)\sinh\!\left(\frac{n\pi y}{a}\right).
\end{equation}
Apply the remaining boundary condition $u(x,b) = f(x)$:
\[
  f(x) = u(x,b) = \sum_{n=1}^{\infty} A_n\sinh\!\left(\frac{n\pi b}{a}\right)\sin\!\left(\frac{n\pi x}{a}\right).
\]
This is a Fourier sine series for $f(x)$ on $[0,a]$. Define $C_n = A_n\sinh(n\pi b/a)$:
\[
  C_n = \frac{2}{a}\int_0^a f(x)\,\sin\!\left(\frac{n\pi x}{a}\right)\,\diff x.
\]
Therefore:
\begin{equation}
  \label{eq:laplace_rect_coefficients}
  A_n = \frac{2}{a\,\sinh(n\pi b/a)}\int_0^a f(x)\,\sin\!\left(\frac{n\pi x}{a}\right)\,\diff x.
\end{equation}

\begin{keyresult}
  \textbf{Laplace's equation on a rectangle.} For the problem \cref{eq:laplace_rect_problem}, the solution is \cref{eq:laplace_rect_solution} with coefficients given by \cref{eq:laplace_rect_coefficients}.
\end{keyresult}

\paragraph{Worked example.}

\begin{workedexample}
  Solve Laplace's equation on the square $0 < x < \pi$, $0 < y < \pi$, with
  \[
    u(0,y) = u(\pi,y) = u(x,0) = 0, \qquad u(x,\pi) = \sin(2x).
  \]

  \textbf{Solution.} Here $a = \pi$, $b = \pi$, and $f(x) = \sin(2x)$. The solution is
  \[
    u(x,y) = \sum_{n=1}^{\infty} A_n\,\sin(nx)\sinh(ny).
  \]
  The coefficients are
  \[
    A_n = \frac{2}{\pi\,\sinh(n\pi)}\int_0^{\pi} \sin(2x)\,\sin(nx)\,\diff x.
  \]
  By orthogonality of sines, the integral vanishes for $n \neq 2$. For $n = 2$:
  \[
    \int_0^{\pi} \sin^2(2x)\,\diff x = \frac{\pi}{2}.
  \]
  So $A_2 = \dfrac{2}{\pi\sinh(2\pi)}\cdot\dfrac{\pi}{2} = \dfrac{1}{\sinh(2\pi)}$, and $A_n = 0$ for $n \neq 2$. The solution is
  \[
    u(x,y) = \frac{\sinh(2y)}{\sinh(2\pi)}\,\sin(2x).
  \]
  \textbf{Check.} At $y = \pi$: $u(x,\pi) = \dfrac{\sinh(2\pi)}{\sinh(2\pi)}\sin(2x) = \sin(2x)$. $\checkmark$\\
  At $y = 0$: $u(x,0) = \dfrac{\sinh(0)}{\sinh(2\pi)}\sin(2x) = 0$. $\checkmark$\\
  At $x = 0$ and $x = \pi$: $\sin(2x) = 0$, so $u = 0$. $\checkmark$
\end{workedexample}

\subsection{Laplace's Equation in Polar Coordinates}
\label{sec:ch13_laplace_polar}

When the domain has circular geometry (e.g., a disk), polar coordinates are the natural choice. The two-dimensional Laplacian in polar coordinates $(r, \theta)$ is
\begin{equation}
  \label{eq:laplace_polar}
  \nabla^2 u = \frac{\partial^2 u}{\partial r^2} + \frac{1}{r}\,\frac{\partial u}{\partial r}
               + \frac{1}{r^2}\,\frac{\partial^2 u}{\partial \theta^2} = 0.
\end{equation}

\paragraph{Separation of variables.} Assume $u(r,\theta) = R(r)\,\Theta(\theta)$. Substitute into \cref{eq:laplace_polar}:
\[
  R''\Theta + \frac{1}{r}\,R'\Theta + \frac{1}{r^2}\,R\,\Theta'' = 0.
\]
Divide by $R\Theta/r^2$:
\[
  \frac{r^2 R'' + r R'}{R} = -\frac{\Theta''}{\Theta} = \lambda.
\]
This gives two ODEs:
\begin{align}
  \Theta'' + \lambda\,\Theta &= 0, \label{eq:angular} \\[6pt]
  r^2 R'' + r R' - \lambda R &= 0. \label{eq:radial}
\end{align}

\paragraph{Angular equation.} The solution $\Theta(\theta)$ must be \textbf{periodic} with period $2\pi$ (since $\theta$ and $\theta + 2\pi$ represent the same physical point). This periodicity condition restricts $\lambda$ to be a non-negative integer square.

\textbf{Case 1: $\lambda = n^2$ with $n = 1, 2, 3, \dots$.} The general solution is
\[
  \Theta_n(\theta) = A_n\cos(n\theta) + B_n\sin(n\theta).
\]
Periodicity is automatically satisfied since $\cos(n(\theta+2\pi)) = \cos(n\theta)$ and similarly for sine.

\textbf{Case 2: $\lambda = 0$ ($n = 0$).} The angular equation becomes $\Theta'' = 0$, with solution
\[
  \Theta_0(\theta) = C_0 + D_0\,\theta.
\]
Periodicity $\Theta_0(\theta + 2\pi) = \Theta_0(\theta)$ requires $D_0 = 0$, so $\Theta_0(\theta) = C_0$ (a constant).

\paragraph{Radial equation.} Equation \cref{eq:radial} is an \textbf{Euler--Cauchy equation} (also called an equidimensional equation). The substitution $R(r) = r^k$ yields:
\[
  r^2\,k(k-1)r^{k-2} + r\,k\,r^{k-1} - \lambda\,r^k = 0
  \quad\Longrightarrow\quad
  k^2 - \lambda = 0
  \quad\Longrightarrow\quad
  k = \pm\sqrt{\lambda}.
\]

\textbf{Case 1: $\lambda = n^2$ with $n \geq 1$.} The roots are $k = \pm n$, so
\[
  R_n(r) = C_n\,r^n + D_n\,r^{-n}.
\]
If the domain includes the origin ($r = 0$), we must require that the solution remains \textbf{bounded} there. Since $r^{-n} \to \infty$ as $r \to 0$, we set $D_n = 0$. Thus
\[
  R_n(r) = C_n\,r^n, \qquad n = 1, 2, 3, \dots
\]

\textbf{Case 2: $\lambda = 0$ ($n = 0$).} The radial equation becomes
\[
  r^2 R'' + r R' = 0.
\]
Let $S = R'$, then $r^2 S' + r S = 0$, which is separable:
\[
  \frac{S'}{S} = -\frac{1}{r}
  \quad\Longrightarrow\quad
  \ln|S| = -\ln r + \text{const}
  \quad\Longrightarrow\quad
  S = \frac{K}{r}.
\]
Integrating once more:
\[
  R_0(r) = C_0 + D_0\ln r.
\]
Boundedness at $r = 0$ requires $D_0 = 0$, so $R_0(r) = C_0$ (a constant).

\paragraph{General bounded solution on a disk.} Combining the angular and radial parts:
\begin{equation}
  \label{eq:laplace_disk_solution}
  u(r,\theta) = \frac{A_0}{2} + \sum_{n=1}^{\infty} r^n\Bigl[A_n\cos(n\theta) + B_n\sin(n\theta)\Bigr].
\end{equation}
The factor $A_0/2$ (rather than $A_0$) is a notational convention that makes the $n=0$ coefficient formula consistent with the Fourier series formula.

\paragraph{Dirichlet problem on a disk.} Suppose the boundary condition on a disk of radius $a$ is
\[
  u(a,\theta) = f(\theta), \qquad 0 \leq \theta < 2\pi,
\]
where $f(\theta)$ is a given $2\pi$-periodic function. Then:
\[
  f(\theta) = \frac{A_0}{2} + \sum_{n=1}^{\infty} a^n\Bigl[A_n\cos(n\theta) + B_n\sin(n\theta)\Bigr].
\]
This is precisely the Fourier series of $f(\theta)$ on $[0, 2\pi]$. The coefficients are:
\begin{align}
  A_0 &= \frac{1}{\pi}\int_0^{2\pi} f(\theta)\,\diff\theta, \label{eq:A0_disk} \\[6pt]
  A_n &= \frac{1}{\pi a^n}\int_0^{2\pi} f(\theta)\cos(n\theta)\,\diff\theta, \qquad n \geq 1, \label{eq:An_disk} \\[6pt]
  B_n &= \frac{1}{\pi a^n}\int_0^{2\pi} f(\theta)\sin(n\theta)\,\diff\theta, \qquad n \geq 1. \label{eq:Bn_disk}
\end{align}

\begin{keyresult}
  \textbf{Dirichlet problem on a disk.} For Laplace's equation $\nabla^2 u = 0$ on the disk $r < a$ with boundary condition $u(a,\theta) = f(\theta)$, the bounded solution is
  \[
    u(r,\theta) = \frac{A_0}{2} + \sum_{n=1}^{\infty} \left(\frac{r}{a}\right)^{\!n}
                  \Bigl[a^n A_n\cos(n\theta) + a^n B_n\sin(n\theta)\Bigr],
  \]
  where $a^n A_n$ and $a^n B_n$ are the standard Fourier coefficients of $f(\theta)$ on $[0, 2\pi]$. Equivalently,
  \[
    u(r,\theta) = \frac{1}{2\pi}\int_0^{2\pi} f(\phi)\,\diff\phi
                  + \frac{1}{\pi}\sum_{n=1}^{\infty} \left(\frac{r}{a}\right)^{\!n}
                  \int_0^{2\pi} f(\phi)\cos\bigl(n(\phi-\theta)\bigr)\,\diff\phi.
  \]
\end{keyresult}

\paragraph{Poisson kernel.} The solution can be written as a single integral using the \textbf{Poisson kernel}:
\begin{equation}
  \label{eq:poisson_kernel}
  u(r,\theta) = \frac{1}{2\pi}\int_0^{2\pi} P(r,\theta - \phi)\,f(\phi)\,\diff\phi,
\end{equation}
where the Poisson kernel is
\begin{equation}
  \label{eq:poisson_kernel_formula}
  P(r,\psi) = \frac{a^2 - r^2}{a^2 - 2ar\cos\psi + r^2}.
\end{equation}
The Poisson kernel has several important properties: $P(a,\psi) = 0$ for $\psi \neq 0$ (the boundary data is sharply localized), and $P(0,\psi) = 1$ (the value at the center is the average of the boundary data).

\paragraph{Worked example.}

\begin{workedexample}
  Solve Laplace's equation on the disk $r < 2$ with boundary condition
  \[
    u(2,\theta) = 3 + 5\cos(2\theta) - 4\sin(3\theta).
  \]

  \textbf{Solution.} Here $a = 2$ and $f(\theta) = 3 + 5\cos(2\theta) - 4\sin(3\theta)$. This is already in the form of a Fourier series, so we can read off the coefficients directly.

  Compare with the general solution on the boundary:
  \[
    f(\theta) = \frac{A_0}{2} + \sum_{n=1}^{\infty} 2^n\Bigl[A_n\cos(n\theta) + B_n\sin(n\theta)\Bigr].
  \]

  From the constant term: $A_0/2 = 3$, so $A_0 = 6$.

  From the $\cos(2\theta)$ term: $2^2 A_2 = 5$, so $A_2 = 5/4$.

  From the $\sin(3\theta)$ term: $2^3 B_3 = -4$, so $B_3 = -4/8 = -1/2$.

  All other coefficients vanish. The solution is
  \[
    u(r,\theta) = 3 + \frac{5}{4}\,r^2\cos(2\theta) - \frac{1}{2}\,r^3\sin(3\theta).
  \]

  \textbf{Check.} At $r = 2$:
  \[
    u(2,\theta) = 3 + \frac{5}{4}\cdot 4\,\cos(2\theta) - \frac{1}{2}\cdot 8\,\sin(3\theta)
                 = 3 + 5\cos(2\theta) - 4\sin(3\theta).
  \]
  $\checkmark$ The boundary condition is satisfied.

  \textbf{Physical interpretation.} The solution is a superposition of a constant (average value $3$) and two harmonic modes. The $r^2$ and $r^3$ factors cause higher modes to be suppressed near the center --- the temperature (or potential) is smoothest at the origin and picks up spatial variation as you move outward toward the boundary.
\end{workedexample}

\subsection{Summary}
\label{sec:ch13_summary}

This chapter has covered two fundamental second-order PDEs: the wave equation (hyperbolic) and Laplace's equation (elliptic). Together with the heat equation (parabolic) from \cref{ch:heat_equation}, these form the three classical types of PDEs.

\begin{table}[htbp]
\centering
\caption{Chapter summary: wave equation and Laplace's equation}
\label{tab:ch13_summary}
\begin{tabular}{l l p{5.5cm}}
\toprule
\textbf{Concept} & \textbf{Key formula/method} \\
\midrule
Wave equation (1D) &
$\displaystyle \frac{\partial^2 y}{\partial t^2} = c^2\,\frac{\partial^2 y}{\partial x^2}$, \quad $c = \sqrt{T/\rho}$ \\[14pt]
d'Alembert's formula &
$\displaystyle y(x,t) = \tfrac{1}{2}[f(x-ct)+f(x+ct)] + \tfrac{1}{2c}\int_{x-ct}^{x+ct}g(s)\,ds$ \\[14pt]
Domain of dependence &
Solution at $(x,t)$ depends only on data in $[x-ct,\, x+ct]$ \\[14pt]
Finite string (fixed ends) &
$\displaystyle y(x,t) = \sum_{n=1}^{\infty}\sin\!\left(\frac{n\pi x}{L}\right)\!\bigl[A_n\cos(\omega_n t)+B_n\sin(\omega_n t)\bigr]$ \\[14pt]
Normal mode frequencies &
$\omega_n = \dfrac{n\pi c}{L} = n\,\omega_1$ (harmonic series) \\[14pt]
2D wave equation &
$\displaystyle u_{tt} = c^2(u_{xx}+u_{yy})$; frequencies $\omega_{mn} = c\pi\sqrt{m^2/a^2+n^2/b^2}$ \\[14pt]
Laplace's equation &
$\nabla^2 u = 0$; solutions are harmonic functions \\[14pt]
Laplace on rectangle &
$\displaystyle u(x,y) = \sum_{n=1}^{\infty} A_n\sin\!\left(\frac{n\pi x}{a}\right)\sinh\!\left(\frac{n\pi y}{a}\right)$ \\[14pt]
Laplace in polar &
$\displaystyle u_{rr}+\frac{1}{r}u_r+\frac{1}{r^2}u_{\theta\theta}=0$; Euler--Cauchy radial equation \\[14pt]
Dirichlet on disk &
$\displaystyle u(r,\theta) = \frac{A_0}{2} + \sum_{n=1}^{\infty} r^n[A_n\cos(n\theta)+B_n\sin(n\theta)]$ \\[14pt]
Poisson kernel &
$\displaystyle P(r,\psi) = \dfrac{a^2-r^2}{a^2-2ar\cos\psi+r^2}$ \\
\bottomrule
\end{tabular}
\end{table}

\begin{hintbox}
  \textbf{Problem-solving checklist.}
  \begin{enumerate}
    \item \textbf{Wave equation, infinite domain:} Use d'Alembert's formula directly.
    \item \textbf{Wave equation, finite domain:} Use separation of variables to get the standing wave series. Compute Fourier sine coefficients from initial data.
    \item \textbf{Wave equation, 2D rectangle:} Double separation; the eigenfrequencies $\omega_{mn}$ are generally non-harmonic.
    \item \textbf{Laplace's equation, rectangle:} Separate in the direction with homogeneous BCs on both ends (gives trig functions); the other direction gives sinh/cosh. Match the nonhomogeneous boundary with a Fourier series.
    \item \textbf{Laplace's equation, disk:} Use polar coordinates. Angular equation gives integer $n$ from periodicity. Radial equation is Euler--Cauchy; enforce boundedness at $r=0$. Match boundary data with a Fourier series.
    \item \textbf{Poisson's equation ($\nabla^2 u = f$):} Use eigenfunction expansion (as with the heat equation with a source), expanding both $u$ and $f$ in the appropriate eigenfunction basis.
  \end{enumerate}
\end{hintbox}
