$$\newcommand{\id}{\mathrm{id}}$$ $$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\kernel}{\mathrm{null}\,}$$ $$\newcommand{\range}{\mathrm{range}\,}$$ $$\newcommand{\RealPart}{\mathrm{Re}}$$ $$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$ $$\newcommand{\Argument}{\mathrm{Arg}}$$ $$\newcommand{\norm}[1]{\| #1 \|}$$ $$\newcommand{\inner}[2]{\langle #1, #2 \rangle}$$ $$\newcommand{\Span}{\mathrm{span}}$$

# Another Example

Solve

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

#### Solution

Let

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

then

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

and

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

We can write the original differential equation as

$x^2 y'' - y'' + xy' -y =0$

Substituting back into this differential equation

$(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$

and multiplying the $$x^2$$ through gives

$\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$

We next need to make the second term has the nth power of $$x$$ instead of $$n-2$$. For this term, we let

$$u = n – 2$$ and  $$n = u + 2$$

The second term becomes

$\sum_{u=0}^{\infty} (u+2)(u+1) a_{u+2}x^u$

now changing this back to $$n$$ and placing the term back into the differential equation gives

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

Since they sums do not all start at the same number, we pull out the $$n = 0$$ and $$n = 1$$ terms to get

$-2a_2 - 6a_3\, x + a_1\, x - a_0 - a_1\, x + \sum_{n=2}^{\infty} n(n-1)a_n \, x^n - \sum_{n=0}^{\infty} (n+2)(n+1)a_{n+2}, x^n + \sum_{n=1}^{\infty} n\,a_n\, x^n - \sum_{n=0}^{\infty} a_n\, x^n = 0$

or

$-2a_2 - 6a_3\,x - a_0 + \sum_{n=2}^{\infty} n(n-1)a_n \, x^n - \sum_{n=2}^{\infty} (n+2)(n+1)a_{n+2}, x^n + \sum_{n=2}^{\infty} n\,a_n\, x^n - \sum_{n=2}^{\infty} a_n\, x^n = 0$

We can now combine the series to get

$-2a_2 - 6a_3\, x - a_0 + \sum_{n=2}^{\infty} \left[ n(n-1)a_n - (n+2)(n+1)a_{n+2} + n\,a_n - a_n \right] = 0$

We are looking for two linearly independent solutions, so we let the first one be such that

$$y(0) = 0$$  and  $$y’(0) = 1$$

this implies that

$$a_0 = 0$$ and $$a_1 = 1$$

from our last equation we have

$0 = -2a_2 – a_0 = -2a_2$

or

$a_2 = 0$

We also have

$0 = - 6a_3$

or

$a_3 = 0$

The terms from the series must all be zero, since that is what it means for a polynomial to be zero. Hence

$n(n-1)\,a_n -(n+2)(n+1)\,a_{n+2} + n\,a_n - a_n = 0$

$(n+2)(n+1)\,a_{n+2} = \left[ n(n-1)+n-1 \right] a_n = (n-1)(n+1)a_n$

$a_{n+2} = \dfrac{n-1}{n+1} a_n$

Notice that since

$a_2 = a_3 = 0$

All of the rest of the coefficients must be zero, since they are each a multiple of the coefficient two before them. Therefore the first linear independent solution is

$y_1 = x$

For the second linearly independent solution, we let

$$y(0) = 1$$ and $$y’(0) = 0$$

this implies that

$$a_0 = 1$$  and $$a_1 = 0$$

from our last equation we have

$1 = -2a_2 – a_0 = -2a_2 - 1$

or

$a_2 = -1$

We also have

$0 = -6a_3$

or

$a_3 = 0$

we still have

$a_{n+2} =\dfrac{n-1}{n+1}a_n$

so notice that the odd terms are all zero. For the even terms, we have

$a_4 = -\dfrac{1}{3}$

$a_6 = \dfrac{3}{5}\dfrac{1}{3}= \dfrac{1}{5}$

$a_8 = -\dfrac{5}{7}\dfrac{1}{5} = -\dfrac{1}{7}$

$a_{2n}= \dfrac{(-1)^{n+1}}{2n-1}$

This one has the series representation

$y_2 = \sum_{n=1}^{\infty} \dfrac{(-1)^{n+1}}{2n-1} x^{2n}$