Whitham prepotential and superpotential