Solution:
Key idea: Write cosx and 1+sinx in terms of the angle 2π−x, and then use the half-angle formulas. The fraction becomes a cotangent, which cot−1 cancels when the angle lies in its principal range (0,π).
Step 1 — Use complementary angles.
We use cosx=sin(2π−x) and sinx=cos(2π−x).
1+sinxcosx=1+cos(2π−x)sin(2π−x)
Step 2 — Apply the half-angle formulas.
We put θ=2π−x, so that the half-angle is 2θ=4π−2x. The half-angle formulas are listed below.
sinθ=2sin2θcos2θ
1+cosθ=2cos22θ
For −2π<x<23π the angle 4π−2x lies in (−2π,2π), so its cosine is not zero and we may cancel it.
1+sinxcosx=2cos2(4π−2x)2sin(4π−2x)cos(4π−2x)=tan(4π−2x)
Step 3 — Change the tangent into a cotangent.
The angles 4π−2x and 4π+2x add up to 2π, so the tangent of one is the cotangent of the other.
tan(4π−2x)=cot(4π+2x)
Step 4 — Remove the inverse cotangent.
For −2π<x<23π, the angle 4π+2x lies in (0,π), the principal range of cot−1.
y=4π+2x
Step 5 — Differentiate.
The constant has derivative 0, and 2x has derivative 21.
dxdy=21
Therefore, dxdy=21.