In deriving Equation 19-17, we’ve assumed that the field inside the solenoid is perfectly uniform and parallel to the solenoid axis and that the field outside the solenoid is exactly zero. These assumptions are strictly valid only for an infinitely long solenoid. But Equation 19-17 is a good approximation at points near the middle of any solenoid, especially one whose length is large compared to its diameter.