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

2 Answers
Jan 13, 2017

#2ln|x - 2| - ln|x + 1| + C#

Explanation:

The trinomial #x^2 - x - 2# can be factored as #(x - 2)(x + 1)#.

#A/(x- 2) + B/( x+ 1) = (x + 4)/((x - 2)(x + 1))#

#A(x+ 1) + B(x- 2) = x + 4#

#Ax + A + Bx - 2B = x + 4#

#(A + B)x + (A - 2B) = x + 4#

Write a system of equations:

#{(A + B = 1), (A - 2B = 4):}#

#B = 1 - A -> A - 2(1 - A) = 4#

#A - 2 + 2A = 4#

#3A = 6#

#A = 2#

#B = 1 - A = 1 - 2 = -1#

The partial fraction decomposition is therefore:

#2/(x - 2) - 1/(x + 1)#

This can be integrated as #2ln|x - 2| - ln|x + 1| + C#

Hopefully this helps!

Jan 13, 2017

I got the same answer in a bit of a different approach.

#2ln|x-2| - ln|x+1| + C#

Sometimes if you can do something to simplify the problem, try it.


As an alternative answer, consider the following trick:

#int (x+4)/(x^2 - x - 2)dx#

#= int (x+4)/((x - 2)(x+1))dx#

#= int (color(red)(x-2+6))/((x - 2)(x+1))dx#

#= int 1/(x+1)dx + 6int 1/((x-2)(x+1))dx#

Now partial fractions becomes a little easier. The second integrand, ignoring the #6# for now, can be set up as

#1/((x-2)(x+1)) = A/(x-2) + B/(x+1)#,

so that we get upon cross-multiplying,

#A(x+1) + B(x-2) = 1#,

#=> (A + B)x + (A - 2B) = 1#,

thus giving the system of equations

#A + B = 0#,
#A - 2B = 1#.

Now we simply get

#A = -B#,
#-B - 2B = -3B = 1#,

so that #B = -1/3# and #A = 1/3# and the entire integral from the start of the problem becomes:

#color(blue)(int (x+4)/((x-2)(x+1))dx)#

#= int 1/(x+1)dx + 6int 1/3 1/(x-2) - 1/3 1/(x+1)dx#

#= int 1/(x+1)dx + 2int 1/(x-2)dx - 2int 1/(x+1)dx#

#= 2int 1/(x-2)dx - int 1/(x+1)dx#

#= color(blue)(2ln|x-2| - ln|x+1| + C)#