How to differentiate $z=f\left(xy,\, \frac y x \right)$? I have a problem solving this problem, since I find it difficult to find the derivatives of $z$ with respect to $u$ and $v$, I would appreciate any help you can give me.
$$
z= f\left(xy,\ \frac y x \right)
$$
Where x and y belong to $R$
And $$xy=u$$ $$\frac{y}{x}=v$$
Prove that
$$x^2\frac{\partial^2 z}{\partial x^2} -y^2 \frac{\partial^2 z}{\partial y^2} = - 4uv\frac{\partial^2 z}{\partial u \, \partial v} +  2v\frac{\partial^2 z}{\partial v ^2}$$
 A: It's a matter of subtle but not deep details.
I would rewrite the beginning, considering $f\in\mathcal C^2(\Bbb R)$; to be clear I will denote the maps using the variables $(u,v)$, i.e. $(u,v)\mapsto f(u,v)$.
Let's define then
$$
z(x,y):=f\left(xy,\frac yx\right).
$$
Well, at this point we could start to derive using chain rule:
\begin{align*}
\frac{\partial z}{\partial x}(x,y)
&=\nabla f\left(xy,\frac yx\right)\cdot\left(y,-\frac y{x^2}\right)\\
&=\left(\frac{\partial f}{\partial u}\left(xy,\frac yx\right),\frac{\partial f}{\partial v}\left(xy,\frac yx\right)
\right)\cdot\left(y,-\frac y{x^2}\right)\\
&=y\frac{\partial f}{\partial u}\left(xy,\frac yx\right)
-\frac y{x^2}\frac{\partial f}{\partial v}\left(xy,\frac yx\right)
\end{align*}
and for simplicity we could omit the argument $\left(xy,\frac yx\right)$ writing $f$ as well we can get rid of $(x,y)$ when we're dealing with $z$, getting thus
$$
\frac{\partial z}{\partial x}=y\frac{\partial f}{\partial u}
-\frac y{x^2}\frac{\partial f}{\partial v}.
$$
Similarly you can obtain $\frac{\partial z}{\partial y}, \frac{\partial^2 z}{\partial x^2}, \frac{\partial^2 z}{\partial y^2}$.
Observe that on the right side of the result you wrote, you should have to write $f$ instead of $z$. If the result is correct and if you compute without mistakes, the mixed derivative $\frac{\partial^2 f}{\partial u\partial v}$ will appear naturally from the hessian.
