# Find the local maxima and local minima, if any, of the following functions. Find also the local maximum and the local minimum values, as the case may be: $f (x) =\sin x-\cos x,0 < x <2\pi$

$\begin{array}{1 1} Maxima =\sqrt 3\; Minima = -\sqrt 2 \\ Maxima =\sqrt 2\; Minima = -\sqrt 2 \\ Maxima =\sqrt 2 Minima = \sqrt 2 \\ Maxima =\sqrt 2 Minima = -\sqrt 3 \end{array}$

Toolbox:
• $\large\frac{d}{dx}$$(\sin x)=\cos x • \large\frac{d}{dx}$$(\cos x)=-\sin x$
• For Maxima and Minima $f'(x)=0$
Step 1:
$f(x)=\sin x-\cos x$
Differentiating with respect to x
$f'(x)=\cos x+\sin x$
$\qquad=\cos x[1+\large\frac{\sin x}{\cos x}]$
$\qquad=\cos x[1+\tan x]$
For Maxima and Minima
$f'(x)=0$
$\Rightarrow \cos x+\sin x=0$
$\cos x[1+\tan x]=0$
$1+\tan x=0$
$\tan x=-1$
$x=\large\frac{3\pi}{4},\frac{7\pi}{4}$
Step 2:
At $x=\large\frac{3\pi}{4}$
When $x$ is slightly $<\large\frac{3\pi}{4}$
$\cos x=-ve$
$\tan x=-(1+h)$
$\qquad=-1-h$
$1+\tan x=1+(-1-h)=-h$=-ve
$\cos x(1+\tan x)=(-)(-)=+ve$
Step 3:
when $x$ is slightly >$\large\frac{3\pi}{4}$
$\cos x=-ve$
$\tan x=-(1-h)$
$\qquad=-1+h$
$1+\tan x=-1-1+h=+h$=+ve
$f'(x)=\cos x(1+\tan x)$
$\qquad=(-)(+)=-ve$
$f'(x)$ changes sign from +ve to -ve.
Therefore At $x=\large\frac{3\pi}{4}$,there is a point of local maxima.
Step 4:
Local maximum value=$f(\large\frac{3\pi}{4})=$$\sin\large\frac{3\pi}{4}$$-\cos\large\frac{3\pi}{4}$
$\Rightarrow \large\frac{1}{\sqrt 2}+\frac{1}{\sqrt 2}$
$\Rightarrow \large\frac{2}{\sqrt 2}$
$\Rightarrow \sqrt 2$
Step 5:
At $x=\large\frac{7\pi}{4}$
Let $x$ is slightly < $\large\frac{7\pi}{4}$
$\cos x=+ve$
$\tan x=-(1+h)$
$1+\tan x=1-(1+h)=-h$=-ve
$f'(x)=\cos x(1+\tan x)$
$\qquad=(+)(-)=-ve$
When $x$ is slightly >$\large\frac{7\pi}{4}$
$\cos x=+ve$
$\tan x=-(1-h)=-1+h$
$1+\tan x=1-1+h=h=+ve$
$f'(x)=\cos x(1+\tan x)=(+)(+)=+ve$
$f'(x)$ changes sign from -ve to +ve .
Hence,there is a local minima at $x=\large\frac{7\pi}{4}$
Step 6:
Local minimum value=$f(\large\frac{7\pi}{4})$
$\qquad\qquad\qquad\quad\;\;=\sin x-\cos x$