int (3x-1)/(x^2+2x-8)dx=int (3x-1)/((x+4)(x-2))dx
To decompose the function into partial fractions, there are A and B such that:
A/(x+4)+B/(x-2)=(3x-1)/((x+4)(x-2))
A(x-2)+B(x+4)=3x-1
(A+B)x+(4B-2A)=3x-1
Now solve for A and B.
A+B=3
4B-2A=-1
->A=13/6, B=5/6
Integrate:
int (13/6)/(x+4)dx+int (5/6)/(x-2)dx
13/6 int1/(x+4)dx+5/6 int 1/(x-2)dx
Set u=x+4 in the first and v=x-2 in the second so that both have derivative of 1.
13/6 int1/u du+5/6int1/v dv
13/6 lnu+5/6 ln v
13/6 ln abs(x+4)+ 5/6 ln abs(x-2)
(13ln abs(x+4)+ 5ln abs(x-2))/6