Traditional Fourier analysis picks a period and then describes a function as: $$f(x) = \frac{1}{2} a_0 + \sum_{k=1}^\infty\, (a_k \cos{(\omega \cdot kx)} + b_n \sin{(\omega \cdot kx)})$$
I am wondering whether there is a way to Fourier-analyze a function in a way that the period is dependent on $x$. Let $g$ be a continuous (or differentiable, if necessary) function that is positive for all arguments $x$. Is there a representation of $f$ in a form that looks something like this? $$f(x) = \frac{1}{2} a'_0 + \sum_{k=1}^\infty\, (a'_k \cos{(g(x) \cdot kx)} + b'_n \sin{(g(x) \cdot kx)})$$
Perhaps one can first make $f(x)$ periodic in the traditional sense, then apply Fourier analysis, and then backtransform the result. This is just an idea.
By the way, $g$ needs to have certain properties for this question to make sense. If $g(x)$ falls so steeply that no period is ever completed, Fourier analysis might not be sensible. If someone would like to work out the details, he may feel free to do so here.