# Evaluate the integral. {eq}\displaystyle \int_0^3 \dfrac{x^2 + x + 1}{ (x+1)^2(x+2) } \ dx {/eq}

## Question:

Evaluate the integral.

{eq}\displaystyle \int_0^3 \dfrac{x^2 + x + 1}{ (x+1)^2(x+2) } \ dx {/eq}

## Partial Fraction:

The operation or the process of conversion of rational fractions into the polynomial one is called the partial fraction method with the help of the constants represented by {eq}A{/eq} , {eq}B{/eq} and so on like this.

Given:

• Consider the integral {eq}\int\limits_0^3 {\frac{{{x^2} + x + 1}}{{{{\left( {x + 1} \right)}^2}\left( {x + 2} \right)}}dx} \cdots \left( 1 \right){/eq}

Use partial fractions to evaluate {eq}\frac{{{x^2} + x + 1}}{{{{\left( {x + 1} \right)}^2}\left( {x + 2} \right)}}{/eq} and simplify it as:

{eq}\begin{align*} \frac{{{x^2} + x + 1}}{{{{\left( {x + 1} \right)}^2}\left( {x + 2} \right)}} &= \frac{A}{{x + 2}} + \frac{B}{{x + 1}} + \frac{C}{{{{\left( {x + 1} \right)}^2}}} \cdots \left( a \right)\\ {x^2} + x + 1 &= A{\left( {x + 1} \right)^2} + B\left( {x + 2} \right)\left( {x + 1} \right) + C\left( {x + 2} \right)\\ {x^2} + x + 1 &= \left( {A + B} \right){x^2} + \left( {2A + 3B + C} \right)x + \left( {A + 2B + 2C} \right) \cdots \left( 2 \right) \end{align*}{/eq}

Comparing the coefficients of {eq}{x^2}{/eq} , coefficients of {eq}x{/eq} and the constant term in equation {eq}\left( 2 \right){/eq} as follows:

{eq}\begin{align*} A + B &= 1\\ 2A + 3B + C &= 1\\ A + 2B + 2C &= 1 \end{align*}{/eq}

From {eq}A + B = 1{/eq} , substitute {eq}A = 1 - B{/eq} into {eq}2A + 3B + C = 1{/eq} and {eq}A + 2B + 2C = 1{/eq} as:

{eq}\begin{align*} 2 - 2B + 3B + C &= 1\\ 2 + B + C &= 1\\ B + C &= - 1 \end{align*}{/eq}

And,

{eq}\begin{align*} 1 - B + 2B + 2C &= 1\\ 1 + B + 2C &= 1\\ B + 2C &= 0\\ B &= - 2C \end{align*}{/eq}

Substitute {eq}B = - 2C{/eq} into {eq}B + C = - 1{/eq} as:

{eq}\begin{align*} - 2C + C &= - 1\\ - C &= - 1\\ C &= 1 \end{align*}{/eq}

Substitute {eq}C = 1{/eq} into {eq}B = - 2C{/eq} , we get {eq}B = - 2{/eq} .

Substitute {eq}B = - 2{/eq} into {eq}A = 1 - B{/eq} , we get {eq}A = 3{/eq} .

Substitute {eq}A = 3{/eq} , {eq}B = - 2{/eq} and {eq}C = 1{/eq} into equation {eq}\left( a \right){/eq} as:

{eq}\begin{align*} \frac{{{x^2} + x + 1}}{{{{\left( {x + 1} \right)}^2}\left( {x + 2} \right)}} &= \frac{3}{{x + 2}} + \frac{{\left( { - 2} \right)}}{{x + 1}} + \frac{1}{{{{\left( {x + 1} \right)}^2}}}\\ &= \frac{3}{{x + 2}} - \frac{2}{{x + 1}} + \frac{1}{{{{\left( {x + 1} \right)}^2}}} \end{align*}{/eq}

Finally substitute {eq}\frac{{{x^2} + x + 1}}{{{{\left( {x + 1} \right)}^2}\left( {x + 2} \right)}} = \frac{3}{{x + 2}} - \frac{2}{{x + 1}} + \frac{1}{{{{\left( {x + 1} \right)}^2}}}{/eq} into equation {eq}\left( 1 \right){/eq} and integrate it as:

{eq}\begin{align*} \int\limits_0^3 {\frac{{{x^2} + x + 1}}{{{{\left( {x + 1} \right)}^2}\left( {x + 2} \right)}}dx} &= \int\limits_0^3 {\frac{3}{{x + 2}}dx} - \int\limits_0^3 {\frac{2}{{x + 1}}dx} + \int\limits_0^3 {\frac{1}{{{{\left( {x + 1} \right)}^2}}}dx} \\ &= 3\left[ {\ln \left| {x + 2} \right|} \right]_0^3 - 2\left[ {\ln \left| {x + 1} \right|} \right]_0^3 + \left[ {\frac{{ - 1}}{{x + 1}}} \right]_0^3\\ &= 3\ln 5 - 3\ln 2 - 2\ln 4 + 2\ln 1 - \frac{1}{4} + 1\\ &= 3\ln 5 - 3\ln 2 - 2\ln 4 + \frac{3}{4} \end{align*}{/eq}

On further simplification we get:

{eq}\begin{align*} \int\limits_0^3 {\frac{{{x^2} + x + 1}}{{{{\left( {x + 1} \right)}^2}\left( {x + 2} \right)}}dx} &= 3\ln 5 - 3\ln 2 - 2\ln 4 + \frac{3}{4}\\ &= 3\left( {\ln 5 - \ln 2} \right) - 2\ln 4 + \frac{3}{4}\\ &= 3\ln \frac{5}{2} - 2\ln 4 + \frac{3}{4} \end{align*}{/eq}

Thus, the solution of the integral is {eq}3\ln \frac{5}{2} - 2\ln 4 + \frac{3}{4}{/eq} .