A noncommutative (nc) polynomial is called (globally) trace-positive if its

evaluation at any tuple of operators in a tracial von Neumann algebra has

nonnegative trace. Such polynomials emerge as trace inequalities in several

matrix or operator variables, and are widespread in mathematics and physics.

This paper delivers the first Positivstellensatz for global trace positivity of

nc polynomials. Analogously to Hilbert’s 17th problem in real algebraic

geometry, trace-positive nc polynomials are shown to be weakly sums of

hermitian squares and commutators of regular nc rational functions. In two

variables, this result is strengthened further using a new sum-of-squares

certificate with concrete univariate denominators for nonnegative bivariate

polynomials.

The trace positivity certificates in this paper are obtained by convex

duality through solving the so-called unbounded tracial moment problem, which

arises from noncommutative integration theory and free probability. Given a

linear functional on nc polynomials, the tracial moment problem asks whether it

is a joint distribution of integral operators affiliated with a tracial von

Neumann algebra. A counterpart to Haviland’s theorem on solvability of the

tracial moment problem is established. Moreover, a variant of Carleman’s

condition is shown to guarantee the existence of a solution to the tracial

moment problem. Together with semidefinite optimization, this is then used to

prove that every trace-positive nc polynomial admits an explicit approximation

in the 1-norm on its coefficients by sums of hermitian squares and commutators

of nc polynomials.