I have a question to find the area bounded by $y = \dfrac{x^2-4x-4}{x^2-4x-5}$ and the x-axis. First I found the bounds by solving where the numerator would equal zero. My result is $2\pm2\sqrt2$ so I wrote the integral as follows:
$$\int_{2-2\sqrt2}^{2+2\sqrt2}\dfrac{x^2-4x-4}{(x-5)(x+1)}$$
Then I used partial fractions to split the integral. The final result I got prior to evaluation at the bounds to find the area is:
$$x + \dfrac{\ln(x-5)}{6}-\dfrac{\ln(x+1)}{6}\bigg|_{2-2\sqrt2}^{2+2\sqrt2}$$
My question is, when I go to plug in the bounds, I get a negative answer inside the first log ($\ln(2+2\sqrt2-5) = \ln(-0.171))$, so that part is not real. I checked over my integral a couple times and I get the same result, although it's possible I'm missing something somewhere. If the result above is correct, how do you deal with the non-real portion after evaluating the bounds?
I am going to start at the partial fractions bit (this isn't necessarily for the OP because he already knows how to do it. Rather, it is for other people who may come across a similar problem). $$\frac{x^2-4x-4}{x^2-4x-5}=1-\frac{1}{x^2-4x-5}$$ I will ignore the $1$ for now. Just remember that the $1$ is still there. $$\frac{9}{(x-5)(x+1)}$$ $$=\frac{A}{x-5}+\frac{B}{x+1}$$ $$A(x+1)+B(x-5)=1$$ $$Ax+Bx+A-5B=1$$ Now we have a linear system of equations, where $A+B=0$ (this deals with the $x$ term) and $A-5B=1$ (this deals with the constant) $$\begin{cases} A+B=0 \\ A-5B=1 \\ \end{cases}$$ We can solve by elimination. $$\begin{array}{align} & A & + & B & = & 0 \\ - & (A & - & 5B) & = & 1 \\ \hline & & & 6B & = & -1 \\ & & & B & = & -\frac{1}{6} \end{array}$$ Plugging back into either equation: $$A-\frac{1}{6}=0$$ $$A=\frac{1}{6}$$ $$\frac{9}{x^2-4x-5}=\frac{\frac{1}{6}}{x-5}+\frac{-\frac{1}{6}}{x+1}$$ $$=\frac{1}{6(x-5)}-\frac{1}{6(x+1)}$$ Don't forget that $1$! Now we solve for the indefinite integral $$\int \frac{x^2-4x-4}{x^2-4x-5} \ dx$$ Using our partial fractions: $$\int 1+\frac{1}{6(x-5)}-\frac{1}{6(x+1)} \ dx$$ $$=\int 1 \ dx + \int \frac{1}{6(x-5)} \ dx - \int \frac{1}{6(x+1)} \ dx$$ The integral of $1$ is $x$. $$x+\int \frac{1}{6(x-5)} \ dx -\int \frac{1}{6(x+1} \ dx$$ Apply constant rule $$x+\frac{1}{6} \int \frac{1}{x-5} \ dx -\frac{1}{6}\int \frac{1}{x+1} \ dx$$ Let's work on each integral one by one. Let's start with the first one. $$\int \frac{1}{x-5} \ dx$$ Let: $$u=x-5, \ du=dx$$ $$\int \frac{1}{u} \ du$$ $$=\ln|u|$$ $$=\ln|x-5|$$ The second integral can be solved in the same way. Let: $$u=x+1, \ du=dx$$ $$\int \frac{1}{u} \ du$$ $$=\ln|u|$$ $$=\ln|x+1|$$ $$\int \frac{x^2-4x-4}{x^2-4x-5}=x+\frac{1}{6}\ln|x-5| -\frac{1}{6}\ln |x+1| + C$$ $$=x+\frac{\ln|x-5|}{6}-\frac{\ln|x+1|}{6}+C$$ Now we solve for the definite integral. We can ignore the $+C$ because it is only going to get canceled out. $$\left.x+\frac{\ln|x-5|}{6}-\frac{\ln|x+1|}{6}\right|_{2-\sqrt{2}}^{2+\sqrt{2}}$$ $$=\left(2+\sqrt{2}+\frac{\ln\left|2+\sqrt{2}-5\right|}{6}-\frac{\ln\left|2+\sqrt{2}+1\right|}{6}\right)-\left(2-\sqrt{2}+\frac{\ln\left|2-\sqrt{2}-5\right|}{6}-\frac{\ln\left|2-\sqrt{2}+1\right|}{6}\right)$$ $$=2+\sqrt{2}+\frac{\ln\left|2+\sqrt{2}-5\right|}{6}-\frac{\ln\left|2+\sqrt{2}+1\right|}{6}-2+\sqrt{2}-\frac{\ln\left|2-\sqrt{2}-5\right|}{6}+\frac{\ln\left|2-\sqrt{2}+1\right|}{6}$$ $$=2\sqrt{2}+\frac{\ln\left|\sqrt{2}-3\right|-\ln\left|\sqrt{2}+3\right|}{6}+\frac{\ln\left|3-\sqrt{2}\right|-\ln\left|-\sqrt{2}-3\right|}{6}$$ $$=\frac{12\sqrt{2}+\ln\left|\sqrt{2}-3\right|-\ln\left|\sqrt{2}+3\right|+\ln\left|3-\sqrt{2}\right|-\ln\left|-\sqrt{2}-3\right|}{6}$$ We can simplify the $\left|-\sqrt{2}-3\right|$ in the numerator to $\sqrt{2}+3$. We can also get rid of the absolute value bars in $\left|\sqrt{2}+3\right|$. $$\frac{12\sqrt{2}+\ln\left|\sqrt{2}-3\right|-\ln\left(\sqrt{2}+3\right)+\ln\left|3-\sqrt{2}\right|-\ln\left(\sqrt{2}+3\right)}{6}$$ $$=\frac{12\sqrt{2}+\ln\left|\sqrt{2}-3\right|-2\ln\left(\sqrt{2}+3\right)+\ln\left|3-\sqrt{2}\right|}{6}$$ $$\color{green}{\therefore \int_{2-\sqrt{2}}^{2+\sqrt{2}} \frac{x^2-4x-4}{x^2-4x+5} \ dx=\frac{12\sqrt{2}+\ln\left|\sqrt{2}-3\right|-2\ln\left(\sqrt{2}+3\right)+\ln\left|3-\sqrt{2}\right|}{6}}$$ If you want a decimal approximation, just plug in that whole entire string of $\ln$s and whatnot into your calculator, or just use an online definite integral calculator. I hope I helped you.