Remember that usually natural signals have noise.
If you integrate you waveform with noise you will get wrong result, because integral of noise will be any value that increase with time.
Therefore you must filter you signal from noises.
To use filter you must know parameters of your signal and of noise.