# Prob. 23, Chap. 4 in Baby Rudin: Every convex function is continuous and every increasing convex function of a convex function is convex

Here is Prob. 23, Chap. 4 in the book Principles of Mathematical Analysis by Walter Rudin, 3rd edition:

A real-valued function $f$ defined in $(a, b)$ is said to be convex if $$f \left( \lambda x + (1- \lambda) y \right) \leq \lambda f(x) + (1-\lambda) f(y)$$ whenever $a < x < b$, $a < y < b$, $0 < \lambda < 1$. Prove that every convex function is continuous. [Although this proof is available at Math SE, I would prefer a direct, $\varepsilon$-$\delta$ proof.] Prove that every increasing convex function of a convex function is convex. [ How to?] (For example, if $f$ is convex, so is $e^f$.)

If $f$ is convex in $(a, b)$ and if $a < s < t < u < b$, show that $$\frac{ f(t)-f(s)}{t-s} \leq \frac{ f(u)-f(s)}{u-s} \leq \frac{ f(u)-f(t)}{u-t}.$$ [ How to? ]

I would appreciate if the proofs are elementary (but rigorous enough for Rudin) and are only based on the machinary developed by Rudin up to this point in the book.

Is every real convex function $f$ defined in $(a, b)$ also uniformly continuous?

An afterthought:

Here's my attempt:

Let $x$, $y$, and $z$ be any three real numbers such that $$x < y < z.$$ Then we have $$0 < y-x < z-x,$$ which implies that $$0< \frac{ y-x}{z-x} < 1;$$ moreover if we put $$\lambda \colon= \frac{y-x}{z-x},$$ then we see that \begin{align} (1-\lambda)x+\lambda z &= \left( 1- \frac{y-x}{z-x} \right) x + \frac{y-x}{z-x} z \\ &= \frac{(z-y)x+(y-x)z}{z-x} \\ &= y. \end{align} Thus we have shown that for any three real numbers $x$, $y$, and $z$ such that $x < y < z$, we can write $y$ as $$y = (1-\lambda)x + \lambda z, \ \mbox{ where } \ \lambda = \frac{y-x}{z-x} \ \mbox{ and } \ 0 < \lambda < 1. \ \tag{0}$$ In what follows, we will be using this fact on several occasions.

