# What is the domain and range for  f(x) = 3x - absx?

Oct 14, 2015

Both the domain and the range are the whole of $\mathbb{R}$.

#### Explanation:

$f \left(x\right) = 3 x - \left\mid x \right\mid$ is well defined for any $x \in \mathbb{R}$, so the domain of $f \left(x\right)$ is $\mathbb{R}$.

If $x \ge 0$ then $\left\mid x \right\mid = x$, so $f \left(x\right) = 3 x - x = 2 x$.

As a result $f \left(x\right) \to + \infty$ as $x \to + \infty$

If $x < 0$ then $\left\mid x \right\mid = - x$, so $f \left(x\right) = 3 x + x = 4 x$.

As a result $f \left(x\right) \to - \infty$ as $x \to - \infty$

Both $3 x$ and $\left\mid x \right\mid$ are continuous, so their difference $f \left(x\right)$ is continuous too.

So by the intermediate value theorem, $f \left(x\right)$ takes all values between $- \infty$ and $+ \infty$.

We can define an inverse function for $f \left(x\right)$ as follows:

${f}^{- 1} \left(y\right) = \left\{\begin{matrix}\frac{y}{2} & \text{if " y >= 0 \\ y/4 & "if } y < 0\end{matrix}\right.$

graph{3x-abs(x) [-5.55, 5.55, -2.774, 2.774]}