Question:

Find : \(\displaystyle \int \frac{x^2+x+1}{(x+2)(x^2+1)} \, dx\).

Show Hint

Write the fraction as A/(x+2) + (Bx+C)/(x^2+1); x = -2 gives A = 3/5, then compare coefficients.
Updated On: Nov 20, 2026
Show Solution
collegedunia
Verified By Collegedunia

Solution and Explanation

Step 1: Choose the partial fraction form:
The denominator has a linear factor and an irreducible quadratic factor. The degree of the numerator is less than that of the denominator.
So write \(\tfrac{x^2+x+1}{(x+2)(x^2+1)} = \tfrac{A}{x+2} + \tfrac{Bx+C}{x^2+1}\).

Step 2: Clear the denominators:
Multiply both sides by \((x+2)(x^2+1)\).
\[ x^2+x+1 = A(x^2+1) + (Bx+C)(x+2) \]
Put \(x = -2\): \(4 - 2 + 1 = 5A\), so \(A = \tfrac{3}{5}\).

Step 3: Compare coefficients:
Coefficient of \(x^2\): \(1 = A + B\), so \(B = \tfrac{2}{5}\).
Constant term: \(1 = A + 2C\), so \(C = \tfrac{1}{5}\).
Check with the coefficient of \(x\): \(2B + C = \tfrac{4}{5} + \tfrac{1}{5} = 1\), which matches.
\[ \frac{x^2+x+1}{(x+2)(x^2+1)} = \frac{3}{5(x+2)} + \frac{2x+1}{5(x^2+1)} \]

Step 4: Integrate each part:
\(\int \tfrac{3}{5(x+2)} dx = \tfrac{3}{5}\ln|x+2|\).
\(\int \tfrac{2x}{5(x^2+1)} dx = \tfrac{1}{5}\ln(x^2+1)\), by putting \(x^2+1 = t\).
\(\int \tfrac{1}{5(x^2+1)} dx = \tfrac{1}{5}\tan^{-1}x\).

Final Answer:
Adding the three pieces and the constant of integration: \[ \boxed{\frac{3}{5}\ln|x+2| + \frac{1}{5}\ln(x^2+1) + \frac{1}{5}\tan^{-1}x + C} \]
Was this answer helpful?
0
0