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. 
 A: The post indicates some difficulty with finding $\int \frac{dx}{x^2+x+1}$. We solve a more general problem. But I would suggest for your particular problem, you follow the steps used, instead of using the final result. 
Suppose that we want to integrate $\dfrac{1}{ax^2+bx+c}$, where $ax^2+bx+c$ is always positive, or always negative. We complete the square.
In order to avoid fractions, note that equivalently we want to find
$$\int \frac{4a\,dx}{4a^2 x+4abx+4ac}.$$
So we want to find
$$\int \frac{4a\,dx}{(2ax+b)^2 + (4ac-b^2)}.$$
Let 
$$2ax+b=u\sqrt{4ac-b^2}.$$
Then $2a\,dx=\sqrt{4ac-b^2}\,du$.
Our integral simplifies to
$$\frac{2}{\sqrt{4ac-b^2}}\int\frac{du}{u^2+1},$$
and we are finished. 
A: 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$.
