# calculating partial derivatives in different coordinate systems

#### oblixps

##### Member
let f = x2 + 2y2 and $$x = rcos(\theta), y = rsin(\theta)$$.

i have $$\frac{\partial f}{\partial y}$$ (while holding x constant) $$= 4y$$. and $$\frac{\partial f}{\partial y}$$ (while holding r constant) $$= 2y$$.

i found these partial derivatives by expressing f in terms of only x and y, and then in terms of only r and y. But i am sure there are times where it can be very difficult to solve for one variable or to express some function in terms of specific variables.

Is there a way to relate the 2 partial derivatives with respect to y (one holding x constant and one holding r constant) using the chain rule or something?

#### Ackbach

##### Indicium Physicus
Staff member
let f = x2 + 2y2 and $$x = r \cos(\theta), y = r \sin(\theta)$$.

i have $$\frac{\partial f}{\partial y}$$ (while holding x constant) $$= 4y$$. and $$\frac{\partial f}{\partial y}$$ (while holding r constant) $$= 2y$$.
This is a very confusing procedure. I would agree with your first result. That's a straight-forward application of the definition of partial derivative. However, for your second result, you seem to be defining the function $f=f(r,y)$. I'm not sure I would consider that to be a very good definition, because $y=y(r,\theta)$, so the variables you are putting forth as "independent" are not actually independent. Typically, you would write $f=f(r,\theta)=r^{2}(1+\sin^{2}(\theta))$, and then compute either $\partial f/ \partial r$ or $\partial f/ \partial \theta$.

i found these partial derivatives by expressing f in terms of only x and y, and then in terms of only r and y. But i am sure there are times where it can be very difficult to solve for one variable or to express some function in terms of specific variables.

Is there a way to relate the 2 partial derivatives with respect to y (one holding x constant and one holding r constant) using the chain rule or something?

#### Klaas van Aarsen

##### MHB Seeker
Staff member
Hi oblixps! Apparently you want to calculate the total derivative under the condition that r is constant.

This is typically written as something like:
$({df \over dy})_{r \text{ constant}}$

It can be calculated with repeated application of the multi variable chain rule as follows:
 $({df \over dy})_{r \text{ constant}} = ({d \over dy}f(x(r,y),y))_{r \text{ constant}} = ({\partial f \over dx}({\partial x \over \partial r}{dr \over dy} + {\partial x \over \partial y}{dy \over dy}) + {\partial f \over \partial y}{dy \over dy})_{r \text{ constant}} = {\partial f \over \partial x}{\partial \over \partial y}x(r,y) + {\partial f \over \partial y}$

To calculate ${\partial \over \partial y}x(r,y)$, we can use that:
$x^2 + y^2 = r^2$
Therefore $2x dx + 2y dy = 2r dr$
Meaning $dx = \frac r x dr - \frac y x dy$
It follows that
 ${\partial \over \partial y}x(r,y) = - \frac y x$

Substituting  in  and using that $f(x,y)=x^2+2y^2$ gives:
$({df \over dy})_{r \text{ constant}}= {\partial f \over \partial x}{\partial \over \partial y}x(r,y) + {\partial f \over \partial y} = 2x \cdot - \frac y x + 4y = 2y$

As you can see this is the same result you already derived by making the relation explicit in r and y.

Last edited: