This comes from a physics problem. For $r\le R$, consider $$t=\sqrt{\frac{R}{2c}} \int_r^R \sqrt{\frac{x}{R-x}} dx$$
The indefinite integral is (by the Wolfram Alpha): $$\frac{\sqrt{-\frac{x}{x-R}}(\sqrt{x}(x-R)+R\sqrt{R-x}\tan^{-1}{\frac{\sqrt{r}}{\sqrt{R-x}}}}{\sqrt{x}}$$ But it did not show the steps. How could I get the indefinite integral?
It's not a homework. I could finish the problem without knowing the method, but I'd like to know how to do this.

HINT...try substituting $$x=R\cos^2\theta$$