  We present the calculation of the stability region of a perfect diamagnet
levitated in a magnetic field created by a circular current loop. We make use
of the machine learning technique of automatic differentiation to illustrate
the calculations with the elliptic integrals involved.
