This is an incorrect attempt! Look below for @Laithy 's advice and my second attempt.
I tried this problem but I'm not sure whether I am getting it right. I am having trouble with the very last step where I am supposed to show that $I^-(f) = I^+(f)$. Here is my attempt. Please point out any errors and help me justify why $I^-(f)$ and $I^+(f)$ are equal. Thank you!
$ f(x) =\begin{cases} 1 & 0\leq x < \frac{1}{2} \\ 0 & x = \frac{1}{2} \\ 1 & \frac{1}{2} < x \leq 1 \end{cases} $
Let $P$ be the following partition $P = \{[0, \frac{1}{2}], [\frac{1}{2}, 1]\}$ of $[0, 1]$.
Consider $I_1 = [0, \frac{1}{2}]$. It follows that $m_1 = 0$ and $M_1 = 1$.
This implies $m_1(x_1 - x_0) = 0$ and $M_1(x_1 - x_0) = 1(\frac{1}{2} - 0) = \frac{1}{2}$.
Now consider $I_2 = [\frac{1}{2}, 1]$. It follows that $m_2 = 0$ and $M_2 = 1$.
This implies $m_2(x_2 - x_1) = 0$ and $M_2(x_2 - x_1) = 1(1 - \frac{1}{2}) = \frac{1}{2}$.
All this gives the following:
$S^- = 0$ and $S^+ = 1$.
Therefore...
$I^-(f) = \sup\{S^-, \sigma\in G[0, 1]\} = \sup\{0, \sigma\in G[0, 1]\}$
and
$I^+(f) = \inf\{s^+, \sigma\in G[0, 1]\} = \inf\{1, \sigma\in G[0, 1]\}$
How do I decide whether $I^-(f)$ equals $I^+(f)$?
I don't quite understand your definition of $I_-$ and $I^+$. This should be the supremum of the lower sum over all partitions and the infimum of the upper sum over all partitions respectively. The partition you defined is not a good choice. You want to choose a partition that makes the upper sum and lower sum arbitrarily close.
Let $\varepsilon >0$. Consider the partition $P = \left\{ [0,\frac{1}{2} - \delta], [\frac{1}{2} - \delta, \frac{1}{2} + \delta], [\frac{1}{2} + \delta, 1] \right\} $ for some $\delta>0$.
Choose an appropriate $\delta >0$ so that $U(f,P) - L(f,P) < \varepsilon$
And so $0 \leq I^+ - I_- < \varepsilon$. Note that $I^+$ and $I_-$ do not depend on $\varepsilon$ and that this inequality holds for all $\varepsilon>0$. This implies that they are equal.