% =============================================================================
% ch09_series_solutions.tex
% Chapter 9: Series Solutions of Differential Equations
% =============================================================================

\section{Series Solutions}
\label{ch:series_solutions}

When the coefficients of a linear differential equation are not constant, the methods of \cref{ch:second_order_homogeneous} and \cref{ch:second_order_nonhomogeneous} (characteristic equations, undetermined coefficients, variation of parameters) generally fail. In such cases, \textbf{series solutions} provide a powerful alternative: we represent the unknown solution as an infinite series and determine the coefficients by substituting into the differential equation.

This chapter develops three closely related methods:
\begin{enumerate}
  \item The \textbf{power series method} for equations with analytic coefficients (\cref{sec:ch09_power_series}).
  \item \textbf{Euler--Cauchy (equidimensional) equations}, a special class admitting closed-form solutions (\cref{sec:ch09_euler_cauchy}).
  \item The \textbf{Frobenius method}, which extends the power series idea to equations with regular singular points (\cref{sec:ch09_frobenius}).
\end{enumerate}

All three methods share a common theme: substitute a series ansatz, reindex, collect coefficients, and solve the resulting recurrence relation.

\subsection{Power Series Method}
\label{sec:ch09_power_series}

\paragraph{When to use.} The power series method applies to the second-order linear homogeneous equation
\begin{equation}
  \label{eq:power_series_ode}
  y'' + p(x)\,y' + q(x)\,y = 0
\end{equation}
when both $p(x)$ and $q(x)$ are \textbf{analytic} at a point $x_0$ (typically $x_0 = 0$). A function is analytic at $x_0$ if it equals its Taylor series in a neighborhood of $x_0$. This includes polynomials, $e^x$, $\sin x$, $\cos x$, and rational functions away from their poles.

If $p(x)$ or $q(x)$ has a singularity at $x_0$, the power series method in its basic form fails --- we must instead use the Frobenius method (\cref{sec:ch09_frobenius}).

\paragraph{Step-by-step algorithm.}

\begin{enumerate}
  \item \textbf{Ansatz.} Assume a power series solution about $x_0 = 0$:
  \[
    y(x) = \sum_{n=0}^{\infty} a_n\,x^n,
    \qquad a_n \text{ to be determined.}
  \]
  \item \textbf{Differentiate term-by-term:}
  \[
    y'(x) = \sum_{n=1}^{\infty} n\,a_n\,x^{n-1},
    \qquad
    y''(x) = \sum_{n=2}^{\infty} n(n-1)\,a_n\,x^{n-2}.
  \]
  \item \textbf{Substitute} $y$, $y'$, and $y''$ into the ODE \cref{eq:power_series_ode}.
  \item \textbf{Reindex} all sums so they involve the same power $x^k$. This typically means shifting the index: set $k = n - m$ in each sum so every sum starts at the same $k$ and involves $x^k$.
  \item \textbf{Collect coefficients} of each power $x^k$. The resulting coefficient expression must vanish for every $k$, producing a \textbf{recurrence relation} for the coefficients $a_n$.
  \item \textbf{Solve the recurrence} to find the coefficients in terms of $a_0$ and $a_1$ (which are arbitrary --- they correspond to the two degrees of freedom in a second-order ODE).
  \item \textbf{Write the general solution} as a linear combination of the two independent series.
\end{enumerate}

\paragraph{Radius of convergence.}

\begin{theorem}[Radius of Convergence]
  \label{thm:radius_of_convergence}
  Consider the equation \cref{eq:power_series_ode} with $p(x)$ and $q(x)$ analytic at $x_0 = 0$. If $R_p$ and $R_q$ denote the radii of convergence of the Taylor series of $p(x)$ and $q(x)$ at $x_0 = 0$, then the power series solution $y(x) = \sum_{n=0}^{\infty} a_n x^n$ converges at least on the interval $(-R, R)$ where
  \[
    R = \min(R_p,\; R_q).
  \]
  Equivalently, $R$ is at least as large as the distance from $x_0$ to the nearest singularity of $p(x)$ or $q(x)$ in the complex plane.
\end{theorem}

In practice, most textbook problems have polynomial coefficients (so $R_p = R_q = \infty$), and the series converges for all $x \in \R$. When $p(x)$ or $q(x)$ is a rational function, $R$ is the distance from $x_0$ to the nearest pole.

\begin{hintbox}
  \textbf{Quick radius check.} If the ODE has polynomial coefficients, the power series converges for all $x$. If coefficients are rational, compute the distance from the expansion point to the nearest pole. For example, $y'' + \frac{1}{1-x^2} y = 0$ expanded about $x_0 = 0$ has poles at $x = \pm 1$, so $R = 1$.
