Proof: If $x^n = y^n$ and n is even, then $x=y$ or $x=-y$. This is a problem from Spivak's Calculus 4th ed., Chapter 1, Problem 6(d)

Proof: If $x^n = y^n$ and n is even, then $x=y$ or $x=-y$.

I tried to prove it in the following way but I'm not sure if the proof makes sense, and the author uses another method.
Proof: Let $n=k+1$, $k$ is odd such that $x^{k+1}=y^{k+1}$. This would only be possible if $x^k=y^k$ or $x^k=-y^k$. This is because, if $x^k=y^k$ and $k$ is odd, then $x=y$ (I proved this on a previous exercise). Therefore, $x^k\cdot x = y^k \cdot x \Rightarrow x^{k+1}=y^{k+1}$. 
Similarly, $x^k=-y^k \Rightarrow x=-y \Rightarrow x^{k+1}=y^{k+1}$. Thus, I have proved that $x^{k+1}=y^{k+1}$ is possible only if $x^k=y^k$ or $x^k=-y^k$. As I have already proved, $x^k=-y^k \Rightarrow x=-y$ and $x^k=y^k \Rightarrow x=y $
$\therefore x^n=y^n$ and $n$ is even $\Rightarrow x=y$ or $x=-y$
 A: Let $n=2k$ be even and let $x^n =y^n$
We get $$x^{2k}=y^{2k}$$
Thus $$x^{2k}-y^{2k}=0$$
$$(x^2)^k-(y^2)^k=0$$
Factoring we get 
$$(x^2-y^2)(x^{2k-2}+...+y^{2k-2})=0$$
That implies $$ x^2-y^2=0$$
Thus $$x=\pm y$$
A: As I mentioned in a comment, for your approach to work you'd need to first show $x^{n-1}=\pm y^{n-1}$. This will ultimately require an argument from moduli, such as the correct one below, rendering your technique unnecessary.
Taking moduli, $|x|^n=|y|^n$. Since $z\mapsto z^n$ is order-preserving on $[0,\,\infty)$, $|x|=|y|$. Therefore, $x=y$ or $x=-y$. The former works regardless of $n$'s parity; the latter works with nonzero variables for even $n$ only, since if $n$ is odd $(-x)^n=-x^n$.
(I'm assuming your variables are real. With complex numbers, counterexamples exist for even $n\ge4$, or even for odd $n\ge3$.)
A: Bear with me.
If $0 \le x <  y$ then $x^n < y^n$.
Pf: By induction. Base case is $x < y$. Induction step is If we assume $x^{n} < y^{n}$ then $x^{n+1} = x*x^{n} < x*y^{n} < y*y^{n-1} = y^{n+1}$.
So if we know $x$ and $y$ are non negative and we are told $x^n = y^n$ then we know $x = y$. (By contradiction.  If $x \ne y$ then one is larger than the other and $x^n \ne y^n$)
Finally $(-x)^n = (-1*x)^n = (-1)^n x^n$ and $(-1)^n = 1$ if $n$ is even.  (Because $(-1)^{2k} = [(-1)^2]^k=1^k = 1$.)  So $(-x)^n = x^n$.
So.... we are ready:
If $x^n= y^n$ there are four cases:
1:  $x \ge 0$ and $y \ge 0$.  We've shown that means $x = y$.
2:  $x \ge 0$ and $y < 0$ then $-y > 0$ and $(-y)^n = y^n$ so $x^n = (-y)^n$ so $x = -y$.
3: $x < 0$ and $y\ge 0$.  Then $-x > 0$ and $(-x)^n=x^n = y^n$ so $-x = y$ and $x = -y$.
4) $x < 0$ and $y < 0$ then $-x>0$ and $-y > 0$ so $(-x)^n = x^n = y^n = (-y)^n$ so $-x =-y$ and $x = y$.
C'est tout.
A: Overkill?
$y \not =0$.
$(x/y)^{2n}=1$, $n=1,2,.....$.
Set $z:=(x/y)$; then $z^{2n}=1$;
The $2n$ roots of unity are:
$z=e^{ik2π/(2n)}$, where $k=0,1,....,2n-1$.
Only $2$ real roots :
$k=0$: $z=1$, i.e. $x=y$ ;
$k=n$: $z=e^{-iπ} =-1$, i.e. $x=-y$.
