# how to take out oscillations of a sine wave and leave only amplitude?

There is a maths trick to take out the oscillations of a sine signal of varying amplitude, to keep only it's maximum transient amplitude in between peaks. It's something like the the square root of: the square of the sine wave added to the square of it's 90 degrees phase shifted equivalent.

Please do you know the name of the equation and the formula?

• Do you mean $\sin^2x+\cos^2x=1$? – Hagen von Eitzen Apr 17 '16 at 19:36
• yes i think that's indeed the formula i was was looking for. if you place that as an answer that would be cool please – com.prehensible Apr 17 '16 at 19:38
• The projected use is to graph the output of an audio filter, (2048 of them) which can let nearly a true sine wave through at the filter frequency, to have a clear view of the the maximum general value of the sound at that time and for post processing to ascertain harmonics of multiple frequencies. – com.prehensible Apr 17 '16 at 19:47

You want to create an operator that operates on sine and cosine waves and returns their amplitude.

$$A \left[ \lambda \cdot \sin(\omega \cdot x +\phi) \right]=\lambda$$

This operator will not be uniquely determined from the information provided from these constrains. For instance, Fourier decomposition, simple division by the wave part, or maximum functions all do the trick.

It seems you meant, a formula involving,

$$\sin(x)^2+\cos(x)^2=1$$

However, this isn't right either. If you really demand a relation, here's one.

$$e^{i \cdot z}=\cos(z)+i \cdot \sin(z)$$

$$f(z)=r \cdot e^{i \cdot z}$$

$$|f(z)|=\sqrt{f(z) \cdot f^*(z)}=r$$

• yes, for some given signal $x_n$ : $\displaystyle\min_{\omega,\phi,\lambda} \sum_{n=-N}^{N-1} | x_n-\lambda \sin(\omega n + \phi)|^2$ can be solved by finding the greatest peak of the Fourier series $f(t) = \sum_{n=-N}^N x_n e^{2 i \pi n t / (2N)}$ – reuns Apr 17 '16 at 19:45