# Find the intervals in which the function $$f$$ given by $f(x) =\large \frac{4sin\: x - 2x - xcos \: x}{2+cos\:x}$ is (i) increasing (ii) decreasing.

Toolbox:
• $\large\frac{d}{dx}$$(\sin\theta)=\cos\theta • \large\frac{d}{dx}$$(\cos\theta)=-\sin\theta$
• $\large\frac{d}{dx}$$(x^n)=nx^{n-1} Step 1: f(x)=\large\frac{4\sin x-2x-x\cos x}{2+\cos x} \qquad=\large\frac{4\sin x-x(2+\cos x)}{2+\cos x} \qquad=\large\frac{4\sin x}{2+\cos x}-\frac{x(2+\cos x)}{2+\cos x} \qquad=\large\frac{4\sin x}{2+\cos x}$$-x$
Step 2:
Differentiating with respect to x we get
$f'(x)=\large\frac{(2+\cos x)4\cos x-4\sin x(-\sin x)}{(2+\cos x)^2}$$-1 \qquad=\large\frac{8\cos x+4\cos^2x-4\sin x(-\sin x)}{(2+\cos x)^2}$$-1$
$\qquad=\large\frac{8\cos x+4\cos^2x+4\sin^2x}{(2+\cos x)^2}$
$\qquad=\large\frac{4\cos x-\cos^2x}{(2+\cos x)^2}$
$\qquad=\large\frac{\cos x(4-\cos x)}{(2+\cos x)^2}$
Step 3:
Since $-1 \leq\cos x\leq 1$
$\Rightarrow 4-\cos x>0$ and also $(2+\cos x)^2>0$
Therefore $f'(x) >0$ or $<0$ according as $\cos x>0$ or $\cos x<0$ respectively.