The integral is \(\displaystyle \int \frac{x-1}{x^2-4x-5}\).

I tried to first do a little manipulation and add \(\displaystyle -1 + 1\) to the integral to get:

\(\displaystyle \int \frac{x-2}{x^2-4x-5} + \int \frac{1}{x^2-4x-5}\)

The first one solves easily using u sub, the second I solved using partial fractions:

\(\displaystyle \frac{A}{x-5} + \frac{B}{x+1}\)

The coefficients solved to \(\displaystyle A = \frac{1}{6}\) and \(\displaystyle B = -\frac{1}{6}\)

That should give me a final answer of \(\displaystyle \frac{1}{2}ln|{x^2-4x-5}| + \frac{1}{6} ln|{x-5}| - \frac{1}{6}ln|{x+1}|\)

The problem is that the integral is supposed to be a definite integral from 0 to 4, and the function I got as an answer isn't continuous over that interval. If I factor out the coefficients and combine the ln's using log properties I get something that is solvable but that doesn't give the right answer.

Can anyone see what I did wrong?

Thanks!