Solution:
Key idea: A function is increasing where f′(x)>0 and decreasing where f′(x)<0. We simplify f′(x) to a product whose sign is easy to read.
Step 1 — Name the parts for the quotient rule.
We write f(x) as vu, with u=4sinx−2x−xcosx and v=2+cosx. Using the product rule on xcosx, we get the two derivatives.
u′=4cosx−2−cosx+xsinx
u′=3cosx−2+xsinx
v′=−sinx
Step 2 — Write the numerator of f′(x).
The quotient rule gives f′(x)=v2vu′−uv′, so the numerator is vu′−uv′.
N=(3cosx−2+xsinx)(2+cosx)+sinx(4sinx−2x−xcosx)
Step 3 — Expand the first product.
We multiply each term of the first bracket by 2+cosx.
(3cosx−2+xsinx)(2+cosx)=6cosx+3cos2x−4−2cosx+2xsinx+xsinxcosx
Step 4 — Expand the second product.
We multiply each term by sinx.
sinx(4sinx−2x−xcosx)=4sin2x−2xsinx−xsinxcosx
Step 5 — Add and simplify.
The terms 2xsinx and xsinxcosx cancel with their negatives, and 6cosx−2cosx=4cosx.
N=4cosx+3cos2x−4+4sin2x
Now we put sin2x=1−cos2x.
N=4cosx+3cos2x−4+4−4cos2x
N=4cosx−cos2x
N=cosx(4−cosx)
So the derivative is:
f′(x)=(2+cosx)2cosx(4−cosx)
Step 6 — Decide what controls the sign.
Since −1≤cosx≤1, the factor 4−cosx is at least 3, and (2+cosx)2 is at least 1. Both are positive, so f′(x) has the same sign as cosx.
Step 7 — Read off the intervals in [0,2π].
Cosine is positive in the first and fourth quadrants and negative in the second and third.
cosx>0for 0<x<2π and 23π<x<2π
cosx<0for 2π<x<23π
Therefore, (i) f is increasing on (0,2π)∪(23π,2π) and (ii) f is decreasing on (2π,23π).