# Chain Rule and Multivariable calculus

I would be very grateful if anyone could assist with the following:

Given that $$z = yg(x^2-y^2)$$ I'm trying to show that:

$$\frac{1}{x}\frac{\partial z }{\partial x} + \frac{1}{y}\frac{\partial z}{\partial y} = \frac{z}{y^2}$$

I've started by doing the following (is this correct?): $$\frac{\partial z}{\partial x} = yg(x^2 - y^2) \times 2x \times\frac{dg}{dx}$$

$$\frac{\partial z}{\partial y} = g(x^2-y^2)-2y^2g(x^2 -y^2)\frac{dg}{dy}$$

My question: is it necessary to add $\frac{dg}{dx}$ and $\frac{dg}{dy}$ to the above?

I tend to struggle a bit with these sort of questions involving differentiating undefined functions like g. Would anyone kindly point to where I find more questions of this sort-perhaps even on MSE?

Edit: I've now realised my mistake was in assuming that g was a function of x and y when its just a function of one variable. Thanks for your explanation and answers.

• Are you sure that $g$ is not constant? – AnilB Jul 10 '15 at 8:52
• @OccupyGezi, I believe g is an undefined function of x and y. Isn't it? – John_dydx Jul 10 '15 at 8:54
• No, it is a constant; see the answer below – AnilB Jul 10 '15 at 9:08
• @Occupy Gezi, Thanks for your explanation. – John_dydx Jul 10 '15 at 9:15
• Be carefull; g is not a function. If it would be the result will not hold. – AnilB Jul 10 '15 at 9:16

$g$ is function of one variable $t=x^2-y^2$ and you have: $z_x=2xyg'$, where subscript under $z$ denotes partial differentiation w.r.t. x. Do you now understand what was the mistake?
• Yes, thanks. How can you tell that g is function of one variable from $g(x^2-y^2)$? I think that was the source of my error. – John_dydx Jul 10 '15 at 8:58
• That is hidden in notation. In parentheses there is only "one slot" and $x^2-y^2$ is substituted. I will give you one more example: consider $f(x,y)=g(x^2+y,x-y)$. Then g is function of two variables, call them $u,v$ for example and with $u=x^2+y$, $v=x-y$, "feeded" into them. Then $f_x=2xg_u+g_v$. Can you figure out what is $f_y$? – Blazej Jul 10 '15 at 9:07
• that was an excellent explanation. I believe $f_{y} = g_{u} - g_{v}$ – John_dydx Jul 10 '15 at 9:13
$$z = ygx^2-gy^3$$ $$dz = gx^2dy+2ygxdx-3gy^2dy$$ $$\frac{\partial z}{\partial y} = gx^2-3gy^2$$ $$\frac{\partial z}{\partial x} = 2ygx$$
Now replacing these into the equation $$\frac{1}{x}2ygx + \frac{1}{y}(gx^2-3gy^2) = 2yg + \frac{gx^2}{y}-3gy$$ $$=-gy + \frac{gx^2}{y}= \frac{gyx^2-gy^3}{y^2}=\frac{gy(x^2-y^2)}{y^2}=\frac{z}{y^2}$$