Series Solutions at Ordinary Points
For , a point is an ordinary point if and are analytic there. Then the solutions are analytic too, and we can find them as power series.
Theorem. If is an ordinary point, every solution is a power series whose radius of convergence is at least the distance from to the nearest (complex) singularity of or . The coefficients and are free; all others follow from a recurrence.
The method
- Substitute , , .
- Shift indices so every sum has the power (Power Series Review).
- Set the coefficient of each to 0: a recurrence relation.
- Choose and to get two independent solutions.
Example: the Airy equation
This equation describes light near a caustic (the bright edge of a rainbow) and a quantum particle in a linear potential. Substituting:
The coefficient gives ; for :
The coefficients come in steps of 3: , , and .
from fractions import Fraction
def airy_coeffs(a0, a1, n):
a = [Fraction(a0), Fraction(a1), Fraction(0)]
for k in range(1, n - 2):
a.append(a[k - 1] / ((k + 2) * (k + 1)))
return a[:n]
print("y1:", [str(c) for c in airy_coeffs(1, 0, 10)])
print("y2:", [str(c) for c in airy_coeffs(0, 1, 11)])y1: ['1', '0', '0', '1/6', '0', '0', '1/180', '0', '0', '1/12960']
y2: ['0', '1', '0', '0', '1/12', '0', '0', '1/504', '0', '0', '1/45360']
So and . Since and have no singularities, both series converge for all .
Checking against a numerical solution
import numpy as np
from fractions import Fraction
from scipy.integrate import solve_ivp
a = [Fraction(1), Fraction(0), Fraction(0)]
for k in range(1, 40):
a.append(a[k - 1] / ((k + 2) * (k + 1)))
series = lambda x, n: sum(float(c) * x**k for k, c in enumerate(a[:n]))
sol = solve_ivp(lambda x, Y: [Y[1], x * Y[0]], (0, 3), [1.0, 0.0], rtol=1e-12, atol=1e-14)
print(f"solve_ivp y1(3) = {sol.y[0][-1]:.10f}")
for n in (7, 13, 25, 40):
print(f"series with {n:2d} terms: {series(3.0, n):.10f}")solve_ivp y1(3) = 11.4231068594
series with 7 terms: 9.5500000000
series with 13 terms: 11.3794034091
series with 25 terms: 11.4231064196
series with 40 terms: 11.4231068594
More terms are needed for larger : the series converges everywhere, but not equally fast.
SymPy's power-series solver
import sympy as sp
x = sp.symbols("x")
y = sp.Function("y")
print(sp.dsolve(y(x).diff(x, 2) - x * y(x), hint="2nd_power_series_ordinary", n=8))Eq(y(x), C2*(x**6/180 + x**3/6 + 1) + C1*x*(x**6/504 + x**3/12 + 1) + O(x**8))
Example: Hermite's equation
appears in the quantum harmonic oscillator. Its recurrence is . When is a non-negative integer, and one of the two series terminates: a polynomial solution, the Hermite polynomial (up to scaling). Polynomial solutions of this kind are why special polynomials show up across physics and numerical analysis.
In software
scipy.special.airyevaluates the standard Airy functions and (particular combinations of and ).- Hermite polynomials (
numpy.polynomial.hermite) are the basis of Gauss-Hermite quadrature, used to compute expectations under a normal distribution (Gaussian Quadrature).
Exercises
Exercise 1: Recurrence
Find the recurrence for and identify the two series solutions.
Answer
; the solutions are and .
Solution
. With , : .
Exercise 2: Guaranteed radius
What radius of convergence is guaranteed for series solutions of about ? About ?
Answer
1 about 0; about 1.
Solution
In standard form is singular at . The distance from 0 to is 1; from 1 to it is .
Exercise 3: A terminating series (code)
For Hermite's equation with , find the polynomial solution with .
Answer
, proportional to .
Solution
and .
from fractions import Fraction
import numpy as np
n = 3
a = [Fraction(0), Fraction(1)]
for k in range(0, 6):
a.append(Fraction(2 * (k - n), (k + 2) * (k + 1)) * a[k])
print([str(c) for c in a])
print(np.polynomial.hermite.herm2poly([0, 0, 0, 1])) # H_3 in powers of x['0', '1', '0', '-2/3', '0', '0', '0', '0']
[ 0. -12. 0. 8.]
Test yourself
At an ordinary point, how many coefficients of the series solution are free?
- None
- One
- Two: and
- All of them
For the Airy equation , the series solutions converge…
- only for
- for all
- only at
- for
Hermite's equation has a polynomial solution when…
- is a non-negative integer
- is negative
- never