I’m working with data coming from a time series. I fit these data obtaining this piecewise function:
f[x_]:=Piecewise[{{5201.719370223533 + 16.124856914784708*x - 0.05730466863626749*x^2 + 0.00007511799657756128*x^3 - 3.0055220788096836*^-8*x^4, Inequality[0, LessEqual, x, Less, 1240.7897231942954]}, {1.9776428665339341*^6 - 6887.559846424106*x + 9.487866827724105*x^2 - 0.00643063499411591*x^3 + 2.145284803022648*^-6*x^4 - 2.8188445268104724*^-10*x^5, Inequality[1240.7897231942954, LessEqual, x, Less, 2050.]}}, 0]
and this is its plot:
Plot[f[x], {x, 0, 2050}]
Now, I would like to decompose this function in several Fourier continuous transform (I probably think it’s necessary to manipulate frequence, amplitude, phase of the transform), and to compare this with my f[x] (so I think I have to change also the “scaling” of the f-transform) to know its periodic signal. In other words, I would need this to generate the different “cycles” of this non-periodic function, with different armonic curves, to make a sort of forecast on its probably walk in the future time. Moreover, there could be some problem when the function has a “cusp” in the point x~1240.
Does someone have an idea about how this could be done? Thanks a lot for the help.