\end{hintbox}

\paragraph{Worked examples.}

\begin{workedexample}
  Solve $y'' - y = 0$ using the power series method and show that the solution recovers the exponential functions.

  \textbf{Solution.} Here $p(x) = 0$ and $q(x) = -1$, both analytic everywhere. Assume
  \[
    y(x) = \sum_{n=0}^{\infty} a_n\,x^n.
  \]
  Differentiate:
  \[
    y' = \sum_{n=1}^{\infty} n\,a_n\,x^{n-1},
    \qquad
    y'' = \sum_{n=2}^{\infty} n(n-1)\,a_n\,x^{n-2}.
  \]
  Substitute into $y'' - y = 0$:
  \[
    \sum_{n=2}^{\infty} n(n-1)\,a_n\,x^{n-2}
    - \sum_{n=0}^{\infty} a_n\,x^n = 0.
  \]
  Reindex the first sum by setting $k = n - 2$ (so $n = k + 2$):
  \[
    \sum_{k=0}^{\infty} (k+2)(k+1)\,a_{k+2}\,x^k
    - \sum_{k=0}^{\infty} a_k\,x^k = 0.
  \]
  Both sums now involve $x^k$ starting at $k = 0$. Collect coefficients of $x^k$:
  \[
    (k+2)(k+1)\,a_{k+2} - a_k = 0
    \quad\Longrightarrow\quad
    a_{k+2} = \frac{a_k}{(k+2)(k+1)}.
  \]
  This is the \textbf{recurrence relation}. It connects every even coefficient to $a_0$ and every odd coefficient to $a_1$.

  \textit{Even coefficients:}
  \[
    \begin{aligned}
      a_2 &= \frac{a_0}{2 \cdot 1} = \frac{a_0}{2!}, \\
      a_4 &= \frac{a_2}{4 \cdot 3} = \frac{a_0}{4 \cdot 3 \cdot 2 \cdot 1} = \frac{a_0}{4!}, \\
      a_6 &= \frac{a_4}{6 \cdot 5} = \frac{a_0}{6!}, \\
      &\;\;\vdots \\
      a_{2m} &= \frac{a_0}{(2m)!}.
    \end{aligned}
  \]

  \textit{Odd coefficients:}
  \[
    \begin{aligned}
      a_3 &= \frac{a_1}{3 \cdot 2} = \frac{a_1}{3!}, \\
      a_5 &= \frac{a_3}{5 \cdot 4} = \frac{a_1}{5!}, \\
      a_7 &= \frac{a_5}{7 \cdot 6} = \frac{a_1}{7!}, \\
      &\;\;\vdots \\
      a_{2m+1} &= \frac{a_1}{(2m+1)!}.
    \end{aligned}
  \]

  The general solution is
  \[
    y(x) = a_0 \sum_{m=0}^{\infty} \frac{x^{2m}}{(2m)!}
          + a_1 \sum_{m=0}^{\infty} \frac{x^{2m+1}}{(2m+1)!}.
  \]
  These are the Taylor series for $\cosh x$ and $\sinh x$:
  \[
    y(x) = a_0 \cosh x + a_1 \sinh x.
  \]
  Equivalently, writing $c_1 = \frac{a_0 + a_1}{2}$ and $c_2 = \frac{a_0 - a_1}{2}$:
  \[
    y(x) = c_1 e^x + c_2 e^{-x}.
  \]
  This recovers the exponential solutions found via the characteristic equation in \cref{ch:second_order_homogeneous}. The power series method works, but for constant-coefficient equations it is overkill --- the characteristic equation is much faster. The power series method truly shines when coefficients are \emph{not} constant.
\end{workedexample}

