Derivative of $\arctan2$
Let's begin by assuming you know that$$\partial_cf=\frac{d}{c^2+d^2},\,\partial_df=\frac{-c}{c^2+d^2}.$$Dividing the chain rule $\operatorname{d}f=\partial_cf\operatorname{d}c+\partial_df\operatorname{d}d$ by $\operatorname{d}x$ gives$$f^\prime=\frac{c^\prime d-cd^\prime}{c^2+d^2}.$$