Solution:
Key idea: Dividing the numerator and the denominator by cosx gives 1+tanx1−tanx, and this equals tan(4π−x) by the formula for tan(A−B). Then tan−1 cancels the tangent on a suitable interval.
Step 1 — Divide by cosx.
We work on −4π<x<43π with x=2π, so that cosx=0 and cosx+sinx=0.
cosx+sinxcosx−sinx=1+tanx1−tanx
Step 2 — Write the fraction as one tangent.
We replace 1 by tan4π and use tan(A−B)=1+tanAtanBtanA−tanB.
1+tanx1−tanx=1+tan4πtanxtan4π−tanx=tan(4π−x)
At x=2π the fraction is −1 and tan(−4π) is also −1, so this form holds there too.
Step 3 — Remove the inverse tangent.
For −4π<x<43π, the angle 4π−x lies in (−2π,2π), the principal range of tan−1.
y=4π−x
Step 4 — Differentiate.
The constant 4π has derivative 0, and −x has derivative −1.
dxdy=−1
Therefore, dxdy=−1.