Equations like $y'' - xy' - y = 0$ have variable coefficients, so the characteristic equation from constant-coefficient equations does not apply. But near a point where the coefficients are well behaved, the solution is a power series, and we can find its coefficients one at a time. The tool is the fact that you can differentiate a power series term by term.
🔑 Key idea
At an ordinary point $x = 0$ (the coefficients of $y'' + p(x)y' + q(x)y = 0$ have power series there), every solution is $y = \sum_{n=0}^{\infty} a_nx^{n}$, with $a_0 = y(0)$ and $a_1 = y'(0)$ free. Substitute, shift every sum to the same power $x^{n}$, and set each coefficient to zero; this gives a recurrence for $a_{n+2}$. The series converges at least out to the nearest singular point (complex ones count).
💡 Why it works
Term by term, $y' = \sum_{n\ge 1} na_nx^{n-1}$ and $y'' = \sum_{n\ge 2} n(n - 1)a_nx^{n-2}$. Replacing $n$ by $n + 2$ in the second sum gives $\sum_{n\ge 0} (n + 2)(n + 1)a_{n+2}x^{n}$: the same terms, renamed so that the power is $x^{n}$. Once every sum is written with $x^{n}$, the equation reads $\sum c_nx^{n} = 0$, and a power series is zero on an interval only if every $c_n = 0$ (its coefficients are its derivatives at 0 divided by $n!$). Each $c_n = 0$ ties $a_{n+2}$ to earlier coefficients, so $a_0$ and $a_1$ determine everything, just as $y(0)$ and $y'(0)$ should.
✏️ Worked example: A familiar answer
Solve $y'' + y = 0$ with $y(0) = 1$, $y'(0) = 0$ by power series.
Find the first terms of the solution of $y'' = xy$ with $y(0) = 1$, $y'(0) = 0$.
$xy = \sum a_nx^{n+1}$; shift it so the power is $x^{n}$: $\sum_{n\ge 1} a_{n-1}x^{n}$.
Coefficient of $x^{0}$: $2a_2 = 0$. For $n \ge 1$: $(n + 2)(n + 1)a_{n+2} = a_{n-1}$.
$a_3 = \frac{a_0}{6} = \frac{1}{6}$, $a_6 = \frac{a_3}{30} = \frac{1}{180}$; $a_1 = a_2 = 0$ kill the other chains.
Answer: $y = 1 + \frac{x^{3}}{6} + \frac{x^{6}}{180} + \dots$, a function with no elementary formula
⚠️ Common mistake
Shifting the index on one sum but not the others. In the Airy example, writing $\sum (n + 2)(n + 1)a_{n+2}x^{n}$ $= \sum a_nx^{n+1}$ and then equating $a_{n+2}$ with $a_n$ compares different powers of $x$. Before matching, every sum must show the same power $x^{n}$ and start at the same $n$; peel off any leftover first terms (here $2a_2 = 0$) separately.
How far does the series reach? For $(1 + x^{2})y'' + y = 0$ the leading coefficient vanishes at $x = \pm i$, distance 1 from 0, so the series is guaranteed to converge for $|x| < 1$, even though nothing goes wrong on the real line.
Partial sums of the series solution from the second example, $1 + \frac{x^{2}}{2} + \frac{x^{4}}{8} + \dots$, closing in on $e^{x^{2}/2}$. Raise the degree and watch the interval of good agreement widen.
Practice
Pass with 3 right answers, the last 2 in a row. Each right answer earns 3 XP.