Define $f:[0,2] \to \mathbb{R}$ by $$f(x)=\begin{cases} 1, &\text{if} \: x \neq 1 \\ -1, &\text{if} \: x=1\end{cases}.$$ Using Riemann's criterion, prove that $f$ is integrable on $[0,2]$.
Now, I think I am right in saying that Riemann's criterion is as follows:
A bounded function $f$ is integrable if and only if $\forall \varepsilon>0, \exists$ a partition $P$ such that $$U(f,P)-L(f,P)<\varepsilon.$$
First of all I defined the partition $P$ to be $$P=\{0,1-\varepsilon,1+\varepsilon,2\}.$$ I was also thinking of defining $P$ to be $$P_n=\left\{ \frac kn: k=0,1,\dots,2n \right\}$$ and so $1 \in P_n$ $\forall n$.
What would be the best approach for a question like this?
$x=1$ is the only point of discontinuity. Take a small interval around $x=1$, and then it doesnt matter what you do everywhere else, just cover it in the simplest way possible. The only contribution will be from the ivterval about $x=1$.