Problem

Source: Swiss MO 2023/5

Tags: algebra, functional equation, function, domain



Let $D$ be the set of real numbers excluding $-1$. Find all functions $f: D \to D$ such that for all $x,y \in D$ satisfying $x \neq 0$ and $y \neq -x$, the equality $$(f(f(x))+y)f \left(\frac{y}{x} \right)+f(f(y))=x$$holds.