How do I start this integral?
integral from [-2 to 1]
sqrt((x^2)-1) / x dx
$\displaystyle \displaystyle \int_{-2}^1{\frac{\sqrt{x^2 - 1}}{x}\,dx} = \frac{1}{2}\int_{-2}^1{\frac{2x\sqrt{x^2 - 1}}{x^2}\,dx}$
Now make the substitution $\displaystyle \displaystyle u = x^2 - 1 \implies du = 2x\,dx$, and making note that $\displaystyle \displaystyle u(-2) = 3, u(1) = 0$, the integral becomes
$\displaystyle \displaystyle \begin{align*} \frac{1}{2}\int_{-2}^1{\frac{2x\,\sqrt{x^2 - 1}}{x^2}\,dx} &= \frac{1}{2}\int_3^0{\frac{\sqrt{u}}{u + 1}\,du} \\ &= -\frac{1}{2}\int_0^3{\frac{\sqrt{u}}{u+1}\,du} \\ &= -\int_0^3{\frac{u}{2\sqrt{u}\,(u + 1)}\,du} \end{align*}$
Now make the substitution $\displaystyle \displaystyle v = \sqrt{u} \implies dv = \frac{1}{2\sqrt{u}}\,du$ and noting that $\displaystyle \displaystyle v(0) = 0$ and $\displaystyle \displaystyle v(3) = \sqrt{3}$, the integral becomes
$\displaystyle \displaystyle \begin{align*} -\int_0^3{\frac{u}{2\sqrt{u}\,(u + 1)}\,du} &= -\int_0^{\sqrt{3}}{\frac{v^2}{v^2 + 1}\,dv} \\ &= -\int_0^{\sqrt{3}}{1 - \frac{1}{v^2 + 1}\,dv} \\ &= -\left[v - \arctan{v}\right]_0^{\sqrt{3}} \\ &= -\left[\left(\sqrt{3} - \arctan{\sqrt{3}}\right) - \left(0 - \arctan{0}\right)\right] \\ &= -\left(\sqrt{3} - \frac{\pi}{3} - 0 + 0\right) \\ &= \frac{\pi}{3} - \sqrt{3} \end{align*}$
oh i mis-read it, its -2 to -1. But I think I can fix it myself.
Also I have a question about how to change the integral bounds when you do a change of variable. What if you change u=cos(x), and the integral bound was -inf to inf, then what would be the new integral bounds?