Compute integral by Riemann sums Consider $$f\left(x\right)\:=\:\begin{cases}0, & x=0, \\1, & x\ne 0.\end{cases}$$
How do I calculate $$\int _{-1}^1f (x) dx$$ by Riemann?
I just don't understand the partition method..can someone guide me?

Hints: for any partition $\;P:=\{x_0=-1<x_2<\ldots < x_n=1\}\;$ of $\;[-1,1]\;$ , we have that
$$\sum_{i=1}^nf(c_i)\left(x_i-x_{i-1}\right)=\begin{cases}\sum_{i=1}^n \left(x_i-x_{i-1}\right)=2&,\;\;\;c_i\neq0\;\;\forall\,i\\{}\\2-\left(x_{i_0}-x_{i_0-1}\right)&,\;\;\;c_{i_0}=0\end{cases}$$
Well, what happens when you take the limit of the above when 
$$\;n\to\infty\;\; \mathbf{\text{and also}} \;\;\max_{i}|x_i-x_{i-1}|\to 0\;\;\;?$$
as required in Riemann sums?
