# Solving this second order ODE with power series method

Problem: Use the power series method to find a general solution for the following differential equation: $$(x^2 - 3) y'' + 2x y' = 0$$

Attempt: We see that $x = \pm \sqrt{3}$ is a singular point of this ODE. Hence we apply the power series method around $x = 0$, and look for a solution of the form $$y(x) = \sum_{n=0}^{\infty} a_n x^n.$$ We have that \begin{align*} y'(x) = \sum_{n=1}^{\infty} n a_n x^{n-1} \qquad \qquad y''(x) = \sum_{n=2}^{\infty} (n-1) n a_n x^{n-2} \end{align*} Plugging this in the ODE and distributing gives \begin{align*} \sum_{n=2}^{\infty} (n-1) n a_n x^n - 3 \sum_{n=2}^{\infty} (n-1)n a_n x^{n-2} + 2 \sum_{n=1}^{\infty} n a_n x^n = 0 \end{align*} Then if I shift the indices to get the exponents equal I get \begin{align*} \sum_{n=2}^{\infty} (n-1) n a_n x^n - 3 \sum_{n=0}^{\infty} (n+1)(n+2) a_{n+2} x^n + 2 \sum_{n=1}^{\infty} n a_n x^n = 0 \end{align*} From the identity theorem we have the following recurrence relation for the coefficients: \begin{align*} (n-1) n a_n - 3 (n+1) (n+2) a_{n+2} + 2 n a_n = 0 \end{align*} We can rewrite this as \begin{align*} a_{n+2} = \frac{n}{3(n+2)} a_n \end{align*}

From what I understand, we need to find two solutions now (since the order of the differential equation is two), one for the even and one for the odd coefficients. A general solution is then a linear combination of the two. I tried solving the recurrence relation for the even coefficients, but I got stuck. For the even coefficients we have \begin{align*} \frac{2n}{3 (2n + 2)} a_{2n} = a_{2n + 2} \end{align*} Now I want to expand this, and write $a_{2n+2}$ in terms of $a_2$. I noticed that \begin{align*} a_{2n} = a_{2n-2} \frac{2 (n-1)}{3 \big( 2 (n-1) + 2 \big)} \end{align*} and \begin{align*} a_{2n-2} = a_{2n - 4} \frac{2}{3} \frac{n-2}{2(n-2) + 2} \end{align*} so that \begin{align*} a_{2n+2} = \frac{2}{3} \frac{n(n-1)(n-2)}{(2n+2)(2(n-1) +2 ) (2 (n-2) + 2) } a_{2n-4} \end{align*} So I figure that if I continue this until $a_2$ shows up at the RHS, I have to write $n!$ in the numerator. But how do I know with what terms I should stop the denominator? Also, is this the general method for solving a problem like this?

Prior to substituting your power series, consider starting off by reducing the order of the ODE via the substitution $y'=z$, so you have $$(x^2-3)z'+2xz=0$$ Now, plugging in terms of power series you have $$(x^2-3)\sum_{n\ge1}na_nx^{n-1}+2x\sum_{n\ge0}a_nx^n=0$$ Distributing, rewriting, etc, you have $$\sum_{n\ge3}(na_{n-2}-3na_n)x^{n-1}-3a_1-6a_2x+2a_0x=0$$ So you have $a_1=0$ and $a_0=3a_2$ as initial conditions for the recurrence relation, $$3a_n=a_{n-2}$$ which you might agree is a bit simpler than the one you have. This can be solved via the method of generating functions. Let $A(t)=\sum\limits_{n\ge0}a_nt^n$ be the generating function for $a_n$, then the recurrence relation can be written as \begin{align*} 3\sum_{n\ge2}a_nt^n&=\sum_{n\ge2}a_{n-2}t^n\\[1ex] 3\left(\sum_{n\ge0}a_nt^n-a_0-a_1t\right)&=t^2\sum_{n\ge2}a_{n-2}t^n\\[1ex] 3A(t)-3a_0&=t^2\sum_{n\ge0}a_nt^n\\[1ex] 3A(t)-3a_0&=t^2A(t)\\[1ex] A(t)&=\frac{a_0}{1-\frac{t^2}{3}}\\[1ex] &=\frac{a_0}{2}\left(\frac{1}{1-\frac{t}{\sqrt3}}+\frac{1}{1+\frac{t}{\sqrt3}}\right) \end{align*} Recall the well-known power series, $$\frac{1}{1-t}=\sum_{n\ge0}t^n\quad\text{for }|t|<1$$ This means the generating function can be written as \begin{align*} A(t)&=\frac{a_0}{2}\left(\sum_{n\ge0}\left(\frac{t}{\sqrt3}\right)^n+\sum_{n\ge0}\left(-\frac{t}{\sqrt3}\right)^n\right)\\[1ex] &=\frac{a_0}{2}\sum_{n\ge0}3^{-n/2}\left(1+(-1)^n\right)t^n \end{align*} for $|t|<\sqrt3$. Comparing to the general proposed form of $A(t)$, it stands to reason that $$a_n=\frac{a_0}{2}3^{-n/2}\left(1+(-1)^n\right)$$ All this to say that the solution to this first-order ODE is $$y'(x)=z(x)=\frac{a_0}{2}\sum_{n\ge0}\frac{1+(-1)^n}{3^{n/2}}x^n$$ Integrating once, you get $$y(x)=\frac{a_0}{2}\sum_{n\ge0}\frac{1+(-1)^n}{3^{n/2}(n+1)}x^{n+1}$$ (noting that the constant of integration disappears, since $y(0)=\sum\limits_{n\ge0}0=0$).
This might suggest only one solution, but in fact you can extract another. Since odd terms of $a_n$ disappear, upon setting $n=2k$ you have $$y=a_0\sum_{k\ge0}\frac{x^{2k+1}}{(2k+1)3^k}$$ which is the power series for $a_0\sqrt3\text{arctanh}\dfrac{x}{\sqrt3}$, which can be expanded into two linearly independent logarithmic terms. See line (3).