[proofplan]
Write the polynomial as a finite linear combination of monomials indexed by multi-indices. The Euler operator $\sum_i x_i \partial_{x_i}$ acts diagonally on each monomial $x^\alpha$, with eigenvalue equal to its total degree $|\alpha|$. Comparing coefficients in the identity then forces every nonzero monomial of $f$ to have total degree $d$, because characteristic zero makes the integer $|\alpha|-d$ nonzero in $k$ whenever $|\alpha| \ne d$. The converse follows by the same monomial computation.
[/proofplan]
[step:Expand the polynomial in the monomial basis]
Let $\mathbb{Z}_{\ge 0}^n$ denote the set of $n$-tuples $\alpha=(\alpha_1,\ldots,\alpha_n)$ of nonnegative integers. For $\alpha \in \mathbb{Z}_{\ge 0}^n$, define its total degree by $|\alpha| := \alpha_1+\cdots+\alpha_n$ and define the corresponding monomial by $x^\alpha := x_1^{\alpha_1}\cdots x_n^{\alpha_n}$. Since $f \in k[x_1,\ldots,x_n]$, there is a finite subset $A \subset \mathbb{Z}_{\ge 0}^n$ and coefficients $c_\alpha \in k$ such that $f = \sum_{\alpha \in A} c_\alpha x^\alpha$. We may enlarge $A$ if necessary, so coefficient comparison may be understood with respect to the full monomial basis $\{x^\alpha : \alpha \in \mathbb{Z}_{\ge 0}^n\}$, with all but finitely many coefficients equal to $0$.
[/step]
[step:Compute the Euler operator on each monomial]
Define the $k$-[linear map](/page/Linear%20Map) $E: k[x_1,\ldots,x_n] \to k[x_1,\ldots,x_n]$ by $E(g) := \sum_{i=1}^n x_i \frac{\partial g}{\partial x_i}$. For a fixed multi-index $\alpha \in \mathbb{Z}_{\ge 0}^n$, the formal [partial derivative](/page/Partial%20Derivative) satisfies $\frac{\partial x^\alpha}{\partial x_i} = \alpha_i x_1^{\alpha_1}\cdots x_i^{\alpha_i-1}\cdots x_n^{\alpha_n}$ when $\alpha_i>0$, and equals $0$ when $\alpha_i=0$. Therefore, in both cases, $x_i \frac{\partial x^\alpha}{\partial x_i} = \alpha_i x^\alpha$. Summing over $i$ gives $E(x^\alpha) = |\alpha| x^\alpha$.
[guided]
The point of introducing $E$ is that the differential expression in the theorem is linear and behaves very simply on monomials. We define the $k$-linear map $E: k[x_1,\ldots,x_n] \to k[x_1,\ldots,x_n]$ by $E(g) := \sum_{i=1}^n x_i \frac{\partial g}{\partial x_i}$. This is $k$-linear because each formal partial derivative $\partial/partial x_i$ is $k$-linear and multiplication by $x_i$ is also $k$-linear.
Now fix a multi-index $\alpha=(\alpha_1,\ldots,\alpha_n) \in \mathbb{Z}_{\ge 0}^n$. The monomial is $x^\alpha := x_1^{\alpha_1}\cdots x_n^{\alpha_n}$. For a fixed index $i \in \{1,\ldots,n\}$, differentiating formally with respect to $x_i$ gives $\frac{\partial x^\alpha}{\partial x_i} = \alpha_i x_1^{\alpha_1}\cdots x_i^{\alpha_i-1}\cdots x_n^{\alpha_n}$ if $\alpha_i>0$, and gives $0$ if $\alpha_i=0$. Multiplying by $x_i$ restores the original monomial and records only the exponent: $x_i \frac{\partial x^\alpha}{\partial x_i} = \alpha_i x^\alpha$. Adding these identities for $i=1,\ldots,n$ gives $E(x^\alpha) = \sum_{i=1}^n \alpha_i x^\alpha$. By the definition $|\alpha|=\alpha_1+\cdots+\alpha_n$, this becomes $E(x^\alpha) = |\alpha|x^\alpha$. Thus the Euler operator preserves each monomial and multiplies it by its total degree.
[/guided]
[/step]
[step:Translate the Euler identity into coefficient equations]
Using the expansion of $f$ and the $k$-linearity of $E$, we obtain
\begin{align*}
E(f) = \sum_{\alpha \in A} c_\alpha E(x^\alpha).
\end{align*}
By the monomial computation,
\begin{align*}
E(f) = \sum_{\alpha \in A} |\alpha|c_\alpha x^\alpha.
\end{align*}
Hence
\begin{align*}
E(f)-df = \sum_{\alpha \in A} (|\alpha|-d)c_\alpha x^\alpha.
\end{align*}
The monomials $x^\alpha$ are a $k$-basis of $k[x_1,\ldots,x_n]$, so $E(f)=df$ if and only if
\begin{align*}
(|\alpha|-d)c_\alpha = 0
\end{align*}
for every $\alpha \in A$.
[/step]
[step:Use characteristic zero to identify the surviving monomials]
Since $\operatorname{char}(k)=0$, the canonical map $\mathbb{Z} \to k$ is injective. Therefore, if $|\alpha| \ne d$, then the integer $|\alpha|-d$ represents a nonzero element of $k$. For such an $\alpha$, the coefficient equation
\begin{align*}
(|\alpha|-d)c_\alpha = 0
\end{align*}
implies $c_\alpha=0$, because $k$ is a field. Thus $E(f)=df$ if and only if every coefficient $c_\alpha$ with $|\alpha| \ne d$ is zero.
[/step]
[step:Conclude both implications]
Assume first that $E(f)=df$. If $f=0$, then the first alternative in the conclusion holds. If $f \ne 0$, then the preceding step shows that every monomial appearing in $f$ with nonzero coefficient has total degree $d$. Hence $f$ is homogeneous of total degree $d$.
Conversely, assume that either $f=0$ or $f$ is a nonzero [homogeneous polynomial](/page/Homogeneous%20Polynomial) of total degree $d$. If $f=0$, then $E(f)=0=df$. If $f$ is nonzero and homogeneous of total degree $d$, then every nonzero coefficient $c_\alpha$ in its monomial expansion satisfies $|\alpha|=d$. Therefore $E(f) = \sum_{\alpha \in A} |\alpha|c_\alpha x^\alpha = \sum_{\alpha \in A} d c_\alpha x^\alpha = df$. This proves the desired equivalence.
[/step]