What is #int (x^3-2x^2+6x+9 ) / (-x^2- x +3 )#?

1 Answer
Feb 17, 2018

# = 3x - 1/2 x^2 - (6 - 6/sqrt(13))ln(x+(1 - sqrt(13))/2) - (6 + 6/sqrt(13))ln(x+(1 + sqrt(13))/2) + C#

Explanation:

First, we must decide what we want to do. Whenever you see a rational function (i.e. a polynomial divided by a polynomial), you want to use partial fraction decomposition (PFD).

We're going to take out a negative sign from the denominator and bring it back after the integral. Therefore, we want to be able to integrate

#(x^3-2x^2+6x+9)/(x^2+x-3) #

The first step in PFD is always to have the upper degree (currently 3) be lower than the lower degree (2). Therefore, we can start long dividing our polynomials:

#x^3 - 2x^2 + 6x+ 9 = x (x^2+x-3) - 3x^2 +9x + 9#
#-3x^2 + 9x + 9 = -3(x^2 + x - 3) + 12x #
Therefore,

#(x^3-2x^2+6x+9)/(x^2+x-3) = x + (-3x^2+9x+9)/(x^2+x-3)#
# = (x-3) + (12x)/(x^2 + x - 3)#
This is a lot easier to manage!

Now we can use PFD. First, we need to factor the bottom. Using the quadratic formula, we find the denominator has roots at
#x = -1/2 pm 1/2 sqrt(1 + 4 cdot 3) = (-1 pm sqrt(13))/2#

We will call these #x_1# and #x_2# for simplicity. We now want to expand the fraction into first order rational functions, i.e.
#A/(x-x_1) + B/(x-x_2) = (12x)/(x^2 + x - 3) #

#A(x-x_2) + B(x-x_1) = 12x#
i.e.
#A+B = 12, Ax_2 + Bx_1 = 0 #

Using a little bit of algebra, we solve
#B = (12x_2)/(x_2 - x_1) = 6 + 6/sqrt(13)#
#A = 12 - B = 6 - 6/sqrt(13) #

Therefore, we have taken the original and made it much more manageable (well at least when it uses a bunch of variables to make it clear)

#(x^3-2x^2+6x+9)/(x^2+x-3) = (x-3) + A/(x-x_1) + B/(x-x_2)#

Now we can finally solve!
#-int (x^3-2x^2+6x+9)/(x^2+x-3) dx#
# = int(3-x)dx - A int(dx)/(x-x_1) - B int(dx)/(x-x_2)#
# = 3x - 1/2 x^2 - Aln(x-x_1) - Bln(x-x_2) + C#

Or writing it out,
# = 3x - 1/2 x^2 - (6 - 6/sqrt(13))ln(x+(1 - sqrt(13))/2) - (6 + 6/sqrt(13))ln(x+(1 + sqrt(13))/2) + C#