# Find \int \frac{(x^2+1)}{(x+1)^2} dx.

## Question:

Find {eq}\int \frac{(x^2+1)}{(x+1)^2} dx {/eq}.

## Integration:

Integration is used to calculate the area under the curve, volume, etc. The integration symbol is

{eq}\int_{a}^{b} f(x) dx {/eq}.

{eq}a \: and \: b {/eq} are the limits of the integration. This is a definite integral.

The integral in which we have no limits of integration called indefinite integral, denoted by {eq}\int f(x) dx {/eq}.

In case of indefinite integral, we add constant {eq}C {/eq} after the integration is solved. This {eq}C {/eq} is called the constant of integration.

Given

{eq}\int \dfrac{(x^2+1)}{(x+1)^2} dx {/eq}.

We have to solve the integral.

{eq}\begin{align} \int \dfrac{(x^2+1)}{(x+1)^2} dx &=\int \left [\dfrac{x^2}{(x+1)^2}+\dfrac{1}{(x+1)^2} \right ]dx\\ &=\int \dfrac{x^2}{\left(x+1\right)^2}dx+\int \dfrac{1}{\left(x+1\right)^2}dx\\ \end{align} {/eq}

First, we solve the integral {eq}\int \dfrac{x^2}{\left(x+1\right)^2}dx {/eq}

{eq}\begin{align} \int \dfrac{x^2}{\left(x+1\right)^2}dx &=\int \dfrac{x^2+1-1+2x-2x}{\left(x+1\right)^2}dx\\ &= \int \dfrac{(x+1)^2-1-2x}{\left(x+1\right)^2}dx\\ &=\int \dfrac{(x+1)^2}{(x+1)^2}dx-\int \dfrac{1}{(x+1)^2}dx-\int \dfrac{2x}{(x+1)^2}dx\\ &=\int dx-\int \dfrac{1}{(x+1)^2}dx-2\int\dfrac{x+1-1}{(x+1)^2}\\ &= \int dx-\int \dfrac{1}{(x+1)^2}dx-2\int \left [ \dfrac{x+1}{(x+1)^2}-\dfrac{1}{(x+1)^2} \right ]dx\\ &=\int dx-\int \dfrac{1}{(x+1)^2}dx-2\int \left [ \dfrac{1}{x+1}-\dfrac{1}{(x+1)^2} \right ]dx\\ &=\int dx-\int \dfrac{1}{(x+1)^2}dx-2\int \dfrac{1}{x+1}dx+2\int\dfrac{1}{(x+1)^2}dx\\ &=\int 1dx+\int \dfrac{1}{\left(x+1\right)^2}dx-\int \dfrac{2}{x+1}dx\\ &=x+\left [ \dfrac{(x+1)^{-2+1}}{-2+1} \right ]+2\ln \left | x+1 \right |\\ &=x-\dfrac{1}{(x+1)}+2\ln \left | x+1 \right | \end{align} {/eq}

Now, we solve the integral

{eq}\begin{align} \int \dfrac{1}{\left(x+1\right)^2}dx &=\dfrac{(x+1)^{-2+1}}{-2+1}\\ &=-\dfrac{1}{(x+1)} \end{align} {/eq}

Applying these values, we have:

{eq}\begin{align} \int \dfrac{(x^2+1)}{(x+1)^2} dx &=\int \dfrac{x^2}{\left(x+1\right)^2}dx+\int \dfrac{1}{\left(x+1\right)^2}dx\\ &=x-\dfrac{1}{(x+1)}+2\ln \left | x+1 \right |-\dfrac{1}{(x+1)}+C\\ &=x-\dfrac{2}{(x+1)}+2\ln \left | x+1 \right |+C \end{align} {/eq}

{eq}\color{blue}{\int \dfrac{(x^2+1)}{(x+1)^2} dx =x-\dfrac{2}{(x+1)}+2\ln \left | x+1 \right |+C} {/eq} 