x²-3x-4=(x-4)(x+1) so we should be able to use partial fractions to solve.
x/(x²-3x-4)≡A/(x-4)+B/(x+1) where A and B are constants.
So x≡Ax+A+Bx-4B.
Equating coefficients of like terms:
x: A+B=1
constant: A-4B=0 so A=4B and 4B+B=1 making B=1/5 and A=4/5
So now we can integrate the partial fractions:
⅘ln|(x-4)| + ⅕ln|(x+1)|+C.