1. ## Indefinite integral

The integral I am trying to solve is:

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

What should I start by doing?

2. Start by rewriting the integral as:

$\displaystyle \displaystyle I = \int\frac{x}{\sqrt{x^2+x+1}}\;{dx} = \int\frac{\frac{1}{2}(2x+1)+x-\frac{1}{2}(2x+1)}{\sqrt{x^2+x+1}}\;{dx}$

$\displaystyle \displaystyle \Rightarrow I = \int\frac{\frac{1}{2}(2x+1)}{\sqrt{x^2+x+1}}\;{dx} +\frac{1}{2}\int\frac{2x-(2x+1)}{\sqrt{x^2+x+1}}\;{dx}$

$\displaystyle \displaystyle \Rightarrow I = \underbrace{\int\frac{\frac{1}{2}(2x+1)}{\sqrt{x^2 +x+1}}\;{dx}}_{I_{1}}-\underbrace{\frac{1}{2}\int\frac{1}{\sqrt{x^2+x+1} }\;{dx}}_{I_{2}}$

We can see that $\displaystyle I_{1}$ is of the form $\displaystyle \int\frac{\frac{1}{2}f'(x)}{\sqrt{f(x)}}\;{dx} = \sqrt{f(x)}+C$
(or we can just let $\displaystyle u = \sqrt{x^2+x+1}$). Thus $\displaystyle I_{1} = \sqrt{x^2+x+1}+k_{1}$

For $\displaystyle I_{2}$ complete the square $\displaystyle x^2+x+1 = \left(x+\frac{1}{2}\right)^2+\frac{3}{4}.$
Then let $\displaystyle x+\frac{1}{2} = \frac{\sqrt{3}}{2}\sinh{\varphi}$, then $\displaystyle dx = \frac{\sqrt{3}}{2}\cosh{\varphi} \;{d\varphi}$.

$\displaystyle \displaystyle \therefore ~ I_{2} = \frac{1}{2}\int\frac{1}{\sqrt{x^2+x+1}}\;{dx} = \frac{1}{2}\int\frac{1}{\sqrt{\left(x+\frac{1}{2}\ right)^2+\frac{3}{4}}}\;{dx}$

$\displaystyle \displaystyle \Rightarrow ~ I_{2} = \frac{1}{2}\int\frac{\frac{\sqrt{3}}{2}\cosh{\varp hi}}{\sqrt{\left(\frac{\sqrt{3}}{2}\sinh{\varphi}\ right)^2+\frac{3}{4}}}\;{d\varphi} = \frac{1}{2}\int\frac{\frac{\sqrt{3}}{2}\cosh{\varp hi}}{\sqrt{\frac{3}{4}\sinh^2{\varphi}+\frac{3}{4} }}\;{d\varphi}$

$\displaystyle \displaystyle\Rightarrow ~ I_{2} = \frac{1}{2}\int\frac{\frac{\sqrt{3}}{2}\cosh{\varp hi}}{\sqrt{\frac{3}{4}\cosh^2{\varphi}}}\;{d\varph i} = \frac{1}{2}\int\frac{\frac{\sqrt{3}}{2}\cosh{\varp hi}}{\frac{\sqrt{3}}{2}\cosh{\varphi}}\;{d\varphi}$

$\displaystyle \displaystyle \Rightarrow ~ I_{2} = \frac{1}{2}\int\;{d\varphi} = \frac{1}{2}\varphi+k_{2} = \frac{1}{2}\sinh^{-1}\left(\frac{2x+1}{\sqrt{3}}\right)+k_{2}$

Therefore $\displaystyle \displaystyle I = I_{1}-I_{2} = \sqrt{x^2+x+1}-\frac{1}{2}\sinh^{-1}\left(\frac{2x+1}{\sqrt{3}}\right)+k$.

3. You solved the entire integral! Thanks!!