Function that is non-zero only at one point.

This is possible if and only if $\tilde x$ is an isolated point of the domain.

Example 1: For example, the domain could be $$(-\infty,\tilde x - \epsilon)\cup \{\tilde x\}\cup (\tilde x +\epsilon,\infty)$$ if it is a subset of $\mathbb R$ (which, incidentally, is not specified) and the function rule could be $$f(x) = \begin{cases} 0 & \textrm{ if }x <\tilde x - \epsilon\\ c & \textrm{ if }x = \tilde x \\ 0 & \textrm{ if }x > \tilde x +\epsilon \end{cases} $$

where $\epsilon$ is a positive constant and $c$ is a nonzero constant.

For example, you could have $$f:(-\infty,-1)\cup \{0\}\cup (1,\infty) \rightarrow \mathbb R$$

with

$$f(x) = \begin{cases} 0 & \textrm{ if }x <-1\\ 1 & \textrm{ if }x = 0 \\ 0 & \textrm{ if }x >1 \end{cases} $$

Example 2: An even simpler example of such a function would be $$f:\{0,1\} \rightarrow \mathbb R$$ with $$f(x) = \begin{cases} 1 & \textrm{ if }x = 0 \\ 0 & \textrm{ if }x =1 \end{cases} $$


This function cannot exist, if it must be continuous.

Suppose such a function $f:R \to R$ exists, and for some $x \in R$, $f(x) = c \ne 0$. Let $y \ne x$. By the Intermediate Value Theorem, then $\exists z \in [x, y]$ (or $[y, x]$) such that $0 < f(z) < c$.


There is no continuous function $f:\mathbb{R}\rightarrow\mathbb{R}$ such that $f(x)=0$ for all $x\not=x_0$ and $f(x_0)\not=0$, since by definition of continuity

$$f(x_0)=\lim_{x\rightarrow x_0,x\not=x_0} f(x)=0$$