# How do you express a fraction with a modulus as the numerator and denominator as a piece-wise function? [closed]

Could somebody please show me how to write it as a piece-wise function?

$$g(x)=\frac{|x^3+x-2|}{|x|}$$

## closed as off-topic by mrtaurho, Lee David Chung Lin, ancientmathematician, GNUSupporter 8964民主女神 地下教會, Thomas ShelbyFeb 12 at 17:00

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question is missing context or other details: Please provide additional context, which ideally explains why the question is relevant to you and our community. Some forms of context include: background and motivation, relevant definitions, source, possible strategies, your current progress, why the question is interesting or important, etc." – mrtaurho, Lee David Chung Lin, ancientmathematician, GNUSupporter 8964民主女神 地下教會, Thomas Shelby
If this question can be reworded to fit the rules in the help center, please edit the question.

• After your edit, you are asking one thing in the title and a different thing in the question! – TonyK Feb 5 at 11:38
• Hi everybody! I'm so sorry for the confusion, I felt like my original question would be too much of a burden so I deleted it, and forgot about the title! Thanks for reminding me, my bad! – kim Feb 5 at 11:50
• A hybrid function, is also a piece-wise function, if that helps. – kim Feb 5 at 11:51

Note that $$x^3+x-2=(x-1)(x^2+x+2)$$ and $$x^2+x+2$$ is positive for all values of $$x$$, so the sign of $$x^3+x-2$$ is the same as the sign of $$x-1$$.
$$g(x)$$ is undefined at $$x=0$$ and $$g(x)=0$$ at $$x=1$$.Divide the rest of the $$x$$ axis into three regions:
1. $$x \lt 0$$ where $$x^3+x-2 \lt 0$$ and $$x \lt 0$$
2. $$0 \lt x \lt 1$$ where $$x^3+x-2 \lt 0$$ and $$x \gt 0$$
3. $$x \gt 1$$ where $$x^3+x-2 \gt 0$$ and $$x \gt 0$$
• Once you know the signs of the numerator and denominator in a particular region then you can re-write the expression for $g(x)$ in that region to remove the absolute value function. – gandalf61 Feb 5 at 13:34