By assuming that you have some test function [tex]\theta\mapsto f(\theta)[/tex], defining a new function [tex]x\mapsto \bar{f}(x)[/tex] by formula [tex]\bar{f}(x)=f(\theta(x))[/tex], where [tex]x\mapsto \theta(x)[/tex] is some inverse of cosine, and then calculating
[tex]
\frac{d}{dx}\bar{f}(x) = \cdots[/tex]
and then "thinking" that [tex]\bar{f}[/tex] and [tex]f[/tex] are somehow the same thing, and that you could cancel them out of the equation, so that you are left only with operators on the both sides.