A solenoid of length \ell and radius a consists of N turns of wire carrying current I. Show that at point P along its axis
H=\frac{nI}{2}(\cos\theta_{2}-\cos\theta_{1})a_{z}
where n=N/\ell, \theta _{1} and \theta_{2} are the angles subtended at P by the end turns as illustrated in Figure 7.9. Also show that if \ell\gg a, at the center of the solenoid
H=nIa_{z}