Home » Blog » Evaluate the integral of x2 / (x2 + x – 6)

Evaluate the integral of x2 / (x2 + x – 6)

Compute the following integral.

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


First, we have

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

Therefore,

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

We use partial fractions to evaluate the integral on the right. To that end, we write

    \[ \frac{x-6}{(x+3)(x-2)} = \frac{A}{x+3} + \frac{B}{x-2}. \]

This gives us the equation

    \[ A(x-2) + B(x+3) = x-6. \]

Evaluating at x = -3 and x = 2 we then have

    \begin{align*}  -5A &= -9 & \implies \qquad A &= \frac{9}{5} \\  5B &= -4 & \implies \qquad B &= -\frac{4}{5}. \end{align*}

Therefore,

    \begin{align*}  \int \frac{x^2}{x^2 + x - 6} \, dx &= x - \int \frac{x-6}{(x+3)(x-2)} \, dx \\  &= x - \frac{9}{5} \int \frac{1}{x+3} \, dx + \frac{4}{5} \int \frac{1}{x-2} \, dx \\  &= x - \frac{9}{5} \log |x+3| + \frac{4}{5} \log |x-2| + C \\  &= x + \frac{4}{5} \log |x-2| - \frac{9}{5} \log |x+3| + 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):