# absolute value global/local Minima and Maxima (piecewise function)

given the function $$f(x)= \begin{cases} |x-2|&\text {} \, 0 which of the following statements is true?(there can be more than one true or all false)

1. In the open interval $$(0,7)$$ there isn't a global maxima
2. In the open interval $$(4,5)$$ there is a global minima
3. The point $$x=3$$ is a local maxima or minima point in the interval $$(0,7)$$

What I tried:

First thing was to write it in a more comfortable way without the absolute value

$$f(x)= \begin{cases} -x+2&\text {} \, 0

then I checked if there is continuity at these points $$(x=2,x=3,x=5)$$ $$\lim \limits_{x \to 2^+}=0$$ $$\lim \limits_{x \to 2^-}=0$$ , $$\lim \limits_{x \to 3^+}=2$$ $$\lim \limits_{x \to 3^-}=1$$ (not continuous at x=3) and $$\lim \limits_{x \to 5^+}=0$$ $$\lim \limits_{x \to 5^-}=0$$.

then I calculated the derivative $$f'(x)= \begin{cases} -1&\text {} \, 0 checked the limits to see if it is differentiable at the points mentioned above and found that they are all critical points (sorry if it is not the right word but what I mean is "suspicious" points).

Did a small table to check if the points are minima or maxima. found out that $$x=2$$ is a minima , $$x=3$$ is a maxima and $$x=5$$ is also a minima but I cannot tell if local or global so I cannot tell if statements 1 or 2 are right since I cannot calculate $$f(2)$$ or $$f(5)$$ $$f(3)$$

Can anyone give me hints on how to continue from here? and if my way was correct? Thank you!

Edit: I just checked the limits of the interval but what can I learn from that? $$\lim \limits_{x \to 0^+}=2$$ $$\lim \limits_{x \to 7^-}=2$$

from what I personally know I can conclude from that if the limits are infinite

• You need also consider the end points $x=0, x=7$ and not the question focuses on *open *intervals – WA Don Feb 15 at 13:42

## 1 Answer

Actually, you can calculate $$f(2)$$ and $$f(5)$$. To check which of the two minima is the global one (both of them are local minima), you can see a bit more carefully the domains on which $$f$$ is defined. By doing this you should also discover that the function has an additional maximum, other than the one you found.

• Thank you for the help , I got that $f(7)=2$, $f(4)=1$ , $f(5)=0$ , $f(2)=0$ and $f(3)=2$ Does that mean $f(2)$ and $f(5)$ are local minimum and $f(7)$ and $f(3)$ are global maximum? if that is the case then statement 1 is false , statement 3 is false and the second statement is also false? or the second statement is true ? – Adamrk Feb 15 at 14:25
• $f(2)$ and $f(5)$ are local minima, while $f(3)$ and $f(7)$ are local maxima. The first question restricts you to the open interval $(0,7)$, where the only local maximum is $f(3)$. Thus, it is a global maximum and the first statement is false. In the open interval $(4,5)$ there is no local maximum or minimum, thus the second statement is false. Finally, as you said $f(3)$ is a local maximum in $(0,7)$ and the third statement is true. – Cyclops Feb 15 at 14:34