\begin{workedexample}
  Solve the Legendre equation $(1-x^2)y'' - 2xy' + 2y = 0$ using the power series method. Find a polynomial solution.

  \textbf{Solution.} This is a special case of the \textbf{Legendre equation}
  $(1-x^2)y'' - 2xy' + \ell(\ell+1)y = 0$ with $\ell = 1$.
  The coefficients $p(x) = \dfrac{-2x}{1-x^2}$ and $q(x) = \dfrac{2}{1-x^2}$ have poles at $x = \pm 1$, so by \cref{thm:radius_of_convergence} the series converges for $|x| < 1$.

  Assume $y = \sum_{n=0}^{\infty} a_n x^n$. Then
  \[
    y' = \sum_{n=1}^{\infty} n\,a_n\,x^{n-1},
    \qquad
    y'' = \sum_{n=2}^{\infty} n(n-1)\,a_n\,x^{n-2}.
  \]
  Substitute into $(1-x^2)y'' - 2xy' + 2y = 0$:
  \[
    (1-x^2)\sum_{n=2}^{\infty} n(n-1)\,a_n\,x^{n-2}
    - 2x\sum_{n=1}^{\infty} n\,a_n\,x^{n-1}
    + 2\sum_{n=0}^{\infty} a_n\,x^n = 0.
  \]
  Expand $(1-x^2)y''$:
  \[
    \sum_{n=2}^{\infty} n(n-1)\,a_n\,x^{n-2}
    - \sum_{n=2}^{\infty} n(n-1)\,a_n\,x^n
    - \sum_{n=1}^{\infty} 2n\,a_n\,x^n
    + \sum_{n=0}^{\infty} 2a_n\,x^n = 0.
  \]
  Reindex the first sum by $k = n-2$ (so $n = k+2$):
  \[
    \sum_{k=0}^{\infty} (k+2)(k+1)\,a_{k+2}\,x^k
    - \sum_{n=2}^{\infty} n(n-1)\,a_n\,x^n
    - \sum_{n=1}^{\infty} 2n\,a_n\,x^n
    + \sum_{n=0}^{\infty} 2a_n\,x^n = 0.
  \]
  All sums now involve powers of $x$ starting from $x^0$. Renaming the dummy index to $k$ everywhere and collecting coefficients of $x^k$:
  \[
    (k+2)(k+1)\,a_{k+2}
    - k(k-1)\,a_k
    - 2k\,a_k
    + 2a_k = 0,
  \]
  where we understand $a_k = 0$ for $k < 0$. Simplify the $a_k$ coefficient:
  \[
    -k(k-1) - 2k + 2 = -k^2 + k - 2k + 2 = -k^2 - k + 2 = -(k-1)(k+2).
  \]
  The recurrence relation is
  \[
    (k+2)(k+1)\,a_{k+2} - (k-1)(k+2)\,a_k = 0.
  \]
  For $k \neq -2$ (always true since $k \geq 0$), divide by $(k+2)$:
  \[
    (k+1)\,a_{k+2} - (k-1)\,a_k = 0
    \quad\Longrightarrow\quad
    a_{k+2} = \frac{k-1}{k+1}\,a_k.
  \]

  Now compute coefficients:
  \[
    \begin{aligned}
      a_2 &= \frac{0-1}{0+1}\,a_0 = -a_0, \\
      a_4 &= \frac{2-1}{2+1}\,a_2 = \frac{1}{3}(-a_0) = -\frac{a_0}{3}, \\
      a_6 &= \frac{4-1}{4+1}\,a_4 = \frac{3}{5}\!\left(-\frac{a_0}{3}\right) = -\frac{a_0}{5}.
    \end{aligned}
  \]

  For the odd series:
  \[
    \begin{aligned}
      a_3 &= \frac{1-1}{1+1}\,a_1 = 0 \cdot a_1 = 0.
    \end{aligned}
  \]
  Since $a_3 = 0$, every subsequent odd coefficient vanishes ($a_5 = \frac{3-1}{3+1} a_3 = 0$, etc.). The odd series terminates immediately.

  If we choose $a_1 = 1$ and $a_0 = 0$, the solution is simply
  \[
    y(x) = a_1 x = x.
  \]
  Let us verify: $y = x \Rightarrow y' = 1, y'' = 0$. Substituting into the ODE:
  \[
    (1-x^2) \cdot 0 - 2x \cdot 1 + 2 \cdot x = -2x + 2x = 0. \quad \checkmark
  \]

  Thus $y_1(x) = x$ is a \textbf{polynomial solution} (a Legendre polynomial of degree~1, denoted $P_1(x)$). The second solution involves the infinite even series, which is related to the Legendre function of the second kind $Q_1(x)$.

  \textbf{Note.} Legendre polynomials $P_n(x)$ are polynomial solutions of the Legendre equation for integer $\ell = n$. They arise in physics (e.g.\ spherical harmonics in quantum mechanics, gravitational potential theory) and form an orthogonal basis on $[-1, 1]$.
\end{workedexample}

\begin{remark}
  The power series method often produces solutions that are recognized as classical \textbf{special functions}. Bessel functions (Frobenius method, \cref{sec:ch09_frobenius}), Legendre polynomials (as in Example~2 above), Hermite polynomials, and Laguerre polynomials all arise as power series solutions of specific ODEs. These special functions have their own properties, tables, and computational implementations, making the power series approach not just theoretical but deeply practical.
