Liouville's equation for curvature and systolic defect