Why is the Indefinite Integral of a Step Function and continuous?

Let $f:[a,b] \to \mathbb R$ a Riemann integrable function and $M:= \sup\{|f(t)|:t \in [a,b]\}$.

If $F(x):=\int_a^x f(t) dt$, then let $x,y \in [a,b]$.

WLOG: $x \ge y$. Then we have $F(x)-F(y)=\int_y^x f(t) dt$, hence

$|F(x)-F(y)|=|\int_y^x f(t) dt| \le \int_y^x |f(t)| dt \le \int_y^x M dt=M(x-y)=M|x-y|$.

F is Lipschitz- continuous !

Your function $S$ is Riemann integrable !


Tons of other people can explain the true mathematics behind it, but I think it could be intuitive for you to try to understand where this continuity is coming from by looking at why the continuous triangle's derivative is giving you a step function. Say we have this function $$ f(x) = |x| = \begin{cases} -x & x< 0 \\ x & 0\leq x \end{cases} $$

which is very provable to be continuous

$$ \lim_{x\rightarrow 0^-}f(x) = 0 = \lim_{x\rightarrow 0^+}f(x). $$

Now if we differentiate the function we find that

$$ f'(x) = \begin{cases} -1 & x< 0 \\ 1 & 0> x \\ &x\neq 0 \end{cases} $$

which is a step function! That is why the reverse holds true: our step functions' integrals give continuous functions because we are making these piecewise linear equations that have "kinks". So long as the connection points are the same, the function will be continuous