The given function is .
Differentiating both sides with respect to x, we get
For maxima or minima,
(Let us only consider the values of x ∈ [0, 2])
Now,
At , we have
> 0
So, is the point of local minimum of f(x).
At , we have
< 0
So, is the point of local maximum of f(x).
∴ Maximum value of f(x)
Thus, the maximum value of is .
The maximum value of f(x) = sinx + cosx is .