Theory of periodic ferromagnetic multilayers