Solution (source code)

= Solution

The scaling relation says that $z$ is a <homogeneous function> of degree $n$. Fix $(x,y)$ and differentiate the identity with respect to the positive parameter $\lambda$. The <chain rule> gives
$$
xz_x(\lambda x,\lambda y)+yz_y(\lambda x,\lambda y)=n\lambda^{n-1}z(x,y).
$$
Setting $\lambda=1$ proves the <Euler theorem for homogeneous functions> identity
$$
\boxed{xz_x+yz_y=nz.}
$$
Differentiate once more with respect to $\lambda$, using equality of the mixed <partial derivatives> for the assumed twice continuously differentiable <function>:
$$
x^2z_{xx}(\lambda x,\lambda y)+2xyz_{xy}(\lambda x,\lambda y)+y^2z_{yy}(\lambda x,\lambda y)=n(n-1)\lambda^{n-2}z(x,y).
$$
At $\lambda=1$ this is the <second-order Euler identity for homogeneous functions>:
$$
\boxed{x^2z_{xx}+2xyz_{xy}+y^2z_{yy}=n(n-1)z.}
$$
The repeated parameter <differentiation> accounts for the factor $n(n-1)$, rather than $n^2$.