Use Convexity to Prove Upper Bound on Sum According to this http://theory.stanford.edu/~tim/s14/l/l1.pdf (last page), it is possible to prove
$\displaystyle \sum_{v \in S} deg(v)^2 \in \mathcal{O}(m^{3/2})$
using the convexity of $f(x) = x^2$. I think, this particular problem can be stated as follows without knowledge of the script I refer to above:

Given positive integers $d_1, d_2, \dots, d_k$ satisfying $d_i \le
 \sqrt{m}$ and $d_1 + d_2 + \dots + d_k \le 2m$, prove $S := d_1^2 +
 d_2^2 + \dots + d_k^2 \in \mathcal{O}(m^{3/2})$. Assume $k
\le m$ and $m \in \mathbb{N}$ from graph theoric context.

It is trivial to show $S \in \mathcal{O}(m^2)$, but that is not asked for. Because of the hint refering to convexity, I tried to apply Jensen's inequality. Add a number $d_{k + 1} = 2m - (d_1 + d_2 + \dots + d_k)$ and let $\lambda_i = \frac{d_i}{2m}$ for $1 \le i \le {k + 1}$ be the weights. Using the convexity of $f(x) = x^2$, by Jensen:
$\displaystyle \frac{1}{4m^2} \left( d_1^2 + \dots + d_{k + 1}^2 \right)^2 = \left( d_1 \cdot \frac{d_1}{2m} + \dots + d_{k + 1} \cdot \frac{d_{k + 1}}{2m} \right)^2 \le \frac{d_1}{2m} \cdot d_1^2 + \dots + \frac{d_{k + 1}}{2m} \cdot d_{k + 1}^2 = \frac{1}{2m} \left( d_1^3 + \dots + d_{k + 1}^3 \right) \le \frac{1}{2m} \left( m^{3/2} + m^{3/2} + \dots + m^{3/2} \right) \le \frac{(k + 1)m^{3/2}}{2m} \le \frac{(m + 1)m^{3/2}}{2m} \le m^{3/2}$
Multiplying with $4m^2$ and taking square root yields $2m^{7/4}$ on the right which is not the desired result.
How to show this inequality?
 A: $$\sum d_i^2 \leq \max(d_i) \sum d_i \leq \sqrt{m} \cdot 2m = 2m^{3/2}.$$
Inequalities like Jensen are when you are interested in a minimum value or lower bound for a sum of values of a convex function. But convexity also says something about upper bounds: the maximum is attained on the boundary.
A lower bound is $\sum d_i^2\geq \frac{1}{k}(\sum d_i)^2;$ subject to $\sum d_i=2m$ this would attained by setting all the $d_i$ to $2m/k,$ in the interior. To get to a maximum, if you had two variables $(d_i,d_j)\in (0,\sqrt{d_i})$ you could replace them by $(d_i+\epsilon,d_j-\epsilon)$ and get a bigger $\sum d_i^2,$ and you end up with as many variables maximized as possible. That is the argument he's making in the text.
A: Consider : 
$$\sum_{i=1}^{k}d_{i}^{} \leq 2m$$
with $0 \leq d_{i}^{} \leq \sqrt{m}$ for $i=1\dots k$.
Multiply by $d_{j}^{}$ for $j=1\dots k$ to get $k$ inequalities : 
$$d_{j}^{}\sum_{i=1}^{k}d_{i}^{} \leq 2m d_{j} \leq 2 m^{3/2}.$$
Summing these $k$ inequalities we get :
$$[\sum_{i=1}^{k}d_{i}^{} ]^{2}_{} \leq 2k m^{3/2}.$$
Which finally gives :
$$\sum_{i=1}^{k}d_{i}^{2}  \leq 2k m^{3/2}.$$
