Case 1: Inside the cavity, the magnetic field is given by B = 0. Case 2: Outside the cylinder, the magnetic field is B = 2πrμ0​I​. In the shaded region shown in the figure, the magnetic field is calculated as B = 2πr(b2−a2)μ0​I​(r−ra2​) At r = a, we have B = 0 and at r = b, we have B = 2πbμ0​I​