Key idea: Use the laws of logarithms first, logw=21logw and logqp=logp−logq, so that only simple logarithms are left. Each is differentiated with the chain rule, and the answer simplifies with 1−sin2x=cos2x.
Step 1 — Rewrite y with the laws of logarithms.
We take −2π<x<2π, so that 1+sinx and 1−sinx are both positive. The square root becomes the factor 21, and the quotient becomes a difference.
y=21[log(1+sinx)−log(1−sinx)]
Step 2 — Differentiate each logarithm.
The derivative of 1+sinx is cosx, and the derivative of 1−sinx is −cosx. Subtracting a negative term turns the minus sign into a plus sign.