I just started learning how to use the power series method to solve ordinary differential equations and this is one of the first questions we were asked. I've managed to get it right up to the last step (assuming I've made no silly errors which I don't think I have as my final line of maths is similar to the solution of the problem set). But I'm not sure how to get to the final solution from the working I have.
The question is as follows: $$(2x-x^2)y''+(x-1)y'+3y=0, \;\;\;\; y(1)=1, \;\;\;\; y'(1)=1$$
I have my solution written in the form: $$y(x) =\sum_{k=0}^{\infty}a_k(x-1)^k$$
and have come to the conclusion that: $$a_{k+2}=\frac{k^2+3}{(k+2)(k+1)}a_k$$
so: $$a_0=1$$ $$a_1=1$$ $$a_2=\frac{3}{2}$$ $$a_3=\frac{4}{3\cdot2}$$ $$a_4=\frac{21}{4\cdot3\cdot2}$$ $$a_5=\frac{48}{5\cdot4\cdot3\cdot2}$$ $$a_6=\frac{399}{6\cdot5\cdot4\cdot3\cdot2}$$ $$a_7=\frac{1344}{7\cdot6\cdot5\cdot4\cdot3\cdot2}$$
Happy to be corrected here but my main issue is how they got from these values to the final solution of: $$y(x) = 1+3\left[-\frac{1}{2!!}(x-1)^2+\frac{1}{4!!}(x-1)^4+\sum_{k=3}^{\infty}\frac{(2k-5)!!}{(2k)!!}(x-1)^{2k}\right]+\left[(x-1)+\frac{2}{3}(x-1)^3\right]$$
I could go ahead and just expand the bottom and see how they're the same but I have no idea how I would've gotten numbers that look as arbitrary (to me at least) as 399 and 1344 to come together as the argument in the summation.
Any help is super appreciated!
Your equation is $$ 0=[(x-1)^2-1]y''-(x-1)y'-3y $$ leading to the coefficient relation at $(x-1)^k$ $$ 0=[k(k-1)-k-3]a_k-(k+2)(k+1)a_{k+2}=(k+1)[(k-3)a_k-(k+2)a_{k+2}] $$ Thus the corrected coefficient recursion is $$ a_{k+2}=\frac{k-3}{k+2}a_k $$ At $k=3$ one finds $a_5=0$ so that $a_{2k+1}=0$ for $k>1$. In the even index sequence then one has $$ a_{2(k+1)}=\frac{2k-3}{2(k+1)}a_{2k}\iff a_{2k}=\frac{2k-5}{2k}a_{2(k-1)} $$ which then leads to the double factorial formulas for the coefficients.