Solution:
Key idea: In (tanx)cosx both the base and the power contain x, so we use logarithmic differentiation and the product rule.
Step 1 — Take logarithms of both sides.
Let y=(tanx)cosx, taken where tanx>0. The natural logarithm brings the power cosx down.
logy=cosxlogtanx
Step 2 — Differentiate both sides with respect to x.
By the product rule, the derivative of cosx is −sinx and the derivative of logtanx is tanxsec2x.
y1dxdy=cosx⋅tanxsec2x+logtanx⋅(−sinx)
Step 3 — Simplify the first term.
Since tanxsec2x=sinxcosx1, multiplying by cosx leaves sinx1.
cosx⋅tanxsec2x=cosx⋅sinxcosx1
cosx⋅tanxsec2x=cosecx
So the right side becomes
y1dxdy=cosecx−sinxlogtanx
Step 4 — Multiply both sides by y.
We multiply by y=(tanx)cosx.
dxdy=(tanx)cosx[cosecx−sinxlogtanx]
Therefore, dxdy=(tanx)cosx(cosecx−sinxlogtanx).