<s>[INST] Solving $(4-x^2)y''+2y=0$ by series I know that there are other ways to solve this, but I want to solve the ODE $(4-x^2)y''+2y=0$ by series close to $0$, that is, I'm looking for solutions of the form $y(x)=\sum_{n=0}^{\infty}a_{n}x^{n}.$
Substituing in the ODE, I got:
$$(8a_{2}+2a_{0})+(24a_{3}+2a_{1})x+\sum_{n=2}^{\infty}[4(n+2)(n+1)a_{n+2}+2a_{n}-n(n-1)a_{n}]x^{n}=0\implies \\
a_2=-\frac{a_0}{4};\quad a_3=-\frac{a_{1}}{12}; \quad a_{n+2}=\frac{(n-2)a_{n}}{4(n+2)}. $$
But this recorrence relation give me a problem: $a_4=0\implies a_{2n}=0$ for all $n>2 $.
My question is: Did I made a mistake? Or this solution considers, for even $n$, only the terms $a_2$ and $a_0$, that is, $y_{1}(x)=a_{0}\left(1-\frac{1}{4}x^{2}\right)$?
 [/INST] We have a differential equation that doesn’t have a constant coefficient for the second derivative.
$p\left( x \right) = 4-{x^2} \hspace{0.25in}p\left( 0 \right) = 4 \ne 0$
So, assume that $x_0$ is an ordinary point for this differential equation. We first need the solution and its derivatives,
$y\left( x \right) = \sum\limits_{n = 0}^\infty  {{a_n}{x^n}} \hspace{0.25in}y'\left( x \right) = \sum\limits_{n = 1}^\infty  {n{a_n}{x^{n - 1}}} \hspace{0.25in}y''\left( x \right) = \sum\limits_{n = 2}^\infty  {n\left( {n - 1} \right){a_n}{x^{n - 2}}}$
Plug these into the differential equation.
$\left( 4-{{x^2}} \right)\sum\limits_{n = 2}^\infty  {n\left( {n - 1} \right){a_n}{x^{n - 2}}}  +2\sum\limits_{n = 0}^\infty  {{a_n}{x^{n}}}= 0$
Now, break up the first term into two so we can multiply the coefficient into the series and multiply the coefficients of the second and third series in as well.
$4\sum\limits_{n = 2}^\infty  {n\left( {n - 1} \right){a_n}{x^{n-2}}}  - x^{2}\sum\limits_{n = 2}^\infty  {n\left( {n - 1} \right){a_n}{x^{n - 2}}}  + 2\sum\limits_{n = 0}^\infty  {{a_n}{x^{n}}}=0$
$4\sum\limits_{n = 2}^\infty  {n\left( {n - 1} \right){a_n}{x^{n-2}}}  - \sum\limits_{n = 2}^\infty  {n\left( {n - 1} \right){a_n}{x^n}}  + 2\sum\limits_{n = 1}^\infty  {{a_n}{x^{n}}}=0$
We will only need to shift the first and third series down by two and one respectively to get all the exponents the same in all the series.
$4\sum\limits_{n = 0}^\infty  {(n+2)\left( {n + 1} \right){a_{n+2}}{x^n}}  - \sum\limits_{n = 2}^\infty  {n\left( {n - 1} \right){a_n}{x^n}}  + 2\sum\limits_{n = 0}^\infty  {{a_{n+1}}{x^{n}}}=0$
At this point we could strip out some terms to get all the series starting at $n=2$, but that’s actually more work than is needed. Let’s instead note that we could start the second series at $n=0$ if we wanted to because that term is just zero. Likewise, the terms in the second series are zero for both $n=1$ and $n=0$ and so we could start that series at $n=0$. If we do this all the series will now start at $n=0$ and we can add them up without stripping terms out of any series.
$\begin{align*}\sum\limits_{n = 0}^\infty  {\left[ {4{(n+2)}\left( {n + 1} \right){a_{n+2}} - n\left( {n - 1} \right){a_{n}} + 2{a_{n}}} \right]{x^n}}  & = 0\\  
\sum\limits_{n = 0}^\infty  {\left[ {4{(n+2)}\left( {n + 1} \right){a_{n+2}} + \left(n+2 \right)\left(n-1\right){a_{n}}} \right]{x^n}}  & = 0\\ \end{align*}$
Now set coefficients equal to zero.
${4{(n+2)}\left( {n + 1} \right){a_{n+2}} + \left(n+2 \right)\left(n-1\right){a_{n}}}= 0,\hspace{0.25in}n = 0,1,2, \ldots$
Solving this gives,
${a_{n + 2}} =  - \frac{{\left( {n + 2} \right)\left( {n - 1} \right){a_n}}}{4{\left( {n + 2} \right)\left( {n + 1} \right)}},\hspace{0.25in}n = 0,1,2, \ldots$
Now, we plug in values of $n$,
$n = 0:\hspace{0.25in}{a_2} = \frac{a_0}{4}\\
n = 1:\hspace{0.25in}{a_3} =   0{a_1} = 0\\
n = 2:\hspace{0.25in}{a_4} =  - \frac{1}{12}{a_2}\neq0\\
n = 3:\hspace{0.25in}{a_5} =  - \frac{1}{8}{a_3} = 0\\
n = 4:\hspace{0.25in}{a_5} =  - \frac{3}{20}{a_4}\neq0$
Now, from this point we can see that $a_{2n}=0$,for all $n>2$.
Thus,for solution considers, for even $n$, only the terms $a_2$ and $a_0$, that is,
$y(x)=a_{0}\left(1+\frac{1}{4}x^{2}\right)$.
</s>