# Integral - using Euler Substitution

I've been trying to solve one simple Integral with Euler substitution several times, but can't find where I'm going wrong. The integral is (+ the answer given here, too):

$$\int\frac{1}{x\sqrt{x^2+x+1}} dx=\log(x)-\log(2\sqrt{x^2+x+1}+x+2)+\text{ constant}$$

The problem is, I cannot get this result. Below is my solution of the problem. I've checked it many times, must be something very obvious that I'm missing:

Euler Substituion

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

Let $\sqrt{x^2+x+1}=t-x$.

$x^2+x+1=t^2-2xt+x^2$

$x(1+2t)=t^2-1\implies x=\dfrac{t^2-1}{1+2t}$

$dx=\left(\dfrac{t^2-1}{1+2t}\right)'dt=\dfrac{2t(1+2t)-(t^2-1)2}{(1+2t)^2}=\dfrac{2t+4t^2-2t^2+2}{(1+2t)^2}=\dfrac{2(t^2+t+1)}{(1+2t)^2}$

$\sqrt{x^2+x+1}=t-x=t-\dfrac{t^2-1}{1+2t}=\dfrac{t^2+t+1}{1+2t}$

$\implies\displaystyle\int\frac{dx}{x\sqrt{x^2+x+1}}=2\int\frac{\frac{t^2+t+1}{(1+2t)^2}\;dt}{\frac{t^2-1}{1+2t}\cdot\frac{t^2+t+1}{1+2t}}=2\int \frac{1}{t^2-1}\,dt$

$\dfrac{1}{t^2-1}=\dfrac{1}{(t+1)(t-1)}=\dfrac{A}{t+1}+\dfrac{B}{t-1}\implies \begin{eqnarray}&&At-A+Bt+B=1\\&&A+B=0\implies A=-B\\ &&B-A=1\implies B=\frac{1}{2},A=-\frac{1}{2}\end{eqnarray}$

$\implies \displaystyle 2\int \frac{1}{2}\frac{1}{2t-1}\,dt-2\int\frac{1}{2}\frac{1}{t+1}\,dt=\int\frac{1}{t-1}\,dt-\int\frac{1}{t+1}\,dt=$

$=\ln|t-1|-\ln|t+1|=\ln\left|\dfrac{t-1}{t+1}\right|$

$t-x=\sqrt{x^2+x+1}\implies t=\sqrt{x^2+x+1}+x$

$\implies \ln\left|\dfrac{t-1}{t+1}\right|=\ln\left|\dfrac{\sqrt{x^2+x+1}+x-1}{\sqrt{x^2+x+1}+x+1}\right|$

I'll appreciate any help.

-
I've typed your scanned document in LaTeX to ensure readability, but I may have inadvertently introduced changes from the original. If so, I apologize, and feel free to change any errors I made (or anything else for that matter). – Zev Chonoles Jun 24 '12 at 18:43
See here and here for how to format your mathematics expressions with LaTeX, and see here for how to use Markdown formatting. If you need to format more advanced math, there are many excellent LaTeX references on the internet, including Stack Exchange's own TeX.SE site. If you see a piece of LaTeX you want to know the code for on the site, you can right click on it, go to "Show Math As", then choose "TeX Commands". – Zev Chonoles Jun 24 '12 at 18:44
Hi Zev, thanks for the tip. I'll definitely use LaTeX next time. – cypressx Jun 24 '12 at 19:40

What you have done is correct. All you need to do is to rewrite it a different form. \begin{align} \ln \left( \sqrt{x^2+x+1} + x - 1\right) & = \ln \left( \dfrac{\left(\sqrt{x^2+x+1} + x - 1 \right) \left(\sqrt{x^2+x+1} - x + 1 \right)}{\left(\sqrt{x^2+x+1} - x + 1 \right)}\right)\\ & = \ln \left(\left(x^2 + x + 1 - (x^2 - 2x + 1) \right) \right) - \ln \left(\sqrt{x^2+x+1} - x + 1 \right)\\ &= \ln(x) - \ln \left(\sqrt{x^2+x+1} - x + 1 \right) \end{align} Hence, \begin{align} \ln \left( \dfrac{\sqrt{x^2+x+1} + x - 1}{\sqrt{x^2+x+1} + x + 1}\right) & = \ln \left( \sqrt{x^2+x+1} + x - 1\right) - \ln \left(\sqrt{x^2+x+1} + x + 1 \right)\\ & = \ln(x) - \ln \left(\sqrt{x^2+x+1} - x + 1 \right) -\ln \left(\sqrt{x^2+x+1} + x + 1 \right)\\ & = \ln(x) - \left(\ln \left(\sqrt{x^2+x+1} - x + 1 \right) +\ln \left(\sqrt{x^2+x+1} + x + 1 \right) \right)\\ & = \ln(x) - \ln \left( \left(\sqrt{x^2+x+1}+1 \right)^2 - x^2\right)\\ & = \ln(x) - \ln \left( x^2 + x + 1 + 1 +2 \sqrt{x^2+x+1} - x^2\right)\\ & = \ln(x) - \ln \left( 2 \sqrt{x^2+x+1} + x + 2\right) \end{align}

-
Thanks! I'm wondering, when I have to rewrite the answers - i.e. how do you know the rewriting is enough and the answer is in it's best form. – cypressx Jun 24 '12 at 19:46
@cypressx There is no best form. Your answer is equally "best" as wolframalpha. – user17762 Jun 24 '12 at 19:51

Looks about right. In your expression, multiply top and bottom of the thing inside the log by $\sqrt{x^2+x+1}-(x-1)$.

-

You may use substitution x=1/t, or Euler substitution \sqrt{x^2+x+1}=tx-1

-