Hopf Bifurcation and the Method of Averaging