How do you evaluate the integral of #int ( (2x^4 + 5x^3 + 17x^2 - 42x + 19) / (x^3 + 2x^2 + 5x - 26) ) dx#?

1 Answer
Mar 8, 2016

#=x^2+x+23/25ln| x-2|-102/25ln|3/sqrt(x^2+4x+13)|-41/5tan^(-1)((x+2)/3)+const.#

Explanation:

First we should get in the numerator a polynomial of a grade inferior than the denominator's

By long division:

#" "2x^4+5x^3+0x^2+2x-1" "#|#" "x^3+2x^2+5x-26#
#-2x^4-4x^3-10x^2+26x" "#|____
_____#" "2x+1#
#" "x^3+7x^2-16x+19#
#" "-x^3-2x^2-5x+26#
#" "# _______
#" "5x^2-21x+45#

So the expression becomes
#=int(2x+1)dx+int (5x^2-21x+45)/(x^3+2x^2+5x-26)dx#

Let's deal with the last part
Trying #+-1, +-2 and +-3# we discover that #x=2# is a root of the polynomial of the denominator
By long division:

#" "x^3+2x^2+5x-26" "#|#" "x-2#
#-x^3+2x^2" "#|____
___#" "x^2+4x+13#
#" "4x^2+5x#
#" "-4x^2+8x#
#" "#
___
#" "13x-26#
#" "-13x+26#
#" "#
______
#" "0#

So we can write the last integrand as
#(5x^2-21x+45)/((x-2)(x^2+4x+13))=A/(x-2)+(Bx+C)/(x^2+4x+13)#

For #x=0, 1 and 3# we get

#-45/26=A/-2+C/13#
#-29/18=-A+(B+C)/18#
#27/34=A+(3B+C)/34#

Or
#[[-1/2,0,1/13],[-1,1/18,1/18],[1, 3/34,1/34]][[A],[B],[C]]=[[-45/26],[-29/18],[27/34]]#
Solving this system of variables, we get

#A=.92=23/25#
#B=4.08=102/25#
#C=-16.52=-413/25#

Then the original expression becomes
#=x^2+x+23/25int(x-2)dx+1/25int(102x-413)/(x^2+4x+13)dx#

Let's deal with the last part
#int(102x-413)/(x^2+4x+13)dx=#

Since #(x+2)^2=x^2+4x+4#
#(x+2)=3tany#
#dx=3sec^2y*dy#
How many units of #(x+2)# are there in the numerator?
#-> (102x-413)/(x+2)=102-615/(x+2)#
So the last partial expression becomes
#=102int (3tany.3cancel(sec^2 y))/(9cancel(sec^2y))dy-615int (3cancel(sec^2 y))/(9cancel(sec^y))dy#
#=-102ln|cosy|-205y#
But #sin y=(x+2)/3cosy#
And #sin^2y+cos^2y=1# => #((x^2+4x+4)/9+1)cos^2 y=1# => #cosy=3/sqrt(x^2+4x+13)#
So the partial expression becomes
#=-102ln|3/sqrt(x^2+4x+13)|-205tan^(-1)((x+2)/3)#

Finally, back to the main expression, we get
#=x^2+x+23/25ln| x-2|+1/25(-102ln|3/sqrt(x^2+4x+13)|-205tan^(-1)((x+2)/3))#
#=x^2+x+23/25ln| x-2|-102/25ln|3/sqrt(x^2+4x+13)|-41/5tan^(-1)((x+2)/3)+const.#