I'm re-posting a question of mine from math.stackexchange in hopes that folks here might have the right kind of expertise.
I'm looking for a systematic way to approximate the sign function
$$\operatorname{sgn}(x) \triangleq \begin{cases}1&\text{ if }x > 0\\ 0&\text{ if }x=0\\ -1&\text{ if }x<0\\\end{cases}$$
by functions $f$ whose (distributional) Fourier transforms $\hat{f}$ are compactly supported.
More precisely, let us fix some $\epsilon$ small. Then I am interested in odd, continuous $f$ such that:
- $\text{supp}{\hat{f}}\subseteq[-\pi,\pi];$
- there exists some $a_f>0$ such that $|f^2(x)-1|<\epsilon$ whenever $|x|\geq a_f$.
Goal: I am looking for a "best" $f$ in the sense $a_f$ is as small as possible.
I figured that one way to do this would to be to look at convolutions $f=a*sgn$ where $a$ is a function that satisfies $\int_\mathbb{R} a(s)\,ds=1$ and $\text{supp }{\hat{a}}\subseteq[-\pi,\pi]$. For example, we could take
- $a_1(s)=\dfrac{\sin(\pi s)}{\pi s}$; or
- $a_2(s)=\frac{1}{2}\left(\dfrac{\sin(\frac{\pi}{2}s)}{\frac{\pi}{2}s}\right)^2,$
where the Fourier transforms of $a_1$ and $a_2$ are a rectangular and a triangle pulse respectively.
Doing some numerical experiments, I find that for the choice $\epsilon=0.05$, $a_2$ is "better" than $a_1$ by the above criterion.
Question: Is there a more systematic way to find better (or a best) $f$? References that deal with this type of problem would also be appreciated.