Evaluate the integral $\int_{-1}^1 \frac{1}{(2-x)\sqrt{1-x^2}}\,dx$ I started with the substitution $x=\sin(\theta)$ with $\theta\in(-\frac{\pi}{2},\frac{\pi}{2})$
And I got the integral $$\int_{-\pi/2}^{\pi/2} \frac{1}{2-\sin(\theta)}\,d\theta$$
which I am again not able to evaluate.
Even integration by parts is not working.
 A: Try using the substitution $\displaystyle t = \tan \frac{\theta}{2}$, this is a handy substitution to make when there are trigonometric functions that you cannot simplify very easily. In our case we have that,
$$\frac{\mathrm{d}t}{\mathrm{d}\theta} = \frac{1}{2} \sec^2\frac{\theta}{2} = \frac{1}{2} \left(1 + \tan^2 \frac{\theta}{2} \right) = \frac{1}{2}(1 + t^2) \Rightarrow \frac{2\mathrm{d}t}{1+t^2} = \mathrm{d}\theta  $$
The usefulness of this substitution is that we can now use properties of a right angled triangle that has angle $\theta /2$ to say that,
$$\sin \theta = 2\sin \frac{\theta}{2} \cos \frac{\theta}{2} = 2 \frac{1}{\sqrt{1+t^2}} \frac{t}{\sqrt{1+t^2}}= \frac{2t}{1+t^2} $$
Putting this into our integral we have,
$$\int_{-\pi/2}^{\pi/2} \frac{\mathrm{d}\theta}{2 - \sin \theta} = \int_{-1}^1 \frac{2}{1+t^2} \cdot \frac{1}{2  - \frac{2t}{1+t^2}} \ \mathrm{d}t = \int_{-1}^1 \frac{1}{t^2 - t+ 1} \ \mathrm{d}t $$
Now we have no more square roots, we have an irreducible quadratic at the bottom so we can complete the square to obtain,
$$\int_{-1}^1 \frac{1}{t^2 - t + 1} \ \mathrm{d} t = \int_{-1}^1 \frac{1}{(t - \frac{1}{2})^2 + \frac{3}{4}} \ \mathrm{d}t = \frac{2}{\sqrt{3}} \tan^{-1} \left(\frac{2}{\sqrt{3}}\left(t - \frac{1}{2}\right) \right) \Big|_{-1}^1 = \frac{\pi}{\sqrt{3}} $$
A: It is an integral of form $\displaystyle\int \dfrac1{L \sqrt{Q}}$, where L is a linear and Q is a quadratic. You could solve such integrals fairly easily with $L = 1/t$. Using this on your integral gives $\displaystyle \int \dfrac{1}{\sqrt{\frac13 - (t\sqrt 3 - \frac2{\sqrt{3}})^2}} dt$. 
Not very appealing here but can be useful for other integrals of this type.
A: Here is a slightly different approach.
Let 
$$I = \int_{-1}^1 \frac{dx}{(2 - x) \sqrt{1 - x^2}} \qquad (1)$$
Enforcing a substitution of $x \mapsto - x$ gives
$$I = \int_{-1}^1 \frac{dx}{(2 + x) \sqrt{1 - x^2}} \qquad (2)$$
Adding (1) to (2) one obtains
$$I = 2 \int_{-1}^1 \frac{dx}{(4 - x^2) \sqrt{1 - x^2}} = 4 \int_0^1 \frac{dx}{(4 - x^2) \sqrt{1 - x^2}},$$
since the integrand is even between symmetric limits. 
Now set $x = \sin \theta$. As $dx = \cos \theta \, d\theta$, doing so yields
$$I = 4 \int_0^{\pi/2} \frac{d\theta}{4 - \sin^2 \theta}.$$
Taking advantage of the identity $\sin^2 \theta + \cos^2 \theta = 1$, the dominator in the above integral can be rewritten as
$$I = 4 \int_0^{\pi/2} \frac{d\theta}{3 \sin^2 \theta + 4 \cos^2 \theta} = 4 \int_0^{\pi/2} \frac{\sec^2 \theta}{3 \tan^2 \theta + 4} \, d\theta.$$
Setting $u = \tan \theta, du = \sec^2 \theta \, d\theta$ one has
\begin{align}
I &= 4 \int_0^\infty \frac{du}{3u^2 + 4}\\
&= \frac{4}{3} \int_0^\infty \frac{du}{u^2 + \left (\frac{2}{\sqrt{3}} \right )^2}\\
&= \frac{4}{3} \left [\frac{\sqrt{3}}{2} \tan^{-1} \left (\frac{u \sqrt{3}}{2} \right ) \right ]_0^\infty\\
&= \frac{\pi}{\sqrt{3}}.
\end{align} 
A: Here's a cool generalization consider the integral 
$$J=I(x_1,x_2;a,b)=\int_{x_1}^{x_2}\frac{dx}{a+b\sin x}$$
We may preform a tangent-half-angle substitution:
$$t=\tan(x/2)\Rightarrow dx=\frac{2dt}{1+t^2}\\\Rightarrow \sin x=\frac{2t}{1+t^2}$$
Thus 
$$J=2\int_{t_1}^{t_2}\frac{1}{a+2b\frac{t}{1+t^2}}\frac{dt}{1+t^2}$$
Where $t_1=\tan(x_1/2)$ and $t_2=\tan(x_2/2)$. Anyway after a little algebra,
$$J=2\int_{t_1}^{t_2}\frac{dt}{at^2+2bt+a}$$
Then we complete the square in the denominator:
$$J=2\int_{t_1}^{t_2}\frac{dt}{a(t+\frac{b}a)^2+a-\frac{b^2}a}$$
then setting $g=a-\frac{b^2}a$ and preforming the substitution 
$$t+\frac{b}a=\sqrt{\frac{g}a}\tan u\Rightarrow dt=\sqrt{\frac{g}a}\sec^2u\, du$$
we see that 
$$J=2\sqrt{\frac{g}a}\int_{u_1}^{u_2}\frac{\sec^2u}{g\tan^2u+g}du$$
Where $u_1=\arctan\bigg[\sqrt{\frac{a}g}\bigg(t_1+\frac{a}b\bigg)\bigg]$ and $u_2=\arctan\bigg[\sqrt{\frac{a}g}\bigg(t_2+\frac{a}b\bigg)\bigg]$. After we note that $\frac{\sec^2u}{g\tan^2u+g}=\frac1g$, we see that 
$$J=\frac2{\sqrt{ag}}(u_2-u_1)$$
And after a bunch of algebra
$$I(x_1,x_2;a,b)=\frac1{\sqrt{a^2-b^2}}\bigg[\arctan\frac{a\tan(x_2/2)+b}{\sqrt{a^2-b^2}}-\arctan\frac{a\tan(x_1/2)+b}{\sqrt{a^2-b^2}}\bigg]$$
Which works as long as $a^2>b^2$.
