How can I obtain the variation of
$$y = \arctan(\frac{q}{p})$$
For example the variation of $\delta (x^2) = 2x\delta x$. Since there's both $q$ and $p$, I was not sure how to approach the problem. Because I need to obtain the variation of both.
I have thought $$y=\arctan(x)$$ and $$\delta y = \frac{1}{x^2+1}\delta x \equiv \frac{1}{(\frac{q}{p})^2+1}\big(\frac{p\delta q - q\delta p}{p^2}\big) = \frac{p\delta q - q\delta p}{q^2+p^2}$$
Is this true ?