How to simplify abs(x)/x

$\begingroup$

I've been trying to find a way to simplify $\frac{|x|}{x}$ if $x$ is real and $\neq{0}$. The two possible outcomes to this are $\pm{1}$ but I believe there is one required answer. I've noticed that if x is positive, we will have +1, and if x is negative, we will have -1. However, I'm unable to simplify the equation such that we have such an outcome.

$\endgroup$

3 Answers

$\begingroup$

I suppose what you're looking for is:

$$\frac{|x|}{x}=\left\{\begin{array}+1&\text{if}&x>0\\-1&\text{if}&x<0\end{array}\right..$$ This function is sometimes written $\text{sgn}(x)$.

$\endgroup$ $\begingroup$

An alternative answer of $\quad \text{sgn}(x)\quad$ is $\quad 2\left(H(x)-\frac12\right)$.

$H(x)$ is the Heaviside step function :

$\endgroup$ $\begingroup$

I don't quite get what you mean by "required answer". You can just write: $$\frac{|x|}{x} = \begin{cases} 1, \mbox{if } x > 0 \\ -1, \mbox{if } x < 0\end{cases}$$ Or, write $\frac{|x|}{x} = \mathrm{sgn}(x)$, where $\mathrm{sgn}: \Bbb R \setminus \{0\} \to \{-1, 1\}$ is the sign function.

$\endgroup$

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like