We put forth a variational principle for the Zakharov-Shabat (ZS) equa
tions, which is the basis of the inverse scattering transform of a num
ber of important nonlinear PDE's. Using the variational representation
of the ZS equations, we develop an approximate analytical technique f
or finding discrete eigenvalues of the complex spectral parameter in t
he ZS equations for a given pulse-shaped potential, which is equivalen
t to the physically important problem of finding the soliton content o
f the given initial pulse. We apply the technique to several particula
r shapes of the pulse and demonstrate that the simplest version of the
variational approximation, based on trial functions with one or two f
ree parameters, proves to be fully analytically tractable, and it yiel
ds threshold conditions for the appearance of the first soliton, or of
the first soliton pair, which are in a fairly good agreement with ava
ilable numerical results. However, more free parameters are necessary
to allow prediction of additional solitons produced by the given pulse
.