Solution (source code)

= Solution

Differentiate
$$
f(\lambda x_1,\ldots,\lambda x_n)=\lambda^kf(x_1,\ldots,x_n)
$$
with respect to $\lambda$. The chain rule gives
$$
\sum_i x_i\frac{\partial f}{\partial x_i}
(\lambda x_1,\ldots,\lambda x_n)
=k\lambda^{k-1}f(x_1,\ldots,x_n).
$$
Setting $\lambda=1$ proves the <Euler theorem for homogeneous functions>
$$
\boxed{\sum_i x_i\frac{\partial f}{\partial x_i}=kf}.
$$