Home » Blog » Evaluate the integral of (x4+2x-6) / (x3 + x2 – 2x)

Evaluate the integral of (x4+2x-6) / (x3 + x2 – 2x)

Compute the following integral.

    \[ \int \frac{x^4+2x-6}{x^3 + x^2 - 2x} \, dx. \]


First, we can factor the denominator,

    \[ x^3 + x^2 - 2x = x(x+2)(x-1).\]

Next, we want to simplify the expression. In particular, we want the numerator to be a polynomial of smaller degree than the denominator. Dividing the numerator by the denominator we obtain

    \[ \frac{x^4+2x-6}{x^3+x^2-2x} = (x - 1) + \frac{3(x^2-2)}{x^3 + x^2 - 2x} = (x-1) + \frac{3(x^2-2)}{x(x+2)(x-1)}. \]

Therefore, we can start evaluating the integral,

    \begin{align*}  \int \frac{x^4 + 2x - 6}{x^3 + x^2 - 2x} \, dx &= \int \left( (x-1) + \frac{3(x^2-2)}{x(x+2)(x-1)} \right) \, dx \\  &= \int x \, dx - \int dx + 3 \int \frac{x^2-2}{x(x+2)(x-1)} \, dx \\  &= \frac{1}{2}x^2 - x + 3 \int \frac{x^2-2}{x(x+2)(x-1)} \, dx. \end{align*}

Now we need to use partial fractions to evaluate this last integral on the right. To that end we write,

    \[ \frac{x^2-2}{x(x+2)(x-1)} = \frac{A}{x} + \frac{B}{x+2} + \frac{C}{x-1}. \]

Therefore, we have the equation

    \[ A(x+2)(x-1) + B(x)(x-1) + C(x)(x+2) = x^2 - 2. \]

Substituting the values x = 0, x = -2, and x = 1 we obtain the following values

    \begin{align*}  -2A &= -2 & \implies \quad A &= 1\\  6B &= 2 & \implies \quad B &= \frac{1}{3} \\  3C &= -1 & \implies \quad C &= -\frac{1}{3}. \end{align*}

So, then we can continue evaluating the integral,

    \begin{align*}  \int \frac{x^4 + 2x - 6}{x^3 + x^2 - 2x} \, dx &= \frac{1}{2}x^2 - x + 3 \int \frac{x^2-2}{x(x+2)(x-1)} \, dx \\[9pt]  &= \frac{1}{2}x^2 - x + 3 \int \left( \frac{A}{x} + \frac{B}{x+2} + \frac{C}{x-1} \right) \, dx \\[9pt]  &= \frac{1}{2}x^2 - x + 3 \left( \int \frac{dx}{x} + \frac{1}{3} \int \frac{dx}{x+2} - \frac{1}{3} \int \frac{dx}{x-1} \right) \\[9pt]  &= \frac{1}{2}x^2 - x + 3 \log|x| + \log |x+2| - \log|x-1| + C \\[9pt]  &= \frac{1}{2}x^2 - x + \log \left| \frac{x^3 (x+2)}{x-1} \right| + C. \end{align*}

Point out an error, ask a question, offer an alternative solution (to use Latex type [latexpage] at the top of your comment):