What functions satisfy $f \circ g = g \circ f\ne \text{id}$ and $f \ne g$?
Some thoughts: This is fulfilled for $f(x) := \alpha x$ and $g(x) := \beta x$ for $\alpha, \beta \in \mathbb{R}$ such that $\alpha \beta \ne 1$ and $x \in \mathbb{R}$ because of commutativity of real numbers, but are there other not so trivial examples and how can they be characterised?
Edit to reflect how this shouldn't be a duplicate. The accepted answer on the suggested duplicate is very interesting and informative but only deals with polynomials / rational functions and there are a lot of other functions that could fit this description (and if not, why?).