\end{remark}

\subsection{Euler--Cauchy Equations}
\label{sec:ch09_euler_cauchy}

The Euler--Cauchy equation (also called the \textbf{equidimensional equation}) is a special second-order ODE with variable coefficients that nevertheless admits closed-form solutions through a power ansatz.

\paragraph{Form and substitution.} The equation has the form
\begin{equation}
  \label{eq:euler_cauchy}
  x^2\,y'' + \alpha\,x\,y' + \beta\,y = 0,
  \qquad x > 0,
\end{equation}
where $\alpha, \beta \in \R$. The key observation is that every term is \textbf{equidimensional}: the $k$-th derivative is multiplied by $x^k$. This suggests the ansatz
\[
  y(x) = x^r,
\]
where $r$ is a constant to be determined.

\paragraph{Derivation of the indicial equation.}
Compute the derivatives of $y = x^r$:
\[
  y' = r\,x^{r-1}, \qquad y'' = r(r-1)\,x^{r-2}.
\]
Substitute into \cref{eq:euler_cauchy}:
\begin{align*}
  x^2 \cdot r(r-1)\,x^{r-2} + \alpha\,x \cdot r\,x^{r-1} + \beta \cdot x^r &= 0, \\
  r(r-1)\,x^r + \alpha\,r\,x^r + \beta\,x^r &= 0, \\
  \bigl[r(r-1) + \alpha\,r + \beta\bigr]\,x^r &= 0.
\end{align*}
Since $x^r \neq 0$ for $x > 0$, we must have
\begin{equation}
  \label{eq:euler_indicial}
  r(r-1) + \alpha\,r + \beta = 0.
\end{equation}
This is the \textbf{indicial equation} (also called the \textbf{characteristic equation} of the Euler--Cauchy equation). It is a quadratic in $r$:
\[
  r^2 + (\alpha - 1)\,r + \beta = 0,
\]
with solutions
\[
  r = \frac{-(\alpha-1) \pm \sqrt{(\alpha-1)^2 - 4\beta}}{2}.
\]

\paragraph{Three cases.}

\begin{keyresult}
  \textbf{Euler--Cauchy: solution forms based on the indicial equation.}

  \begin{center}
  \begin{tabular}{l l}
    \toprule
    \textbf{Roots of \cref{eq:euler_indicial}} & \textbf{General solution} \\
    \midrule
    Distinct real $r_1 \neq r_2$ &
    $y(x) = c_1\,x^{r_1} + c_2\,x^{r_2}$ \\[10pt]
    Repeated $r_1 = r_2 = r$ &
    $y(x) = x^{r}\bigl[c_1 + c_2\,\ln(x)\bigr]$ \\[10pt]
    Complex $\lambda \pm i\omega$ &
    $y(x) = x^{\lambda}\bigl[c_1\cos(\omega\ln x) + c_2\sin(\omega\ln x)\bigr]$ \\
    \bottomrule
  \end{tabular}
  \end{center}
\end{keyresult}

The repeated-root case is analogous to the repeated-root case for constant-coefficient equations (\cref{sec:ch04_repeated_roots}): the logarithmic factor plays the role of the extra $x$ factor. The complex-root case involves trigonometric functions of $\ln x$, reflecting the self-similar (scale-invariant) nature of the Euler--Cauchy equation.

\paragraph{Worked examples.}

\begin{workedexample}
  Solve $x^2\,y'' - x\,y' - 3y = 0$ for $x > 0$.

  \textbf{Solution.} This is an Euler--Cauchy equation with $\alpha = -1$ and $\beta = -3$. The indicial equation is
  \[
    r(r-1) + (-1)r + (-3) = 0.
  \]
  Simplify:
  \[
    r^2 - r - r - 3 = r^2 - 2r - 3 = 0.
  \]
  Factor:
  \[
    (r - 3)(r + 1) = 0.
  \]
  Distinct real roots: $r_1 = 3$ and $r_2 = -1$. The general solution is
  \[
    y(x) = c_1\,x^3 + c_2\,x^{-1} = c_1\,x^3 + \frac{c_2}{x}.
  \]

  \textit{Verification.} Compute $y' = 3c_1 x^2 - c_2 x^{-2}$ and $y'' = 6c_1 x + 2c_2 x^{-3}$. Substitute into the ODE:
  \[
    x^2(6c_1 x + 2c_2 x^{-3}) - x(3c_1 x^2 - c_2 x^{-2}) - 3(c_1 x^3 + c_2 x^{-1})
    = 6c_1 x^3 + 2c_2 x^{-1} - 3c_1 x^3 + c_2 x^{-1} - 3c_1 x^3 - 3c_2 x^{-1}
    = (6 - 3 - 3)c_1 x^3 + (2 + 1 - 3)c_2 x^{-1} = 0. \quad \checkmark
  \]
