<s>[INST] How to integrate $ \int^a_0{\cfrac{dx}{x \ + \ \sqrt{a^2 \ - \ x^2}}} $? I am having a little problem with my maths homework. The problem is as follows:
\begin{equation}
  \int^a_0{\cfrac{dx}{x \ + \ \sqrt{a^2 \ - \ x^2}}}
\end{equation}
I tried to do the following but got stuck halfway:
Let $\ \ x \ = asin\theta, \ hence, \  dx = acos\theta \ d\theta $
$
\int^a_0{\cfrac{dx}{x \ + \ \sqrt{a^2 \ - \ x^2}}}
$


$
= \int^\frac{\pi}{2}_0{\cfrac{acos\theta}{asin\theta \ + \ \sqrt{a^2 \ - \ a^2sin^2\theta}}}\ d\theta
$ 


$
= a \cdot \int^\frac{\pi}{2}_0{\cfrac{(cos\theta \ + \ sin\theta) \ + \ (cos\theta \ - \ sin\theta) - \ cos\theta}{asin\theta \ + \ \sqrt{a^2cos^2\theta}}}\ d\theta
$


$
= a \cdot \int^\frac{\pi}{2}_0{\cfrac{(cos\theta \ + \ sin\theta) \ + \ (cos\theta \ - \ sin\theta) - \ cos\theta}{asin\theta \ + \ acos\theta }}\ d\theta
$


$
= \int^\frac{\pi}{2}_0{\cfrac{(cos\theta \ + \ sin\theta) \ + \ (cos\theta \ - \ sin\theta) - \ cos\theta}{sin\theta \ + \ cos\theta }}\ d\theta \\ \\
$


$
= \int^\frac{\pi}{2}_0{\left(1 \ + \ \cfrac{(cos\theta \ - \ sin\theta)}{sin\theta \ + \ cos\theta } - \cfrac{cos\theta}{sin\theta \ + \ cos\theta}\right)}\ d\theta
$

Could someone please advise me how to solve this problem?
 [/INST] Try Euler substitutions. The second one might do the job.
</s>