Sine Function with Alternating Peaks and Wavelengths

hddd123456789
Messages
92
Reaction score
0
Hi All,

I'm trying to find a sine function that models the cyclic and seasonal nature of retail sales across the years. I've tried several combinations including some basic attempts at complex plots of sin(x), but am now starting to wonder if there is even a simple solution to the problem. I've searched google for images of plots but maybe I'm not entering the right keywords?

Anyway I'm going to have to write out the description. The units right now don't matter since I can't even get the proper shape of the curve. I did a polynomial fit to average monthly data and got the fifth order polynomial that fits the data from x=1 to x=12 (for the months 1 to 12):

y = -1.225*x^5 + 40.785*x^4 - 479.82*x^3 + 2325.3*x^2 - 4029.5*x + 1554.433 view wolframalpha plot

I'm basically trying to find a sine function that repeats this basic pattern for every year since I need to then apply time-dependent attenuation and perhaps other functions to it. The closest I got was through complex plots like this:

y = (sin(pi*x-pi/2)) - re(sqrt(sin(pi/2*(x+2))))^2 view wolframalpha plot

Will greatly appreciate any help!
 
Mathematics news on Phys.org
Have you tried fitting your data to a fourier series?

Fourier series are basically made to find all of the frequency components of periodic data.
 
There won't exit a single sine (or cosine) function that models that but a sum of such functions can (that is the "Fourier series" Mute mentions).
 
Mute said:
Have you tried fitting your data to a fourier series?

Fourier series are basically made to find all of the frequency components of periodic data.

I haven't, how do you do that exactly? ;)

I'll just go ahead and assume that I'm in over my head with the actual math behind this for the moment. I am a programmer however, and found a nifty class that is supposed to perform a "Fast Fourier Transform" which calculates the "discrete Fourier transform". But this is apparently quite different than the Fourier series (from a google search).

Ok, some more searching around and I found this:

http://www.public.iastate.edu/~akmitra/aero361/design_web/crvft.html

at the bottom of which there is a link to an excel file that basically lays out all the calculations done. This seems to be what I need, and I would appreciate if someone could point out that I'm going in the right direction.

Many thanks!
 
Insights auto threads is broken atm, so I'm manually creating these for new Insight articles. In Dirac’s Principles of Quantum Mechanics published in 1930 he introduced a “convenient notation” he referred to as a “delta function” which he treated as a continuum analog to the discrete Kronecker delta. The Kronecker delta is simply the indexed components of the identity operator in matrix algebra Source: https://www.physicsforums.com/insights/what-exactly-is-diracs-delta-function/ by...
Fermat's Last Theorem has long been one of the most famous mathematical problems, and is now one of the most famous theorems. It simply states that the equation $$ a^n+b^n=c^n $$ has no solutions with positive integers if ##n>2.## It was named after Pierre de Fermat (1607-1665). The problem itself stems from the book Arithmetica by Diophantus of Alexandria. It gained popularity because Fermat noted in his copy "Cubum autem in duos cubos, aut quadratoquadratum in duos quadratoquadratos, et...
I'm interested to know whether the equation $$1 = 2 - \frac{1}{2 - \frac{1}{2 - \cdots}}$$ is true or not. It can be shown easily that if the continued fraction converges, it cannot converge to anything else than 1. It seems that if the continued fraction converges, the convergence is very slow. The apparent slowness of the convergence makes it difficult to estimate the presence of true convergence numerically. At the moment I don't know whether this converges or not.

Similar threads

Back
Top