# Sine wave with a constant period: what else is constant? [closed]

Which statistic that you can calculate on a window remains constant on a sine wave with a constant period? This is for a window function for a proprietary filter.

-
What are you asking? I don't understand. – Peter Shor Dec 29 '11 at 15:13
I agree with Peter - needs a bit more explanation. Do you mean that you have a finite time window, which you slide along the sine wave and compute some statistic (like RMS for example) on the samples that fall inside the window ? With the window, are you applying some amplitude modification, (like Kaiser, Hamming etc window functions) ? – twistor59 Dec 29 '11 at 15:38
You've cross-posted this on Mathematics, Statistics, Theoretical CS and Signal Processing. Please do not spam all the sites in the network with your question. – Zev Chonoles Dec 29 '11 at 15:49
Cross-posting between SE sites is not allowed, especially if you do not announce that you've done so. – Zev Chonoles Dec 29 '11 at 16:01
The answer is simple, although this is more appropriate for math – Ron Maimon Dec 29 '11 at 16:21

## closed as off topic by David Zaslavsky♦Dec 29 '11 at 20:08

Questions on Physics Stack Exchange are expected to relate to physics within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.

The quantities you will find to be constant in a window for a pure sine wave are all derived from

$${y''/y} = - \alpha^2$$

where $y(x) = A \sin(\alpha x)$. So if you measure the second derivative in any window of width $W$ around position $x$, for example, by computing

$$Y''(x) = { Y(x+\epsilon) - 2Y(x) + Y(x-\epsilon) \over \epsilon ^2}$$

for $\epsilon<W$ taken to be small compared to $1/\alpha$ and divide by the value $Y(x)$, no matter which window you take and where you are in the window, the answer will be $-\alpha^2$. You can extract other higher order invariants from this relation, by differentiating. So that

$${y'''/y'} = -\alpha^2$$

and

$${y''''/y} = \alpha^4$$

etc, I hope the others are all obvious. This will not distinguish between cosine and sine, of course, because you can shift one to the other, but it will distinguish between sinusoids and anything else. Different values of $\alpha$ are different periods.

If you are interested in a diagnostic which will give you a sinusoid without knowing $\alpha$, it is given by differentiating the first relation once again:

$${d\over dx} ({y''\over y}) = 0$$

or

$${y y''' - y' y'' = 0}$$

At all places where y is nonzero. Using suitable estimators of these quantities in any window will give you a criterion for a function to be sinusoidal.

-