Example 3 Let $f$ be a positive-valued function defined on all positive integers, $f(1)=\frac{1}{2}$ and
$$
f(n+1) \leqslant \frac{3 f(n)}{2 f(n)+1}(n \geqslant 1) \text {. }
$$

Find $f(n)$.
Analysis: It is easy to know that $f(n)>0$. Taking the reciprocal of both sides of equation (1) yields
$$
2+\frac{1}{f(n)} \leqslant \frac{3}{f(n+1)}(n \geqslant 1) \text {. }
$$

Subtracting 3 from both sides of equation (2) gives
$$
\frac{1}{f(n)}-1 \leqslant 3\left(\frac{1}{f(n+1)}-1\right) \text {. }
$$

Multiplying both sides of the above equation by $3^{n}$ yields
$$
\begin{array}{l}
3^{n}\left(\frac{1}{f(n)}-1\right) \leqslant 3^{n+1}\left(\frac{1}{f(n+1)}-1\right) . \\
\text { Let } 3^{n}\left(\frac{1}{f(n)}-1\right)=g(n), \text { satisfying } \\
g(1)=3\left(\frac{1}{f(1)}-1\right)=3, g(n) \leqslant g(n+1) .
\end{array}
$$

Therefore, the analytical expression of the given recursive inequality (1) is
$$
f(n)=\frac{3^{n}}{3^{n}+g(n)},
$$

where any function $g(n)$ satisfies
$$
g(1)=3, g(n) \leqslant g(n+1) \text {. }
$$

Note: In equation (2), let $\varphi(n)=\frac{1}{f(n)}$, then it can be transformed into a first-order linear inequality about $\varphi(n)$ and solved.