\end{workedexample}

\begin{workedexample}
  Solve $x^2\,y'' + 3x\,y' + y = 0$ for $x > 0$.

  \textbf{Solution.} Here $\alpha = 3$ and $\beta = 1$. The indicial equation is
  \[
    r(r-1) + 3r + 1 = 0.
  \]
  Simplify:
  \[
    r^2 - r + 3r + 1 = r^2 + 2r + 1 = (r + 1)^2 = 0.
  \]
  Repeated root: $r = -1$. The general solution is
  \[
    y(x) = x^{-1}\bigl[c_1 + c_2\,\ln(x)\bigr] = \frac{c_1 + c_2\,\ln x}{x}.
  \]

  \textit{Verification.} Let $y = \dfrac{\ln x}{x}$. Then
  \[
    y' = \frac{1/x \cdot x - \ln x \cdot 1}{x^2} = \frac{1 - \ln x}{x^2},
    \qquad
    y'' = \frac{(-1/x)\cdot x^2 - (1-\ln x)\cdot 2x}{x^4}
         = \frac{-x - 2x + 2x\ln x}{x^4}
         = \frac{2\ln x - 3}{x^3}.
  \]
  Substitute:
  \[
    x^2 \cdot \frac{2\ln x - 3}{x^3} + 3x \cdot \frac{1 - \ln x}{x^2} + \frac{\ln x}{x}
    = \frac{2\ln x - 3}{x} + \frac{3 - 3\ln x}{x} + \frac{\ln x}{x}
    = \frac{2\ln x - 3 + 3 - 3\ln x + \ln x}{x} = 0. \quad \checkmark
  \]
\end{workedexample}

\begin{workedexample}
  Solve $x^2\,y'' + 2x\,y' + 10y = 0$ for $x > 0$.

  \textbf{Solution.} Here $\alpha = 2$ and $\beta = 10$. The indicial equation is
  \[
    r(r-1) + 2r + 10 = 0.
  \]
  Simplify:
  \[
    r^2 - r + 2r + 10 = r^2 + r + 10 = 0.
  \]
  Discriminant: $\Delta = 1 - 40 = -39 < 0$. Complex roots:
  \[
    r = \frac{-1 \pm i\sqrt{39}}{2}.
  \]
  Here $\lambda = -\dfrac{1}{2}$ and $\omega = \dfrac{\sqrt{39}}{2}$. The general solution is
  \[
    y(x) = x^{-1/2}\!\left[c_1\cos\!\left(\tfrac{\sqrt{39}}{2}\ln x\right)
            + c_2\sin\!\left(\tfrac{\sqrt{39}}{2}\ln x\right)\right].
  \]
  Equivalently:
  \[
    y(x) = \frac{1}{\sqrt{x}}\!\left[c_1\cos\!\left(\tfrac{\sqrt{39}}{2}\ln x\right)
            + c_2\sin\!\left(\tfrac{\sqrt{39}}{2}\ln x\right)\right].
  \]
  This represents oscillations in $\ln x$ whose amplitude decays like $x^{-1/2}$.
\end{workedexample}

\begin{remark}
  Euler--Cauchy equations are scale-invariant: replacing $x$ by $cx$ (for any constant $c > 0$) transforms the equation into itself. This is why the solutions involve powers of $x$ and trigonometric functions of $\ln x$ --- both are natural under scaling.
\end{remark}

\subsection{Frobenius Method}
\label{sec:ch09_frobenius}

The power series method (\cref{sec:ch09_power_series}) requires the coefficients $p(x)$ and $q(x)$ to be analytic at the expansion point. When this condition fails, we may still obtain series solutions if the singularity is not too severe. The Frobenius method handles precisely this situation.

\paragraph{Regular singular point.}

\begin{definition}[Regular Singular Point]
  \label{def:regular_singular_point}
  Consider the equation $y'' + p(x)y' + q(x)y = 0$. The point $x_0$ is a \textbf{regular singular point} if:
  \begin{enumerate}
    \item $p(x)$ or $q(x)$ (or both) is \emph{not} analytic at $x_0$, but
    \item both $x\,p(x)$ and $x^2\,q(x)$ \emph{are} analytic at $x_0$ (after a shift to $x_0 = 0$ if necessary).
  \end{enumerate}
  If neither $x\,p(x)$ nor $x^2\,q(x)$ is analytic at $x_0$, then $x_0$ is an \textbf{irregular singular point}, and the Frobenius method does not apply.
