$f(x)=0$ for any $x\in S$, $S$ is a dense set on $\mathbb R$, $f(x)$ is lipschitz continuous $\implies f(x)$ is always zero?

63 Views Asked by At

The set $S$ is a dense subset of $\mathbb R$. There is a function $y=f(x)$ such that $\{x\in\mathbb R||f(x)=0\}=S$ and $f(x)\geq0$.

Given that $y=f(x)$ is Lipschitz continuous, prove that $f(x)=0$ for any $x$.


Here is my try: by contradiction.

Suppose that $f(z)=a\neq0$ for some $a$. Because $S$ is dense

$\sup_{w\in S}\frac{f(z)-f(w)}{z-w} = \sup_{w\in S}\frac{a}{z-w} = +\infty$.

However, by the definition of $L$ continuity, there exists a constant $L$ such that $|\frac{f(z)-f(w)}{z-w}|\leq L$ for any $z,w\in\mathbb R$. Contradiction!

Is this proof rigorous enough?