Example $\mathbf{1}$ Let $f(x)$ be monotonic on $\mathbf{R}$, and $f\left(\frac{x+y}{2}\right)=\frac{1}{2}(f(x)+f(y))$. Find $f(x)$.
Let $f(0)=b$.
From the given, we have
\[
\begin{array}{l}
\frac{1}{2}(f(x)+f(y))=f\left(\frac{(x+y)+0}{2}\right) \\
=\frac{1}{2}(f(x+y)+f(0)) \\
\Rightarrow f(x+y)=f(x)+f(y)-f(0) \\
\Rightarrow f(x+y)-f(0) \\
\quad=(f(x)-f(0))+(f(y)-f(0)) . \\
\text { Let } g(x)=f(x)-f(0) \text {. Then } \\
g(x+y)=g(x)+g(y) .
\end{array}
\]

By Cauchy's functional equation, we know that when $x \in \mathbf{Q}$,
\[
g(x)=x g(1) \text {. }
\]

When $x \in \mathbf{R}$, assume $g(x)$ is monotonically increasing. There exist convergent sequences $\left\{\alpha_{k}\right\}$ and $\left\{\beta_{k}\right\}\left(\alpha_{k} \leqslant x \leqslant \beta_{k}\right)$, and as $k \rightarrow+\infty$, $\alpha_{k}$ and $\beta_{k}$ both converge to $x$. Then
\[
\begin{array}{l}
g\left(\alpha_{k}\right) \leqslant g(x) \leqslant g\left(\beta_{k}\right) \\
\Rightarrow \alpha_{k} g(1) \leqslant g(x) \leqslant \beta_{k} g(1) .
\end{array}
\]

As $k \rightarrow+\infty$, $x g(1) \leqslant g(x) \leqslant x g(1)$.
By the Squeeze Theorem, we have
\[
g(x)=a x, a=g(1)(a \geqslant 0) .
\]

Similarly, when $g(x)$ is monotonically decreasing,
\[
g(x)=a x, a=g(1)(a \leqslant 0) .
\]

In summary, $g(x)=a x(x, a \in \mathbf{R})$.
Thus, $f(x)=a x+b$, where
\[
a=g(1)=f(1)-f(0), b=f(0) .
\]

Upon verification, $f(x)=a x+b$ is a solution to the original equation.