# Partial derivative of a function with respect to product of variables

If I have a function $$f(x,y)$$, and all I know about this function is its partial derivatives $$\frac{\partial f(x,y)}{\partial x}$$ and $$\frac{\partial f(x,y)}{\partial y}$$ as well as the position $$(x_i, y_i)$$ at which these partial derivatives were obtained, is it possible to obtain the partial derivative of $$f(x,z)$$ with respect to a new variable $$z = x y$$ while keeping $$x$$ constant, i.e. $$\frac{\partial f(x,z)}{\partial (z)}$$ at the same point $$(x_i, y_i)$$, or $$(x_i, x_i y_i)$$?

• Instead of “is it possible?”, the question you should ask yourself is what do you even mean by $\partial f/\partial (xy)$? Commented May 23, 2021 at 9:40
• @HansLundmark I feel like I don't know what I don't know here. What is arbirary about that notation? In my example, $f$ could be expressed either as $f(x,y)$ or as $f(x,z)$ where $z = x \cdot y$. It can't feasibly be differentiated analytically, so the partial derivatives that I have are numerically derived and I'm interested in finding $\frac{\partial f }{\partial z}$ without calculating it separately in order to save computational time. Commented May 23, 2021 at 17:22
• OK, if you say that you express $f$ as a function of $x$ and $z$, it becomes clear. The thing is that when you write $\partial f/\partial z$, it must be understood from context what other quantity that should be held constant as $z$ is varied. So in this case, it seems that you want to keep $x$ constant as $z$ varies. You could also imagine, for instance, introducing new variables $(w,z)=(x^2-y^2,xy)$ or something like that, and write $\partial f/\partial z$ to mean that $w$ is to be held constant as $z$ varies, and that would be something completely different! Commented May 23, 2021 at 17:27
• Ah, that makes sense, thank you. Yes, I see now why I need to specify that I do indeed want to keep $x$ constant. I will amend the question above accordingly. Commented May 23, 2021 at 17:42

Let's be a bit careful with notation and write $$f(x,y) = g(x,xy) ,$$ using different letters for the two functions $$f(x,y)$$ and $$g(x,z)$$. Then the derivative that you seek is $$g_z(x,xy)$$, that is, $$\partial g/\partial z$$ evaluated at the point $$(x,z)=(x,xy)$$. (I'll use subscripts to denote partial derivatives, since it's faster to type.)
The multivariable chain rule gives $$f_x(x,y) = g_x(x,y) + g_z(x,xy) \, y ,\qquad f_y(x,y) = g_z(x,xy) \, x ,$$ so the answer is simply (from the second of those two equations) $$g_z(x,xy) = \frac{f_y(x,y)}{x} .$$ (Which makes sense, since if you're holding $$x$$ fixed, varying $$z=xy$$ is basically the same thing as varying $$y$$; the only thing that differs is the scaling factor $$x$$.)