Simple functional equation in two variables In one dimension the equation
$$
\frac{1}{1 + f^2(x)}=\frac{\left(\frac{\cos \phi}{\sqrt{1}} x +\sin \phi \right)^2}{1 + x^2}, \ x\in \mathbb{R}
$$
has the solution
$$f(x) =\frac{x-\frac{\cot \phi}{\sqrt{1}}}{1+ x \frac{\cot \phi}{\sqrt{1}}}, \ x\in \mathbb{R}$$
But, what is a solution of the equation in two dimensions
$$
\frac{1}{1 + f^2(x,y)+f^2(y,x)}=\frac{\left(\frac{\cos \phi}{\sqrt{2}} (x+y) +\sin \phi \right)^2}{1 + x^2+y^2}, \ x,y\in \mathbb{R}.\tag{1}
$$
Note: The function
$$f(x,y) =\frac{x-\frac{\cot \phi}{\sqrt{2}}}{1+ (x+y) \frac{\cot \phi}{\sqrt{2}}}$$
is close but not quite.
Any guess or method to derive a solution?
 A: Using the ansatz $f(x,y)=\frac{P(x,y)}{Q(x,y)}$, where $P,Q$ are polynomials of degree $1$ leads to four possible solutions such that your equation is satisfied. One of them is
$$f(x,y)=\frac{\frac{\cos\phi}{\sqrt{2}}+ x \frac{-1-\sin \phi}{2}+ y \frac{1-\sin \phi}{2}}{(x+y) \frac{\cos \phi}{\sqrt{2}}+\sin \phi}.$$
A: Write
$$g(x,y) = g(y,x) = \frac{ \left ( \frac{\cos \phi}{\sqrt{2}} (x+y) + \sin \phi \right )^2}{1 + x^2 + y^2}$$
Then you want to solve
$$\frac{1}{1 + (f(x,y))^2 + (f(y,x))^2} = g$$
But this gives exactly one constraint:
$$(f(x,y))^2 + (f(y,x))^2 = \frac{1 - g}{g}$$
This determines $f$ uniquely on the diagonal, as
$$f(x,x) = \sqrt{\frac{1-g(x,x)}{2g(x,x)}}$$
But off the diagonal, all bets are off. In particular, for any function $h(x,y)$
$$
f(x,y) = 
\begin{cases}
\sqrt{\frac{1-g(x,x)}{2g(x,x)}} & x = y \\
h(x,y)                & x < y \\
\sqrt{\frac{1-g(x,y)}{g(x,y)} - h(y,x)^2} & y < x
\end{cases}
$$
will do the trick. We can do whatever we want on $x < y$, and then define the function to make the swapping condition work for $y < x$.
Obviously the dream will be to find a function $h$ which makes this piecewise definition smooth, and you can try to build one by looking at the taylor series of $\sqrt{\frac{1-g}{2g}}$, or by looking for a function $h(x,y)$ so that $h(x,x) = \sqrt{\frac{1-g}{2g}}$.
At least one of those strategies is likely to work, but the definition of $g$ is too ugly for me to want to do it myself. If you aren't already using a computer algebra system like sage, you should look into one. It'll handle the calculations for you, and will make your life 1000 times easier.

I hope this helps ^_^
