<s>[INST] 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.
 [/INST] 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.$$
</s>