\end{definition}

\begin{hintbox}
  \textbf{Quick test.} For the equation $y'' + \dfrac{A}{x}y' + \dfrac{B}{x^2}y = 0$, the point $x_0 = 0$ is a regular singular point because $x\,p(x) = A$ and $x^2\,q(x) = B$ are both analytic (they are constants). This is exactly the Euler--Cauchy equation (\cref{sec:ch09_euler_cauchy}), which is a special case where the Frobenius series terminates into a closed-form solution.
\end{hintbox}

\paragraph{Frobenius ansatz.}
When $x_0 = 0$ is a regular singular point, we assume a solution of the form
\begin{equation}
  \label{eq:frobenius_ansatz}
  y(x) = x^r \sum_{n=0}^{\infty} a_n\,x^n
       = \sum_{n=0}^{\infty} a_n\,x^{n+r},
  \qquad a_0 \neq 0.
\end{equation}
The exponent $r$ is \textbf{not} assumed to be an integer --- it is a parameter to be determined by the equation. When $r = 0$, the Frobenius ansatz reduces to the ordinary power series (\cref{sec:ch09_power_series}).

\paragraph{Indicial equation.}
Substituting \cref{eq:frobenius_ansatz} into the ODE and collecting the lowest power of $x$ produces a quadratic equation for $r$, called the \textbf{indicial equation}. This equation determines the possible values of $r$ and hence the form of the leading term of the series.

\paragraph{Three cases.}

\begin{keyresult}
  \textbf{Frobenius method: solution forms based on the indicial roots.}

  Let $r_1$ and $r_2$ be the roots of the indicial equation, with $r_1 \geq r_2$ (real parts if complex).

  \begin{center}
  \begin{tabular}{l l}
    \toprule
    \textbf{Condition on $r_1, r_2$} & \textbf{Solution structure} \\
    \midrule
    $r_1 - r_2$ is \emph{not} a nonnegative integer &
    Two independent Frobenius series: \\[4pt]
    & $y_1(x) = x^{r_1}\sum_{n=0}^{\infty} a_n x^n$, \;
       $y_2(x) = x^{r_2}\sum_{n=0}^{\infty} b_n x^n$ \\[12pt]
    $r_1 = r_2$ (repeated root) &
    $y_1(x) = x^{r_1}\sum_{n=0}^{\infty} a_n x^n$, \\
    & $y_2(x) = y_1(x)\ln(x) + x^{r_1}\sum_{n=0}^{\infty} b_n x^n$ \\[12pt]
    $r_1 - r_2 = N$ (positive integer) &
    $y_1(x)$ from the larger root $r_1$; \\
    & $y_2(x)$ may or may not contain $\ln(x)$; \\
    & requires separate analysis \\
    \bottomrule
  \end{tabular}
  \end{center}
\end{keyresult}

Cases~2 and~3 involve the logarithmic term $\ln(x)$, analogous to the repeated-root case for constant-coefficient equations. The detailed derivations of Cases~2 and~3 are beyond the scope of this chapter (see standard texts on advanced ODE theory for full treatments). We illustrate Case~1 with Bessel's equation.

