Problem. Find y(x) such that y′′ − 2xy′ − 2y = 0. (This equation is second-order linear with non-constant coefficients.) Power Series Solution. We assume that there exists a solution to the D. E. which can be represented by a Taylor series. This is not always the case. We write

y = a_{0} + a_{1}x + a_{2}x^{2} + ⋯ + a_{k}x^{k} + a_{k+1}x^{k+1} + a_{k+2}x^{k+2} + …

Then

y = a_{0} + a_{1}x + ⋯ + a_{k}x^{k} + a_{k+1}x^{k+1} + ⋯
y′ = a_{1} + 2a_{2}x + ⋯ + ka_{k}x^{k−1} + (k + 1)a_{k+1}x^{k} +(k + 2)a_{k+2}x^{k+1} + ⋯
y′′ = 2a_{2} + 3 · 2a_{3}x + …  +(k + 2)(k + 1)a_{k+2}x^{k} + ⋯
−2xy′ = −2a_{1}x − ⋯ − 2ka_{k}x^{k} − ⋯
−2y = −2a_{0} −2 a_{1}x + ⋯  −2 a_{k}x^{k} − ⋯

Substituting in the equation y′′ − 2xy′ − 2y = 0 yields

2a_{2} − 2a_{0} = 0,
6a_{3} − 4a_{1} = 0,
(k + 2)(k + 1)a_{k+2} − 2(k + 1)a_{k} = 0.

Thus a_{k+2} = 2a_{k}/(k + 2). Substituting r = k − 2 yields a_{r} = 2a_{r−2}/r. Therefore, for instance

a_{8} = \frac{2a_{6}}{8} = \frac{2^{2}a_{4}}{8 · 6} = \frac{2^{3}a_{2}}{8 · 6 · 4} = \frac{a_{2}}{4 · 3 · 2} = \frac{a_{0}}{4 · 3 · 2} ,

and in general, for any s ≥ 2,

a_{2s} = \frac{2a_{2s−2}}{2s} = \frac{4a_{2s−4}}{4s(s − 1)} = \frac{8a_{2s−6}}{8s(s − 1)(s − 2)} = ⋯ = \frac{2^{s}a_{0}}{2^{s}s!} = \frac{a_{0}}{s!}

and for s ≥ 1,

a_{2s+1} = \frac{2a_{2s−1}}{2s + 1} = \frac{2^{2}a_{2s−3}}{(2s + 1)(2s − 1)} = ⋯ = \frac{2^{s}a_{1}}{(2s + 1)(2s − 1) ⋯ 3} .

Thus

y = a_{0} ∑_{s=0}^{∞} \frac{x^{2s}}{s!} + a_{1} ∑_{s=0}^{∞} \frac{2^{s}x^{2s+1}}{(2s + 1) ⋯ 3 · 1} = a_{0}e^{x^{2}} + a_{1} ∑_{s=0}^{∞} \frac{2^{s}x^{2s+1}}{(2s + 1) ⋯ 3 · 1}

where a_{0} and a_{1} are arbitrary constants.