Find the intervals in which the function $f\left(x\right) = \sin x - \cos x$, $0 < x < 2 \pi$ is increasing or decreasing.
$f\left(x\right) = \sin x - \cos x$
$\begin{aligned}
\therefore \; f'\left(x\right) & = \cos x + \sin x \\
& = \sqrt{2}\left(\dfrac{1}{\sqrt{2}} \cos x + \dfrac{1}{\sqrt{2}} \sin x\right) \\
& = \sqrt{2} \left(\sin \dfrac{\pi}{4} \cos x + \cos \dfrac{\pi}{4} \sin x\right) \\
& = \sqrt{2} \sin \left(\dfrac{\pi}{4} + x\right)
\end{aligned}$
$\therefore$ $\;$ $f'\left(x\right) = 0$ $\implies$ $\sin \left(\dfrac{\pi}{4} + x\right) = 0$
i.e. $\sin \left(\dfrac{\pi}{4} + x\right) = \sin 0 \;\; \text{OR} \;\; \sin \pi \;\; \text{OR} \;\; \sin 2 \pi$
$\implies$ $x = - \dfrac{\pi}{4}$ OR $x = \pi - \dfrac{\pi}{4} = \dfrac{3\pi}{4}$ OR $x = 2 \pi - \dfrac{\pi}{4} = \dfrac{7\pi}{4}$
Since $0 < x < 2 \pi$, $\;$ $x = - \dfrac{\pi}{4}$ is not a valid solution.
The points $x = \dfrac{3\pi}{4}$ and $x = \dfrac{7\pi}{4}$ divide the interval $0 < x < 2 \pi$ into three intervals namely $\left(0,\dfrac{3\pi}{4}\right)$, $\left(\dfrac{3\pi}{4},\dfrac{7\pi}{4}\right)$ and $\left(\dfrac{7\pi}{4},2\pi\right)$
Interval | Sign of $\sin \left(\dfrac{\pi}{4} + x\right)$ | Nature of function f |
---|---|---|
$\left(0,\dfrac{3\pi}{4}\right)$ | +ve | Increasing |
$\left(\dfrac{3\pi}{4},\dfrac{7\pi}{4}\right)$ | -ve | Decreasing |
$\left(\dfrac{7\pi}{4}, 2 \pi\right)$ | +ve | Increasing |
$\therefore$ $f\left(x\right)$ is increasing in the interval $\left\{x : 0< x < \dfrac{3\pi}{4}\right\} \cup \left\{x : \dfrac{7\pi}{4}< x < 2\pi\right\} $
$f\left(x\right)$ is decreasing in the interval $\left\{x : \dfrac{7\pi}{4} < x < 2\pi\right\} $