Artificial intelligent assistant

How to write $\space f(x)=\frac{|2-x|+x}{|x|} \space$ by pieces? > Let $\space f(x)=\frac{|2-x|+x}{|x|} \space$. How can it be written by pieces? I've tried to find the zeros of $f$, by solving $f(x)=0$. But it seems that the function don't have real zeros. I stayed without knowing what is the transition point in the piecewise function. Even without the transition poin, I tried to figure it out the two pieces. In the original expression, I put the minus signal in evidence, and the expression of $f$ stayed like this: $\space f(x)=\frac{|-(x-2)|+x}{|x|} \space$ To the right of the transition point would be like this $\frac{-(x-2)+x}{x}=\frac{2}{x} \space$.To the left would be like this $\frac{x-2+x}{-x}=\frac{2x-2}{-x}$. But the graphs don't seem to be like the original one. Can you explain me how to write in pieces this function?

First, split into two cases: $x<0$ and $x>0$. We get

$$f(x)=\begin{cases} \frac{|2-x|+x}{x} & x> 0 \\\ \\\ \frac{|2-x|+x}{-x} & x<0\. \end{cases}$$

For $x<0$, note $2-x$ is always positive. Otherwise, for $x\in(0,\infty)$, $2-x$ is nonnegative for $x\le 2$ and negative for $x>2$. So we can split our first case into $x>2$ and $0< x\le 2$. We obtain

$$f(x)=\begin{cases} \frac{(x-2)+x}{x} & x>2 \\\ \\\ \\\ \frac{(2-x)+x}{x} & 0< x\le 2 \\\ \\\ \\\ \frac{(2-x)+x}{-x} & x<0\. \end{cases}$$

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy d1d8140c5afb50134e0f6e2f3bfe4b34