A novel exact analytical expression for the magnetic field of a solenoid