If the information available was 2 sine waves, and 1 for current and the other for voltage. The two waves would have to be multiplied which is a straght forward multiplication. Once multiplied the result is the power which should be positive have twice the original frequency (current and voltage).

This Power can now be integrated with respect to time to calculate the energy.

Alternatively the voltage sine wave can be squared and divided by the resistance then integrated with respect to time or

The current sine wave can be squared and multiplied by the resistance then integrated with time.

Are my assumptions correct or is there and easier method.

In a lot of the material I have read the equation given for energy is E=0.5CV2 , however I cannot mentally relate that to what I have stated above.

Any advice would be appreciated.