Why when $x^2=y^2$ then $x=y$ doesn't hold sometimes but $x^3=y^3$ then $x=y$ Why when $x^2=y^2$ then $x=y$ doesn't hold sometimes , but $x^3=y^3$ then $x=y$ holds in the real numbers.
.
I don't understand a thing If we do like this:
$\sqrt{x^2}=\sqrt{y^2}$then $x=y$ but why it is wrong we do the same thing for $x^3=y^3$ but it is true. why?
edit:Because there are a lot of answer I am ging to check and accept the best one.
 A: Let $f(t)=t^2$. Then $(-2)^2=2^2$.

Let $g(t)=t^3$. If $t_1\not=t_2$, then $g(t_1)\not=g(t_2)$

A: Alternative point:
$x^2-y^2=(x-y)(x+y)$
while
$x^3-y^3=(x-y)(x^2+xy+y^2)$
Thus, $x=y$ is the first term equated to zero while in the second expression, solving $x^2+xy+y^2=0$ may produce more of an answer here, especially for $y
\neq0$.
A: Looks like you are just talking about for the real numbers.  I think your tag of number theory is a bit misleading for some people.
$f(x)=x^2$ doesn't pass the horizontal line test, so two numbers go to the same place, like $1$ and $-1$.
$g(x)=x^3$ does, that is called a 1-1 or injective function, so if $g(x_1)=g(x_2)$, then $x_1=x_2$.
A: Your mistake lies in writing 
\begin{eqnarray}
x^{2}=y^{2}\Rightarrow x=y.
\end{eqnarray}
The correct way to conclude is that if $x^{2}=y^{2}$, then $|x|=|y|$, or $x=\pm|y|$.
A: Suppose that $x^3=y^3$. If any of $x,y$ is zero, then so is the other. We can assume, thus, that $x,y\neq 0$. It is enough to show then that if $t^3=1$ then in fact $t=1$, because we can apply the claim to $xy^{-1}$ and conclude what we want. If $t^3=1$ then either $t=1$ or $t^2+t+1=0$ because $t^3-1=(t-1)(t^2+t+1)=0$. But the roots of $t^2+t+1$ are not real numbers because the discriminant $\Delta=1-4=-3<0$, so $t=1$ as we wanted.
A: Let $n$ be a positive integer. It is easy to prove that if $x^n=y^n$ then $|x|=|y|$, because $|x^n|=|x|^n$, and $x^n$ is a strictly increasing function on $[0,\infty)$. So suppose that $x\ne y$. Then $y=-x$, so $x^n=(-x)^n=(-1)^nx^n$. Unless $x=0$ (in which it is the unique solution for both odd and even $n$), we can cancel $x^n$ to get $(-1)^n=1$. This is the source of the alternation between odd and even cases. If $n$ is odd, say $n=2k+1$, then $$(-1)^{2k+1}=((-1)^2)^k\cdot (-1)=(-1)\cdot 1^k=-1\ne 1,$$ which contradicts the assumption. Thus $x^n$ is injective for odd $n$, and for even $n$ we only have $x^n=y^n\implies |x|=|y|$.
A: 
$x=y \Rightarrow x^n=y^n$, where $n \in \mathbb{N}$

This implication actually produces a new equation which contains the root of the original equation. So, it's true.

The reverse implication however doesn't hold true. 

When $n \in \mathbb{N}$, $x^n=y^n \nRightarrow x=y $ 

as the new equation doesn't contain all the roots of the original one.

When dealing with $x,y \in \mathbb{R}$, it can be seen that


*

*If $n$ is even, the only real solutions of $x^n=y^n$ is $x=\pm y$

*If $n$ is odd, the only real solutions of $x^n=y^n$ is $x=y$
Note:
These results hold only because complex solutions are not allowed. Otherwise, as shown above these implications will be false.
