Verify Ampere's law for the magnetic field of a point dipole of dipole moment m = m$\stackrel{^}{\mathrm{k}}$. Take C as the closed curve running clockwise along:

(i) the z-axis from z = a > 0 to z = R,
(ii) along the quarter circle of radius R and center at the origin in the first quadrant of xz-plane,
(iii) along the x-axis from x = R to x = a, and
(iv) along the quarter circle of radius a and center at the origin in the first quadrant of xz-plane

Hint: Use the formula of the magnetic field due to a bar magnet.
From P to Q, every point on the z-axis lies at the axial line of magnetic dipole of moment M. Magnetic field induction at a point at distance z from the magnetic dipole of moment  M is:
$|\mathrm{B}|=\frac{{\mathrm{\mu }}_{0}}{4\mathrm{\pi }}\frac{2|\mathrm{M}|}{{\mathrm{z}}^{3}}=\frac{{\mathrm{\mu }}_{0}\mathrm{M}}{2{\mathrm{\pi z}}^{3}}$
Step 1:
(i) Along z-axis from P to Q:

$\begin{array}{l}={\int }_{\mathrm{a}}^{\mathrm{R}}\frac{{\mathrm{\mu }}_{0}}{2\mathrm{\pi }}\frac{\mathrm{M}}{{\mathrm{z}}^{3}}\mathrm{dz}=\frac{{\mathrm{\mu }}_{0}\mathrm{M}}{2\mathrm{\pi }}\left(\frac{-1}{2}\right)\left(\frac{1}{{\mathrm{R}}^{2}}-\frac{1}{{\mathrm{a}}^{2}}\right)\\ =\frac{{\mathrm{\mu }}_{0}\mathrm{M}}{4\mathrm{\pi }}\left(\frac{1}{{\mathrm{a}}^{2}}-\frac{1}{{\mathrm{R}}^{2}}\right)\end{array}$
Step 2:
(ii) Along the quarter circle QS of radius R is given in the figure below,

The point A lies on the equatorial line of the magnetic dipole of moment Msin$\mathrm{\theta }$. The Magnetic field at point A on the circular arc is:

Step 3:
(iii) Along the x-axis over the path ST, consider the figure given ahead;

From the figure, every point lies on the equatorial line of the magnetic dipole. Magnetic field induction at a point at distance x from the dipole is,
$B=\frac{{\mu }_{0}}{4\pi }\frac{M}{{x}^{3}}$
Step 4:
(iv) Along with the quarter circle TP of radius a. Consider the figure given below.

From case (i), we get line integral of B along the quarter circle TP of radius a;
$\int \mathrm{B}\cdot \mathrm{dl}={\int }_{\mathrm{\pi }/2}^{0}\frac{{\mathrm{\mu }}_{0}}{4\mathrm{\pi }}\frac{\mathrm{Msin}\mathrm{\theta }}{{\mathrm{a}}^{3}}\mathrm{ad\theta }$
$\begin{array}{l}=\frac{{\mathrm{\mu }}_{0}}{4\mathrm{\pi }}\frac{\mathrm{M}}{{\mathrm{a}}^{2}}{\int }_{\mathrm{\pi }/2}^{0}\mathrm{sin}\mathrm{\theta d\theta }=\frac{{\mathrm{\mu }}_{0}}{4\mathrm{\pi }}\frac{\mathrm{M}}{{\mathrm{a}}^{2}}\left[-\mathrm{cos}\mathrm{\theta }{\right]}_{\mathrm{\pi }/2}^{0}\\ =\frac{-{\mathrm{\mu }}_{0}}{4\mathrm{\pi }}\frac{\mathrm{M}}{{\mathrm{a}}^{2}}\end{array}$

$=\frac{{\mathrm{\mu }}_{0}\mathrm{M}}{4\mathrm{\pi }}\left[\frac{1}{{\mathrm{a}}^{2}}-\frac{1}{{\mathrm{R}}^{2}}\right]+\frac{{\mathrm{\mu }}_{0}}{4\mathrm{\pi }}\frac{\mathrm{M}}{{\mathrm{R}}^{2}}+0+\left(-\frac{{\mathrm{\mu }}_{0}}{4\mathrm{\pi }}\frac{\mathrm{M}}{{\mathrm{a}}^{2}}\right)=0$