# How do you integrate int(x(x+2))/(x^3 +3x^2 -4) dx?

Mar 6, 2018

$\frac{1}{3} \ln | x - 1 | + \frac{2}{3} \ln | x + 2 | + C$

#### Explanation:

Let us begin by factorizing the denominator. It is easy to see that ${x}^{3} + 3 {x}^{2} - 4$ vanishes when $x = 1$, so that $\left(x - 1\right)$ is a factor.

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

Thus, the integrand simplifies considerably to

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

We try the partial fraction expression

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

Thus
$x = A \left(x + 2\right) + B \left(x - 1\right)$

substituting $x = 1$ and $x = - 2$, respectively, gives

$1 = A \times 3 \implies A = \frac{1}{3} , - 2 = B \times \left(- 3\right) \implies B = \frac{2}{3}$

Thus

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

Finally

$\int \frac{x \left(x + 2\right)}{{x}^{3} + 3 {x}^{2} - 4} \mathrm{dx} = \int \left(\frac{1}{3} \frac{1}{x - 1} + \frac{2}{3} \frac{1}{x + 2}\right) \mathrm{dx}$
$q \quad = \frac{1}{3} \ln | x - 1 | + \frac{2}{3} \ln | x + 2 | + C$

Mar 6, 2018

$\setminus q \quad \setminus q \quad \int \setminus \frac{x \left(x + 2\right)}{{x}^{3} + 3 {x}^{2} - 4} \setminus \mathrm{dx} \setminus = \setminus \frac{1}{3} \ln | {x}^{3} + 3 {x}^{2} - 4 | + C .$

#### Explanation:

$\text{We want to find:}$

$\setminus q \quad \setminus q \quad \setminus q \quad \setminus q \quad \setminus q \quad \setminus q \quad \setminus q \quad \setminus q \quad \int \setminus \frac{x \left(x + 2\right)}{{x}^{3} + 3 {x}^{2} - 4} \setminus \mathrm{dx} .$

$\text{Taking a quick second look, multiplying out the numerator,}$
$\text{we see:}$

$\setminus q \quad \setminus q \quad \setminus q \quad \int \setminus \frac{x \left(x + 2\right)}{{x}^{3} + 3 {x}^{2} - 4} \setminus \mathrm{dx} \setminus = \setminus \int \setminus \frac{{x}^{2} + 2 x}{{x}^{3} + 3 {x}^{2} - 4} \setminus \mathrm{dx} .$

$\text{Observing the derivative of the denominator:} \setminus q \quad 3 {x}^{2} + 6 x ,$
$\text{which just happens to be proportional to numerator:} \setminus \setminus {x}^{2} + 2 x ,$
$\text{[this situation is a rare accident -- but welcome], we can finish}$
$\text{directly as:}$

$\setminus q \quad \setminus q \quad \setminus q \quad \int \setminus \frac{x \left(x + 2\right)}{{x}^{3} + 3 {x}^{2} - 4} \setminus \mathrm{dx} \setminus = \setminus \int \setminus \frac{{x}^{2} + 2 x}{{x}^{3} + 3 {x}^{2} - 4} \setminus \mathrm{dx} .$

$\setminus q \quad \setminus q \quad \setminus q \quad \setminus q \quad \setminus q \quad \setminus q \quad \setminus q \quad \setminus q \quad \setminus q \quad \setminus q \quad \setminus q \quad \setminus \setminus = \setminus \frac{1}{3} \int \setminus \frac{3 \left({x}^{2} + 2 x\right)}{{x}^{3} + 3 {x}^{2} - 4} \setminus \mathrm{dx} .$

$\setminus q \quad \setminus q \quad \setminus q \quad \setminus q \quad \setminus q \quad \setminus q \quad \setminus q \quad \setminus q \quad \setminus q \quad \setminus q \quad \setminus q \quad \setminus \setminus = \setminus \frac{1}{3} \int \setminus \frac{3 {x}^{2} + 6 x}{{x}^{3} + 3 {x}^{2} - 4} \setminus \mathrm{dx} .$

$\setminus q \quad \setminus q \quad \setminus q \quad \setminus q \quad \setminus q \quad \setminus q \quad \setminus q \quad \setminus q \quad \setminus q \quad \setminus q \quad \setminus q \quad \setminus \setminus = \setminus \frac{1}{3} \int \setminus \frac{\left({x}^{3} + 3 {x}^{2} - 4\right) '}{{x}^{3} + 3 {x}^{2} - 4} \setminus \mathrm{dx} .$

$\setminus q \quad \setminus q \quad \setminus q \quad \setminus q \quad \setminus q \quad \setminus q \quad \setminus q \quad \setminus q \quad \setminus q \quad \setminus q \quad \setminus q \quad \setminus \setminus = \setminus \frac{1}{3} \ln | {x}^{3} + 3 {x}^{2} - 4 | + C .$

$\text{Thus:}$

$\setminus q \quad \setminus q \quad \setminus q \quad \int \setminus \frac{x \left(x + 2\right)}{{x}^{3} + 3 {x}^{2} - 4} \setminus \mathrm{dx} \setminus = \setminus \frac{1}{3} \ln | {x}^{3} + 3 {x}^{2} - 4 | + C .$