# what is $\int{\sqrt{\frac{x}{x-c}}} dx$

Tried all methods I knew, but couldn't get to a solution:

$$\int{\sqrt{\frac{x}{x-c}}} dx$$

where $c$ is a constant.

Since I myself wasn't able to solve it, I tried using online integral calculators. One answer i got was

$$\int{\sqrt{\frac{x}{x-c}}} dx =\frac{\sqrt{x/(-c + x)}\cdot(\sqrt{x}(-c + x) + c\cdot\sqrt{-c + x}\cdot\log{(2(\sqrt{x} + \sqrt{-c + x}))})}{\sqrt{x}} + C$$

Is this correct? I tried another calculator, and that gave me a slightly different result.

• Another method besides the one in 8 pi r's answer is to use $x = c\cosh\theta$. – M. Vinay Jun 6 '14 at 7:10
• Under the assumption that $\sqrt{x/(x-c)} \ge 0$ (which is valid if the integrand is intended to be a real-valued function), the antiderivative simplifies to $$\sqrt{x} \sqrt{x-c}+c \log \left(\sqrt{x-c}+\sqrt{x}\right) + C.$$ – heropup Jun 6 '14 at 7:22
• @M.Vinay That should be $x = c\cosh^2\theta$. – M. Vinay Jun 6 '14 at 8:01

Let $x=c\cosh^2y\;\Rightarrow\;dx=2c\cosh y\sinh y\ dy$, then \eqalign { \int\sqrt{\frac{x}{x-c}}\ dx&\stackrel{\color{red}{(1)}}=2c\int\cosh^2y\ dy\\ &=2c\int\frac{1+\cosh2y}{2}\ dy\\ &=c\left(y+\frac12\sinh 2y\right)+K_1\\ &\stackrel{\color{red}{(2)}}=c\left(\text{arccosh}\ \sqrt{\frac xc}+\sinh y\cosh y\right)+K_1\\ &=c\ln\left(\sqrt{\frac xc}+\sqrt{\frac{x-c}{c}}\right)+c\sqrt{\frac{x-c}{c}}\cdot\sqrt{\frac{x}{c}}+K_1\\ &\stackrel{\color{red}{(3)}}=c\ln\left(\sqrt x+\sqrt{x-c}\right)-\frac c2\ln c+\sqrt{x(x-c)}+K_1\\ &\stackrel{\color{red}{(4)}}=\color{blue}{c\ln\left(\sqrt x+\sqrt{x-c}\right)+\sqrt{x(x-c)}+K_2}. } The final result is equal to output of Wolfram Alpha.

Notes:

$\color{red}{(1)}\ \ \cosh^2y-\sinh^2y=1$

$\color{red}{(2)}\ \ \text{arccosh}\ x=\ln\left(x+\sqrt{x^2-1}\right)\quad;\quad x\ge1$

$\color{red}{(3)}\ \ \ln\dfrac ab=\ln a-\ln b\ \text{and}\ \ln a^b=b\ln a$

$\color{red}{(4)}\ \ K_2=K_1-\dfrac c2\ln c$

Let $u^2 = \dfrac{x}{x-c} \to x = u^2(x-c) = u^2x - u^2c \to u^2c = (u^2-1)x \to x = \dfrac{u^2c}{u^2-1} = c + \dfrac{c}{u^2 -1}$. Thus: $dx = \dfrac{-2cu}{(u^2-1)^2}du$, and we have:

$I = -2c\displaystyle \int \dfrac{u^2}{(u^2-1)^2}du$, and you can use fraction decomposition to continue.

If you change variable as $x=c \cosh^2(t)$,$$\int{\sqrt{\frac{x}{x-c}}} dx=2 c\int\cosh ^2(t) dt=c\int\Big(1+\cosh(2t)\Big)dt=c \Big(t+\frac{1}{2} \sinh (2t)\Big)$$

• I cannot change the variable. x is a physical quantity. – The Light Spark Jun 6 '14 at 7:32
• @TheLightSpark, WHAT??????????????????? – Martín-Blas Pérez Pinilla Jun 6 '14 at 8:42

Assume $$x=c\sec^2\theta$$ then, $$dx=2c\,\sec^2 \theta\,\tan \theta\,d\theta$$ Substituting these we get, $$\int \sqrt{\dfrac {c\sec^2 \theta} {c\tan^2 \theta}}\;2\,c \sec^2 \theta\,\tan\theta \,d\theta$$ $$2\,c\int sec^3\theta\,d\theta$$ Using integration by parts by considering $\sec\theta$ as the first function and $sec^2\theta$ as the second function, we get $$2\,c\int \sec^3 \theta \, d \theta = c\sec \theta \tan \theta + c\ln|\sec \theta + \tan \theta| + C$$ Replace $\sec \theta$ with $\sqrt{\frac xc}$ and $\tan \theta$ with $\sqrt{\frac xc-1}$

$$\sqrt{x} \sqrt{x-c}+c \log \left(\sqrt{x-c}+\sqrt{x}\right)+C_1$$