\documentclass{amsart}
\usepackage{amssymb}
\usepackage{amsmath}

\pagestyle{plain}

\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{fact}[theorem]{Fact}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{claim}[theorem]{Claim}

\theoremstyle{definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{remark}[theorem]{Remark}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{question}[theorem]{Question}



\begin{document}

\noindent
{\Large {\bf 18.099b Problem Set 6} (Corrected version)\\
{\it Due}: Thursday, April 15th.}

\bigskip
\bigskip

This assignment is to write a short paper on {\em convex functions}.
It should be typeset in Tex.
Arrange and express the material discussed below in whatever way you think best.
The paper should flow smoothly and be well motivated.
\bigskip

A real valued function $f$ on an open (possibly unbounded) interval $I\subseteq\mathbb{R}$ is {\em convex} if for all $x,y\in I$
$$f(\lambda x+(1-\lambda) y)\leq \lambda f(x)+(1-\lambda)f(y)$$
for all $0<\lambda <1$.
Explain the geometric meaning of this definition; namely that the part of the graph of the function between any two points $x,y\in I$ lies below the chord joining $(x,f(x))$ and $(y,f(y))$.

Make precise and prove the statement that an increasing convex function applied to a convex function is again convex.

Show that if $f$ is continuous and $f(\frac{x+y}{2})\leq\frac{f(x)+f(y)}{2}$ for all $x,y\in I$. then $f$ is convex.
{\em Hint: Use the fact that if $g$ and $h$ are continuous functions with $g(a)>h(a)$ for some $a$, then $g>h$ on $(a-\delta,a+\delta)$ for some $\delta>0$.}


Prove that $f$ is convex on $I$ if and only if for every $x<t<y$ in $I$
\begin{eqnarray}
\label{inequality}
(y-x)f(t) & \leq & (y-t)f(x)+(t-x)f(y).
\end{eqnarray}
In particular if $f$ is convex and $a\in I$, then the function
$\displaystyle \frac{f(t)-f(a)}{t-a}$
is increasing on $I\setminus\{a\}$.
Conclude that every convex function is continuous and has both right-hand and left-hand derivatives at every point in $I$.

Suppose $f$ is convex and differentiable on $I$.
Show that for every $a\in I$, the graph of $f$ lies above the tangent line to the graph at $(a,f(a))$.

Suppose $f$ is differentiable on $I$.
Show that $f$ is convex if and only if $f'$ is increasing.
{\em Hint: Use the mean value theorem and the inequality}~(\ref{inequality}).

Give (interesting) examples of convex elementary functions.

Prove Jensen's inequality:
If $f$ is convex on $I$, $x_1,\dots,x_n\in I$, and $\lambda_1,\dots,\lambda_n$ are non-negative real numbers such that $\displaystyle\sum_{i=1}^n\lambda_i=1$, then
$$f(\sum_{i=1}^n\lambda_ix_i) \leq \sum_{i=1}^n\lambda_if(x_i).$$
(Notice that in order for this to even make sene, $\displaystyle \sum_{i=1}^n\lambda_ix_i$ must also be in $I$.  Why is this the case?).


As an application of Jensen's inequality, deduce the ``inequality of the arithmetic and geometric means'': if $x_1,\dots,x_n$ are positive real numbers, then
$$ (x_1x_2\cdots x_n)^{\frac{1}{n}}\leq\frac{1}{n}\sum_{i=1}^nx_i.$$
\end{document}

