Problem
I have been working through content in real analysis and came across across an inequality in a proof that is unclear to me.
We are told that a function $\psi$ is a step function on the interval $[a,b]$ where there exists partition $P=${$p_0,…p_k$} for which $\psi$ is constant on all intervals $(p_{i-1},p_i)$.
The proof begins with the inequality:
Note: we define $a_i=a+i\frac{(b-a)}n$
I understand that we can replace each value $\psi (a_i)$ with $\lVert \psi \lVert_\infty$ to bound the left hand side.
However, I’m not quite sure how they have derived the upper bound $2k\frac{(b-a)}n\lVert \psi\lVert_\infty$ from the information provided.
I would be grateful if anyone could shed some light on what I’m failing to understand here.
Edit
I have included more of the proof for clarity where the aim is to show that as n$\rightarrow$$\infty$ the left hand side converges to 0:
where $S[a,b]$ is the set of step functions on $[a,b]$.