Solution:
Key idea: For a quotient, (vu)′=v2vu′−uv′, and for a logarithm, dxdlogu=u1⋅dxdu.
We also need the derivatives dxdcosecx=−cosecxcotx and dxdcotx=−cosec2x.
Step 1 — Part (i): set up the quotient rule for logxsinx.
We take u=sinx and v=logx (with x>0 and x=1, so that logx=0). Their derivatives are u′=cosx and v′=x1.
dxdy=(logx)2logx⋅cosx−sinx⋅x1
Step 2 — Part (i): clear the small fraction.
We multiply the numerator and the denominator by x, so that no fraction is left inside the numerator.
dxdy=x(logx)2xcosxlogx−sinx
Step 3 — Part (ii): apply the chain rule to log(cosecx−cotx).
The inner function is u=cosecx−cotx, and its derivative is cosec2x−cosecxcotx, because the derivative of cosecx is −cosecxcotx and the derivative of cotx is −cosec2x.
dxdy=cosecx−cotx1⋅(cosec2x−cosecxcotx)
Step 4 — Part (ii): take out the common factor and cancel.
The bracket has the common factor cosecx, and what is left is exactly the denominator cosecx−cotx, which is not zero where the logarithm is defined.
dxdy=cosecx−cotxcosecx(cosecx−cotx)=cosecx
Therefore, (i) dxdy=x(logx)2xcosxlogx−sinx and (ii) dxdy=cosecx.