Function with Multiple Periods

106 Views Asked by At

Basically I'm trying to fit some data with seasonal effects to a periodic function, and the problem I'm running into is that the local minima usually occur around April, and the local maxima usually occur around December. So the distance from peak to trough is 4 months, but the distance from trough to peak is twice that. I'm wondering what the general form of a function with that behavior looks like.

Thank you!

1

There are 1 best solutions below

1
On

The best way is to experiment, as it depends so much on the actual shape of the data. You can get a sinusoidal type graph with a lop-sided cycle by considering a function in the form of a fraction consisting of $a\sin(nt+\epsilon)$ in the numerator and and $b\sin(mt+\delta)+k$ where $k$ is only just large enough to ensure the denominator remains strictly positive. Of $k$ is too large, the peaks and troughs get too close together.

To see what I mean, try plotting $$y=\frac{\sin x}{\sin x+\cos x+2}$$ on Wolfram Alpha.