Example 11 (2007 Japan Mathematical Olympiad Final) Find the function $f$ with the domain of positive real numbers and the range of real numbers, satisfying: $f(x)+f(y) \leqslant \frac{f(x+y)}{2}, \frac{f(x)}{x}+\frac{f(y)}{y}$ $\geqslant \frac{f(x+y)}{x+y}$, where $x, y$ are any real numbers.
Let $x=y=t(t>0), \therefore 4 f(t) \leqslant f(2 t)$ and $4 f(t) \geqslant f(2 t), \therefore f(2 t)=4 f(t)(t>0)$.

Repeating this equation $m$ times, we get: $f\left(2^{m} t\right)=$ $2^{2 m} f(t)$.

Now let $g(x)=\frac{f(x)}{x}$, and we will prove that for any positive integer $n$ and any positive real number $t$, $g(n t)=n g(t)$.

It is clear that when $n=2^{m}$, the proposition holds. Also, because the second inequality is equivalent to $g(x)+g(y) \geqslant g(x+y)$, for any $n, t$ we have $g(n t) \leqslant g(t)+\cdots+g(t)=n g(t)$. If we take $m\left(m \in \mathbf{N}_{+}\right)$ such that $2^{m}>n$,

then: $g\left(2^{m} t\right) \leqslant g(n t)+g\left(\left(2^{m}-n\right) t\right) \leqslant n g(t)+\left(2^{m}-n\right) g(t)=2^{m} g(t)$

On the other hand, we have $g\left(2^{m} t\right)=2^{m} g(t)$, so the inequality signs in the above must be equalities, i.e., $g(n t)+g\left(\left(2^{m}-n\right) t\right)=n g(t)+\left(2^{m}-n\right) g(t)$,
thus it must be that $g(n t)=n g(t)$.
Next, we prove that $g$ is a non-increasing function.
For positive real numbers $t$, we have $f(t)+f(2 t) \leqslant \frac{f(t+2 t)}{2}$,
since $f(t)=t g(t) \Rightarrow f(2 t)=2 t g(2 t)=4 t g(t)$,
$f(3 t)=3 t g(3 t)=9 t g(t)$, then $5 t g(t) \leqslant \frac{9}{2} t g(t) \Rightarrow g(t) \leqslant 0$.

Therefore, for all $x, y(00)$.

Assume for a positive real number $t$ that $g(t)t$ and $g(t)t$ and the non-increasing nature of $g$ lead to a contradiction. Similarly, if $g(t)>a t$, it also leads to a contradiction. Therefore, for positive real numbers $t$, we have $g(t)=a t$.

Thus, $f(x)=x g(x)=a x^{2}(a \leqslant 0)$, and for such $f$, we have $f(x)+f(y)-\frac{f(x+y)}{2}=\frac{a}{2}(x-y)^{2} \leqslant 0, \frac{f(x)}{x}+\frac{f(y)}{y}-\frac{f(x+y)}{x+y}=0$ which are all satisfied. $\therefore f(x)=a x^{2}$ is the solution.