If I want to Fourier transform a function $$t \in [-1,1] \to f $$ but this function and it's first $n$ differentials are not equal at the edges : $$f^{(k)}(-1) \neq f^{(k)}(1) , k \in \{0,1,\cdots,n\}$$, which function $g$ can I additively adjust $f$ with so that the resulting function $h(t) = f(t)+g(t)$ has as sparse a Fourier transform as possible? Let us for simplicitys sake assume that f is awfully nicely behaving on the inside of the interval $]-1,1[$ having bounded $0$:th to $k$:th derivatives there.
Now the trivial solution is to select $g(t)=-f(t)$. This one I am not interested in as it does not help me in any sense. See I still need to store the information about $g$ as this is for data compression purposes.
Own work One simple approach I have thought about is to use a linear compensatory function $$2g(t) = -f(-1)-f(1) + t\cdot(f(-1)-f(1))$$ This will remove the step discontinuity as $h(t)$ should be 0 at the edges, but probably leave us having discontinuities in all the derivatives.
Having started with a polynomial... for the purpose of expanding into being able to attack and remove higher order discontinuities it could be tempting to continue into the realm of polynomial splines or Bezier curves or something like that?