Let $M$ be a set with an internal binary operation, denoted $\cdot$. Knowing that $(M, \cdot)$ is a semigroup and if there exists a natural number $n$ such that $x^ny^n=yx$, $\forall (x, y) \in M^2$, prove that $(M, \cdot)$ is a commutative semigroup.
My approach was to try using the fact that $xy=y^nx^n$ and to raise $yx$ to the power of $n$ and $(yx)^n=y(xy)^{n-1}x=y^{n+1}(x^ny^n)^{n-2}x^{n+1}=y^{n+1}(yx)^{n-2}x^{n+1}$ and we have a recurrence formula: $(yx)^n=a_n=y^{n+1}a_{n-2}x^{n+1}$ where $a_2=(yx)^2, a_1=yx$. We can't have $a_0$, because we do not have an identity element. The same recurrence relation can be deduced for $(xy)^n=b_n=x^{n+1}b_{n-2}y^{n+1}$, but I feel that this leads to nowhere. How could I draw a conclusion, knowing that there could not exist an identity element.