How to integrate $\int \frac{2x^2+x}{(x+1)(x^2+1)}dx$? How to integrate $\displaystyle \int \frac{2x^2+x}{(x+1)(x^2+1)}dx$? I Tried using partial fractions but i got lost, thanks.

The key is to write $(2x^2 + x)$ as $A(x^2+1) + (Bx+C)(x+1)$
$$(2x^2 + x) = A(x^2+1) + (Bx+C)(x+1) = (A+B)x^2 + (B+C)x + (A+C)$$
This gives us $A+B = 2$, $B+C = 1$ and $A+C = 0$ i.e. $A+B = 2$ and $B-A = 1$.
$$A = \dfrac12, B = \dfrac32, C = -\dfrac12$$
Hence, $$\dfrac{2x^2+x}{(x+1)(x^2+1)} = \dfrac1{2(x+1)} + \dfrac{3x-1}{2(x^2+1)} = \dfrac1{2(x+1)} + \dfrac34 \dfrac{2x}{x^2+1} - \dfrac12 \dfrac1{x^2+1}$$
Now you should be able to integrate it.
