# Partial derivative with respect to a function, rather than variable?

## Main Question or Discussion Point

Hi all. I've recently started working a lot on my background in math and physics, since this year I began a new masters program which is quite math/physics heavy and I don't have a formal background in either field. I will try to get active on this forum, since I've been luring for some time and I find it really useful.

Right now I'm going through partial derivatives and some of the questions in the book I'm working with are quite confusing and I'm stuck. Here is one few examples:

z=x$^{2}$+2y$^{2}$
x=rcos(θ)
y=rsin(θ)

Question: $\frac{∂^{2}z}{∂y∂θ}$

Here's what I've done so far:

I took the partial derivative with respect to θ = 2r$^{2}$cosθsinθ

Now, from here I'm supposed to take the partial of the above with respect to y. I could either express it in terms of x and y:

$\frac{∂2xy}{∂y}$

or in terms of r and θ:

$\frac{∂2r^{2}sinθcosθ}{∂rsinθ}$

The thing is that I have no idea how to solve any of the above. The first I don't know how to solve because x and y aren't independent, so I can't just treat x as a constant. I got stuck when I attempted using the chain rule as well. The second I can't solve, since I don't know how to take a partial derivative with respect to a function, rather than a variable.

I would appreciate it if somebody explained how I can solve the problem using both methods (if both are possible, that is).

arildno
Homework Helper
Gold Member
Dearly Missed
You have to express z as an explicit function of the two independent variables (y,theta).

From your second transformation rule, you have r=y/sin(theta).
Inserting this in your first, you get x=y*cot(theta), where cot(theta)=cos(theta)/sin(theta)

Thus, you have:
z(y,theta)=y^2(cot^2(theta)+2)

Now, proceed as usual.
----------------------------------------------------------------------------------------
Visually, the coordinate grid you are using are lines parallell to the x-axis (fixed values of y), and rays emanating from the origin (fixed values of theta)

Oh... That was easy! :) I can't believe I was struggling so much with this when the obvious solution was in front of me the whole time.

Well, thanks a lot, you saved me a lot of stress!

Now, since I already attempted to solve it in a strange way, could you tell me if I made a mistake anywhere? Is it possible to continue the solution from any (or both) of the ways I went to? Or is it not doable analytically?

arildno
Homework Helper
Gold Member
Dearly Missed
"Now, since I already attempted to solve it in a strange way, could you tell me if I made a mistake anywhere? "
Yes.
When you made your partial with respect to the angular variable, you deliberately held "r" constant.
Thus, you actually "moved along" a circular arc (the only possible way to change the value of the angle with "r" constant). But, to move like that necessarily invokes a change in "y", which you are not allowed to!

HOW can you change the value of the angle if you are not allowed to change the "y"-value?