The magnetocrystalline anisotropy energies of the elements iron, cobalt, and nickel have been calculated by means of the linear muffin-tin orbital (LMTO) method in the atomic-sphere approximation (ASA) within the framework of the local-spin-density approximation (LSDA). The so-called force theorem is used to express the total-energy difference, when spin-orbit coupling is included, as a difference in sums of Kohn-Sham single-particle eigenvalues. The results depend strongly on the location and dispersion of degenerate energy bands near the Fermi surface, and particular attention must be paid to the convergence of the Brillouin-zone integral of the single-particle eigenvalues. The calculated values of the anisotropy energy are too small by comparison with experiment, and we do not predict the correct easy axis for cobalt and nickel. We find that the variation of the anisotropy energy with changes in strain, in the magnitude of the spin-orbit coupling, for different choices of the exchange-correlation potential and for varying numbers of valence electrons are not capable of explaining these incorrect results. By comparing our calculated energy bands with those obtained by a full-potential linear augmented plane wave (FLAPW) method we conclude that the discrepancy is not attributable to terms in the potential that are neglected in the ASA.