  Ternary sextics and quaternary quartics are the smallest cases where there
exist nonnegative polynomials that are not sums of squares (SOS). A complete
classification of the difference between these cones was given by G. Blekherman
via analyzing the extreme rays of the corresponding dual cones. However, an
exact computational approach in order to build separating extreme rays for
nonnegative polynomials that are not sums of squares is a widely open problem.
We provide a method substantially simplifying this computation for certain
classes of polynomials on the boundary of the PSD cones. In particular, our
method yields separating extreme rays for every nonnegative ternary sextic with
at least seven zeros. As an application to further instances, we compute a
rational certificate proving that the Motzkin polynomial is not SOS.
