rsq_a said:
I seem to have forgotten a lot of my Calculus.
The problem which provoked the question was, I was trying to figure out the relationship between the divergence/gradient/laplacian, etc. in polar coordinates with cartesion coordinates.
So for example, if x = r\sin\theta and y = r\cos\theta, I immediately wrote down,
\frac{\partial \theta}{\partial x} = \frac{1}{\dfrac{\partial x}{\partial \theta}} = \frac{1}{r\cos\theta}
However, if you write \theta = \text{atan}(y/x) and differentiate, you get \frac{\partial \theta}{\partial x} = -\frac{\sin\theta}{r}, which seems correct.
The hitch, if I recall correctly, is that
\frac{\partial \theta}{\partial x} = \frac{1}{\dfrac{\partial x}{\partial \theta}}
is true, except that you left off a
very important piece of information. Namely, the variables being held constant. The true statement, if I recall correctly, is that
\left(\frac{\partial \theta}{\partial x}\left)_{y} = \frac{1}{\left(\dfrac{\partial x}{\partial \theta}\right)_y}
Note that on both sides of the equality, the variable y is being held constant - hence, you cannot just differentiate x with respect to theta while holding r fixed, because r depends on x! Here's the derivation:
x = r\cos\theta = \sqrt{x^2 + y^2}\cos\theta \Rightarrow \left(\frac{\partial x}{\partial \theta}\right)_y = \frac{x\left(\frac{\partial x}{\partial \theta}\right)_y}{\sqrt{x^2+y^2}}\cos\theta - r\sin\theta
Solve for the derivative:
\left(\frac{\partial x}{\partial \theta}\right)_y(1 - \cos^2\theta) = -r\sin\theta \Rightarrow \left(\dfrac{\partial x}{\partial \theta}\right)_y = -\frac{r}{\sin\theta}
Hence,
\left(\frac{\partial \theta}{\partial x}\left)_{y} = \frac{1}{\left(\dfrac{\partial x}{\partial \theta}\right)_y} = -\frac{\sin\theta}{r}
In general, the rule is that a partial derivative is equal to the reciprocal of the inverting of the "numerator" and "denominator", but you MUST differentiate both with respect to the SAME variables being held constant on both sides. I'm not sure of a good, general way to write it down. Maybe
\left(\frac{\partial y_i(x_1,x_2,...)}{\partial x_j}\right)_{x_k, k \neq j} = \frac{1}{\left(\frac{\partial x_j(x_1,x_2,...,x_j,...,y_i)}{\partial y_i}\right)_{\all x_k, k \neq j}}
Note that on the RHS you have x_j written as a function of all the other x_k's, and y_i, and potentially as an implicit function of itself.