# Evaluate $\int \frac{dx}{\sqrt{\frac{1}{x}-\frac{1}{a}}}$

Evaluate the following integral: $$\displaystyle \int\dfrac{dx}{\sqrt{\dfrac{1}{x}-\dfrac{1}{a}}}$$ Where $$a$$ is an arbitrary constant.

How do I solve this?

EDIT: I would appreciate it if you do consider the case when $$a<0$$, but this is an integral that I encountered in a physics problem. Considering $$a>0$$ will suffice.

I tried the substitution $$x=a\cos \theta$$

And I ended up with:

$$\displaystyle a^{3/2}\int\dfrac{\sqrt {\cos\theta}.\sin\theta.d\theta}{\sqrt{1-\cos\theta}}$$

How do I simplify this further?

Instead, we first simply $$\displaystyle \frac{1}{\sqrt{\frac{1}{x} - \frac{1}{a}}}$$ by writing the two fractions on the denominator as a single fraction, and then flipping the fraction, to obtain $$\displaystyle \frac{\sqrt {ax}}{\sqrt {a-x}}$$ (assuming $$a>0$$). From here, making the substitution $$x=a \sin^2 \theta$$ yields $$\int \frac{a \sin \theta}{\sqrt a \cos \theta} 2a \sin \theta \cos \theta d\theta = \int 2a^{\frac{3}{2}} \sin^2 \theta d \theta$$ which can now be easily solved.
For $$a<0$$, simply let $$b=-a$$. We will obtain $$\displaystyle \frac{\sqrt b}{\sqrt {b+x}}$$ in the integrand, from which the substitution $$x=b \tan^2 \theta$$ will work.
• What happen if $a<0?$ – lab bhattacharjee May 23 '19 at 7:02
• @labbhattacharjee If a is negative, we can replace the subtraction with addition and let $b=-a$, and now use $x=b \tan^2 \theta$. – auscrypt May 23 '19 at 7:04
It can be rewritten (for $$0) as $$\int \frac{dx}{\sqrt{\frac{1}{x}-\frac{1}{a}}} = \int \frac{\sqrt{ax}dx}{\sqrt{a-x}}$$ We can use substitution $$x = a\sin^2\theta$$, $$0<\theta<\frac{\pi}{2}$$ to get $$\int \frac{\sqrt{ax}dx}{\sqrt{a-x}} = 2a^\frac32 \int \frac{\sqrt{\sin^2\theta}\sin\theta\cos\theta \,d\theta}{\sqrt{1-\sin^2\theta}} = 2a^\frac32\int \sin^2\theta\, d\theta$$ For $$x we use subsstitution $$x=a\cosh^2t$$, $$t>0$$ and we get $$\int \frac{dx}{\sqrt{\frac{1}{x}-\frac{1}{a}}} = \int \frac{\sqrt{(-a)(-x)}dx}{\sqrt{(-x)-(-a)}} = -2(-a)^\frac32\int \cosh^2t\, dt$$ Finally, for $$a<0 we use $$x=-a\sinh^2t$$, $$t>0$$ to get $$\int \frac{dx}{\sqrt{\frac{1}{x}-\frac{1}{a}}} = \int \frac{\sqrt{(-a)x}dx}{\sqrt{x+(-a)}} = 2(-a)^\frac32\int \sinh^2 t\, dt$$