# \int5/((x^2+2x+2)(x-1))dx?

## $\setminus \textcolor{c r i m s o n}{\setminus} \boldsymbol{\setminus \textrm{p \le a s e h e l p m e w \mathmr{and} k o u t t h e \ne x t s t e p ,}}$ $\setminus \textcolor{m a r \infty n}{\setminus} \boldsymbol{\setminus \textrm{\neg \star t \mathfrak{o} m t h e b e g \in n \in g}}$ (I mean, I just don't want to make you spend time on the whole problem. But it's ok to do all of the work) Partial fractions: $\frac{5}{\left({x}^{2} + 2 x + 2\right) \left(x - 1\right)} = \frac{A x + B}{\left({x}^{2} + 2 x + 2\right) \left(x - 1\right)} + \frac{C}{x - 1}$ $A = - 1 , B = - 3 , C = 1$ $\setminus \therefore \setminus \int \left(\frac{- x + \left(- 3\right)}{{x}^{2} + 2 x + 2} + \frac{1}{x - 1}\right) \mathrm{dx}$ Separating integrals: $\setminus \int \frac{x + \left(- 3\right)}{{x}^{2} + 2 x + 2} \mathrm{dx} + \setminus \int \frac{1}{x - 1} \mathrm{dx}$ $\setminus \textcolor{s t e e l b l u e}{- \setminus \int \frac{x + 3}{{x}^{2} + 2 x + 2} \mathrm{dx}} + \setminus \int \frac{1}{x - 1} \mathrm{dx}$ \color(olive)\bb\text(How would I solve the blue part?)

Apr 16, 2018

$- \int \frac{x + 3}{{x}^{2} + 2 x + 2} \mathrm{dx} = - \frac{1}{2} \ln \left[{\left(x + 1\right)}^{2} + 1\right] - 2 \arctan \left(x + 1\right) + C$

#### Explanation:

So, we have the integral

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

The first problem seems to be the denominator -- this ruins the possibility of integrating as a logarithm or as an arctangent.

Let's complete the square:

${x}^{2} + 2 x + 2 = 0$

${x}^{2} + 2 x = - 2$

Add ${\left(\frac{b}{2}\right)}^{2}$ to each side, where $b = 2.$

${x}^{2} + 2 x + {\left(\frac{2}{2}\right)}^{2} = - 2 + {\left(\frac{2}{2}\right)}^{2}$

${x}^{2} + 2 x + 1 = - 1$

${\left(x + 1\right)}^{2} = - 1$

Thus, the completed square is

${\left(x + 1\right)}^{2} + 1$

Now, we have

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

We can split this up:

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

We're going to apply the substitution $u = x + 1$ to both integrals:

$\mathrm{du} = \mathrm{dx}$

$x = u - 1$

Thus, we obtain

$- \int \frac{u - 1}{{u}^{2} + 1} \mathrm{du} - 3 \int \frac{\mathrm{du}}{{u}^{2} + 1}$

Again, split up the first integral:

$- \int \frac{u}{{u}^{2} + 1} \mathrm{du} + \int \frac{\mathrm{du}}{{u}^{2} + 1} - 3 \int \frac{\mathrm{du}}{{u}^{2} + 1}$

These are all simple integrals:

$- \int \frac{u}{{u}^{2} + 1} \mathrm{du} = - \frac{1}{2} \ln \left({u}^{2} + 1\right)$ -- This can be done by a quick mental substitution, as the differential of ${u}^{2} + 1$ shows up in the numerator as $2 u \mathrm{du}$.

(No need for absolute value bars, ${u}^{2} + 1$ is always positive)

$\int \frac{\mathrm{du}}{{u}^{2} + 1} = \arctan \left(u\right)$

$- 3 \int \frac{\mathrm{du}}{{u}^{2} + 1} = - 3 \arctan \left(u\right)$

Simplifying, we get

$- \int \frac{u}{{u}^{2} + 1} \mathrm{du} + \int \frac{\mathrm{du}}{{u}^{2} + 1} - 3 \int \frac{\mathrm{du}}{{u}^{2} + 1} = - \frac{1}{2} \ln \left({u}^{2} + 1\right) - 2 \arctan \left(u\right) + C$

We need to rewrite in terms of $x .$ We get

$- \int \frac{x + 3}{{x}^{2} + 2 x + 2} \mathrm{dx} = - \frac{1}{2} \ln \left[{\left(x + 1\right)}^{2} + 1\right] - 2 \arctan \left(x + 1\right) + C$

So, as you can see, these can get very messy sometimes. It all comes down to using relevant substitutions and splitting up across sums and differences until you get only simple integrals.

Apr 16, 2018

$= \ln | x - 1 | - \frac{1}{2} \ln | {x}^{2} + 2 x + 2 | - 2 {\tan}^{-} 1 \left(x + 1\right) + c$

#### Explanation:

Seprating integrals:

$I = \int \frac{\textcolor{red}{-} x + \left(- 3\right)}{{x}^{2} + 2 x + 2} \mathrm{dx} + \int \frac{1}{x - 1} \mathrm{dx}$

$= - \frac{1}{2} \int \frac{2 x + 6}{{x}^{2} + 2 x + 2} \mathrm{dx} + \ln | x - 1 |$

$= - \frac{1}{2} \int \frac{2 x + 2 + 4}{{x}^{2} + 2 x + 2} \mathrm{dx} + \ln | x - 1 |$

$= \ln | x - 1 | - \frac{1}{2} \int \frac{2 x + 2}{{x}^{2} + 2 x + 2} \mathrm{dx} - \frac{1}{2} \int \frac{4}{{x}^{2} + 2 x + 2} \mathrm{dx}$

=ln|x-1|-1/2int(d/(dx)(x^2+2x+2))/(x^2+2x+2)dx- 2int1/((x+1)^2+1)dx

$= \ln | x - 1 | - \frac{1}{2} \ln | {x}^{2} + 2 x + 2 | - 2 \cdot \frac{1}{1} {\tan}^{-} 1 \left(\frac{x + 1}{1}\right) + c$

$= \ln | x - 1 | - \frac{1}{2} \ln | {x}^{2} + 2 x + 2 | - 2 {\tan}^{-} 1 \left(x + 1\right) + c$