# How to find solution to this ODE with powerseries

I am working on solving this ODE $$(1+x^2)y'' + xy'-y =0$$

with $1. y(0)=0,y'(0)=1 \\ 2. y(0)=1, y'(0)=1$

with $$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}$$

plugged into the equation follows:

$(1+x^2) \sum_{n=2}^{ \infty} n(n-1)a_n x^{n-2}+x \sum_{n=1}^{ \infty}na_n x^{n-1}-\sum_{n=0}^{ \infty} a_n x^n =0$ $\leftrightarrow \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} na_n x^{n}-\sum_{n=0}^{ \infty} a_n x^n =0$ $\leftrightarrow 2a_2-a_0 + \sum_{n=1}^{ \infty} (n(n-1)a_n + (n+2)(n+1)a_{n+2}+ na_n - a_n) x^n = 0$

you get that $a_{n+2}= \frac{a_n(1-n^2)}{(n+2)(n+1)}$

let now be $a_0=1$, $a_1=0$ so that $a_2= \frac12,$( $2a_2 - a_0 = 0 \leftrightarrow a_2= \frac12 )$

for uneven $n$ such as $a_3, a_5,..$ it equals zero. but for even $n$ i can not find any regularity:

$n=2 , a_4 = \frac{a_2 (-3)}{12}= -\frac{1}{8}$ $n=4 , a_6= \frac{a_4 (-15)}{30}= \frac{1}{16}$ $n=6 , a_8= \frac{a_6 (-35)}{56}= - \frac{5}{128}$

i am totally stuck and do not know how to proceed :( I appreciate any help of you guys !

Note that by binomial theorem $n^2-1=(n-1)(n+1)$ so that the recursion cancels to $$a_{n+2}=-\frac{n-1}{n+2}a_n=\frac{(n-1)(n-3)}{(n+2)n}a_{n-2}=...$$ For the even subsequence one can write $$a_{2(k+1)}=-\frac{2k(2k-1)}{4(k+1)k}a_{2k}=(-1)^{k}\frac{(2k)(2k-1)\cdots2\cdot1}{4^{k}(k+1)k^2(k-1)^2\cdots2^2\cdot1}a_2 \\=(-1)^k\frac{(2k)!}{2^{2k+1}(k+1)!k!}a_0 =\frac{(-1)^k}{2^{2k+1}(k+1)}\binom{2k}{k}a_0$$ etc.
For (1), you should get $a_n = 0$ for all $n \ge 2$, i.e. $y(x) = x$.
For (2), the solution turns out to be $y(x) = x + \sqrt{1+x^2}$.