#"This is the integral of a rational function."#
#"The standard procedure is splitting in partial fractions."#
#"First, we search for the zeros of the denominator :"#
#x^3 - 5 x^2 + 4 x = 0#
#=> x (x - 1)(x - 4) = 0#
#=> x = 0, 1, or 4#
#"So we split in partial fractions : "#
#(2x + 1)/(x^3-5x^2+4x) = A/x + B/(x-1) + C/(x-4)#
#=>2x + 1 = A(x-1)(x-4) + B x(x-4) + C x(x-1)#
#=> A+B+C = 0 , -5 A - 4 B - C = 2, 4A = 1#
#=> A=1/4 , B = -1, C = 3/4#
#"So we have"#
#(1/4) int {dx}/x - int {dx}/(x-1) + (3/4) int {dx}/(x-4)#
# = (1/4) ln(|x|) - ln(|x-1|) + (3/4) ln(|x-4|) + C#
#"Now we evaluate between 2 and 3 :"#
#= (1/4) ln(3) - ln(2) + cancel((3/4) ln(1)) - (1/4) ln(2) + cancel(ln(1)) - (3/4) ln(2)#
#= (1/4) ln(3) - 2 ln(2)#
#= -1.11164#