# Solution to ODE using Power Series

I'm currently trying to wrap my head around how to solve an ODE with series.

The problem I am working on is this:

Find the indicated coefficients of the power series solution about x=0 of the differential equation:

$(x^2 + 1)y'' - xy' + y = 0$

$y(0) = 3, y'(0) = -8$

The answer blanks are as follows:

$y = 3-8x + BLANKx^2 + BLANKx^4 + BLANKx^6 + BLANKx^8 + 0(x^9)$

From my notes, I can discern that because $x=0$,

$y = \sum_{n=0}^{\infty}a_n x^{n}$

$y' = \sum_{n=1}^{\infty}na_n x^{n-1}$

$y'' = \sum_{n=2}^{\infty}n(n-1)a_n x^{n-2}$

From here, I'm unsure how to proceed. If someone could walk me step by step through these types of problems (I have several to complete), I would be very grateful.

From what I can tell, I need to manipulate the equation with those sums in place to get "formulas" for $a_2$, $a_3$ etc...but I don't know how I would go about that.

Here are the steps.. I'll do some of the working, but I'll mainly leave it up to you to solve.

1. Substitute your power series for $y$, $y'$, $y''$ into your equation $(x^{2} + 1)y'' -xy' + y = 0$ i.e.

\begin{align} (x^{2} + 1) \sum_{n = 2}^{\infty} n (n - 1) a_n x^{n - 2} - x \sum_{n = 1}^{\infty} n a_n x^{n - 1} + \sum_{n = 0}^{\infty} a_n x^{n} &= 0 \\ \implies \sum_{n = 2}^{\infty} n (n - 1) a_n x^{n} + \sum_{n = 2}^{\infty} n (n - 1) a_n x^{n - 2} - \sum_{n = 1}^{\infty} n a_n x^{n} + \sum_{n = 0}^{\infty} a_n x^{n} &= 0 \\ \end{align}

1. Shift your power series for those series that don't have $x^{n}$ so that they do have $x^{n}$ and then replace the old series with the new one i.e.

$$\implies \sum_{n = 2}^{\infty} n (n - 1) a_n x^{n - 2} = \sum_{n = 0}^{\infty} (n + 2)(n + 1) a_{n + 2} x^{n}$$

1. Notice that you have series that start at $0, 1, 2$ so evaluate those at $0, 1$ so that all the series then start at $2$ i.e.

$$\sum_{n = 1}^{\infty} n a_n x^{n} = a_1 x^{1} + \sum_{n = 2}^{\infty} n a_n x^{n}$$

1. Collect summation terms under a single summation starting at $n = 2$, with individual terms (like the $a_1 x$ above) not written in the summation i.e.

$$a_1 x + ... + \sum_{n = 2}^{\infty} \bigg[ a_n - n a_n + ... \bigg] x^{n} = 0$$

Once you have done that, comment below and then we can do the next steps (Or if you need any help at all, just comment below).

EDIT

In step $1$, just expand the $(x^{2} + 1)y''$ term i.e.

\begin{align} (x^{2} + 1)y'' &= x^{2}y'' + y'' \\ &= x^{2} \sum_{n = 2}^{\infty} n (n - 1) a_n x^{n - 2} + \sum_{n = 2}^{\infty} n (n - 1) a_n x^{n - 2} \\ \end{align}

Now, the $x^{2}$ term can be taken inside the summation (or you can take the $x^{-2}$ term out of the summation, it's the same thing), because we are not summing over that term. Hence

\begin{align} x^{2} \sum_{n = 2}^{\infty} n (n - 1) a_n x^{n - 2} + \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 = 2}^{\infty} n (n - 1) a_n x^{n - 2} \\ \end{align}

Similarly, for $xy'$

\begin{align} xy' &= x \sum_{n = 1}^{\infty} n a_n x^{n - 1} \\ &= \sum_{n = 1}^{\infty} n a_n x^{n} \\ \end{align}

