I pondered upon this transformation in a book and have some confusion about it. $$y =\cos(\theta) = \sin\left(\frac\pi2-\theta\right)$$$$dy = d\left(\sin\left(\frac\pi2-\theta\right)\right)=\cos\left(\frac\pi2-\theta\right) \times d(-\theta) = \cos\left(\frac\pi2-\theta\right) \times (-d\theta)$$
$$\frac {dy}{d\theta}=-\cos\left(\frac\pi2-\theta\right)=-\sin(\theta)$$
The main part I don't understand is: $$dy = d\left(\sin\left(\frac\pi2-\theta\right)\right)=\cos\left(\frac\pi2-\theta\right) \times d(-\theta)$$
This is (from what I can tell) an informal way to differentiate $\cos(\theta)$.
\cos
and\sin
to get $\cos$ and $\sin$ (rather than $cos$ and $sin$, which respectively refer to the products $c \cdot o \cdot s$ and $s \cdot i \cdot n$). We definitely appreciate the effort to MathJax, though! – Brian Tung Apr 18 '22 at 19:26