# Functional equation $f(x)-f(y)=\frac{1}{(x-y)^{2}}$

Please help me to solve the functional equation $$f(x)-f(y)=\frac{1}{(x-y)^{2}}$$ for all real $x\neq y$.

I have reduced it to $$f(x+h)-f(x)=\frac{1}{h^{2}}$$ for all real $h\neq 0$.

But what to do with this equation?

Note that by definition, $f(x)-f(y)=f(y)-f(x)$, which means $f(x)-f(y)=0$ for all $x\neq y$. Clearly a contradiction, as $\frac1{(x-y)^2}\neq0$ for all $x\neq y$.
(In fact this shows that the only possible subset of $\mathbb R$ on which such a function exists is either a singleton or the empty set.)

You can remark that:

$$f(1) - f(0) = 1 \quad and \quad f(2) - f(1) = 1$$

So you conclude that: $f(2) - f(0) = 2$

But $$f(2) - f(0) = 1/4$$

It's not going to match any function, because otherwise $$\frac{1}{(x-y)^2}=f(x)-f(y)=(f(x)-f(0))-(f(y)-f(0))=\frac{1}{x^2}-\frac{1}{y^2}$$

If you consider $x=0$ in the equality $$f(x+h)-f(x)=\frac{1}{h^{2}}$$ you have $$\begin{equation} f(h)=f(0)+\frac{1}{h^{2}},\forall h\in \mathbb{R}.\tag{1}\end{equation}$$

If you consider $x=-h$ in the equality $$f(x+h)-f(x)=\frac{1}{h^{2}}$$ you have $$f(0)-f(-h)=\frac{1}{(-h)^{2}}=\frac{1}{h^{2}},\forall h\in \mathbb{R},$$ that is,

$$\begin{equation}f(-h)=f(0)-\frac{1}{h^{2}},\forall h\in \mathbb{R}.\tag{2} \end{equation}$$

So, it follows from $(1)$ and $(2)$ that such a function can't exist.