Prove that $\int_0^2f(x)\,dx=-1$ where \begin{equation} f(x)=\left\{\begin{array}{c}1,\,\mbox{if }0\leq x\lt 1\\ -2,\,\mbox{if }1\leq x\leq 2\end{array}\right. \end{equation} using Riemann sums.

Problem: 

Prove that $\int_0^2f(x)\,dx=-1$ where
\begin{equation}
f(x)=\left\{\begin{array}{c}1,\,\mbox{if }0\leq x\lt 1\\ -2,\,\mbox{if }1\leq x\leq 2\end{array}\right.
\end{equation}
using Riemann sums.

Answer: 

It is true that $\int_0^2f(x)\,dx=-1$.