Rewrite the expression as x = cot ( θ ) = cos ( θ ) sin ( θ ) {\displaystyle x=\cot(\theta )={\frac {\cos(\theta )}{\sin(\theta )}}} and use quotient rule ( g ( x ) h ( x ) ) ′ = g ′ ( x ) h ( x ) − g ( x ) h ′ ( x ) h 2 ( x ) {\displaystyle {\Big (}{\frac {g(x)}{h(x)}}{\Big )}'={\frac {g'(x)h(x)-g(x)h'(x)}{h^{2}(x)}}} to calculate the implicit differentiation of the expression with respect to x {\displaystyle x} .