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.

2 Answers
2

Just a few pointers to further reading, and some general remarks.
Rather than saying that "the period is dependent on $x$", one would say that the instantaneous frequency is varying. There are some time-frequency representations that specifically allow for modeling signals with time-variable frequencies.

You may find the fractional Fourier transform useful, or perhaps chirplets, or the Fan-Chirp transform (FChT). Whereas the Fourier transform $X(f)$ is a function of one variable, the frequency, the FChT also depends on the chirp rate $\alpha$, so it is a function $X(f,\alpha)$.

As far as I can see, your idea of first making $f(x)$ periodic and then do a Fourier transform is related to the Mellin transform:
"Since the Mellin transform can be interpreted as a Fourier transform working on logarithmic time, it relies on warping the time axis."

If $g$ is fixed and $xg(x)$ is an increasing function of $x$, we can just warp the $x$-axis so that the basis functions $\cos(g(x)\cdot kx)$ and $\sin(g(x)\cdot kx)$ become the usual Fourier basis. Let $h(x)=xg(x)$, and define the warped input signal $\phi=f\circ h^{-1}$, so that $f(x)=\phi(h(x))=\phi(xg(x))$. If $\phi$ turns out to be periodic, you can find its Fourier series
$$\phi(y) = f(x) = \frac{1}{2} a'_0 + \sum_{k=1}^\infty\, (a'_k \cos{(\omega \cdot ky)} + b'_k \sin{(\omega \cdot ky)}),$$
and then
$$f(x)=\phi(xg(x))=\frac{1}{2} a'_0 + \sum_{k=1}^\infty\, (a'_k \cos{(\omega \cdot kxg(x))} + b'_k \sin{(\omega \cdot kxg(x))})$$
which is almost exactly what you wanted. If $\phi$ is not periodic, you'll get a continuous Fourier transform instead, but the principle will remain the same.