Function similar to Heaviside function
By Michael Henderson •
I was looking for a function, $f(x) = 1$ if $x = a$, and $f(x) = 0$ otherwise. otherwise. I was thinking of letting f(x) = H(x-a), where H is the Heaviside function, but this doesn't quite work.
Any ideas?
Thanks.
$\endgroup$1 Answer
$\begingroup$You could use something like this
$$ f(x) = \lim_{\epsilon \to 0}\eta_{\epsilon} $$
where $\eta_\epsilon$ is any of the following functions
\begin{eqnarray*} \eta_\epsilon &=& \frac{1}{\pi x}\sin\left(\frac{x}{\epsilon} \right)\\ \eta_\epsilon &=& \frac{1}{2\sqrt{\pi \epsilon}}e^{-x^2/4\epsilon} \\ \eta_\epsilon &=& \frac{1}{2}\epsilon |x|^{\epsilon - 1} \\ &...& \end{eqnarray*}
I guess it depends on the problem you're trying to solve
$\endgroup$