Suppose that we have the following functional equation $$y(x)=x \,g(x)$$ where both $y$ and $g$ are functions over the reals. In addition, we want $y(x)$ to be an involution, i.e. $y(y(x))=x$, for some interval of the real line $\mathbb R$. Is there a straightforward way to determine all possible functions $g(x)$ for which $y(x)$ is an involution? (At least given some specific interval in the reals).
I am not sure whether this question is trivial or extremely simple, but I was not able to work out an answer or find one in any reference.
Note added: We also want $y$ to be continuous and differentiable in the interval that is of interest.