# Help finding integral: $\int \frac{dx}{x\sqrt{1 + x + x^2}}$

Could someone help me with finding this integral

$$\int \frac{dx}{x\sqrt{1 + x + x^2}}$$

or give a hint on how to solve it.

-
Wolfram|Alpha will show you steps for the solution if you click on "Show Steps", but one might hope that there would be an easier way than what it shows... –  joriki Apr 9 '12 at 23:00
yep, I know but as you said I was hoping for a batter solution and seems like i got it :), thanks Américo Tavares –  Dave Apr 9 '12 at 23:14
Once again: "Solving" is the wrong word. One solves equations; one solves problems. One evaluates expressions. –  Michael Hardy Apr 10 '12 at 0:03
He's created a new problem in that he doesn't know how to evaluate this integral, and is asking for help in solving that. –  Waffle Sep 23 '14 at 2:40

Since the integrand is a quadratic irrational function of the type $R(x,\sqrt{1+x+x^{2}})$, you may use the Euler substitution $\sqrt{1+x+x^{2}}=x+t$. You get

$$\begin{eqnarray*} \int \frac{dx}{x\sqrt{1+x+x^{2}}} &=&\int \frac{2}{t^{2}-1}\,dt \\ &=&-2\operatorname{arctanh}t+C \\ &=&-2\operatorname{arctanh}\left( \sqrt{1+x+x^{2}}-x\right)+C. \end{eqnarray*}$$

-
I have just solved this on paper step by step, and I wonder shouldn't it be $ln\frac{x - a}{x + a}$ instead of arctg as it's (t^2 - 1) not plus 1 –  Dave Apr 9 '12 at 23:22
@Dave: You can rewrite the integral by using the identity $\operatorname{arctanh}t=\frac{1}{2}\ln \left( t+1\right) -\frac{1}{2}\ln \left( 1-t\right) .$ –  Américo Tavares Apr 9 '12 at 23:28

Make the substitution $x = \frac{1}{t}$ and this reduces to finding

$$\int \frac{\text{d}t}{\sqrt{t^2 + t + 1}}$$

which can easily be reduced to finding the standard integral:

$$\int \frac{\text{d}z}{\sqrt{z^2 + 1}} = \sinh^{-1}(z) + C$$

This substitution can be used for finding

$$\int \frac{\text{d}x}{x\sqrt{P(x)}}$$

where $P(x)$ is a quadratic polynomial in $x$.

-

$\displaystyle\int\frac{1}{x\sqrt{x^2+x+1}}dx=\int\frac{1}{x\sqrt{(x+\frac{1}{2})^2+\frac{3}{4}}}dx$.$\;\;$ Now let $x+\frac{1}{2}=\frac{\sqrt{3}}{2}\tan\theta$, $dx=\frac{\sqrt{3}}{2}\sec^{2}\theta d\theta$

to get $\displaystyle\int\frac{1}{(\frac{\sqrt{3}}{2}\tan\theta-\frac{1}{2})(\frac{\sqrt{3}}{2}\sec\theta)}\frac{\sqrt{3}}{2}\sec^{2}\theta d\theta=\int\frac{\sec\theta}{\frac{\sqrt{3}}{2}\tan\theta-\frac{1}{2}}d\theta=\int\frac{1}{\frac{\sqrt{3}}{2}\sin\theta-\frac{1}{2}\cos\theta}d\theta$

$\;\;=\displaystyle\int\frac{1}{-\cos(\theta+\frac{\pi}{3})}d\theta=-\int\sec\big(\theta+\frac{\pi}{3}\big)d\theta=-\ln\left|\sec\big(\theta+\frac{\pi}{3}\big)+\tan\big(\theta+\frac{\pi}{3}\big)\right|+C$

$\;\;=-\displaystyle\ln\left|\frac{-2\sqrt{x^2+x+1}}{\sqrt{3}x}-\frac{x+2}{\sqrt{3}x}\right|+C=-\ln\left|\frac{2\sqrt{x^2+x+1}+x+2}{\sqrt{3}x}\right|+C$

$\;\;\displaystyle=\ln\left|\frac{\sqrt{3}x}{2\sqrt{x^2+x+1}+x+2}\right|+C=\ln|x|-\ln\left(2\sqrt{x^2+x+1}+x+2\right)+C$

-

Yes. The substitution $x = \frac{1}{t}$ works. But check for the minus sign.

It does reduce to integral of $\frac{-dt}{\sqrt{t^2+t+1}}$, which can be reduced further to integral of $\frac{-dz}{z^2 + \frac{\sqrt3}{2}}$

Regards, Prakash

-