Showing Every Polygonal function is Lipschitz There is a problem in my (N.L. Carothers') analysis textbook that asks:

Prove every polygonal function is Lipschitz. Thus, the Lipschitz functions are dense in $C[a,b]$.

Is this question supposed to say: prove every polynomial function is Lipschitz? My reason for thinking this is because polygonal functions are just polynomials with degree $\leq 1$, and therefore,  would be constant and hence Lipschitz. On the other hand, if the author meant to ask this claim for polynomials in $C[a,b] : = \{f:[a,b] \subset \mathbb{R} \to \mathbb{R}: f \ is \ continuous\}$ we would only be studying polynomials on a compact domain in $\mathbb{R}$. Which, in turn would mean the polynomials we are considering are bounded and hence continuous.
I have definitely been staring at this problem for far too long, so any insight will be useful.
 A: No, "polygonal" isn't a typo. A polygonal function on $[a, b]$ is formed by splitting $[a, b]$ into a finite set of intervals and defining an affine function on each interval, such that the affine functions "join up" at the interval boundaries. In other words, a function that looks like this:

A polygonal function is definitely not just a polynomial of degree at most one, and certainly isn't necessarily constant.
A more formal definition could be this:

A function on $[a, b]$ is polygonal iff here exists a strictly increasing finite sequence $a=x_1<...<x_n=b$ such that for all $i$, the function is affine on $[x_i, x_{i+1}]$, and the function is continuous on $[a, b]$.

To prove such a function is Lipschitz, consider the following intuitions.

*

*Think of the function $x(t)$ as representing the position of something over time. To say $x$ is $\lambda$-Lipschitz is precisely to say that the average speed of $x$ over any time interval is at most $\lambda$ (convince yourself of this).


*To say $x$ is an affine function is precisely to say the particle travels at constant speed. Apply this to show an affine function is Lipschitz (and work out the Lipschitz constant).


*To say $x$ is polygonal is precisely to say that the particle starts out traveling at speed $v_1$, then changes speed instantaneously to $v_2$, and so on a finite number of times. Think about why this makes the function Lipschitz (hint: there is a maximum speed $\max v_i$ the particle is ever travelling at).
In more detail, here is one way to do it.
Let $f$ be polygonal and let $x < y$ be two points in $[a, b]$. Let $\xi_1 < ... < \xi_n$ be the points in $[a, b]$ where $f$ "changes direction" that are between $x$ and $y$. Note that $f'$ is constant on each interval $[\xi_i,\xi_{i+1}]$, say $f'=\lambda_i$ on that interval. Similarly, $f'$ is constant on $[x, \xi_1]$ and on $[\xi_n, y]$, let's say equal to $\alpha$ and $\beta$ respectively. We have:
$$f(y)=f(x)+\alpha|\xi_1-x|+\sum_{i=1}^{n-1} \lambda_i |\xi_{i+1}-\xi_i|+\beta|y-\xi_n|$$
You can use this to obtain a bound on $|f(y)-f(x)|$ using the triangular inequality which will give you that $f$ is Lipschitz with constant $\max(\alpha, \beta, \lambda_1, ..., \lambda_{n-1})$.
