Question:
Differentiate x/sinx w.r.t sin x.
Solution:
Let $y=\frac{x}{\sin x}$ and $z=\sin x$.
Differentiating both the parametric functions w.r.t. $x$,
$\frac{d y}{d x}=\frac{\sin x \cdot \frac{d}{d x}(x)-x \cdot \frac{d}{d x}(\sin x)}{(\sin x)^{2}}$
$=\frac{\sin x \cdot 1-x \cdot \cos x}{\sin ^{2} x}=\frac{\sin x-x \cos x}{\sin ^{2} x}$
$\frac{d z}{d x}=\cos x$
Now, $\frac{d y}{d z}=\frac{d y / d x}{d z / d x}=\frac{\frac{\sin x-x \cos x}{\sin ^{2} x}}{\cos x}=\frac{\sin x-x \cos x}{\sin ^{2} x \cos x}$
$=\frac{\sin x}{\sin ^{2} x \cos x}-\frac{x \cos x}{\sin ^{2} x \cos x}$
$=\frac{\tan x}{\sin ^{2} x}-\frac{x}{\sin ^{2} x}=\frac{\tan x-x}{\sin ^{2} x}$
Thus, $\frac{d y}{d z}=\frac{\tan x-x}{\sin ^{2} x}$.