# Function with zero description

Is there a nice expression (possibly differentiable outside $0$) for a function $f(x)$ that satisfies the following property other than the delta? $$f(x)=1\iff x=0$$ $$f(x)=0\iff x\neq0$$

Is it possible to have something only in the numerator? This is a great one $$f(x)=\left\lfloor\frac1{x^2+1}\right\rfloor$$ but it has non-constants in the denominator. So does function using $$f(x)=\left\lfloor e^{-x^2}\right\rfloor=\left\lfloor\frac{1}{e^{x^2}}\right\rfloor.$$

If $0<a<1$, then $\lim_{n\rightarrow\infty}a^{n!|x|^{n}}$ works if $|x|>\frac{1}{\sqrt[n]{n!}}>\frac{1}{n}$ and hence works for $|x|>0$ as $n\rightarrow\infty$.

• What is a nice function? What delta are you talking about? Kronecker's Delta? – Billy Rubina Dec 22 '14 at 6:18
• Typically you'd see something like $\chi _{\{0\}}$,the indicator function for the set consisting of nothing but 0 for this, but Ajotaxe's formulation for this one is neater :) – Alan Dec 22 '14 at 6:22
• You could also have $f(x) = \lfloor e^{-x^2}\rfloor$. – JimmyK4542 Dec 22 '14 at 7:06
• @JimmyK4542 $e^{-x^2}=\frac{1}{e^{x^2}}$. – T.... Dec 22 '14 at 7:07
• All these are different expressions for the same function. – Robert Israel Dec 22 '14 at 7:15

$$f(x)=\left\lfloor\frac1{x^2+1}\right\rfloor$$

• Nice function!! – T.... Dec 22 '14 at 6:20
• $f(x)=\lfloor \frac{1}{|x|+1}\rfloor$ also works for complex $x$. – vadim123 Dec 22 '14 at 6:24

Let $a$ be the value you wish such a function to have at zero.

I assert that, for most practical purposes,

$$f(x) = \begin{cases} 0 & x \neq 0 \\ a & x = 0 \end{cases}$$

is the nicest expression for this function, barring the use of special functions, in which case something like

$$f = a \chi_0$$

is the nicest expression, where $\chi_0$ is the appropriate indicator function.

These may be boring, but boring is usually good, because that means they are very easy to actually use to do things.

Without any special functions, and using only a single expression, you may say:$$f(x)=a\cdot0^{|x|}$$ where $a$ is the value you want for $f(0)$.

For all real $x\ne0$, $|x|>0$, so $f(x)=a\cdot0^{|x|}=a\cdot0=0$.

And consensus seems to be that $0^0$ should be considered $1$ (even though this causes confusion wrt limits, which is one of the reasons this is not (yet) universally accepted), which would make $f(0)=a\cdot0^{|0|}=a\cdot0^0=a$.