Explanation:
f(x) = cos(2x) + cos(x)
so, the maximum and minimum values are the result of adding or subtracting the min./max. values of the parts of f(x).
cos(x) is simple. it moves between +1 and -1 between 0° and 180° (or 0 and pi).
cos(2x) is also 1 for x = 0.
so, for x = 0 we have the max. value 1 + 1 = 2.
cos(0) + cos(0) = 1 + 1 = 2
for x = 90° (or pi/2) we have -1 + 0 = -1.
cos(180) + cos(90) = -1 + 0 = -1
for x = 180° (or pi) we have +1 - 1 = 0.
cos(360) + cos(180) = 1 - 1 = 0
for x = 270° (or 3pi/2) we have -1 + 0 = -1
cos(540) + cos(270) = cos(540 - 360) + 0 =
cos(180) + 0 = -1 + 0 = -1
there is no point where both extremes of -1 and -1 fall together. so, -2 is actually not happening.
so, the min/max values of f(x) are -1 and +2.