How would you do this without sketching the graph e.g using f'(x), f''(x) like I have done

\(\displaystyle f'(x) = \cos{x} - \sin{x}\)

\(\displaystyle f'(x) = 0\) at \(\displaystyle x = \frac{\pi}{4}\) and \(\displaystyle x = \frac{5\pi}{4}\)

perform the first derivative test to locate extrema ...

in the interval \(\displaystyle \left[0, \frac{\pi}{4}\right)\) , \(\displaystyle f'(x) > 0\) ... \(\displaystyle f(x)\) is increasing.

in the interval \(\displaystyle \left(\frac{\pi}{4}, \frac{5\pi}{4}\right)\) , \(\displaystyle f'(x) < 0\) ... \(\displaystyle f(x)\) is decreasing.

in the interval \(\displaystyle \left(\frac{5\pi}{4}, 2\pi\right]\) , \(\displaystyle f'(x) > 0\) ... \(\displaystyle f(x)\) is increasing.

when f'(x) changes sign from positive to negative, f(x) has a relative maximum at that critical value.

when f'(x) changes sign from negative to positive, f(x) has a relative minimum at that critical value.

set f''(x) = 0 and perform the same analysis. inflection points on the graph of f(x) occur where f''(x) changes sign. f(x) will be concave up for f''(x) > 0 and concave down for f''(x) < 0.

all this basic info is in your text. look it over.