\paragraph{Worked example: Bessel's equation of order~0.}

\begin{workedexample}
  Solve Bessel's equation of order~0:
  \[
    x^2\,y'' + x\,y' + x^2\,y = 0,
  \]
  using the Frobenius method about $x_0 = 0$.

  \textbf{Solution.} First write the equation in standard form:
  \[
    y'' + \frac{1}{x}y' + y = 0.
  \]
  Here $p(x) = \dfrac{1}{x}$ and $q(x) = 1$. Check the regular singular point condition:
  \[
    x\,p(x) = 1 \quad\text{(analytic at $x = 0$)},
    \qquad
    x^2\,q(x) = x^2 \quad\text{(analytic at $x = 0$)}.
  \]
  So $x_0 = 0$ is a regular singular point. We proceed with the Frobenius ansatz:
  \[
    y(x) = \sum_{n=0}^{\infty} a_n\,x^{n+r}, \qquad a_0 \neq 0.
  \]
  Compute the derivatives:
  \[
    y' = \sum_{n=0}^{\infty} (n+r)\,a_n\,x^{n+r-1},
    \qquad
    y'' = \sum_{n=0}^{\infty} (n+r)(n+r-1)\,a_n\,x^{n+r-2}.
  \]
  Substitute into $x^2 y'' + x y' + x^2 y = 0$:
  \[
    x^2 \sum_{n=0}^{\infty} (n+r)(n+r-1)\,a_n\,x^{n+r-2}
    + x \sum_{n=0}^{\infty} (n+r)\,a_n\,x^{n+r-1}
    + x^2 \sum_{n=0}^{\infty} a_n\,x^{n+r} = 0.
  \]
  Simplify powers of $x$:
  \[
    \sum_{n=0}^{\infty} (n+r)(n+r-1)\,a_n\,x^{n+r}
    + \sum_{n=0}^{\infty} (n+r)\,a_n\,x^{n+r}
    + \sum_{n=0}^{\infty} a_n\,x^{n+r+2} = 0.
  \]
  Combine the first two sums:
  \[
    (n+r)(n+r-1) + (n+r) = (n+r)(n+r-1+1) = (n+r)^2.
  \]
  So the equation becomes
  \[
    \sum_{n=0}^{\infty} (n+r)^2\,a_n\,x^{n+r}
    + \sum_{n=0}^{\infty} a_n\,x^{n+r+2} = 0.
  \]
  Reindex the second sum: let $k = n+2$ (so $n = k-2$). When $n=0$, $k=2$:
  \[
    \sum_{k=2}^{\infty} a_{k-2}\,x^{k+r} = \sum_{n=2}^{\infty} a_{n-2}\,x^{n+r}.
  \]
  Now combine:
  \[
    \underbrace{r^2\,a_0\,x^r}_{n=0}
    + \underbrace{(1+r)^2\,a_1\,x^{1+r}}_{n=1}
    + \sum_{n=2}^{\infty} \Bigl[(n+r)^2\,a_n + a_{n-2}\Bigr]\,x^{n+r} = 0.
  \]

  \textit{Indicial equation.} The lowest power is $x^r$. Its coefficient must vanish:
  \[
    r^2\,a_0 = 0.
  \]
  Since $a_0 \neq 0$ by assumption, we must have $r^2 = 0$, so $r = 0$ (repeated root). This is \textbf{Case~2} ($r_1 = r_2$).

  \textit{Next coefficient.} The coefficient of $x^{1+r} = x^1$ is $(1+r)^2 a_1 = a_1$ (since $r = 0$). For this to vanish, $a_1 = 0$.

  \textit{Recurrence relation.} For $n \geq 2$:
  \[
    (n+r)^2\,a_n + a_{n-2} = 0
    \quad\Longrightarrow\quad
    a_n = -\frac{a_{n-2}}{(n+r)^2}.
  \]
  With $r = 0$:
  \[
    a_n = -\frac{a_{n-2}}{n^2}.
  \]
  Since $a_1 = 0$, all odd coefficients vanish ($a_3 = -a_1/9 = 0$, $a_5 = -a_3/25 = 0$, etc.). For even coefficients:
  \[
    \begin{aligned}
      a_2 &= -\frac{a_0}{2^2}, \\
      a_4 &= -\frac{a_2}{4^2} = \frac{a_0}{2^2 \cdot 4^2} = \frac{a_0}{(2^2)(2^2 \cdot 2^2)} = \frac{a_0}{2^4 \cdot (1! \cdot 2!)^2} \cdot 2^2,
    \end{aligned}
  \]
  which simplifies more cleanly as follows. Let $a_{2m}$ be the $m$-th even coefficient:
  \[
    a_{2m} = \frac{(-1)^m}{2^{2m}\,(m!)^2}\,a_0.
  \]
  Choosing $a_0 = 1$, the first Frobenius solution is
  \[
    y_1(x) = 1 - \frac{x^2}{2^2} + \frac{x^4}{2^2 \cdot 4^2} - \frac{x^6}{2^2 \cdot 4^2 \cdot 6^2} + \cdots
    = \sum_{m=0}^{\infty} \frac{(-1)^m}{(m!)^2}\left(\frac{x}{2}\right)^{\!2m}.
  \]
  This is the \textbf{Bessel function of the first kind of order~0}, denoted $J_0(x)$:
  \[
    J_0(x) = \sum_{m=0}^{\infty} \frac{(-1)^m}{(m!)^2}\left(\frac{x}{2}\right)^{\!2m}.
  \]

  \textit{Second solution.} Since $r_1 = r_2 = 0$ is a repeated root (Case~2), the second linearly independent solution has the form
  \[
    y_2(x) = J_0(x)\,\ln(x) + \sum_{n=1}^{\infty} b_n\,x^n.
  \]
  This function is denoted $Y_0(x)$ (the \textbf{Bessel function of the second kind of order~0}). The coefficients $b_n$ are determined by substituting $y_2$ into the ODE; the derivation is more involved and omitted here.

  The general solution of Bessel's equation of order~0 is
  \[
    y(x) = c_1\,J_0(x) + c_2\,Y_0(x).
  \]
\end{workedexample}

\begin{remark}
  Bessel functions $J_\nu(x)$ and $Y_\nu(x)$ appear ubiquitously in physics and engineering: wave propagation in circular membranes, heat conduction in cylindrical rods, electromagnetic fields in waveguides, and quantum mechanics (schrödinger equation in cylindrical coordinates). The Frobenius method is the primary tool for constructing these special functions analytically.
\end{remark}

\begin{remark}
  For the Legendre equation discussed in \cref{sec:ch09_power_series}, the points $x = \pm 1$ are regular singular points. The Frobenius method can be applied about those points as well, yielding the associated Legendre functions. When the parameter $\ell$ is a nonnegative integer, the series terminates into the familiar Legendre polynomials $P_n(x)$.
\end{remark}

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

\begin{table}[htbp]
\centering
\caption{Series solution methods: when to use and solution forms}
\label{tab:ch09_summary}
\begin{tabular}{l l p{4.5cm}}
\toprule
\textbf{Method} & \textbf{When to use} & \textbf{Solution form} \\
\midrule
Power series & $p(x)$ and $q(x)$ analytic at $x_0$ &
$y(x) = \sum_{n=0}^{\infty} a_n (x-x_0)^n$ \\[12pt]
Euler--Cauchy & $x^2 y'' + \alpha x y' + \beta y = 0$ &
$y = c_1 x^{r_1} + c_2 x^{r_2}$ (and variants, see \cref{sec:ch09_euler_cauchy}) \\[12pt]
Frobenius & $x_0$ is a regular singular point; $xp(x)$ and $x^2q(x)$ analytic at $x_0$ &
$y(x) = x^r \sum_{n=0}^{\infty} a_n x^n$ (with $r$ from the indicial equation) \\
\bottomrule
\end{tabular}
\end{table}

\begin{table}[htbp]
\centering
\caption{Frobenius method: indicial roots and solution structure}
\label{tab:ch09_frobenius_cases}
\begin{tabular}{l l}
\toprule
\textbf{Indicial roots $r_1, r_2$} & \textbf{Solution structure} \\
\midrule
$r_1 - r_2 \notin \{0, 1, 2, \dots\}$ &
Two Frobenius series (no $\ln x$) \\[8pt]
$r_1 = r_2$ &
One Frobenius series + logarithmic term \\[8pt]
$r_1 - r_2 = N \in \{1, 2, 3, \dots\}$ &
One Frobenius series; second solution may contain $\ln x$ \\
\bottomrule
\end{tabular}
\end{table}

\begin{table}[htbp]
\centering
\caption{Euler--Cauchy equation: indicial roots and solution forms}
\label{tab:ch09_euler_cases}
\begin{tabular}{l l}
\toprule
\textbf{Roots of $r(r-1) + \alpha r + \beta = 0$} & \textbf{General solution} \\
\midrule
Distinct real $r_1 \neq r_2$ &
$y(x) = c_1 x^{r_1} + c_2 x^{r_2}$ \\[10pt]
Repeated $r$ &
$y(x) = x^r\bigl[c_1 + c_2 \ln(x)\bigr]$ \\[10pt]
Complex $\lambda \pm i\omega$ &
$y(x) = x^{\lambda}\bigl[c_1 \cos(\omega\ln x) + c_2 \sin(\omega\ln x)\bigr]$ \\
\bottomrule
\end{tabular}
\end{table}

\begin{hintbox}
  \textbf{Problem-solving workflow for series solutions.}
  \begin{enumerate}
    \item \textbf{Classify the point $x_0$.} Are $p(x)$ and $q(x)$ analytic at $x_0$? If yes, use the \textbf{power series method} (\cref{sec:ch09_power_series}).
    \item If not, check whether $x_0$ is a \textbf{regular singular point}: are $x\,p(x)$ and $x^2\,q(x)$ analytic at $x_0$? If yes, use the \textbf{Frobenius method} (\cref{sec:ch09_frobenius}).
    \item If the equation has the special form $x^2 y'' + \alpha x y' + \beta y = 0$, use the \textbf{Euler--Cauchy method} (\cref{sec:ch09_euler_cauchy}), which gives closed-form solutions directly.
    \item After finding the series, check whether it corresponds to a known special function (Bessel, Legendre, etc.) --- this often simplifies further analysis.
  \end{enumerate}
\end{hintbox}
