First normalize the fraction to get the highest power of #x# in the numerator to be less than the highest power in the denominator. (This can be done either by algebraic division, or as shown below, by transfering a multiple of the denominator to the numerator and then adding or subtracting a linear term to get the original numerator.)

Then decompose into partial fractions. Since the denominator is already factorized into two distinct linear factors, the cover-up rule is bound to work. Write out the two linear factors as denominators, leaving the numerators blank. To fill in the numerator over #x-1#, cover up the #x-1# in the undecomposed fraction and replace #x# with #1# in what remains uncovered. (The value that you replace #x# with is the value that makes the covered up expression zero.) Then do the similar process with the other fraction.

You now have three easy expressions to integrate. Then check back.

#int(3x^2-4x-2)/((x-1)(x-2))dx#

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

#=int3+(5x-8)/((x-1)(x-2))dx#

#=int3+((5-8)/(-1))/(x-1)+((10-8)/(+1))/(x-2)dx#

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

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

Check by differentiating the answer:

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

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

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

#=(3x^2-4x-2)/((x-1)(x-2))# Good!