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.

We can simplify it as $\displaystyle1-\frac{a}{\sin^2 (x)+a} $. 
Then by using $\displaystyle \sin (x)=\frac {\tan x}{\sec x},\sec^2x=\tan^2x+1$, we have the next term as $\\\displaystyle\frac {a\sec^2 (x)}{(a+1)\tan^2 (x)+a} $. Now let $\tan (x)=t \implies\sec^2 (x)dx=dt $. 
Thus the next part changes to the integral $\displaystyle\int \frac {a}{(a+1)t^2+a}dt$ which has well-known antiderivative. After all the simplification and re-substituting we have the final result as $$ I=x-\frac{1}{\sqrt {a (a+1)}}\arctan(\frac {\sqrt {(a+1)}\tan (x)}{\sqrt {a}})$$ 
I haven't put the limits as it would make the work messy. I hope you can continue from here. 
