While solving problems I saw a question in which I was supposed to find the range of a function $$f(x) = |x+3| - |x+1| - |x-1| + |x-3|$$ I know the way in which I can take different cases of $x$ larger than $3$ and then $x$ between $3$ and $1$ and so on. But it gets a bit long as there are 5 cases and the competitive exam for which I am getting my brain ready for wants me to solve a question in average 1.5 minutes. I want to know if there exists a faster way to find its range.
What is the fastest way to find the range of functions having modulus: $f(x) = |x+3| - |x+1| - |x-1| + |x-3|$
501 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail AtThere are 3 best solutions below
On
In this particular example, one short-cut you could use is to notice that the function is even, so to cut down on the work you would only need to consider the set $x\geq0$ to establish the range for the whole function.
On
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$.
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.
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.
Here is a plot from WolframAlpha. But again you should be able to sketch the graph of this function by hand.