Applications of Demoivre's Theorem