# Evaluate $\int \frac{dx}{\left(\frac{1}{x}-\frac{1}{a}\right)}$

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

How do I solve this?

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

But that got me here (i.e. no where): $$\displaystyle a^{3/2}\int\dfrac{-\sqrt {\cos\theta}.\sin\theta.d\theta}{\sqrt{1-\cos\theta}}$$

How do I simplify this further?

• @ThomasShelby I edited and removed my working because I realized I asked the wrong question, and the working provided is for the question I was supposed to ask, which I have done here. I forgot the square root sign in the denominator, and by the time I realized this there already were 3 answers on my post. So should I still let my working remain? If I could, I would have deleted the question by now, which I can't do anymore. – ExtremeRaider May 23 at 11:16
• Alright then, I did not think about that. – ExtremeRaider May 23 at 11:21

$$\int\dfrac{dx}{\left(\dfrac{1}{x}-\dfrac{1}{a}\right)}=\int\dfrac{ax\,dx}{a-x}.$$ Note that $$\dfrac{ax}{a-x}=\dfrac{(-a)(a-x+a)}{a-x}$$
Use: $$\frac 1 {\frac 1 x -\frac 1 a} =\frac {a^{2}} { a-x} -a$$.
Note that the integrand is a rational function which can be easily split: $$\dfrac{1}{\left(\dfrac{1}{x}-\dfrac{1}{a}\right)}= -\frac{ax}{x-a}=-\frac{a(x-a+a)}{x-a}=-a-\frac{a^2}{x-a}.$$ Can you take it from here?