I am trying to understand why the magnetic field outside a solenoid of very long length can be assumed to be near zero. I gather that the field inside the solenoid will be very dense and therefore strong, and that the field lines that loop back round outside the solenoid can spread out. Is this the correct understanding. If so why do the field lines spread out outside the solenoid so much so that their density tends to zero as the solenoid gets longer?
It's just an approximation. Think about an electric dipole in one dimension. Far away from the dipole the effect of both particles will tend to cancel out because they subtract. Right in the middle of the dipole the field will be strong because they add. Outside of the solenoid the magnetic field of the far side will tend to cancel the field of the near side. The further you get the weaker the field. It will actually drop off fairly quick. Inside the solenoid the fields will add up.
Hi SteveDC! yes the densest flux comes out of the centre of the solenoid flux near the rim of the solenoid is least dense, and that's the flux that takes the shortest way round, ie nearest to the solenoid so the flux at any small distance r from the outside of the solenoid will be weak if you fix r, and increase the length of the solenoid, the lines that go through r will get closer to the rim of the solenoid … at infinite length, they're infinitesimally close to the rim, and their density approaches zero to put it another way, there's only so many field lines, no matter how long the solenoid is those field lines have to follow the same graceful curves so they get infinitely far away from the solenoid!