# Not sure what I did wrong in this integral

#### KevinShaughnessy

Hi,

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!

#### ebaines

The problem is that $$\displaystyle \int \frac {dx} {x-5} = \ln(x-5)$$ only in the domain x>5. For the interval 0 to 4 you must make a substitution:

Let $$\displaystyle u = -(x-5)$$. Then $$\displaystyle \int_0 ^4 \frac {dx} {x-5} = \int_5 ^1 \frac {du} u = \ln(1)-\ln(5) = -\ln(5)$$

Last edited:

#### skeeter

MHF Helper
I graphed your antiderivative on [0,4] ... looks continuous to me.

#### Attachments

• 6.6 KB Views: 2
1 person

#### ebaines

skeeter: I think you may have interpreted the OP's "|" marks as absolute values - they actually should be parentheses. His problem is that ln(x-5) is not defined for x<=5.

1 person

#### skeeter

MHF Helper
I disagree ... the antiderivative requires the absolute value to be correct.

The integrand is continuous over [0,4] and value of the definite integral is

$$\displaystyle \int_0^4 \frac{x-1}{x^2-4x-5} \, dx = -\frac{\ln(5)}{3} \approx -0.536479...$$

his antiderivative was $$\displaystyle \frac{1}{2}\ln|x^2-4x-5| + \frac{1}{6}\ln|x-5| - \frac{1}{6}\ln|x+1|$$

the absolute value is required for the first two terms, not for the last.

evaluating this antiderivative from x = 0 to x = 4 yields ...

$$\displaystyle \left[\frac{1}{2}\ln(5) + 0 - \frac{1}{6}\ln(5)\right]-\left[\frac{1}{2}\ln(5) + \frac{1}{6}\ln(5) - 0\right] = -\frac{\ln(5)}{3}$$

rational functions that yield log functions when integrated can be evaluated when the log's argument is negative, hence the need for absolute value in the antiderivative. as a simple example ...

$$\displaystyle \int_{-6}^{-1} \frac{1}{x} \, dx = \left[\ln|x|\right]_{-6}^{-1} = \ln|-1| - \ln|-6| = -\ln(6)$$

the attached image is a calculator evaluation of the original integral.

#### Attachments

• 658 bytes Views: 13
ebaines

#### ebaines

OK, thanks skeeter. I assumed that the OP's issue was that he wasn't using the absolute values, even though he included them in his answer. So, you're right - it seems there is really no issue here.