  For applications to quasi-exactly solvable Schr\"odinger equations in quantum
mechanics, we consider the general conditions that have to be satisfied by the
coefficients of a second-order differential equation with at most $k+1$
singular points in order that this equation has particular solutions that are
$n$th-degree polynomials. In a first approach, we show that such conditions
involve $k-2$ integration constants, which satisfy a system of linear equations
whose coefficients can be written in terms of elementary symmetric polynomials
in the polynomial solution roots whenver such roots are all real and distinct.
In a second approach, we consider the functional Bethe ansatz method in its
most general form under the same assumption. Comparing the two approaches, we
prove that the above-mentioned $k-2$ integration constants can be expressed as
linear combinations of monomial symmetric polynomials in the roots, associated
with partitions into no more than two parts. We illustrate these results by
considering a quasi-exactly solvable extension of the Mathews-Lakshmanan
nonlinear oscillator corresponding to $k=4$.
