<s>[INST] Difficulty finding the integral of this rational function? I'm attempting to do the following integral
$$\int \frac{2x+1}{x^3 +2x^2 +1} \, dx$$
I wanted to try using partial fractions but I'm unsure how to factor the denominator. I've been unable to make any progress on this question because of this which is why I don't have any work for it. I was wondering whether there are any ways to take the integral of this function?
 [/INST] Hint
The denominator has three roots, only one neing real. So, write
$$x^3+2x^2+1=(x-a)(x^2+bx+c)$$ and use partial fractions
$$\frac{2x+1}{x^3 +2x^2 +1}=\frac 1 {a^+ab+c}\left(\frac{2 a+1}{x-a}-\frac{ (a+b-2 c)+(2 a+1) x}{x^2+bx+c} \right)$$
Now, work the problem of expressing $a,b,c$ which is not the most pleasant since
$$a=-\frac{2}{3}-\frac{4}{3} \cosh \left(\frac{1}{3} \cosh
   ^{-1}\left(\frac{43}{16}\right)\right)$$
Edit
If this looks too difficult, name $a,b,c$ the roots of $x^3 +2x^2 +1=0$ and write
$$\frac{2x+1}{x^3 +2x^2 +1}=\frac{2x+1}{(x-a)(x-b)(x-c)}$$ Use partial fraction decomposition to get 
$$\frac{2x+1}{x^3 +2x^2 +1}=\frac{2 a+1}{(a-b) (a-c) (x-a)}+\frac{2 b+1}{(b-a) (b-c) (x-b)}+\frac{2
   c+1}{(c-a) (c-b) (x-c)}$$ which is simple, leading to a weighted sum of logarithms, two of them with complex arguments (you can recombine them later). The result is ugly.
</s>