Evaluate the following $\int\sqrt{\frac{a+x}{a-x}}$

Toolbox:
• $1- \cos 2\theta=2 \sin ^2 \theta$
• $1+\cos 2 \theta=2 \cos ^2 \theta$
• $\int \cos ax dx=\large\frac{1}{a}$ $\sin ax+c$
Step 1:
Let $\large\int\sqrt{\frac{a+x}{a-x}}dx$
Put $x=a \cos 2 \theta$
differentiating with respect to $\theta$
$dx=a(-\sin 2 \theta).2.d\theta$
$=-2a \sin 2\theta d \theta$
on substituting for x and dx in I we get,
$I=\large\int\sqrt{\frac{a \cos 2 \theta+a}{a-a \cos 2 \theta}}$ $(-2a\sin 2 \theta)$
=$\large\int\sqrt{\frac{a (1+\cos 2 \theta)}{a(1- \cos 2 \theta)}}$ $(-2a\sin 2 \theta)$
But $1-\cos 2 \theta=2 \sin ^2 \theta$ and $1+\cos 2 \theta\; and\; 1+\cos 2 \theta=2 \cos ^2 \theta$
$I=\large\int\sqrt{\frac{2\cos ^2 \theta}{2 \sin ^2 \theta}}$ $(-2a\sin 2 \theta)$
But $\sin 2 \theta=2 \sin \theta \cos \theta$
$=\large\int \frac{\cos \theta}{\sin \theta}.$ $-4a \sin \theta \cos \theta$
$I=-4a \int \cos ^2 \theta d \theta$
$\cos ^2 \theta =\large\frac{1+\cos 2 \theta}{2}$
Therefore $I=\large\frac{-4a}{2}$ $\int (1+\cos 2 \theta) d\theta$
$I=-2a \bigg[ \int d\theta+\int \cos 2 \theta d \theta \bigg]$
Step 2:
On integrating we get
$I= -2a \bigg[\theta +\frac{1}{2} \sin 2 \theta \bigg]+c$
Since $x=a \cos 2 \theta => \cos 2 \theta =\large\frac{x}{a}$
Therefore $2\theta=\cos ^{-1}(\frac{x}{a})$ and $\sqrt {1-\frac{x^2}{a^2}}=\sin 2 \theta$
Therefore $I=-a \cos ^{-1}(x/a) -a \sqrt {1 -\frac{x^2}{a^2}}+c$
$-a \bigg[\cos ^{-1} (x/a)+\sqrt {1-\frac{x^2}{a^2}} \bigg]+c$