Global solution of the ideal resonance problem