Let $f$ be the function on $[0, 1]$ given by:
$$f(x) = \left\{\begin{array}{ll} 1 & : x \neq \frac{1}{2}\\\\ 2 & : x = \frac{1}{2}\end{array} \right.$$
Prove that $f$ is Riemann integrable and compute $\int_0^1 f(x)\,\mathrm dx$.
Hint: for each $\epsilon > 0$, find a partition $P$ so that $U_P (f) − L_P(f) \leq \epsilon$.
So I understand that I have to show that $U_P (f ) = L_P(f )$ to show that it is integrable, but I have no idea where to start. What partition do I pick and how do I even come about picking it?
Also as far as the integral, I figure that it is 1, although I'm not sure if I am right. Since it is a single point ($x = \frac{1}{2} $) where the function is not uniformly continuous, does it change the area as a whole?
Pick the partition $P_n = (0, {1 \over 2}-{1 \over n}, {1 \over 2}-{1 \over n}, 1)$. Then $L(f,P_n) = 1$, $U(f,P_n) = 1+{2 \over n}$.
It follows that $\int_0^1 f(x)dx = 1$.