`f(x) = x/2 + cos(x)` Consider the function on the interval (0, 2pi). Find the open intervals on which the function is increasing or decreasing, apply first derivative test to identify all relative extrema.
This functions is infinitely differentiable. To find its extrema we have to solve the equation f'(x)=0:
f'(x)=1/2 - sin(x). This is zero at x=(-1)^k*pi/6+k*pi. At the given interval (0, 2pi) there are two of them: pi/6 and 5pi/6.
f'(x)>0 on (0, pi/6) and (5pi/6, 2pi) and therefore f is increasing on these separate intervals.
f'(x)<0 on (pi/6, 5pi/6) and therefore f is decreasing on that interval.
So pi/6 is a relative maximum and 5pi/6 is a relative minimum.