I need to use calculus to solve this word problem:

Find all maximum and minimum values for f(x)= sin(x)+ cos(x) on [0, 2(3.14)]

How do I do it?

f(x) = sinx + cosx , 0 ≤ x ≤ 2π

f ' (x) = cosx - sinx
= 0 for a max/min
cosx - sinx = 0
sinx = cosx
sinx/cosx = 1
tanx = 1
x = 45° or 225°
x = π/4 or x = 5π/4

f(π4) = √2/2 + √2/2 = √2
f(5) = -√2/2 - √2/2 = -√2

the max is √2, the min is -√2