• I'm confused in step one. For the second line, you got another summation, but I don't see where you got it from. The difference between the two lines is that $(x^2 + 1)$ and $x$ are gone, but I don't see how those two translate into the new summation at $x^n$ – Kommander Kitten Mar 12 '15 at 18:57
• @KommanderKitten I'll edit my post. – mattos Mar 13 '15 at 0:16

form the initial conditions we know that the series solution of $$(x^2 + 1)y'' -xy' + y = 0 \tag 1$$ is of the form $$y = 3 - 8x + a_2x^2 + a_3 x^3 + \cdots, y' = -8 + 2a_2 x + 3 a_3 x^2 + 4a_4x^3+\cdots, y'' = 1 \cdot 2 a_2 + 2\cdot 3 a_3x + 3 \cdot 4 a_4 x^2 + \cdots$$ putting these in $(1)$ we get $$(1 + x^2) \left(1 \cdot 2 a_2 + 2\cdot 3 a_3x + 3 \cdot 4 a_4 x^2 + \cdots\right) -x\left( -8 + 2a_2 x + 3 a_3 x^2 + 4a_4x^3+\cdots\right)+\left(3 - 8x + a_2x^2 + a_3 x^3 + \cdots\right) = 0$$

equating the coefficients of the powers of $x$ gives $$1\cdot2 a_2+3 = 0\\ 2 \cdot 3 a_3+8-8=0\\3\cdot4 a_4+1\cdot 2a_2 -2a_2+a_2 = 0\\ 4\cdot 5 a_5+2 \cdot 3 a_3 -3a_3 + a_3 = 0\\\vdots\\ (n-1)na_n+(n-3)(n-2)a_{n-2}-(n-2)a_{n-2}+a_{n-2}=0$$

the generic recurrence equation is $$a_n = -\frac{(n-2)(n-4)+1}{(n-1)n}a_{n-2}, a_0 = 3, a_1 = -8, a_2 = -\frac 32, a_3 = 0\cdots$$ since $a_3 = 0,$ then $$0= a_5 = a_7 = a_9= \cdots = a_{2n+1}$$ we can continue $$a_4 = -\frac{1}{3 \cdot 4}a_2 = \frac 18,\\ a_6 = -\frac{9}{5 \cdot 6}a_4 =\frac 3{80}, \\ a_8 = -\frac{25}{56}a_6 = -\frac{15}{896}$$

$\bf p.s. added \, \, on\, \, 03/13$

here is another way, perhaps an easier way, to do this. take the differential equation $$(1+x^2)y'' -xy' + y = 0, (1+x^2)y''' + 2xy'' -xy'' -y1 + y' = 0\to (1+x^2)y'''+xy'' = 0$$ we can separate the last equation $$\frac{dy''}{y''} =-\frac{x\,dx}{1+x^2}$$ and on integration gives $$y'' = \frac{y''(0)}{\sqrt{1+x^2}} = - y(0)\left(1+x^2\right)^{-1/2} = -y(0)\left( 1-\frac 12 x^2 + \frac 38 x^4 - \frac 5{16}x^6 + \cdots \right)\\ y' = y'(0) - y(0)\left(x-\frac 16 x^3 + \frac 3{40} x^5 - \frac 5{112}x^7 + \cdots \right)\\ y = y(0) + y'(0)x - y(0)\left(\frac 12 x^2-\frac 1{24} x^4 + \frac 3{240} x^6 - \frac 5{896}x^8 + \cdots \right)\\ y = 3 -8x - \frac 32 x^2+\frac 1{8} x^4 - \frac 1{240} x^6 + \frac {15}{896}x^8 + \cdots$$

• While I do follow your math, I don't see you using any power series. Also, $a_6$ and $a_8$ are incorrect. Could you explain this using power series? Thanks! – Kommander Kitten Mar 12 '15 at 20:03
• This is another worthwhile method to learn. It's a different way to view series solutions. – jdods Mar 14 '15 at 1:59