# Function with Weird Property!

Does there exist a function $f: \mathbb{R} \to \mathbb{R}\setminus\{0\}$ such that $(x-y)^2 \geq 4f(x)f(y), \forall x \neq y \in \mathbb{R}$?

Spoiler

I know of a proof using countability. But is there any proof without using that?

• ah yes! edited! :) – user121933 Apr 2 '18 at 2:17
• Countability? What does countability have to do with this? – saulspatz Apr 2 '18 at 3:08
• (1) Some of us on this site don't like teasers; please tell us whether you have proved existence or nonexistence. (2) What is the point of the factor $4$? Deleting it makes no difference to the difficulty of the question. – John Bentin Apr 2 '18 at 13:49

Fix some real $x$, and consider a sequence $\{x_n\}$ such that $x_n \to x$. We can split this sequence up into a subsequence $\{p_n\}$ consisting of the terms with $f(p_n)$ positive, and a subsequence $\{q_n\}$ consisting of the terms with $f(q_n)$ negative.
Suppose $p_n$ is infinite; then it is Cauchy. Take $\epsilon>0$; choose $N$ such that $|p_n-p_m|<\epsilon$ for all $n,m>N$. Then $0 < f(p_m)f(p_n) \leq 4\epsilon^2$. It follows that there can be at most one $n>N$ with $f(p_n) >2\epsilon$. So $\lim_{n \to \infty} f(p_n)=0$. Similarly, if $\{q_n\}$ is infinite then $\lim_{n \to \infty} f(q_n) = 0$. Since $p_n$ and $q_n$ partition $x_n$, it follows that $\lim_{n \to \infty} f(x_n)=0$.
But $x_n$ was an arbitrary sequence converging to $x$. Since $\Bbb{R}$ is first countable, this means that $\lim_{y \to x} f(y)=0$. Moreover, $x$ was arbitrary, and so this limit is zero for all $x \in \Bbb{R}$.
Now, define $$g(x)=\begin{cases}0 & x \in \Bbb{Q} \\ f(x) & \text{otherwise}\end{cases}$$ Then also $\lim_{y \to x} g(x)=0$ for all $x$. Since $f(x)$ is everywhere nonzero, $g(x)$ is continuous at each rational number and discontinuous at each irrational. But (as shown here) it follows from the Baire category theorem that no such function can exist. Since $g$ cannot exist, it follows that $f$ cannot either. So there is no nowhere-zero function which satisfies your inequality.
• Very nice. If $X$ is any metric space, the set of points of continuity of any $g:X\to \Bbb R$ is a $G_{\delta}$ set in $X$.... And by Baire, $\Bbb Q$ is not $G_{\delta}$ in $\Bbb R.$ – DanielWainfleet Apr 2 '18 at 14:54