Integration of $1/(1+a \csc^2(x))$ 
Integration of  $$\int_{0}^{\frac{(M-1)\pi}{M} }\frac{1}{1+\alpha \csc^2(x)} dx,$$ where $ \alpha $ is a constant. 

I tried taking $\cot(x) = t$, then differentiating it w.r.t $dx$ we get, $-\csc^2(x)dx = dt$. And as we know that, $\csc^2(x)= \cot^2(x) +1$, so tried substituting these values, but did not got any outcome.

Hint
Considering the problem of the antiderivative, using $$x=\tan ^{-1}\left(u\,\sqrt{\frac{a}{a+1}} \right)\implies dx=\frac{ \sqrt{a(a+1)}}{a u^2+a+1}\,du$$ This makes 
$$\int\frac{dx}{1+a \csc^2(x)}=\sqrt{\frac{a}{a+1}}\int\frac{ u^2}{\left(u^2+1\right) \left(a u^2+a+1\right)}\,du$$ Now, using partial fraction decomposition $$\frac y{(y+1)(ay+a+1)}=\frac A {y+1}+\frac B {ay+a+1}$$ Identify to get  $A=-1$ and $B=1+a$. 
So $$\frac{ u^2}{\left(u^2+1\right) \left(a u^2+a+1\right)}=-\frac 1{u^2+1}+\frac {1+a}{au^2+a+1}$$ which seems much simpler to solve.
Edit
In fact, using $$x=\tan^{-1}(ku)\implies dx=\frac{k}{k^2 u^2+1},du$$  makes 
$$\int\frac{dx}{1+a \csc^2(x)}=\int\frac {k^3 u^2}{u^4 k^4\left(a +1\right)+u^2 k^2\left(2 a +1\right)+a}\,du$$ and $${u^4 k^4\left(a +1\right)+u^2 k^2\left(2 a +1\right)+a}=k^4\left(a +1\right)\left(u^2+\frac 1 {k^2}\right)\left(u^2+\frac{a}{(a+1) k^2}\right)$$ which simplifies setting one of the roots equal to $1$ that is to say using either $k=1$ or $k=\sqrt{\frac{a}{a+1}}$. The case $k=1$ is what Archis Welankar proposed in his answer.
