Daniel B. answered 10/27/21
A retired computer professional to teach math, physics
Define the functions
n(x) = x5 + 0.4
p(x) = -x + 0.4
Then
f(x) = n(x) for x <= 0, and f(x) = p(x) for x >0
Notice that
n(0) = p(0) = 0.4,
which makes f(x) continuous, although its derivative is not continuous.
First consider n(x).
n'(x) = 5x4
n'(0) = 0, but that does not make it maximum or minimum.
The important thing is that n'(x) >= 0, therefore
n(x) is non-decreasing, therefore
n(x) <= n(0) for all x <= 0, i.e,
n(x) has absolute maximum on the interval (-∞, 0] at x = 0.
Now consider p(x).
p'(x) = -1
p'(x) < 0, therefore
p(x) is always decreasing, therefore
p(x) <= p(0) for all x >= 0, therefore
p(x) has absolute maximum on the interval [0, ∞) at x = 0.
The conclusion is that the point (0, 0.4) is
absolute maximum for n(x) on (-∞, 0], and
absolute maximum for p(x) on [0, ∞).
Therefore it is absolute maximum for f.