<s>[INST] Prove that if $x^n = y^n$ and $n$ is even, then $x = y$ or $x = -y$ This is a problem from Spivak's Calculus $3^{rd}$ ed., Chapter I, Problem $6$(d)

Prove that if $x^n = y^n$ and $n$ is even, then $x = y$ or $x = -y$.

Proof. Suppose $x^n = y^n$ and $n$ is even. We consider the following cases.
Case 1. $x \geq 0$ and $y \geq 0$. Now suppose, for the sake of contradiction, $x \neq y$. Then $x > y$ or $x < y$. If $x > y$, then $0 \leq y < x$, so $y^n < x^n$. But this contradicts our assumption that $x^n = y^n$. Similarly, $x < y$ leads to a contradiction. Thus $x = y$. 
Case 2. $x \geq 0$ and $y < 0$. Now suppose, for the sake of contradiction, $x \neq -y$. Then $x > -y$ or $x < -y$. If $x > -y$, then $0 < -y < x$, so $(-y)^n < x^n$. Since $n$ is even, it follows that $y^n < x^n$. But this contradicts our assumption that $x^n = y^n$. Similarly, $x < -y$ leads to a contradiction. Thus $x = -y$. 
Case 3. $x < 0$ and $y \geq 0$. Applying case 2 with $x$ and $y$ interchanged, we get $y = -x$. Therefore $x = -y$. 
Case 4. $x <0$ and $y < 0$. Then $-x > 0$ and $-y > 0$. Applying case 1 to $-x$ and $-y$, we get $-x = -y$. Therefore $x = y$.
Is my proof correct? Is there a shorter way to prove this?
 [/INST] I would do it this way:
We have $x^n=y^n$ and $n=2k$ so we have $(y^2)^k=(x^2)^k$, taking $k$-th root of the both sides we obtain $y^2=x^2$ (beacuse $k$-th root function is an injection) so it follows $(x-y)(x+y)=0$ from which it follows that either $x=y$ or $x=-y$, short enough?
</s>