Determining whether a function is integrable by selecting a dissection I have a function $g:[0,1] \rightarrow \mathbb{R}$ which is defined by:
$g(x)=
\begin{cases}
1,\ \text{if} \ 0 \leq x<1 \\
2,\ x=1
\end{cases}$
I need to determine whether $g$ is integrable or not by using Riemann's criterion. First I need to choose a dissection though and this is where my problems arise. I believe that the dissection will be something along the lines of: $$D= \bigg[ 0, \frac{1}{n}, 1 - \frac{1}{n}, 1\bigg]$$ But I'm unsure if this is correct? I believe I can do the steps after this but I'm struggling to select a proper dissection.
 A: Your dissection is almost correct. Note that $n = 1, 2$ give a bit of a weird dissection. For $n \ge 3$, it should work. That is, you will indeed have the following inequality:
$$0 < \frac{1}{n} < 1 - \frac{1}{n} < 1.$$

On the other hand, you may want to consider a simpler dissection of the form:
$$D_n = \left[0, 1 - \frac{1}{2n}, 1\right]; \quad n \ge 1.$$
This will give the difference of the upper and lower sums quite neatly and you should be able to conclude.

EDIT: Adding more details.
Let us now calculate the upper sums $U(D_n)$ and lowers sums $L(D_n)$. (Hopefully, the notation is understandable if not the same.)
Note that over the interval $\left[0, 1 - \dfrac{1}{2n}\right]$, the function is identically equal to $1$ and thus, $m_1 = M_1 = 1$. (Using the notation from the comment.)
On the interval $\left[1 - \dfrac{1}{2n}, 1\right]$, we see that the function takes the values $\{1, 2\}$. Thus, we have $m_2 = 1$ and $M_2 = 2$.  
(Note that $n$ does not appear in the infima and suprema.)
Now, we calculate the sums as:
$$L(D_n) = 1\cdot\left(1 - \dfrac{1}{2n}\right) + 1\cdot\left(\dfrac{1}{2n}\right) = 1,$$
$$U(D_n) = 1\cdot\left(1 - \dfrac{1}{2n}\right) + 2\cdot\left(\dfrac{1}{2n}\right) = 1 + \dfrac{1}{2n}.$$
Thus, we see that $U(D_n) - L(D_n) = \dfrac{1}{2n}$ which tends to $0$ as $n \to \infty$. This concludes that the function is integrable. (And the integral is either of the limits of the sums, both being equal to $1$, as expected.)
