# How do you write f(x) = |x| + 3x + 1 as a piecewise function?

$f \left(x\right) = \left\{\left(4 x + 1 \textcolor{w h i t e}{\text{xxx")x>=0),(2x+1color(white)("xxx}} x < 0\right)\right.$
If $x \ge 0$ then $\left\mid x \right\mid = x$
if $x < 0$ then $\left\mid x \right\mid = - x$