The function that we are using in this example to compute the signal power and energy is: $ f(x)=sin(x) \! $
Power Calculation
$ P = \int_0^2\pi \! |\sin(x)|^2\ dx $
$ P = \int_0^2\pi \! |{(1-\cos(2x))\over 2}| dx $
$ P = {1\over 2}\int_0^2\pi \! |1-\cos(2x)| dx $
$ P = [{1\over 2} (x - {1\over 2}\sin(2x) )]\mid_0^{2\pi} $
$ P = [{1\over 2}x - {1\over 4}\sin(2x)]\mid_0^{2\pi} $
$ P = \pi - {1\over4}\sin(4\pi) $
$ P = \pi $
Energy Calculation
$ E = {1\over(2\pi-0)}\int_{0}^{2\pi} \! |\sin(x)|^2 dx $
$ E = {1\over(2\pi-0)}\int_{0}^{2\pi} \! |{(1-\cos(2x))\over 2}| dx $
$ E = {1\over{2\pi}}*{1\over 2}\int_0^{2\pi} \! |1-\cos(2x)| dx $
$ E = {1\over{4\pi}} * [ x - {1\over2}\sin(2x) ]_0^{2\pi} $
$ E = {1\over{4\pi}} * [ 2\pi - {1\over2}\sin(4\pi) - ( 0 - {1\over2}\sin(0) ) ] $
$ E = {2\pi\over{4\pi}} $
$ E = {1\over2} $