Example 2, Chpt 4 Advanced Mathematics (I) 
$$\int \frac{x+2}{2x^3+3x^2+3x+1}\, \mathrm{d}x$$

I can get it down to this: 
$$\int \frac{2}{2x+1} - \frac{x}{x^2+x+1}\, \mathrm{d}x $$
I can solve the first part but I don't exactly follow the method in the book. 

$$ = \ln \vert 2x+1 \vert - \frac{1}{2}\int \frac{\left(2x+1\right) -1}{x^2+x+1}\, \mathrm{d}x $$
  $$= \ln \vert 2x+1 \vert - \frac{1}{2} \int \frac{\mathrm{d}\left(x^2+x+1\right)}{x^2+x+1} + \frac{1}{2}\int \dfrac{\mathrm{d}x}{\left(x+\dfrac{1}{2}\right)^2 + \frac{3}{4}} $$

For the 2nd part: 
I tried $ u = x^2+x+1 $ and $\mathrm{d}u = 2x+1\, \mathrm{d}x$  that leaves me with $\frac{\mathrm{d}u - 1}{2} = x\, \mathrm{d}x$  which seems wrong.  
because $x^2+x+1$ doesn't factor, I don't see how partial fractions again will help. 
$x = Ax+B$ isn't helpful. 

Let
$$x+\frac12=\frac{\sqrt3}2\tan t,dx=\frac{\sqrt3}2\sec^2tdt$$
$$\frac12\int\frac{dx}{\left(x+\frac12\right)^2+\frac34}=\frac{\sqrt3}4\int\frac{\sec^2tdt}{\frac34\tan^2t+\frac34}=$$
$$\frac{\sqrt3}4\int\frac{\sec^2tdt}{\frac34\sec^2t}=\frac{\sqrt3}3\int dt=\frac{\sqrt3}3t+C$$
Now just solve for $t$ in terms of $x$.
