Given f(x) = sinx - cosx
differentiate on both sides
f'(x) = cosx + sinx
f'(x) = 0 ⇒ x = 3π/4, 7π/4
local maxima:
f''(x) = cosx - sinx
f''(3π/4) = -√2 < 0, f(3π/4) = √2
local minima:
f''(7π/4) = √2 > 0, f(3π/4) = -√2
√2 and -√2 are the maximum and minimum values.