# $\int \frac{x-4}{\sqrt{x^2-4x+5}}\, dx$

I'm trying to solve this irrational integral $$\int \frac{x-4}{\sqrt{x^2-4x+5}}\, dx$$ doing the substitution

$$x= \frac{5-t^2}{2 \cdot (2+t)}$$ according to the rule.

So the integral becomes:

$$\int \frac{1}{2} \cdot \frac{t^2+8t+11}{t^2+4t+5}\, dt =\frac{1}{2} \int 1+\frac{4t+7}{t^2+4t+5}\, dt= \frac{1}{2}t+2 \ln (t+2)+\frac{1}{2}\frac{1}{t+2} + cost$$ with $$t=-x+ \sqrt{x^2-4x+5}$$

The final result according to my book is instead $$\sqrt{x^2-4x+5}-2 \ln( x-2+ \sqrt{(x-2)^2+1})$$

I don't understant why this difference. Can someone show me where I'm making mistakes?

• First thing I would do is differentiate your answer, and differentiate the book answer, and see whether you get back the original integrand. Apr 18 at 0:33
• In the final result of the book, you forgot the ln parenthesis. Apr 18 at 0:44
• yes, I changed the parenthesis
– Anne
Apr 18 at 0:46
• Is my substitution correct in the original integral?
– Anne
Apr 18 at 0:53

To check your results, here's an other approach

$$\int \frac{2x-4-4}{2\sqrt{(x-2)^2+1}}dx=$$

$$\sqrt{x^2-4x+5}-2\int \frac{dx}{\sqrt{(x-2)^2+1}}$$

put $$x-2=\sinh(t)=\frac{e^t-e^{-t}}{2}$$ the last integrale becomes $$\int dt=t+C$$

but $$e^{2t}-2(x-2)e^t-1=0$$ gives

$$e^t=(x-2)+\sqrt{x^2-4x+5}$$

So, the final result is $$\sqrt{x^2-4x+5}-$$ $$2\ln\Bigl((x-2)+\sqrt{x^2-4x+5}\Bigr)+C$$

• why $$x-2=\sinh(t)=\frac{e^t-e^{-t}}{2}$$?
– Anne
Apr 18 at 0:52
• @Anne I made that substitution to take benefit from $1+\sinh^2=\cosh^2$. Your book is right. how did you get the $cos(t)$. Apr 18 at 0:53
• great! Now I have the same result of the book. What I don't understant is where I made mistakes in the substitution...
– Anne
Apr 18 at 1:10
• Your denominator $t^2+4t+4$ should be $t^2+4t+5$ Apr 18 at 1:32
• ahh ok I didn't write well but it's $t^2+4t+5$
– Anne
Apr 18 at 1:34