Definite integral of sign function I need to calculte the integral of $F(x)=\text{sign}(x)$ (A partial function)
between $x=-1$ and $x=2$.
Of course we need to seperate the integral between $x>0$   and  $x<0$
but is it a case of improper integral ? or just seperate and calculate?
 A: 
Notice:

*

*When $x<0$:
$$\text{sign}(x)=-1$$

*When $x>0$:
$$\text{sign}(x)=1$$

*When $x=0$:
$$\lim_{x\to0^+}\text{sign}(x)=1$$
$$\lim_{x\to0^-}\text{sign}(x)=-1$$

\begin{align}
\int_{-1}^{2}\text{F}(x)\space\text{d}x &= \int_{-1}^{2}\text{sign}(x)\space\text{d}x \\ 
&= \int_{-1}^{0}\text{sign}(x)\space\text{d}x+\int_{0}^{2}\text{sign}(x)\space\text{d}x \\ 
&= \int_{-1}^{0}-1\space\text{d}x+\int_{0}^{2}1\space\text{d}x \\ 
&=-\int_{-1}^{0}1\space\text{d}x+\int_{0}^{2}1\space\text{d}x \\ 
&= -\left[x\right]_{-1}^{0}+\left[x\right]_{0}^{2}\\ &= -\left(0-\left(-1\right)\right)+\left(2-0\right)\\ &=-1+2 \\
&=1
\end{align}
A: Except at $x=0$, $(|x|)'=\text{sgn}(x)$. Can you conclude ?
A: Once you've separated $\int_{-1}^2 F(x) dx$ it becomes by definition of the sign function (and because the value at exactly $x = 0$ doesn't matter)
$$
\int_{-1}^0 -1dx + \int_0^2 1dx
$$
which is easy to calculate and completely proper.
Integrals are very forgiving with discontinuities like this. You need quite a lot of them before they start causing theoretical problems with regards to properness and whether the integral is even defined. Technicality: As long as the set of discontinuities has measure $0$ (where "measure" is a more structured approach to the naïve notion of length / area / volume and so on), in particular if it's countable, then they do not hinder the Riemann integral from being defined.
