<s>[INST] Evaluation of $\int_{0}^{1} \frac{1}{x+\sqrt{1-x^2}} \space dx$ Evaluate
$$\int_{0}^{1} \frac{1}{x+\sqrt{1-x^2}} \space dx$$
My main concern is finding the indefinite integral as once i have that the rest is fairly straight forward. Please give a detailed answer with reference to why you made each substitution (what indicated that said substitution would work etc.)
My initial substitution was $x= \sin \theta$ which tidies it up a bit
$$\int_{0}^{\frac{\pi}{2}} \frac{\cos x}{\sin x + \cos x} \space dx$$
Also the answer from Wolfram Alpha is;
$$ = \frac{1}{4}\bigg( log(1-2 x^2)+2 \tanh^{-1}\bigg(\frac{x}{\sqrt{1-x^2}}\bigg)+2 \sin^{-1}x\bigg)+constant$$
I need to be able to answer questions like this in under 15 mins so any help is appreciated
 [/INST] Since no one used it, let me consider the case of the antiderivative $$I=\int\frac{\cos x}{\sin x + \cos x} \space dx$$ Now, use the tangent half-angle substitution (Weierstrass substitution) $t=\tan(\frac x 2)$.
We so obtain $$I=\int \frac{2 \left(t^2-1\right)}{t^4-2 t^3-2 t-1}\space dt$$ But $$t^4-2 t^3-2 t-1=(t^2+1)(t-r_1)(t-r_2)\qquad r_{1,2}=1\pm \sqrt 2$$ Using partial fraction decomposition, we have $$\frac{2 \left(t^2-1\right)}{t^4-2 t^3-2 t-1}=\frac{1-t}{t^2+1}+\frac{1}{2 t-2 \sqrt{2}-2}+\frac{1}{2 t+2 \sqrt{2}-2}$$ that is to say $$\frac{2 \left(t^2-1\right)}{t^4-2 t^3-2 t-1}=\frac{1}{1+t^2}-\frac{2t}{1+t^2}+\frac{1}{2 t-2 \sqrt{2}-2}+\frac{1}{2 t+2 \sqrt{2}-2}$$ and each term is easy to integrate. After simplifications, this leads to $$I=\tan ^{-1}(t)+\frac{1}{2} \log \left(\frac{-t^2+2 t+1}{t^2+1}\right)$$ Now, if integration is from $t=0$ to $t=1$, the logarithms disappear and youare just let with $\tan ^{-1}(1)=\frac \pi 4$.
</s>