Calculating the Energy of a Function
To calculate the energy of a function, use the following equation.
$ E=\int_{t1}^{t2}{|f(t)|^2dt} $
For clarity, follow the example below.
$ E=\int_{0}^{2\pi}{|2sin(t)|^2dt} $
$ E=2\int_{0}^{2\pi}{|sin(t)|^2dt} $
$ E=\int_0^{2\pi}(1-cos(2t))dt $
$ E=(t-\frac{1}{2}sin(2t))|_{t=0}^{t=2\pi} $
$ E= 2{\pi} $
Calculating the Power of a Function
After you have the energy of a function, calculating the power isn't very difficult. Use the following equation.
$ E=\frac{1}{t_2 - t_1}\int_{t1}^{t2}{|f(x)|^2} $
For our previous example, continue by following below.