Show that $f(x)=f(y)$ then $|x|=|y|$, where $f(x )=\frac{1+|x|}{x}$ Let $f: \mathbb{R}^{*}\to \mathbb{R}$ function  definied by  $f(x )=\dfrac{1+|x|}{x}$
Show that  $f(x)=f(y)$ then $|x|=|y|$
Indeed,
$$f(x)=f(y)\\ \iff \\\dfrac{1+|x|}{x}=\dfrac{1+|y|}{y} \\ \iff \\ \dfrac{1+|x|}{x}=\dfrac{1+|y|}{y} \\ \iff\\ \left|\dfrac{1+|x|}{x}   \right|=\left| \dfrac{1+|y|}{y}\right| \\ \iff \\ \dfrac{1+|x|}{|x|}  =\dfrac{1+|y|}{|y|} \\\iff \\ |y|+|xy|=|x|+|xy| \\ \iff \\ |x|=|y| .$$
Is my proof correct? I'm also interested in others methods.
 A: The idea of the proof is correct, however how you wrote it is formally wrong, as some of the relations you marked by an equivalence are just implications. For example,
$$\frac{1+|x|}{x}=\frac{1+|y|}{y}\Rightarrow\left|\frac{1+|x|}{x}\right|=\left|\frac{1+|y|}{y}\right|$$
but not the other way around. Be careful with those things!
A: Note that $f(x)<0$ if $x<0$ and $f(x)>0$ if $x>0$, since $1+|x|$ is always positive.
$$f(x) = \frac{1+|x|}{x} = \begin{cases} \frac1x+1 & x>0 \\ \frac1x-1 & x<0 \end{cases}$$

Proof 1:
Suppose $x,y>0$, then $f(x)=\frac1x+1=\frac1y+1=f(y)$ implies $x=y$. 
Suppose $x,y<0$, then $f(x)=\frac1x-1=\frac1y-1=f(y)$ implies $x=y$. 
If $x<0$ and $y>0$ then $f(x)<0$ and $f(y)>0$.
If $x>0$ and $y<0$ then $f(x)>0$ and $f(y)<0$.
Hence we always have $x=y$ and hence also $|x|=|y|$. 

Proof 2:
$$f'(x) = -\frac1{x^2}$$
for all $x\neq 0$, where $f'$ isn't defined. So $f'(x)<0$, so $f$ is strictly decreasing on $(-\infty,0)$ and $(0, \infty)$. 
Therefore $f(x) \neq f(y)$ for $x \neq y$ that are both in $(-\infty,0)$ or $(0, \infty)$. So if $f(x)=f(y)$ then $x=y$ and hence $|x|=|y|$. 
If $x,y$ are in different intervals, then $f(x)$ is negative and $f(y)$ positive or vice versa. 
A: HINT.-If you want to see another method you can, for example, examine that for $x\gt 0$ and for $x\lt 0$ the function is clearly injective and that $$|f(x)|=|f(-x)|  $$ 
