Find extreme values of absolute function

73 Views Asked by At

I have to find the extreme values of the following function: $f(x) = |x-2|+|x+3|$ on [-5;5]. How do I do that?

1

There are 1 best solutions below

2
On BEST ANSWER

Note that $|x-2|$ is the distance between $x$ and 2, and $|x+3|$ is the distance between $x$ and -3 (easy verification to convince yourself: plot on number line, plug in x=2 and x=3). If you let $g(x)=|x-2|$ and $h(x)=|x+3|$, then you can consider where $g$ and $h$ are increasing and decreasing with respect to x. Note also that $g'(x)$ and $h'(x)$ are either equal to 1, -1, or 0 (disregarding $x=2$ and $x=3$).

Since $f(x)=g(x)+h(x)$, $f(x)$ is increasing on an interval $I$ when $g(x)$ and $h(x)$ are both increasing on $I$; $f(x)$ is constant on $I$ when exactly one of $g(x)$ and $h(x)$ is increasing and the other is decreasing on $I$; $f(x)$ is decreasing on $I$ when both $g(x)$ and $h(x)$ are decreasing on $I$.

To see when $g(x)$ and $h(x)$ are increasing or decreasing, simply draw the number line of the interval $[-5,5]$ and mark $x=2,$, $x=-3$. For $g(x)=|x-2|$: Start from the far left, and start moving right. If you are moving toward $x=2$, $g(x)$ is decreasing. If you are moving away from it, $g(x)$ is increasing. Same for $h(x)$ but the key point here is $x=-3$.