Analytical study of magnetization dynamics driven by spin-polarized currents