Using the electron scattering theory, we obtain analytic expressions for anisotropic magnetoresistance (AMR) ratios for ferromagnets with a crystal field of tetragonal symmetry. Here, a tetragonal distortion exists in the [001] direction, the magnetization ${\mbox{\boldmath $M$}}$ lies in the (001) plane, and the current ${\mbox{\boldmath $I$}}$ flows in the [100], [010], or [001] direction. When the ${\mbox{\boldmath $I$}}$ direction is denoted by $i$, we obtain the AMR ratio as ${\rm AMR}^i (\phi_i)= C_0^i + C_2^i \cos 2\phi_i + C_4^i \cos 4 \phi_i \ldots = \sum_{j=0,2,4,\ldots} C_j^i \cos j\phi_i$, with $i=[100]$, $[110]$, and $[001]$, $\phi_{[100]} = \phi_{[001]}=\phi$, and $\phi_{[110]}=\phi'$. The quantity $\phi$ ($\phi'$) is the relative angle between ${\mbox{\boldmath $M$}}$ and the $[100]$ ($[110]$) direction, and $C_j^i$ is a coefficient composed of a spin--orbit coupling constant, an exchange field, the crystal field, and resistivities. We elucidate the origin of $C_j^i \cos j\phi_i$ and the features of $C_j^i$. In addition, we obtain the relation $C_4^{[100]} = -C_4^{[110]}$, which was experimentally observed for Ni, under a certain condition. We also qualitatively explain the experimental results of $C_2^{[100]}$, $C_4^{[100]}$, $C_2^{[110]}$, and $C_4^{[110]}$ at 293 K for Ni.