# How do you find int (x^2+2x+1)/((x+1)(x^2-2)) dx using partial fractions?

May 6, 2018

$I = \frac{1}{2} \ln | {x}^{2} - 2 | + \frac{1}{2 \sqrt{2}} \ln | \frac{x - \sqrt{2}}{x + \sqrt{2}} | + c$

#### Explanation:

We know that,

color(red)((1)int(d/(dx)(f(x)))/(f(x))dx=ln|f(x)|+c

color(blue)((2)int1/(x^2-a^2)dx=1/(2a)ln|(x-a)/(x+a)|+c

Here,

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

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

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

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

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

Using $\textcolor{red}{\left(1\right)} \mathmr{and} \textcolor{b l u e}{\left(2\right)}$, we get

$I = \frac{1}{2} \ln | {x}^{2} - 2 | + \frac{1}{2 \sqrt{2}} \ln | \frac{x - \sqrt{2}}{x + \sqrt{2}} | + c$

May 6, 2018

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

The numerator factors:

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

Cancel the common factor:

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

The denominator can be factored as the difference of two squares:

int (x+1)/((x-sqrt2)(x+sqrt2) dx

Write the partial fractions equation:

$\frac{x + 1}{\left(x - \sqrt{2}\right) \left(x + \sqrt{2}\right)} = \frac{A}{x - \sqrt{2}} + \frac{B}{x + \sqrt{2}}$

Multiply both sides by $\left(x - \sqrt{2}\right) \left(x + \sqrt{2}\right)$:

$x + 1 = A \left(x + \sqrt{2}\right) + B \left(x - \sqrt{2}\right)$

Let $x = \sqrt{2}$:

$\sqrt{2} + 1 = A \left(\sqrt{2} + \sqrt{2}\right) + B \left(\sqrt{2} - \sqrt{2}\right)$

$\sqrt{2} + 1 = A \left(2 \sqrt{2}\right)$

$A = \frac{2 + \sqrt{2}}{4}$

Let $x = - \sqrt{2}$:

$- \sqrt{2} + 1 = A \left(- \sqrt{2} + \sqrt{2}\right) + B \left(- \sqrt{2} - \sqrt{2}\right)$

$- \sqrt{2} + 1 = B \left(- 2 \sqrt{2}\right)$

$B = \frac{2 - \sqrt{2}}{4}$

Write in integral form:

$\frac{2 + \sqrt{2}}{4} \int \frac{1}{x - \sqrt{2}} \mathrm{dx} + \frac{2 - \sqrt{2}}{4} \int \frac{1}{x + \sqrt{2}} \mathrm{dx}$

The integrals become natural logarithms:

$\frac{2 + \sqrt{2}}{4} \ln \left(x - \sqrt{2}\right) + \frac{2 - \sqrt{2}}{4} \ln \left(x + \sqrt{2}\right) + C$