Example 7 An arithmetic sequence $\left\{a_{n}\right\}, a_{1}>0$, the sum of the first $n$ terms is $S_{n}$, and $S_{9}>0, S_{10}<0$, for what value of $n$ is $S_{n}$ maximized?
Solution: Since $S_{n}=\frac{9\left(a_{1}+a_{9}\right)}{2}=9 a_{5}>0$,
$$
S_{10}=\frac{10\left(a_{1}+a_{10}\right)}{2}=5\left(a_{5}+a_{6}\right)a_{2}>\cdots>a_{5}>0>a_{6}>a_{7}>\cdots$,
thus, when $n=5$, $S_{n}$ is maximized.
The correctness of the result can be verified not only by directly checking the calculation process, but also by estimation.
Verification: Since the graph of $S_{n}=f(n)$ is a parabola passing through the origin, and the horizontal coordinates are natural numbers, and the common difference of the sequence is less than zero, the parabola opens downwards, with one intersection point with the horizontal axis having a horizontal coordinate of zero, and the other intersection point having a horizontal coordinate within the interval $(9,10)$. It is evident that the horizontal coordinate of the vertex lies within the interval $(4.5,5)$, indicating that $S_{n}$ is maximized when $n=5$.