I have this problem:
$$\int_0^2 \mathrm{(x-1-e^{-\frac{1}{2}x})}\,\mathrm{d}x$$
what I tried:
$t=-\dfrac{1}{2}x \Rightarrow \dfrac{dt}{dx} = \dfrac{1}{2} \Rightarrow dx = \dfrac{dt}{2}$
$$\int_0^2 \mathrm{(x-1)}\,\mathrm{d}x -\int_0^2 \mathrm{(e^{-\frac{1}{2}x})}\,\mathrm{d}x = \\ \int_0^2 \mathrm{x}\,\mathrm{d}x - \int_0^2 \mathrm{1}\,\mathrm{d}x - \int_0^2 \mathrm{(e^{-\frac{1}{2}x})}\,\mathrm{d}x = \\ [\dfrac{x^2}{2}]_{0}^{2} - [x]_{0}^{2} - \int_0^{-1} \mathrm{(e^t)}\,\mathrm{d}t = \\ [\dfrac{4}{2} - 0] - [2] - [e^{-\frac{1}{2}x}]_{0}^{-1} = 2- 2 - e^{\frac{1}{2}} - 0 = - e^{\frac{1}{2}} $$
which is obvously wrong because i substituted $t$ with $-\frac{1}{2}x$ at the end. why shouldnot I do this?
You must either keep the integral in terms of $t$ AND change the bounds, or convert back to $x$ and use the original bounds. Not both.