<s>[INST] What is the expansion in power series of ${x \over \sin x}$ How can I expand in power series the following function:
$$
{x \over \sin x}
$$
? I know that:
$$
\sin x = x - {x^3 \over 3!} + {x^5 \over 5!} - \ldots,
$$
but a direct substitution does not give me a hint about how to continue.
 [/INST] A simple way is to manipulate the generating function for Bernoulli numbers, but I will follow another approach. We have:
$$ \frac{1}{\sin x}=\frac{d}{dx}\log\tan\frac{x}{2}\tag{1}$$
as well as:
$$ \frac{\sin x}{x}=\prod_{n\geq 1}\left(1-\frac{x^2}{\pi^2 n^2}\right),\qquad \cos x=\prod_{n\geq 0}\left(1-\frac{4x^2}{(2n+1)^2 \pi^2}\right)\tag{2}$$
hence by considering the logarithmic derivatives:
$$ -\frac{1}{x}+\cot(x) = \sum_{n\geq 1}\frac{2x}{x^2-n^2\pi^2},\qquad -\tan(x)=\sum_{n\geq 0}\frac{8x}{4x^2-(2n+1)^2 \pi^2}\tag{3}$$
so:
$$ \frac{1}{\sin x}=\frac{1}{2}\cot\left(\frac{x}{2}\right)+\frac{1}{2}\tan\left(\frac{x}{2}\right)=\frac{1}{x}+\sum_{n\geq 1}\frac{2x}{x^2-4n^2\pi^2}-\sum_{n\geq 0}\frac{2x}{x^2-(2n+1)^2 \pi^2}$$
and:
$$ \frac{x}{\sin x}=1+2\sum_{m\geq 1}x^{2m}\left(-\sum_{n\geq 1}\frac{1}{(2\pi)^{2m} n^{2m}}+\sum_{n\geq 0}\frac{1}{\pi^{2m}(2n+1)^{2m}}\right)\tag{4} $$
that gives:

$$\begin{eqnarray*} \frac{x}{\sin x}&=&1+2\sum_{m\geq 1}x^{2m}\left(-\frac{\zeta(2m)}{(2\pi)^{2m}}+\frac{(4^m-1)\zeta(2m)}{(2\pi)^{2m}}\right)\\&=& 1+2\sum_{m\geq 1}\frac{(4^m-2)\zeta(2m)}{(2\pi)^{2m}}x^{2m}.\tag{5}\end{eqnarray*}$$

As expected, we have an even analytic function in a neighbourhood of the origin, and the radius of convergence of the previous power series is $\pi$.
</s>