# [Math] Limit of derivatives of convex functions

convex-analysisreal-analysis

Let $(f_n)_ {n\in\mathbb{N}}$ be a sequence of convex differentiable functions on $\mathbb{R}$.

Suppose that $f_n(x)\xrightarrow[n\to\infty]{}f(x)$ for all $x\in\mathbb{R}$.

Let $D:=\{x\in\mathbb{R}\,|\,f\text{ is differentiable in }x\}$. I read that
$f_n'(x)\xrightarrow[n\to\infty]{}f'(x)$ for all $x\in D$.

Why is it true? How can I prove it?

Furthermore is it true that $f$ is a convex function? As consequence $\mathbb{R}\smallsetminus D$ would be at most countable.

Edit after did's comment: clearly $f$ is convex.

Since $f$ is convex, there exist the left and right derivative $f'_{-},f'_{+}$ in every point.
For any $x\in\mathbb{R}$ and for any $\epsilon>0$ is possible to prove that there exists $N\in\mathbb{N}$ such that $$f'_{-}(x)-\epsilon < f_n'(x) < f'_{+}(x)+\epsilon$$ for all $n\geq N$. As a consequence if $x\in D$ then $f_n'(x)\xrightarrow[n\to\infty]{}f'(x)$.
How to prove it? First by definition of right derivative there exists $h>0$ such that $$\frac{f(x+h)-f(x)}{h} < f'_{+}(x) + \epsilon$$ Then since $f_n$ converges to $f$ there exists $N\in\mathbb{N}$ such that $$\frac{f_n(x+h)-f_n(x)}{h} < f'_{+}(x) + \epsilon$$ Now use the convexity and differentiability of $f_n$ to observe that $$f_n'(x)\leq\frac{f_n(x+h)-f_n(x)}{h}$$ Conclude $f_n'(x)<f'_{+}(x) + \epsilon$. A similar reasoning holds to prove the other inequality.