## Calculus: Early Transcendentals (2nd Edition)

$$\ln \left| x \right| + {\tan ^{ - 1}}\left( {x + 1} \right) + C$$
\eqalign{ & \int {\frac{{{x^2} + 3x + 2}}{{x\left( {{x^2} + 2x + 2} \right)}}dx} \cr & {\text{partial fractions}} \cr & \frac{{{x^2} + 3x + 2}}{{x\left( {{x^2} + 2x + 2} \right)}} = \frac{A}{x} + \frac{{Bx + C}}{{{x^2} + 2x + 2}} \cr & {\text{multiplying}} \cr & {x^2} + 3x + 2 = A\left( {{x^2} + 2x + 2} \right) + \left( {Bx + C} \right)x \cr & {x^2} + 3x + 2 = A{x^2} + 2Ax + 2A + B{x^2} + Cx \cr & {x^2} + 3x + 2 = \left( {A{x^2} + B{x^2}} \right) + \left( {2Ax + Cx} \right) + 2A \cr & {\text{by equating the coefficients}} \cr & {x^2}:{\text{ }}A + B = 1 \cr & x:{\text{ 2}}A + C = 3 \cr & {x^0}:{\text{ }}2A = 2 \cr & {\text{Solving these equations}} \cr & A = 1 \cr & B = 0 \cr & C = 1 \cr & {\text{substituting constants}} \cr & \frac{A}{x} + \frac{{Bx + C}}{{{x^2} + 2x + 2}} = \frac{1}{x} + \frac{1}{{{x^2} + 2x + 2}} \cr & = \int {\frac{{{x^2} + 3x + 2}}{{x\left( {{x^2} + 2x + 2} \right)}}dx} = \int {\left( {\frac{1}{x} + \frac{1}{{{x^2} + 2x + 2}}} \right)dx} \cr & = \int {\frac{1}{x}dx} + \int {\frac{1}{{{x^2} + 2x + 2}}dx} \cr & {\text{completing the square}} \cr & = \int {\frac{1}{x}dx} + \int {\frac{1}{{{x^2} + 2x + 1 + 1}}dx} \cr & = \int {\frac{1}{x}dx} + \int {\frac{1}{{{{\left( {x + 1} \right)}^2} + 1}}dx} \cr & {\text{integrating}} \cr & = \ln \left| x \right| + {\tan ^{ - 1}}\left( {x + 1} \right) + C \cr}