  We establish that the optimal bound for the size of the smallest integral
solution of the Oppenheim Diophantine approximation problem $\abs{Q(x)-\xi}<
\epsilon$ for a generic ternary form $Q$ is $\abs{x}\ll \epsilon^{-1}$. We also
establish an optimal rate of density for the values of polynomials maps in a
number of other natural problems, including the values of linear forms
restricted to suitable quadratic surfaces, and the values of the polynomial map
defined by the generators of the ring of conjugation-invariant polynomials on
$M_3(\C)$.
  These results are instances of a general approach that we develop, which
considers a rational affine algebraic subvariety of Euclidean space, invariant
and homogeneous under an action of a semisimple Lie group $G$. Given a
polynomial map $F$ defined on the Euclidean space which is invariant under a
semisimple subgroup $H$ of the acting group $G$, consider the family of its
translates $F\circ g$ by elements of the group. We study the restriction of
these polynomial functions to the integer points on the variety confined to a
large Euclidean ball. Our main results establish an explicit rate of density
for their values, for generic polynomials in the family. This problem has been
extensively studied before when the polynomials in question are linear, in the
context of classical Diophantine approximation, but very little was known about
it for polynomial of higher degree. We formulate a heuristic pigeonhole lower
bound for the density and an explicit upper bound for it, formulate a
sufficient condition for the coincidence of the lower and upper bounds, and in
a number of natural examples establish that they indeed match. Finally, we also
establish a rate of density for values of homogeneous polynomials on
homogeneous projective varieties.
