<s>[INST] If $g(x) = xf(x^2)$ and $f(x)=\sum_{n=0}^\infty \sin(\frac{\pi}{n+2})x^n$, what is $f^{(20)}(0)$ and $g^{(35)}(0)$? My task is this:
(i)Let $$f(x)=\sum_{n=0}^\infty \sin\left(\frac{\pi}{n+2}\right)x^n.$$ Find $f^{(20)}(0)$ and $g^{(35)}(0)$ when $g(x) = xf(x^2)$.
(ii)Find $$\lim_{n\to\infty}\frac{f(x)-1-\frac{\sqrt(3)x}{2}}{x^2}.$$
My work so far:
After finding the convergence interval $x\in[\pm1,)$, we notice that the $20$th derivative for $x^{20}$ is $20!x^{20-20}= 20!$. If we try the sum formula for this series with $r=x, a_1 = 20!\sin\left(\frac{\pi}{22}\right)$ one should expect to see that $f^{(20)}(x) = 20!\frac{\sin\left(\frac{\pi}{22}\right)}{1-x}\to f^{(20)}(0)=20!\sin\left(\frac{\pi}{22}\right)$.
Although this is the answer I'm not sure if I used this formula correctly. I also have som serious trouble finding my way to $g^{(35)}(0)$. Because $g(x) = xf(x^2) = x\sum_{n=0}^\infty \sin\left(\frac{\pi}{n+2}\right)x^{2n}=\sum_{n=0}^\infty \sin\left(\frac{\pi}{n+2}\right)x^{2n+1}$. We must have that $2n + 1 = 35 \implies n = 17$. I'm thinking that our $g^{(2n+1)}(x)= xf(x^2)=(2n+1)!\frac{x\sin\left(\frac{\pi}{n+2}\right)}{1-x^2}$. This however can't be the case since the answer in my book is $g^{(35)}(0)=35!\sin(\frac{\pi}{19})$. It seems to me that they are using $g^{(2n +1)}= (2n+1)!\frac{\sin\left(\frac{\pi}{n+2}\right)}{1-x^2}$. For the limit we notice that $f^{(0)}=0!\frac{\sin\left(\frac{\pi}{0 + 2}\right)}{1-x}=\frac{1}{1-x}\to\lim_{x\to0}\frac{f(x) - 1 - \sqrt(3)x/2}{x^2}= \lim_{x\to0}\frac{1/(1-x)^2-\sqrt(3)/2}{2x}$, but this doesn't lead me anywhere near the finite answer. So I need some help in understanding their approach and reasoning in addition to comments on my approach with $f^{(20)}$. I'm getting the wrong answer for the limit as I pointed out, so I need someone to show me that aswell. Thanks in advance!
 [/INST] Note that $$f'\left(x\right)=\sum_{n\geq0}n\sin\left(\frac{\pi}{n+2}\right)x^{n-1}=\sum_{n\geq1}n\sin\left(\frac{\pi}{n+2}\right)x^{n-1}
 $$ since for $n=0
 $ there is no addend. Furthermore $$f''\left(x\right)=\sum_{n\geq1}n\left(n-1\right)\sin\left(\frac{\pi}{n+2}\right)x^{n-2}=\sum_{n\geq2}n\left(n-1\right)\sin\left(\frac{\pi}{n+2}\right)x^{n-2}
 $$ since for $n=1
 $ again there is no addendum. Iterating we have $$f^{\left(20\right)}\left(x\right)=\sum_{n\geq20}n\left(n-1\right)\cdots\left(n-19\right)\sin\left(\frac{\pi}{n+2}\right)x^{n-20}
 $$ and if we consider $f^{\left(20\right)}\left(0\right)
 $ the only term which is not zero is when the exponent is $n=20$, since $x^{n-20}=1
 $, then $$f^{\left(20\right)}\left(0\right)=20!\sin\left(\frac{\pi}{22}\right).
 $$ For the other function we can observe that $$g\left(x\right)=\sum_{n\geq0}\sin\left(\frac{\pi}{n+2}\right)x^{2n+1}
 $$ so if we take the derivative $$g'\left(x\right)=\sum_{n\geq0}\left(2n+1\right)\sin\left(\frac{\pi}{n+2}\right)x^{2n}
 $$ and in this case the series start from $0$ since there is no cancellation. For the second derivative $$g''\left(x\right)=\sum_{n\geq0}\left(2n+1\right)\left(2n\right)\sin\left(\frac{\pi}{n+2}\right)x^{2n-1}=\sum_{n\geq1}\left(2n+1\right)\left(2n\right)\sin\left(\frac{\pi}{n+2}\right)x^{2n-1}
 $$ since for $n=0
 $ the sum is $0$. So in this case we have to change the starting number of the series only when we have to differentiate an even exponent. Hence $$g^{\left(35\right)}\left(x\right)=\sum_{n\geq17}\left(2n+1\right)\left(2n\right)\cdots\left(2n-33\right)\sin\left(\frac{\pi}{n+2}\right)x^{2n-34}
 $$ and again if we consider $g^{\left(35\right)}\left(0\right)
 $ the only non zero terms is when $2n-34=0
 $ so $n=17$. Hence $$g^{\left(35\right)}\left(0\right)=35!\sin\left(\frac{\pi}{19}\right).$$
</s>