\(\int \frac{(x^2+x+1)dx}{(x+2)(x^2+1)}\) equals ______

Category: Questions\(\int \frac{(x^2+x+1)dx}{(x+2)(x^2+1)}\) equals ______
Editor">Editor Staff asked 11 months ago

\(\int \frac{(x^2+x+1)dx}{(x+2)(x^2+1)}\) equals ______
(a) \(\frac{3}{5}log|x+2| + \frac{1}{5}log|x^2+1|+\frac{1}{5} tan^{-1}x+5C\)
(b) \(\frac{3}{5}log|x+2| + \frac{1}{5}log|x^2+1|+\frac{1}{6} tan^{-1}x+C\)
(c) \(\frac{3}{5}log|x+2| + \frac{1}{6}log|x^2+1|+\frac{1}{6} tan^{-1}x+C\)
(d) \(\frac{3}{5}log|x+2| + \frac{1}{5}log|x^2+1|+\frac{1}{5} tan^{-1}x+C\)
This question was addressed to me during an online interview.
My doubt stems from Integration by Partial Fractions topic in division Integrals of Mathematics – Class 12
NCERT Solutions for Subject Clas 12 Math Select the correct answer from above options 
Interview Questions and Answers, Database Interview Questions and Answers for Freshers and Experience

1 Answers
Editor">Editor Staff answered 11 months ago

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