What is the fastest way to find the range of functions having modulus: $f(x) = |x+3| - |x+1| - |x-1| + |x-3|$

Let us have a look at the two parts of your function. What is $|x-3|-|x-1|$? This is the distance of $x$ from $3$ minus the distance of $x$ from $1$. Can we say what this function looks like? If $x$ is on the right of the interval $[1,3]$, then the difference is obviously $-2$. If $x$ is on the left then the difference is clearly $2$. In the interval $[1,3]$ this function changes linearly between the two values.

The following graph is taken from WolframAlpha, but if you have seen a few such functions and you keep the above interpretation (absolute value as distance) in mind, you should be able to plot this graph easily by hand.

enter image description here

In the same way we can plot $|x+3|-|x+1|$ which looks rather similar. And you want to add these two functions together. You can simply plot both of them into the same graph.

enter image description here

  • You can see that for $x<-3$ and for $x>3$, one of the values is $2$ and the other one is $-2$. So the sum will be zero.
  • On the interval $(-1,1)$ both functions have value $2$, so their sum will be $4$.
  • In the two intervals inbetween the functions changes linearly, since it is a sum of two linear functions.

Here is a plot from WolframAlpha. But again you should be able to sketch the graph of this function by hand.

enter image description here


Let $g(x) = |x+3| + |x-3|$ and $h(x) = |x+1| + |x-1|.$ Then \begin{align} g(x) &= \begin{cases} 2|x| & \text{if $|x| \geq 3$} \\ 6 & \text{if $|x| < 3$} \end{cases} \\ h(x) &= \begin{cases} 2|x| & \text{if $|x| \geq 1$} \\ 2 & \text{if $|x| < 1$} \end{cases} \\ f(x) &= g(x) - h(x) \end{align} It should then be easy to see that $f(x) = 0$ when $|x| \geq 3$ and $f(x) = 4$ when $|x| < 1$. You just then have to confirm that $0 \leq f(x) \leq 4$ when $1 \leq |x| < 3$.