  We first interpret Pell's equation satisfied by Chebyshev polynomials for
each degree t, as a certain Positivstellensatz, which then yields for each
integer t, what we call a generalized Pell's equation, satisfied by reciprocals
of Christoffel functions of ''degree'' 2t, associated with the equilibrium
measure $\mu$ of the interval [--1, 1] and the measure (1 -- x 2)d$\mu$. We
next extend this point of view to arbitrary compact basic semi-algebraic set S
$\subset$ R n and obtain a generalized Pell's equation (by analogy with the
interval [--1, 1]). Under some conditions, for each t the equation is satisfied
by reciprocals of Christoffel functions of ''degree'' 2t associated with (i)
the equilibrium measure $\mu$ of S and (ii), measures gd$\mu$ for an
appropriate set of generators g of S. These equations depend on the particular
choice of generators that define the set S. In addition to the interval [--1,
1], we show that for t = 1, 2, 3, the equations are indeed also satisfied for
the equilibrium measures of the 2D-simplex, the 2D-Euclidean unit ball and unit
box. Interestingly, this view point connects orthogonal polynomials,
Christoffel functions and equilibrium measures on one side, with
sum-of-squares, convex optimization and certificates of positivity in real
algebraic geometry on another side.
