Riemann sum approaches area under graph
Actually the Riemann sum does not depend on how the rectangles are chosen, e.g. non-uniform $\Delta x$ can be chosen, provided that they all go to 0 as $N\to\infty$.
Given that $f(x)$ is continuous, by the mean-value theorem, the area under the curve between $x_n$ and $x_{n+1}$ is $$ A_n = (x_{n+1} - x_n)f(c_n) $$ where $c_n\in[x_n, x_{n+1}]$.
If $f(x)$ is differentiable, then we Taylor expand to the first term, $$\begin{align*} f(c_n) &= f(x_n) + O(c_n - x_n) \\ &= f(x_n) + O(\Delta x), \end{align*}$$ as $\Delta x\to 0$, since $c_n - x_n\leq \Delta x$.
Therefore the area under graph is $$\begin{align*} A &= \lim_{N\to\infty}\sum_{n=0}^{N-1} A_n \\ &= \lim_{N\to\infty}\sum_{n=0}^{N-1} \Delta x\cdot f(x_n)+O(\Delta x^2) \\ &= \lim_{N\to\infty}\sum_{n=0}^{N-1} \Delta x\cdot f(x_n) + \lim_{N\to\infty}\sum_{n=0}^{N-1}O\Big(\frac{1}{N^2}\Big) \\ &= \lim_{N\to\infty}\sum_{n=0}^{N-1} \Delta x\cdot f(x_n) + \lim_{N\to\infty}N\cdot O\Big(\frac{1}{N^2}\Big) \\ &= \lim_{N\to\infty}\sum_{n=0}^{N-1} \Delta x\cdot f(x_n) + \lim_{N\to\infty}O\Big(\frac{1}{N}\Big) \\ &= \lim_{N\to\infty}\sum_{n=0}^{N-1} \Delta x\cdot f(x_n)\\ &= \int_a^b f(x)\,dx \end{align*}$$