Integrating $\frac{x}{\sin x}$ using infinite products and fraction decomposition I found this way of integrating $\frac{x}{\sin x}$ using infinite products and fraction decomposition.
$$I=\int\frac{xdx}{\sin x}=\int\frac{xdx}{x\prod_{n\geq1}(1-\frac{x^2}{\pi^2n^2})}\\I=\int\prod_{n\geq1}\frac{1}{1-\frac{x^2}{\pi^2n^2}}\ dx$$
Fraction decomposition:
Let $a_n=\frac1{\pi n}$. Suppose
$$\prod_{n\geq1}\frac1{1-a_n^2x^2}=\sum_{n\geq1}\frac{b_n}{1-a_n^2x^2}$$
$$\therefore \prod_{n\geq1}\frac1{1-a_n^2x^2}=\frac{\sum_{n\geq1}b_n\prod_{n\neq i\in\Bbb N}(1-a_i^2x^2)}{\prod_{k\geq1}(1-a_k^2x^2)}$$
$$\therefore 1=\sum_{n\geq1}b_n\prod_{n\neq i\in\Bbb N}(1-a_i^2x^2)$$
$$\therefore 1=b_n\prod_{n\neq i\in\Bbb N}\bigg(1-\frac{a_i^2}{a_n^2}\bigg)$$
$$\therefore b_n=\prod_{n\neq i\in\Bbb N}\frac1{1-\frac{a_i^2}{a_n^2}}$$
Which gives
$$I=\sum_{n\geq1}\bigg(\prod_{n\neq i\in\Bbb N}\frac1{1-\frac{a_i^2}{a_n^2}}\bigg)\int\frac{dx}{1-a_n^2x^2}$$
Now the integral 
$$G_n=\int\frac{dx}{1-a_n^2x^2}$$
$a_nx=\sin u$:
$$G_n=\frac1{a_n}\int\sec u\ du$$
$$G_n=\frac1{a_n}\log\bigg|\frac{1+a_nx}{\sqrt{1-a_n^2x^2}}\bigg|$$
Thus
$$I=C+\sum_{n\geq1}\frac1{a_n}\log\bigg|\frac{1+a_nx}{\sqrt{1-a_n^2x^2}}\bigg|\prod_{n\neq i\in\Bbb N}\frac1{1-\frac{a_i^2}{a_n^2}}$$
Question: Is this valid/does this work? Can similar techniques be employed to find similar integrals? Thanks.
 A: We have that, for a sufficient function $f(x)$,
$$f(x)=\prod_{f(\omega)=0}(x-\omega)$$
so that
$$\frac{1}{f(x)}=\prod_{f(\omega)=0}\frac{1}{x-\omega}.$$
We then assume that we may write
$$\frac{1}{f(x)}=\sum_{f(\omega)=0}\frac{b(\omega)}{x-\omega}.$$
We can show that $$b(\omega)=\prod_{f(r)=0\ ,\  r\ne\omega}\frac{1}{\omega-r}\ .$$
But on the other hand,
$$\ln f(x)=\sum_{f(\omega)=0}\ln(x-\omega)$$
so that 
$$f'(x)=\sum_{f(\omega)=0}\frac{f(x)}{x-\omega}=\sum_{f(\omega)=0}\ \prod_{f(r)=0\ ,\ r\ne\omega}(x-r)\ .$$
Thus, for any $q$ with $f(q)=0$, we plug in $x=q$ to get 
$$f'(q)=\prod_{f(r)=0\ ,\ r\ne q}(q-r)=\frac{1}{b(q)}\ .$$
 Which gives 
 $$\frac{1}{f(x)}=\sum_{f(\omega)=0}\frac{1}{(x-\omega)f'(\omega)}\ .$$
Choosing $f(x)=\sin x$ implies that 
$$\frac{\omega}{\pi}\in\Bbb Z$$
and $$f'(\omega)=\cos\omega=(-1)^k,$$
so we end up with 
$$\frac{1}{\sin x}=\sum_{k\in\Bbb Z}\frac{(-1)^k}{x+\pi k}$$
for $x/\pi\not\in\Bbb Z$. This expression is equivalent to 
$$\frac{x}{\sin x}=\sum_{k\in \Bbb N}\frac{\pi^2k^2}{\pi^2k^2-x^2}\prod_{k\ne j\in\Bbb N}\frac{j^2}{j^2-k^2}\ .$$
