Find the maximum value of f(x)=sinx+cosx on [0,2π].
Solution — Step by Step
f′(x)=cosx−sinx=0⟹tanx=1
So x=π/4 or x=5π/4 in [0,2π].
f′′(x)=−sinx−cosx. At x=π/4: f′′(π/4)=−2<0⟹ maximum.
At x=5π/4: f′′(5π/4)=+2>0⟹ minimum.
f(π/4)=sin(π/4)+cos(π/4)=21+21=2
f(0)=1, f(2π)=1. Both less than 2.
The maximum value is 2.
Why This Works
For a smooth function on a closed interval, the maximum is either at a critical point (where f′=0) or at an endpoint. We’ve checked both and confirmed the maximum is 2 at x=π/4.
The second derivative test classifies critical points: f′′<0 means concave down (local max), f′′>0 means concave up (local min). When f′′=0, the test is inconclusive and we go to higher derivatives or the first-derivative sign chart.
Alternative Method
Rewrite sinx+cosx=2sin(x+π/4). Maximum of sin is 1, so the maximum of the expression is 2, achieved when x+π/4=π/2, i.e. x=π/4. Two-line solution.
The identity asinx+bcosx=Rsin(x+α) where R=a2+b2 is a JEE staple. Maximum is R, minimum is −R. No calculus needed.
Common Mistake
Forgetting to check endpoints. CBSE board questions on closed intervals always require checking f(a) and f(b). JEE Main 2024 had a 4-marker where the endpoint won, surprising students who had only used the second-derivative test.
Want to master this topic?
Read the complete guide with more examples and exam tips.