What is the maximum value of the function sin x+cos x?
Let f(x)=sin x+cos x⇒f′=cos x−sin x
and f"=−sin x−cos x=−(sin x+cos x)
For maxima or minima put f'(x)=0
⇒cos x−sin x=0⇒sin x=cos x⇒sin xcos x=1⇒tan x=1⇒x=π4,5π4…
Now, f"(x) will be negative when (sin x+cos x)is positive i.e., when sin x and cos x are both positive. Also, we know that sin x and cos x both are positive in the first quadrant.
Then, f"(x) will be negative when xϵ(0,π2)
Thus, we consider x=π4
f"(π4)=−(sinπ4+cosπ4)=−(1√2+1√2)=−2√2=−√2<0
∴ By second derivative test. f will be maximum at x=π4 and the maximum value of f is f(π4)=sinπ4+cosπ4=1√2+1√2=2√2=√2