Integral of function with absolute value Let us consider the following integral for $x>0$
$$\int_{-1}^x e^{|t|} \, dt=\int_{-1}^0 e^{-t}dt+\int_0^1 e^t dt=e^x+e-2.$$
If we take $\frac{d}{dt}|t|=\mathrm{sgn}(t)$ we might want to evaluate it as
$$\int_{-1}^x e^{|t|} dt =\biggr[\frac{e^{|t|}}{\mathrm{sgn}(t)} \biggr]^x_{-1}=e^x+e.$$
My question is: why doesn't the second method work? Why is there a $-2$ missing? It looks strange too, since the integral is not a continuous function of $x$ either.

This is a classic case of failure in the method of substitutions. You can only substitute for functions that do not change sign over the interval of the integral. $|t|$ and consequently its derivative $sgn(t)$ do not hold the same sign over $[-1, x]$.
