Calculate simple integral undefined I'm not being able to calculate $ \large{\int{\sqrt{\frac{x}{a-x}}} dx} $ , someone could help me? I tryed to use integration by parts, but i achieved $0 = 0$.  
Thanks in advance.
 A: First to make life a little bit easier on yourself, set $x = ay$ to turn your integral into
$$\int \sqrt{\frac{ay}{a-ay}} a\,dy = a\int\sqrt{\frac{y}{1-y}}\,dy.$$
Let's make the substitution $y = \cos^2(t)$. Then $dy = -2\sin(t)\cos(t)dt$ which gives
$$a\int \sqrt{\frac{\cos^2(t)}{1-\cos^2(t)}}(-2\sin(t)\cos(t))dt = -2a\int \sqrt{\frac{\cos^2(t)}{\sin^2(t)}}\sin(t)\cos(t)dt.$$
This integral is pretty manageable at this point. Can you take it from here?
A: You could also substitute $u=\sqrt{\frac{x}{a-x}}$, $\;x=\frac{au^2}{1+u^2}$ and $dx=\frac{2au}{(1+u^2)^2}du$ to get $\int\frac{2au^2}{(1+u^2)^2}du$.
Then letting $u=\tan\theta$, $du=\sec^{2}\theta \;d\theta$ gives 
$2a\int\sin^{2}\theta\; d\theta = a[\theta-\sin\theta\cos\theta]+C=a[\tan^{-1}u-\frac{u}{1+u^2}]+c$, and then substitute back for u.
A: Let $\displaystyle u^2=\frac{x}{a-x}$. Then $x=\displaystyle\frac{au^2}{1+u^2}$ and so $\displaystyle du=\frac{2au\, du}{(1+u^2)^2}$. Then,
$$\int \sqrt{\frac{x}{a-x}}dx = \int \sqrt{u^2}\frac{2au}{(1+u^2)^2}du=\int \frac{2au^2\, du}{(1+u^2)^2}. $$
Now, let $u=\tan t$ and $\displaystyle\cos t=\frac{1}{\sqrt{1+u^2}}$. Then $du=\sec^2 t\,dt$ and we have
$$ \int \sqrt{\frac{x}{a-x}}dx =\int \frac{2au^2\, du}{(1+u^2)^2}=\int \frac{2a\tan^2 t\sec^2 t\, dt}{(\sec^2t)^2}=2a\int \frac{\tan^2t}{\sec^2t}dt=$$
$$=2a\int \frac{\sin^2t}{\cos^2t}\cdot \cos^2t\, dt=2a\int \sin^2t dt=2a\int \frac{1-\cos 2t}{2}dt= $$
$$=a\int dt-a\int \cos 2t \, dt = at-a\frac{1}{2}\sin 2t +c= $$
$$=at-a\sin t\cdot \cos t +c = a\arctan u-a\frac{u}{\sqrt{1+u^2}}\cdot \frac{1}{\sqrt{1+u^2}}+c= $$
$$= a\arctan u -\frac{au}{1+u^2}+c =$$
$$=a\arctan\sqrt{\frac{x}{a-x}}-\frac{\sqrt{\frac{x}{a-x}}}{1+\frac{x}{a-x}} +c.$$
A: Integrals of roots (of any order) of a linear function can be integrated by substitution, in this case of 
$$y^2=\frac{x}{a-x}$$
solving for $x$ we get $$x=\frac{ay^2}{y^2+1}$$ so
$$dx=\frac{2ay}{(y^2+1)^2}dy$$
substituting this gives,
$$\int\sqrt{\frac{x}{a-x}}dx=\int \frac{2ay^2}{(y^2+1)^2}dy$$
which is a rational function and can be integrated by partial fractions.
In this case
$$\int \frac{y^2}{(y^2+1)^2}dy=\int \frac{1}{y^2+1}dy-\int \frac{1}{(y^2+1)^2}dy$$
$$\int \frac{1}{y^2+1}dy=\arctan(y)$$ is easy but the other integral is harder and can be done in several ways including trig substitution, but can also be done directly by parts
\begin{equation*}
\begin{split}
\int \frac{1}{y^2+1}dy&=\frac{y}{y^2+1}-\int \frac{2y^2}{(y^2+1)^2}dy\\
&=\frac{y}{y^2+1}-2\int \frac{1}{y^2+1}dy  +2\int \frac{1}{(y^2+1)^2}dy\\
\end{split}
\end{equation*}
So
\begin{equation*}
\begin{split}
2\int \frac{1}{(y^2+1)^2}dy&=3\int \frac{1}{y^2+1}dy  -\frac{y}{y^2+1}\\
&=3\int \arctan(y)  -\frac{y}{y^2+1}\\
\end{split}
\end{equation*}
And we have 
$$\int \frac{y^2}{(y^2+1)^2}dy= -\frac{1}{2}\int \arctan(y)  +\frac{1}{2}\frac{y}{y^2+1}$$
Then assuming I have not made any mistakes, (which is unlikely) you should be able to show it is equal to the Wolfram answer.
