Energy
$ f(t)=2cos(t) $
$ E = {1\over(t2-t1)}\int_{t_1}^{t_2}\!|f(t)|^2 dt $
$ E = {1\over(2\pi-0)}\int_{0}^{2\pi}\!|2cos(t)|^2 dt $
$ E = {1\over(2\pi-0)}{1\over2}\int_{0}^{2\pi}\!(1+cos(2t)) dt $
$ E = {1\over(4\pi)}(2\pi+{1\over2}sin(2*2\pi)) dt $
$ E = {1\over2} $
Power
$ f(t)=2cos(t) $
$ P = \int_{t_1}^{t_2}\!|f(t)|^2\ dt $
$ P = \int_{t_1}^{t_2}\!|f(t)|^2\ dt $