The given function is,
f( x )=sinx+cosx
Differentiate the function with respect to x,
f ′ ( x )=cosx−sinx(1)
Put f ′ ( x )=0,
cosx−sinx=0 cosx=sinx tanx=1 x= π 4 , 5π 4 ,⋯
Differentiate equation (1) with respect to x,
f ″ ( x )=−sinx−cosx =−( sinx+cosx )
The value of f ″ ( x ) is negative only when the value of f( x ) is positive which is only possible when the function lies in first quadrant in the interval ( 0, π 2 ). For this interval, the value of x is π 4 .
The maximum value of the given function is,
f( π 4 )=sin π 4 +cos π 4 = 1 2 + 1 2 = 2 2 = 2
Therefore, the maximum value of the given function is 2 .