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?
 A: $$I=\int^a_0{\cfrac{dx}{x \ + \ \sqrt{a^2 \ - \ x^2}}}$$
Let $x^2+y^2=a^2\implies dx=-\frac{y}{\sqrt{a^2-y^2}}dy$
Thus:
$$I=\int^a_0{\cfrac{dy}{y \ + \ \sqrt{a^2 \ - \ y^2}}}\frac{y}{\sqrt{a^2-y^2}}$$
Adding these together,
$$2I=\int^a_0{\cfrac{dx}{x \ + \ \sqrt{a^2 \ - \ x^2}}}\left(1+\frac{x}{\sqrt{a^2-x^2}}\right)=\int_0^a\frac{dx}{\sqrt{a^2-x^2}}=\sin^{-1}\left(\frac{x}{a}\right)\vert_0^a=\frac{\pi}{2}$$
Thus, $I=\frac{\pi}{4}$.
A: Assuming $a>0$ and applying the substitutions $x=az$, $z=\sin\theta$:
$$ I(a)=\int_{0}^{a}\frac{dx}{x+\sqrt{a^2-x^2}}=\int_{0}^{1}\frac{dz}{z+\sqrt{1-z^2}}=\int_{0}^{\pi/2}\frac{\cos\theta}{\sin\theta+\cos\theta}\,d\theta $$
but due to the substitution $\theta=\frac{\pi}{2}-\varphi$ we also have $I(a)=\int_{0}^{\pi/2}\frac{\sin\theta}{\sin\theta+\cos\theta}\,d\theta$, hence:
$$ 2\cdot I(a) = \int_{0}^{\pi/2}\frac{\sin\theta+\cos\theta}{\sin\theta+\cos\theta}\,d\theta = \frac{\pi}{2}$$
and $\boxed{I(a)=\color{red}{\large\frac{\pi}{4}}}$ holds by symmetry.
A: Try Euler substitutions. The second one might do the job.
