Scattering, KdV hierarchy, Trace formulas