First, we show that $f$ is bounded on every closed interval $[ c, d] \subset (a, b)$. Now let $t \in (c, d)$, where $c$ and $d$ are any two real numbers such that $a < c < d < b$. Then we can write $t$ as $$t = (1- \lambda) c + \lambda d, \ \mbox{ where } \ \lambda = \frac{t-c}{d-c} \in (0, 1).$$ Then \begin{align} f(t) &= f \left( (1-\lambda)c+\lambda d \right) \\ &\leq (1-\lambda) f(c) + \lambda f(d) \\ &\leq (1-\lambda + \lambda ) \max \left\{ f(c), f(d) \right\} \\ &= \max \left\{ f(c), f(d) \right\}. \end{align} Thus $$f(t) \leq \max \left\{ f(c), f(d) \right\} \ \mbox{ for all } \ t \in [c, d] \ \tag{1}.$$ If $$c < t < \frac{c+d}{2},$$ then we can also conclude that $$t < \frac{c+d}{2} < d,$$ and so $$\frac{c+d}{2} = (1-\lambda) t + \lambda d, \ \mbox{ where } \ \lambda = \frac{\frac{c+d}{2} - t}{d-t} = \frac{c+d-2t}{2(d-t)} \in (0, 1).$$ Then
\begin{align} f\left( \frac{c+d}{2} \right) &= f \left( (1- \lambda) t + \lambda d \right) \\ &\leq (1-\lambda) f(t) + \lambda f(d) \\ &\leq f(t) + f(d), \end{align} which implies that $$f(t) \geq f\left( \frac{c+d}{2} \right) - f(d) \ \mbox{ for all } \ t \in \left(c, \frac{c+d}{2} \right) \ \tag{2}$$ And, if $$\frac{c+d}{2} < t < d,$$ then we can also conclude that $$c < \frac{c+d}{2} < t,$$ and so $$\frac{c+d}{2} = (1-\lambda) c + \lambda t, \ \mbox{ where } \ \lambda = \frac{\frac{c+d}{2}-c}{t-c} = \frac{d-c}{2(t-c)} \ \mbox{ so that } \ 0 < \lambda < 1.$$ Then \begin{align} f\left( \frac{c+d}{2} \right) &= f\left( (1-\lambda) c + \lambda t\right) \\ &\leq (1-\lambda) f(c) + \lambda f(t) \\ &\leq f(c) + f(t), \end{align} which implies that $$f(t) \geq f\left( \frac{c+d}{2} \right) - f(c) \ \mbox{ for all } \ t \in \left( \frac{c+d}{2}, d \right) \ \tag{3}.$$ From (2) and (3) we can conclude that $$f(t) \geq \min \left\{ \ f(c), \ f(d), \ f\left( \frac{c+d}{2} \right) - f(c), \ f\left( \frac{c+d}{2} \right) - f(d), \ f\left( \frac{c+d}{2} \right) \ \right\} \\ \mbox{ for all } \ t \in [c, d] \ \tag{4}$$ From (1) and (4) we can comclude that, given any two real numbers $c$ and $d$ which satisfy $a < c < d < b$, we can find a real number $M > 0$ such that $$\left\vert f(t) \right\vert \leq M \ \mbox{ for all } \ t \in [c, d]. \ \tag{5}$$ Now let $\eta$ be a real number such that $$0 < \eta < \frac{d-c}{2}, \ \tag{6a}$$ and let $x$ and $y$ be any two real numbers such that $$c +\eta < x < y < d-\eta. \ \tag{6b}$$ Thus, we have the following chain of inequalities: $$c < c+\eta < x < y < d-\eta < d, \ \mbox{ and } \ c+\eta < \frac{c+d}{2} < d-\eta. \ \tag{6}$$ Therefore we can conclude that
$$c < x < y < d, \ \tag{7}$$ and so $$y = (1-\lambda) x + \lambda d, \ \mbox{ where } \ \lambda = \frac{y-x}{d-x} \ \mbox{ so that } \ 0 < \lambda < 1,$$ and then \begin{align} f(y) - f(x) &= f\left( (1-\lambda) x + \lambda d \right) - f(x) \\ &\leq (1-\lambda) f(x) + \lambda f(d) - f(x) \\ &= \lambda \left( f(d) - f(x) \right) \\ &\leq \lambda \left| f(d) - f(x) \right| \\ &\leq \lambda \left( \left| f(d) \right| + \left| f(x) \right| \right) \\ &\leq 2\lambda M \ \mbox{ [ by (5) above ] } \\ &= \frac{2M(y-x)}{d-x} \\ &< \frac{2M(y-x)}{\eta}. \ \mbox{ [ by (6b) above ] } \ \tag{8a} \end{align} And, from (7) we can also write $$x = (1-\lambda) c + \lambda y, \ \mbox{ where } \ \lambda = \frac{x-c}{y-c} \ \mbox{ so that } \ 0 < \lambda < 1,$$ and then \begin{align} f(x) - f(y) &= f\left( (1-\lambda) c + \lambda y \right) - f(y) \\ &\leq (1-\lambda) f(c) + \lambda f(y) - f(y) \\ &= (1-\lambda) \left( f(c) - f(y) \right) \\ &\leq (1-\lambda) \left| f(c) - f(y) \right| \\ &\leq (1-\lambda) \left( \left| f(c) \right| + \left| f(y) \right| \right) \\ &\leq 2(1-\lambda) M \ \mbox{ [ again by (5) above ]} \\ &= \frac{2M(y-x)}{y-c} \\ &< \frac{2M(y-x)}{\eta}. \ \mbox{ [ again by (6b) above ] } \ \tag{8b} \end{align} From (8a) and (8b) we can conclude that $$\left\vert f(x) - f(y) \right\vert < \frac{2M}{\eta} \left(y-x \right)$$ whenever $a < c < d < b$, $0 < \eta < \frac{d-c}{2}$, and $c+\eta < x < y < d-\eta$. Therefore, interchanging the roles of $x$ and $y$ in the last result we can also conclude that, whenever $a < c < d < b$ and $0 < \eta < \frac{d-c}{2}$, we have $$\left\vert f(x) - f(y) \right\vert < \frac{2M}{\eta} \left\vert x-y \right\vert \ \mbox{ for all } \ x, y \in (c+\eta, d-\eta). \ \tag{8}$$

