(1-x²)y''-2xy'+4y=0, given y=∑aᵣxʳ, a power series in x for r∈[0,n], so for r∈[2,n]:

y=a₀+a₁x+∑aᵣxʳ,

y'=a₁+∑raᵣxʳ⁻¹,

y''=∑r(r-1)aᵣxʳ⁻².

We can expect the power series to be infinite, that is, n→∞.

The DE can now be written:

(1-x²)∑r(r-1)aᵣxʳ⁻²-2x(a₁+∑raᵣxʳ⁻¹)+4(a₀+a₁x+∑aᵣxʳ)=0,

∑r(r-1)aᵣxʳ⁻²-∑r(r-1)aᵣxʳ-2a₁x-∑2raᵣxʳ+4a₀+4a₁x+∑4aᵣxʳ=0.

This simplifies:

4a₀+2a₁x+∑aᵣxʳ(4-r-r²)+∑r(r-1)aᵣxʳ⁻²=0 for r∈[2,n].

This has to be true for all x, so we need to find the constant terms, that is, x⁰ coefficients: 4a₀+2a₂=0 (r-2=0 implies r=2). So a₂=-2a₀.

If we now expand the resulting polynomial a little we get:

4a₀+2a₁x-2a₂x²-8a₃x³-...+2a₂+6a₃x+12a₄x²+20a₅x³+...=0,

(4a₀+2a₂)+x(2a₁+6a₃)+x²(-2a₂+12a₄)+x³(-8a₃+20a₅)+...=0.

Because 4a₀+2a₂=0, this becomes:

x(2a₁+6a₃)+x²(-2a₂+12a₄)+x³(-8a₃+20a₅)+...=0.

We can divide through by x:

(2a₁+6a₃)+x(-2a₂+12a₄)+x²(-8a₃+20a₅)+...=0.

Therefore, 2a₁+6a₃=0, and a₃=-⅓a₁.

Progressively, the coefficients can be found. Let A=a₀ and B=a₁ (constants of integration), so a₂=-2A and a₃=-B/3. If we can find out the relation of successive coefficients and hence their relation to A and B, the polynomial can be written in the form y=Ap(x)+Bq(x).

For example, following the above method, we deduce that -2a₂+12a₄=0, a₄=a₂/6=-2A/6=-A/3, and -8a₃+20a₅=0, a₅=2a₃/5=-2B/15.

Therefore we need to find the coefficients of consecutive powers of x as a formula.

The general formula is: aᵣ(4-r-r²)+(r+2)(r+1)aᵣ₊₂=0,

aᵣ₊₂=(r²+r-4)aᵣ/((r+2)(r+1)).

If r=0, a₂=-4a₀/2=-2a₀=-2A, as discovered earlier.

If r=1, a₃=-2a₁/6=-a₁/3=-B/3 as before.

y=A+Bx-2Ax²-Bx³/3+...

y=A(1-2x²-x⁴/3-...)+B(x-x³/3-2x⁵/15-...)

The series in parentheses are both infinite.