Let $y=\sin x+\cos x$ $=\sqrt{2}\left(\frac{\sin x+\cos x}{\sqrt{2}}\right)$ $=\sqrt{2}\left(\sin \left(\frac{\pi}{4}+x\right)\right)$ Here, $y$ will be maximum when $\left(\sin \left(\frac{\pi}{4}+x\right)\right)=1$ But, $\sin \frac{\pi}{2}=1$ So, $\frac{\pi}{4}+x=\frac{\pi}{2}$ Hence, $x=\frac{\pi}{4}$
The extrema of a function are very well known as Maxima and minima. Maxima is the maximum and minima is the minimum value of a function within the given set of ranges.
There are two types of maxima and minima that exist in a function, such as: