Hint to the solenoid problem

Well, the actual question was to show that the field is regardless of the cross-sectional shape of the solenoid.