Now let $p$ be any given point of $(a, b)$, and let $\varepsilon$ be any positive real number. We can choose some real numbers $c$ and $d$ such that $$a < c < p < d < b,$$ and then we can choose a real number $\eta$ such that $$0 < \eta < \min \left\{ \ \frac{d-c}{2}, \ p-c, \ d-p \ \right\}.$$ Then $$p \in (c+\eta, d-\eta);$$ that is, $$c+\eta < p < d-\eta.$$ Let us choose a real number $\delta$ such that $$0 < \delta < \min \left\{ \ \frac{\eta}{2M+1}\varepsilon, \ p-c-\eta, \ d-\eta-p \ \right\}.$$ Then any $x \in (a, b)$ which satisfies $\left\vert x-p \right\vert < \delta$ also belongs to $(c+\eta, d-\eta)$ and therefore by (8) above also satisfies \begin{align} \left\vert f(x) - f(p) \right\vert &\leq \frac{2M}{\eta} \vert x-y\vert \\ &\leq \frac{2M}{\eta} \frac{\eta}{2M+1}\varepsilon \\ &< \varepsilon. \end{align} Hence $f$ is continuous at every point $p \in (a, b)$.

Is this proof correct? If so, then is my presentation good enough? If not, then where lie the flaws?

Now let $f$ be a real convex function on $(a, b)$, let $g$ be a real increasing convex function defined on a segment $(c, d)$ in $\mathbb{R}^1$ such that $$f\left( (a, b) \right) \subset (c, d),$$ and let $h$ be the function defined in $(a, b)$ as follows: $$h(x) = g\left(f(x) \right) \ \mbox{ for all } \ x \in (a, b).$$ We show that $h$ is convex. For this, let $x, y \in (a, b)$ and $\lambda \in (0, 1)$. Then we note that \begin{align} h \left( (1-\lambda) x + \lambda y \right) &= g \left( f \left( (1-\lambda) x + \lambda y \right) \right) \\ &\leq g\left( \ (1-\lambda) f(x) + \lambda f(y) \ \right) \\ & \ \ \ \mbox{ [ because of the convexity of f, } \\ & \ \ \ \mbox{ we have f \left( (1-\lambda) x + \lambda y \right) \leq (1-\lambda) f(x) + \lambda f(y) } \\ & \ \ \ \mbox{ and because g is increasing ]} \\ &\leq (1-\lambda) g \left( f(x) \right) + \lambda g \left( f(y) \right) \\ & \ \ \ \mbox{ [ because of the convexity of g ] } \\ &= (1-\lambda) h(x) + \lambda h(y). \end{align} Hence $h$ is convex.

Is the formulation of this result correct and general enough? If so, then is my proof (and the presentation thereof) good enough?

