We provide two certificates of convexity for arbitrary basic closed semi-algebraic sets of Rn. The first one is based on a necessary and sufficient condition whereas the second one is based on a sufficient (but simpler) condition only. Both certificates are obtained from any feasible solution of a related semidefinite program and so in principle, can be obtained numerically (however, up to machine precision).
Jean B. Lasserre