Solve $\int (4x+2)\sqrt{x^2+x+1}\,dx$ Trying to solve this for a while now, so far I was able to come up without a proper answer.
Problem : $\displaystyle \int (4x+2)\sqrt{x^2+x+1}\,dx$. 
I tried to take two common from $(4x+2)$ and also to take $(x+1)^2 - x$ from the root, but wasn't able to come up with something to take for substitution. A hint in the right direction would be highly appreciated
Edit :
I forgot to mention this. As this is part of the integration by substitution exercise it'd be highly appreciated if you could provide the hint in that direction.
 A: Hint :
Are you asking
$$
\int (4x+2)\sqrt{x^2+x+1}\ dx = \ldots?
$$
If so, let $u=x^2+x+1\ \Rightarrow\ du=2x+1$.
A: I'm extremely new to integration and my methods are sloppy but I'd like to try out this question. The following isn't an answer but a demonstration that any substitution can do the job as long as it is done right (Although, a fundamental zen of calculus dictates that the rightest way is the fastest way, I think any path is better than no path)
I'm going to try my luck with $u = 4x+2 \implies \frac{du}{dx} = 4 \implies dx= \frac{1}{4} du$
Also, by the above assumption, $x = \frac{u-2}{4}$ 
$$
\require{cancel}
\begin{align}
&\int (4x+2)\sqrt{x^2+x+1}\,dx \\
&= \int{u\cdot\sqrt{\left(\frac{u-2}{4}\right)^2 + \frac{u-2}{4}+ 1}}\cdot\frac{1}{4} du\\
&= \frac{1}{4} \int{u}\cdot\sqrt{\frac{u^2 - 4u + 4 +4(u-2) + 4^2}{4^2}}\, du\\
&= \frac{1}{4} \int{ u \cdot \frac{1}{4}\cdot \sqrt{u^2 \cancel{- 4u} + 4 \cancel{+ 4u} - 8 +16}}\, du\\
&=\frac{1}{16} \int{u\cdot\sqrt{u^2 + 12}}\, du
\end{align}
$$
Mhh, we need to substitute again inorder to proceed. Let's continue this with
$$v =\sqrt{ u^2 + 12 } 
\implies \frac{dv}{du} = \frac{2u}{2\sqrt{u^2 + 12}} = \frac{u}{v}
\implies du = \frac{v}{u}\, dv$$
Continuing,
$$
\begin{align}
&\frac{1}{16} \int{u\cdot\sqrt{u^2 + 12}}\, du \\
&= \frac{1}{16} \int{u\cdot v \cdot \frac{v}{u}\, dv} \\
&= \frac{1}{16}\int{v^2}\, dv\\
&= \frac{1}{16}\frac{v^{2+1}}{(2+1)} + C\\
&= \frac{v^3}{48} + C
\end{align}$$
Putting $v$ interms of $x$, you'll probably get the right answer.
$\dots$ Maybe taking $u=x^2+x+1$ would have been a better substitution.
Well, practice makes perfect! :D
A: $\newcommand{\angles}[1]{\left\langle\, #1 \,\right\rangle}
 \newcommand{\braces}[1]{\left\lbrace\, #1 \,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\, #1 \,\right\rbrack}
 \newcommand{\ceil}[1]{\,\left\lceil\, #1 \,\right\rceil\,}
 \newcommand{\dd}{{\rm d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,{\rm e}^{#1}\,}
 \newcommand{\fermi}{\,{\rm f}}
 \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,}
 \newcommand{\half}{{1 \over 2}}
 \newcommand{\ic}{{\rm i}}
 \newcommand{\iff}{\Longleftrightarrow}
 \newcommand{\imp}{\Longrightarrow}
 \newcommand{\pars}[1]{\left(\, #1 \,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\pp}{{\cal P}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\vphantom{\large A}\,#2\,}\,}
 \newcommand{\sech}{\,{\rm sech}}
 \newcommand{\sgn}{\,{\rm sgn}}
 \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}}
 \newcommand{\ul}[1]{\underline{#1}}
 \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert}$
With $\ds{\root{x^{2} + x + 1} = x + t}$ we'll get
$\ds{x = {1 - t^{2} \over 2t - 1}}$ such that

\begin{align}
&\color{#c00000}{\int\pars{4x + 2}\root{x^{2} + x + 1}\,\dd x}
=\int{32 t^{3} + 12t^{2} - 4 \over \pars{2t - 1}^{4}}\,\dd t
\end{align}

Now, we set $\ds{t \equiv {1 - a \over 2}}$. Then

\begin{align}
&\color{#c00000}{\int\pars{4x + 2}\root{x^{2} + x + 1}\,\dd x}
=\int\pars{{27 \over 16 a^{4}} - {a^{2} \over 16} + {9 \over 16a^{2}}
-{3 \over 16}}\,\dd a
\\[5mm]&=-\frac{a^3}{48}-\frac{9}{16 a^3}-\frac{3 a}{16}-\frac{9}{16 a}
\\[5mm]&=-\frac{1}{48} (1-2 t)^3-\frac{3}{16} (1-2 t)-\frac{9}{16 (1-2 t)}
-\frac{9}{16 (1-2 t)^3}
\\[5mm]&=-\frac{1}{48} \left[1-2 \left(\sqrt{x^2+x+1}-x\right)\right]^3-\frac{3}{16} \left[1-2 \left(\sqrt{x^2+x+1}-x\right)\right]-\frac{9}{16 \left[1-2 \left(\sqrt{x^2+x+1}-x\right)\right]}-\frac{9}{16 \left[1-2 \left(\sqrt{x^2+x+1}-x\right)\right]^3}\\[5mm]& + \mbox{a constant}
\end{align}

