Using Parseval's theorem to check for energy conservation between the time and frequency domain