Correct option is (d) \(\frac{3}{5}log|x+2| + \frac{1}{5}log|x^2+1|+\frac{1}{5} tan^{-1}x+C\)
Explanation: \(\int \frac{(x^2+x+1)dx}{(x+2)(x^2+1)} = \frac{A}{(x+2)} + \frac{Bx+C}{(x^2+1)}\)
Now equating, (x^2+x+1) = A (x^2+1) + (Bx+C) (x+2)
After equating and solving for coefficient we get values,
A=\(\frac{3}{5}\), B=\(\frac{2}{5}\), C=\(\frac{1}{5}\), now putting these values in the equation we get,
\(\int \frac{(x^2+x+1)dx}{(x+2)(x^2+1)} = \frac{3}{5} \int \frac{dx}{(x+2)} + \frac{1}{5} \int \frac{2xdx}{(x^2+1)} + \frac{1}{5} \int \frac{dx}{(x^2+1)}\)
Hence it comes, \(\frac{3}{5} log|x+2| + \frac{1}{5} log|x^2+1|+\frac{1}{5}tan^{-1}x+C\)