If $a < s < t < u < b$, then we can write $$t = (1-\lambda) s + \lambda u, \ \mbox{ where } \ \lambda = \frac{t-s}{u-s} \in (0, 1),$$ and then \begin{align} f(t) &= f\left( (1-\lambda) s + \lambda u \right) \\ &\leq (1-\lambda) f(s) + \lambda f(u) \\ &= \left( 1 - \frac{t-s}{u-s} \right) f(s) + \frac{t-s}{u-s} f(u) \\ &= \frac{u-t}{u-s} f(s) + \frac{t-s}{u-s} f(u), \ \tag{9} \end{align} and so \begin{align} \frac{f(t) - f(s)}{t-s} &\leq \frac{1}{t-s} \left[ \frac{u-t}{u-s} f(s) + \frac{t-s}{u-s} f(u) - f(s) \right] \\ &= \frac{1}{t-s} \left[ \left( \frac{u-t}{u-s} - 1 \right) f(s) + \frac{t-s}{u-s} f(u) \right] \\ &= \frac{1}{t-s} \left[ \frac{s-t}{u-s} f(s) + \frac{t-s}{u-s} f(u) \right] \\ &= \frac{1}{t-s} \frac{t-s}{u-s} \left[ f(u) - f(s) \right] \\ &= \frac{ f(u)-f(s)}{u-s}. \end{align} Thus we have shown that if $a < s < t < u < b$, then $$\frac{f(t) - f(s)}{t-s} \leq \frac{ f(u)-f(s)}{u-s}. \ \tag{10}$$ Now from (9) above, we obtain $$f(t) \leq \frac{u-t}{u-s} f(s) + \frac{t-s}{u-s} f(u),$$ which upon dividing both sides by $u-t$ becomes \begin{align} \frac{ f(t)}{u-t} &\leq \frac{f(s)}{u-s} + \frac{t-s}{(u-s)(u-t)} f(u) \\ &= \frac{f(s)}{u-s} + \frac{(u-s) - (u-t) }{(u-s)(u-t)} f(u) \\ &= \frac{f(s)}{u-s} + \left( \frac{1}{u-t} - \frac{1}{u-s} \right) f(u) \\ &= \frac{f(s)- f(u) }{u-s} + \frac{f(u)}{u-t}. \end{align} Thus we have shown that $$\frac{ f(t)}{u-t} \leq \frac{f(s)- f(u) }{u-s} + \frac{f(u)}{u-t},$$ which implies that $$\frac{f(u)- f(s) }{u-s} \leq \frac{f(u)- f(t) }{u-t} \ \tag{11}$$ if $a < s < t < u < b$.

From (10) and (11), we conclude that if $a< s< t< u< b$, then $$\frac{f(t) - f(s)}{t-s} \leq \frac{f(u)- f(s) }{u-s} \leq \frac{f(u)- f(t) }{u-t},$$ as required.

Is this proof correct? If so, then what is the presentation like? If there is (are) any problem(s) in this proof, then at what point?

• Have you done any work on this problem? – grndl Apr 5 '17 at 17:31
• @aduh I'm sorry but I just haven't been able to hit upon a way to proceed. – Saaqib Mahmood Apr 5 '17 at 17:36
• You could start by showing the last item first, since that follows from some easy algebraic manipulations: just express $t$ as a convex combination of $s$ and $u$ and use the definition of convexity for $f$. Continuity follows readily from the last item. – grndl Apr 5 '17 at 17:38
• @aduh thank you for your hint, but don't you think that Rudin has formulated this problem suggests that he intended the proof to be independent of the last chain of inequalities? Otherwise, he could have asked for showing that chain first, and then he would have asked for the proof of the continuity of every convex function. – Saaqib Mahmood Apr 5 '17 at 23:05
• There is an $\epsilon-\delta$ type proof here: math.stackexchange.com/questions/258511/…. Not sure the point of the question. – Bombyx mori Apr 6 '17 at 1:35

Is this proof correct? If so, then is my presentation good enough? If not, then where lie the flaws?

The presentation is easy to read and understand. I have corrected the flaws (see my edit of your question). Now the proof is correct, but extremely long, because it consists of a big number of short steps. I don’t have read Rudin, because I learned analysis by old Russian and Ukrainian books, and I don’t know what level of mathematical rigor is required for it, but such detalization level is more like to logical profs than to mathematical that. :-) So you may try to work in formal logic, maybe you’ll like that. :-)

Is the formulation of this result correct and general enough? If so, then is my proof (and the presentation thereof) good enough?

Yes, all is OK.

Is this proof correct? If so, then what is the presentation like?

The proof is correct, the presentation is easy to read and understand.

Is every real convex function $f$ defined in $(a,b)$ also uniformly continuous?

Not necessarily. For instance, a function $f(x)=1/x$ defined on $(0,1)$ is convex, but not uniformly continuous.