Find absolute extrema of the function $\ f(x)=1-|x-1| , \ \ x \in [-9,4] \$ on the closed interval

Find absolute extrema of the function $$\ f(x)=1-|x-1| , \ \ x \in [-9,4] \$$ on the closed interval.

$$f(x)= \begin{array} (2-x) , \ \ if \ x \in [1,4] \\ \ \ x , \ \ if \ \ x \in [-9,1] \end{array} \$$

The function has not critical point.

Thus the extrema occurs at the end points $$\ x=1, x=4, x=-9 \$$

Now,

$$f(1)=1, \ f(-9)=-9 , \ f(4)=-2 \$$

Thus,

absolute minima $$\ f(-9)=-9 \$$

absolute maxima $$\ f(1)=1 \$$

I need confirmation of my work.

• This seems fine to me. You might add, that since $f$ is continuous and $[-9,4]$ is a compact intervall (it is bounded and closed), your function $f$ maps onto a maximum and minimum. Jul 11, 2018 at 1:36
• To confirm your calculations, you could draw the graph of the function.
– MasB
Jul 11, 2018 at 1:45

Your work is correct. The absolute maximum value of $1$ is attained at $x=1$ and the absolute minimum value of $-9$ is attained at $x=-9.$