#### Question

Find the intervals in which *f*(*x*) = sin *x* − cos *x*, where 0 < *x* < 2π is increasing or decreasing ?

#### Solution

\[f\left( x \right) = \sin x - \cos x, x \in \left( 0, 2\pi \right)\]

\[f'\left( x \right) = \cos x + \sin x\]

\[\text { Forf(x) to be increasin, we must have }\]

\[f'\left( x \right) > 0\]

\[ \Rightarrow \cos x + \sin x > 0\]

\[ \Rightarrow \sin x > - \cos x\]

\[ \Rightarrow \tan x > - 1\]

\[ \Rightarrow x \in \left( 0, \frac{3\pi}{4} \right) \cup \left( \frac{7\pi}{4}, 2\pi \right)\]

\[\text { So,f(x)is increasing on } \left( 0, \frac{3\pi}{4} \right) \cup \left( \frac{7\pi}{4}, 2\pi \right) . \]

\[\text { Forf(x) to be decreasing we must have},\]

\[f'\left( x \right) < 0\]

\[ \Rightarrow \cos x + \sin x < 0\]

\[ \Rightarrow \sin x < - \cos x\]

\[ \Rightarrow \tan x < - 1\]

\[ \Rightarrow x \in \left( \frac{3\pi}{4}, \frac{7\pi}{4} \right)\]

\[\text { So,f(x)is decreasing on }\left( \frac{3\pi}{4}, \frac{7\pi}{4} \right).\]