  Let v be a real polynomial of even degree, and let \rho be the equilibrium
probability measure for v with support S; so that v(x)\geq 2\int \log |x-y|
\rho (dy)+C_v for some constant C_v with support S. Then S is the union of
finitely many bounded intervals with endpoints delta_j, and \rho is given by an
algebrais weight w(x) on S. The system of orthogonal polynomials for w gives
rise to the Magnus--Schlesinger differential equations. This paper identifies
the tau function of this system with the Hankel determinant det[\in x^{j+k}\rho
(dx)] of \rho. The solutions of the Magnus--Schlesinger equations are realised
by a linear system, which is used to compute the tau function in terms of a
Gelfand--Levitan equaiton. The tau function is associated with a potential q
and a scattering problem for the Schrodinger operator with potential q. For
some algebro-geometric potentials, the paper solves the scattering problem in
terms of linear systems. The theory extends naturally to elliptic curves and
resolves the case where S has exactly two intervals.
