<s>[INST] Integral $\int \sqrt{x^2-3x+2}\ dx$ How to evaluate $$\int_3^{17} \sqrt{x^2-3x+2}\ dx \ ?$$ I tried Euler's substitution, that is $$\sqrt{x^2-3x+2}=x+t \Longleftrightarrow \frac{t^2-2}{-3-2t}+t=\frac{t^2+3t+2}{2t+3}\ ,$$ which I obtained from $$x^2+2tx+t^2=x^2-3x+2\Longleftrightarrow x=\frac{t^2-2}{-3-2t}$$ $$dx=\frac{2t(-3-2t)-(t^2-2)(-2)}{(-3-2t)^2}\ dt=-\frac{2t^2+6t+4}{(3+2t)^2} \ dt\ .$$ $x\in[3,17]$, so $t\in[\sqrt{2}-3,\sqrt{240}-17]$ (right?). Then we got $$\int_{\sqrt{2}-3}^{\sqrt{240}-17} \frac{t^2+3t+2}{2t+3}(-\frac{2t^2+6t+4}{(2t+3)^2})\ dt=-2\int_{\sqrt{2}-3}^{\sqrt{240}-17} \frac{(t^2+3t+2)^2}{(2t+3)^3}\ dt$$ and it's where I stuck...
EDIT
Ok I finished it my way, but I've heard there's a possibility to do it using $(x-\frac{3}{2})=\tan (t)$ substitution. How exactly?
 [/INST] An Euler Substitution will work, remember that there are several such substitutions and you have the root of a quadratic which factors. Another approach in addition to the excellent idea above is to write the integral as
$$\int (x-1)\sqrt{\frac{x-2}{x-1}}$$
and let 
$$y^2=\frac{x-2}{x-1}$$
</s>