Below I present a proof that I know is wrong. It "states" that all bounded functions are integrable. However, I am not sure why it is wrong, i.e., I am unsure where my logic fails. It goes as follows:
Suppose we have a bounded function $f:[a,b]\to\mathbb{R}$. Then, every subset $S\subseteq[a,b]$ has a supremum and infimum because $f$ is well-defined in the interval and because it is bounded. We call this supremum of a subset $M_S$, and the infimum $m_S$. Then, we define a partition $P=\{a=x_0<x_1<...<x_n=b\}$, and we demand $|x_i-x_{i-1}|<\frac{\epsilon}{nN}$. Thus $U(f,P)=\sum\limits_{i=1}^nM_i(x_i-x_{i-1})$ and $L(f,P)=\sum\limits_{i=1}^nm_i(x_i-x_{i-1})$, where $M_i$ denotes $M_S$ on the interval $S=[x_k,x_{k-1}]$ (similarly for $m_i$). So, $U(f,P)-L(f,P)$ is:
$$U(f,P)-L(f,P)=\sum\limits_{i=1}^nM_i(x_i-x_{i-1})-\sum\limits_{i=1}^nm_i(x_i-x_{i-1})=\sum\limits_{i=1}^n(M_i-m_i)(x_i-x_{i-1})$$
But because $f$ is bounded, $M_i-m_i\leq N$, thus:
$$\sum\limits_{i=1}^n(M_i-m_i)(x_i-x_{i-1})\leq N\sum\limits_{i=1}^n(x_i-x_{i-1})<N\sum\limits_{i=1}^n\frac{\epsilon}{nN}=\epsilon$$
This implies that $f$ is integrable because for any $\epsilon$, we can find some partition $P$ such that $U(f,P)-L(f,P)<\epsilon$
I know this is wrong, but where does my logic faulty?
$n$ depends on the interval size, so when you set $|x_i - x_{i-1}| < \frac{\epsilon}{nN}$, the interval size now depends on $n$. This means that $|x_i - x_{i-1}|$ and $n$ depend on each other. It can't always be the case that there are $n$ intervals and the size of each interval is $< \frac{\epsilon}{nN}$.