# How to prove $\sum_{k=1}^{n}f(a_k)\leq nf\left(\frac{b}{n}\right)$ for sufficiently large $n$ here?

Let $$0, $$f\in C^1\left([0,b]\right)$$. Assume that $$f$$ is concave on $$[0,a]$$ and convex on $$[a,b]$$ with $$f'(0)>f'(b)$$. Please prove that there exist $$n_0\in\mathbb{N}$$ which is sufficiently large, such that for any $$n\geq n_0$$ and $$a_1+a_2+...+a_n=b$$ with $$a_i\geq 0$$ ($$i=1,2,...,n$$), we have $$\sum_{i=1}^nf(a_i)\leq nf\left(\frac{b}{n}\right)$$.

Simple observation shows that if $$a_i\in [0,a]$$ for all $$i$$, the result is easy to prove. However, I cannot deal with the situation that there exists some $$i_0$$ such that $$a_{i_0}\in(0,b]$$. I guess that such case is related with the statement that $$f'(0)>f'(b)$$, but I do not know how to continue the proof. Could you give me some references or hints?

Denote $$b/n=s$$. We want a pointwise bound $$f(x)\leqslant f(s)+(x-s)f'(s),\label{1}\tag{\heartsuit}$$ then summing \eqref{1} up for $$x=a_1,\ldots,a_n$$ we get the desired inequality. Note that if $$s (that holds for $$n>b/a$$) we get \eqref{1} on $$[0,a]$$ by concavity. For proving \eqref{1} on $$[a,b]$$, by convexity it suffices to verify \eqref{1} for $$x=a$$ and $$x=b$$. For $$x=a$$ this is already done, for $$x=b$$ it reads as $$f(b)\leqslant f(s)+(b-s)f'(s).$$ When $$n$$ is large, RHS converges to $$f(0)+bf'(0)$$. Thus it suffices to check that $$f(b) Assume the contrary: $$f(b)\geqslant f(0)+bf'(0).$$ We have $$f(x)\leqslant f(0)+f'(0)x$$ for all $$x\in [0,a]$$ by concavity. Denote by $$c$$ the endpoint of the maximal segment $$[0,c]$$ on which we have $$f(x)\leqslant f(0)+f'(0)x$$. Then $$c\in [a,b]$$ and we have $$f(c)=f(0)+f'(0)c$$ (otherwise $$c$$ is not maximal). This yields $$f'(c)=\lim_{x\to c-0}\frac{f(c)-f(x)}{c-x}\geqslant f'(0).$$ Since $$f'$$ increases on $$[a,b]$$ by convexity we get $$f'(b)\geqslant f'(c)\geqslant f'(0)$$, a contradiction.

Without loss of generality (wlog), $$\begin{equation*} 0\le a_1\le\cdots\le a_p\le a\le a_{p+1}\le\cdots\le a_n\le b \tag{1}\label{1} \end{equation*}$$ for some $$p\in\{0,\dots,n\}$$. Also, by approximation, wlog $$f$$ is strictly convex on $$[a,b]$$.

If $$p=0$$, then $$a_i\ge a$$ for all $$i\in\{0,\dots,n\}$$ and hence $$b=\sum_1^n a_i\ge na$$, which is impossible if $$\begin{equation*} n>b/a, \tag{2}\label{2} \end{equation*}$$ which will be assumed henceforth. So, $$p\ge1$$. Letting now $$\begin{equation*} s:=\sum_1^p a_i \tag{3}\label{3} \end{equation*}$$ and recalling that $$f$$ is concave on $$[0,a]$$, we have $$\begin{equation*} S:=\sum_{i=1}^n f(a_i)\le T:=pf(s/p)+\sum_{i=p+1}^n f(a_i). \tag{4}\label{4} \end{equation*}$$

It is enough to show that $$\begin{equation*} T\le nf(b/n) \tag{5}\label{5} \end{equation*}$$ for all large enough $$n$$. Since $$f$$ is continuous on $$[a,b]$$, the sum $$\sum_{i=p+1}^n f(a_i)$$ attains a maximum over all $$(a_{p+1},\dots,a_n)$$ such that $$a\le a_{p+1}\le\cdots\le a_n\le b$$ and $$\sum_{i=p+1}^n a_i=b-s$$ (with $$n,p,s$$ fixed). In what follows, let $$(a_{p+1},\dots,a_n)$$ be a corresponding maximizer.

One of the following two cases takes place:

Case 1: $$a_n=b$$ or Case 2: $$a_n.

Consider Case 1. Then $$a_1=\cdots=a_{n-1}=0$$ and $$p=n-1$$, whence \eqref{5} can be rewritten as $$\begin{equation*} f(b)-f(0)\le n[f(b/n)-f(0)]. \tag{6}\label{6} \end{equation*}$$ We have (i) $$f'\le f'(0)$$ on $$[0,a]$$, since $$f$$ is concave on $$[0,a]$$ and (ii) $$f'\le f'(b) on $$[a,b]$$, since $$f$$ is convex on $$[a,b]$$. Therefore and because $$a, we have $$f(b)-f(0)=\int_0^b f'. On the other hand, $$n[f(b/n)-f(0)]\to bf'(0)$$ as $$n\to\infty$$. So, for all large enough $$n$$, \eqref{6} holds, and hence \eqref{5} holds.

Now Consider Case 2. Then, by the strict convexity of $$f$$ on $$[a,b]$$, at most one of the coordinates $$a_{p+1},\cdots,a_n$$ of the maximizer $$(a_{p+1},\dots,a_n)$$ can be in the interval $$(a,b)$$, and hence at most one of the numbers $$a_{p+1},\dots,a_n$$ can be in the interval $$(a,b]$$. So,
$$\begin{equation*} T=g(s):=pf(s/p)+(n-p-1)f(a)+f(b-s-(n-p-1)a) \tag{7}\label{7} \end{equation*}$$ and $$\begin{equation*} 0\le s\le pa,\quad n-p-1\ge0,\quad b-s-(n-p-1)a\ge a. \tag{8}\label{8} \end{equation*}$$ The last inequality in \eqref{8} means $$\begin{equation} s\le b-(n-p)a. \tag{9}\label{9} \end{equation}$$ For all $$t\in[0,b-(n-p)a]$$ we have $$t/p\in[0,a]$$ (by \eqref{2}) and $$b-t-(n-p-1)a\in[a,b]$$, so that, by the convexity of $$f$$ on $$[0,a]$$ and the convexity of $$f$$ on $$[a,b]$$,
$$\begin{equation*} g'(t)=f'(t/p)-f'(b-t-(n-p-1)a)\ge f'(a)-f'(a)=0, \end{equation*}$$
so that $$g$$ is nondecreasing on $$[0,b-(n-p)a]$$. So, by \eqref{7} and \eqref{9},
$$\begin{equation*} T\le g(b-(n-p)a)=pf\Big(\frac{b-(n-p)a}p\Big)+(n-p)f(a)\le nf\Big(\frac bn\Big), \end{equation*}$$ since $$f$$ is concave on $$[0,a]$$ and $$\frac{b-(n-p)a}p\in[0,a]$$ (by \eqref{8} and \eqref{2}). Thus, \eqref{5} holds in Case 2 as well. $$\quad\Box$$