# How do calculate that? pls help me

## $\int \frac{{x}^{2} + 2 x + 3}{{x}^{2} + 2 x + 1} \mathrm{dx}$

Apr 14, 2018

$\int \frac{{x}^{2} + 2 x + 3}{{x}^{2} + 2 x + 1} \mathrm{dx} = x - \frac{2}{x + 1} + c$

#### Explanation:

$\int \frac{{x}^{2} + 2 x + 3}{{x}^{2} + 2 x + 1} \mathrm{dx}$

= $\int \left[\frac{{x}^{2} + 2 x + 1}{{x}^{2} + 2 x + 1} + \frac{2}{{x}^{2} + 2 x + 1}\right] \mathrm{dx}$

as ${x}^{2} + 2 x + 1 = {\left(x + 1\right)}^{2}$ this becomes

$\int \left(1 + \frac{2}{x + 1} ^ 2\right) \mathrm{dx}$

= $\int \mathrm{dx} + 2 \int \frac{1}{x + 1} ^ 2 \mathrm{dx}$

= $x + 2 \int \frac{1}{x + 1} ^ 2$ - now let $u = x + 1$ then $\mathrm{du} = \mathrm{dx}$

and our integral becomes

$x + 2 \int \frac{\mathrm{du}}{u} ^ 2$

= $x - \frac{2}{u} + c$

= $x - \frac{2}{x + 1} + c$

Apr 14, 2018

The answer should be $x - \setminus \frac{2}{x + 1} + C$.

#### Explanation:

First off, split the $3$ into $2 + 1$:

$\setminus \int \frac{{x}^{2} + 2 x + 3}{{x}^{2} + 2 x + 1} \mathrm{dx} = \setminus \int \frac{{x}^{2} + 2 x + 1 + 2}{{x}^{2} + 2 x + 1} \mathrm{dx}$

Then, use the linearity of this function to get rid of the $2$ and simply drop the $1$ because it's a constant:

$\setminus \int \left(\frac{2}{{x}^{2} + 2 x + 1} + 1\right) \mathrm{dx} = 2 \setminus \int \frac{1}{{x}^{2} + 2 x + 1} \mathrm{dx} + \setminus \int 1 \mathrm{dx}$

Then, try to factor out the denominator:

$2 \setminus \int \frac{1}{{x}^{2} + 2 x + 1} \mathrm{dx} = 2 \setminus \int \frac{1}{x + 1} ^ 2 \mathrm{dx} + \setminus \int 1 \mathrm{dx}$

Get rid of $\setminus \int 1 \mathrm{dx}$, using the rule $\setminus \int K \mathrm{dx} = K x + C$, where $K$ is any constant:

$2 \setminus \int \frac{1}{x + 1} ^ 2 \mathrm{dx} + \setminus \int 1 \mathrm{dx} = 2 \setminus \int \frac{1}{x + 1} ^ 2 \mathrm{dx} + x$

Then, let $k = \left(x + 1\right)$ and apply the power rule:

$2 \setminus \int \frac{1}{x + 1} ^ 2 \mathrm{dx} + x = 2 \setminus \int \frac{1}{k} ^ 2 \mathrm{dk} + x = 2 \setminus \int {k}^{- 2} \mathrm{dk} + x$

$2 \setminus \int {k}^{- 2} \mathrm{dk} + x = 2 \setminus \frac{{k}^{- 2 + 1}}{- 2 + 1} + x = 2 \setminus \frac{{k}^{- 1}}{- 1} + x$

$2 \setminus \frac{{k}^{- 1}}{- 1} + x = \setminus \frac{- 2}{k} + x = \setminus \frac{- 2}{x + 1} + x$

And we're done! Don't forget to add a constant, though :) Hence, we can conclude that:

$\setminus \int \frac{{x}^{2} + 2 x + 3}{{x}^{2} + 2 x + 1} \mathrm{dx} = x - \setminus \frac{2}{x + 1} + C$