Solution:
Key idea: The half-angle formulas sinx=2sin2xcos2x and 1+cosx=2cos22x turn each fraction into a single tangent or cotangent of 2x. Then tan−1(tanθ)=θ for −2π<θ<2π.
Step 1 — Part (i): simplify the fraction.
We work on −π<x<π, where cos2x>0, so we may cancel 2cos2x.
1+cosxsinx=2cos22x2sin2xcos2x=tan2x
Step 2 — Part (i): remove the inverse tangent and differentiate.
For −π<x<π, the angle 2x lies in (−2π,2π), so tan−1 cancels the tangent.
y=2x
dxdy=21
Step 3 — Part (ii): simplify the fraction.
We work on 0<x<2π with x=π, so that sinx=0 and the fraction is defined. Then cos2x=0, so we may cancel the common factor 2cos2x. The cotangent is then written as a tangent of the complementary angle.
sinx1+cosx=2sin2xcos2x2cos22x=cot2x=tan(2π−2x)
Step 4 — Part (ii): remove the inverse tangent and differentiate.
For 0<x<2π, the angle 2π−2x lies in (−2π,2π), so tan−1 cancels the tangent.
y=2π−2x
dxdy=−21
Therefore, (i) dxdy=21 and (ii) dxdy=−21.