How do you integrate #(x^2 + 5x - 2)/(x(x^2 - 2))#?

1 Answer
Jun 14, 2017

#ln|x| + (5sqrt2)/4 ln |x - sqrt2|/|x + sqrt2| + C#

(Wolfram Alpha gets this too.)


Always simplify first... You'll get:

#= int cancel(x^2 - 2)/(xcancel((x^2 - 2)))dx + int (5cancel(x))/(cancel(x)(x^2 - 2))dx#

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

#= ln|x| + 5 int 1/((x + sqrt2)(x - sqrt2))dx#

Now, only the second integral needs partial fractions.

#int 1/((x + sqrt2)(x - sqrt2))dx = int A/(x + sqrt2) + B/(x - sqrt2)dx#

Get common denominators:

#(A(x - sqrt2) + B(x + sqrt2))/cancel((x + sqrt2)(x - sqrt2)) = 1/cancel((x + sqrt2)(x - sqrt2))#

Distribute and get to common polynomial form:

#Ax - Asqrt2 + Bx + Bsqrt2#

#= color(red)((A + B))x + color(green)((-A + B)sqrt2) = color(red)(0)x + color(green)(1)#

Hence, we have the system of equations:

#A + B = 0# #" "" "" "" "" "bb((1))#

#(-A + B)sqrt2 = 1##" "" "bb((2))#

Solve #(1)# to get #A = -B# and plug into #(2)# to get:

#2B = 1/sqrt2#

#=> B = 1/(2sqrt2) = sqrt2/4#

#=> A = -sqrt2/4#

Therefore, we have:

#int 1/((x + sqrt2)(x - sqrt2))dx#

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

#= -sqrt2/4 ln |x + sqrt2| + sqrt2/4 ln |x - sqrt2|#

And thus, the overall integral is:

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

#= ln|x| - (5sqrt2)/4 ln |x + sqrt2| + (5sqrt2)/4 ln |x - sqrt2| + C#

#= color(blue)(ln|x| + (5sqrt2)/4 ln |x - sqrt2|/|x + sqrt2| + C)#