[proofplan]
The key idea is the degree-$d$ Veronese embedding $\nu_d : \mathbb{P}^n_k \to \mathbb{P}^{N-1}_k$ (where $N = \binom{n+d}{d}$ is the number of degree-$d$ monomials), which exhibits $\mathbb{P}^n_k$ as a closed subvariety of $\mathbb{P}^{N-1}_k$. Under $\nu_d$, the homogeneous degree-$d$ polynomial $F$ on $\mathbb{P}^n_k$ pulls back from a linear form $L$ on $\mathbb{P}^{N-1}_k$, so $\nu_d^{-1}(V(L)) = X_d$. The complement of any hyperplane in $\mathbb{P}^{N-1}_k$ is isomorphic to affine space $\mathbb{A}^{N-1}_k$. Thus $\nu_d$ identifies $U_d$ with a Zariski-closed subset of $\mathbb{A}^{N-1}_k$, hence with an affine variety.
[/proofplan]
[step:Set up the Veronese map and its degree-$d$ monomial coordinates]
Let $N := \binom{n+d}{d}$, the number of monomials of degree exactly $d$ in $n+1$ variables. Enumerate the multi-indices
\begin{align*}
\mathcal{I} := \{ \alpha = (\alpha_0, \ldots, \alpha_n) \in \mathbb{N}^{n+1} : |\alpha| = \alpha_0 + \cdots + \alpha_n = d \}, \qquad |\mathcal{I}| = N,
\end{align*}
so the degree-$d$ monomials in $X_0, \ldots, X_n$ are
\begin{align*}
X^\alpha := X_0^{\alpha_0} \cdots X_n^{\alpha_n}, \qquad \alpha \in \mathcal{I}.
\end{align*}
Equip $\mathbb{P}^{N-1}_k$ with homogeneous coordinates $(Z_\alpha)_{\alpha \in \mathcal{I}}$ indexed by $\mathcal{I}$. The \textbf{degree-$d$ Veronese map} is
\begin{align*}
\nu_d : \mathbb{P}^n_k &\to \mathbb{P}^{N-1}_k, \\
[X_0 : \cdots : X_n] &\mapsto [X^\alpha]_{\alpha \in \mathcal{I}}.
\end{align*}
This is well-defined: at any $p = [x_0 : \cdots : x_n] \neq 0$, at least one $x_i \neq 0$, so the pure-power monomial $x_i^d = x^{d e_i} \neq 0$ and the image tuple is nonzero. Rescaling representatives by $\lambda \in k^\times$ multiplies every $X^\alpha$ by $\lambda^d$, so the projective class is preserved. Thus $\nu_d$ is a well-defined morphism of projective varieties.
[/step]
[step:Show $\nu_d$ is a closed embedding of $\mathbb{P}^n_k$ into $\mathbb{P}^{N-1}_k$]
We show $\nu_d$ is injective and its image is Zariski-closed; together with the fact that $\nu_d$ has a morphism inverse on its image (established at the end of this step), this exhibits $\nu_d$ as a closed embedding. By [Image of Segre](/theorems/2145) — whose analogue for the Veronese follows from the same quadratic-monomial-relation bookkeeping — the image $\nu_d(\mathbb{P}^n_k)$ is the projective variety cut out by the homogeneous quadratic equations
\begin{align*}
Z_\alpha Z_\beta - Z_\gamma Z_\delta = 0 \qquad \text{whenever } \alpha + \beta = \gamma + \delta \text{ in } \mathbb{N}^{n+1},
\end{align*}
where the addition is componentwise on multi-indices. (In brief: these relations hold on the image because $x^\alpha x^\beta = x^{\alpha+\beta}$ depends only on $\alpha + \beta$; they force a point $z = (z_\alpha)$ satisfying all the relations to be of the form $z = \lambda \cdot \nu_d([x_0 : \cdots : x_n])$ for some $[x_0 : \cdots : x_n] \in \mathbb{P}^n_k$ and $\lambda \in k^\times$. The full verification is given in the claim below.)
[claim:The image $\nu_d(\mathbb{P}^n_k)$ is the vanishing locus of the quadratic relations above]
[proof]
\textbf{The image lies in the vanishing locus.} At $\nu_d(p) = [x^\alpha]_\alpha$, if $\alpha + \beta = \gamma + \delta$ then
\begin{align*}
x^\alpha x^\beta = x^{\alpha + \beta} = x^{\gamma + \delta} = x^\gamma x^\delta,
\end{align*}
so $Z_\alpha Z_\beta - Z_\gamma Z_\delta$ vanishes at $\nu_d(p)$.
\textbf{The vanishing locus lies in the image.} Suppose $z = (z_\alpha)_{\alpha \in \mathcal{I}}$ satisfies all the relations and $z \neq 0$ in $\mathbb{P}^{N-1}_k$. Choose $i \in \{0, \ldots, n\}$ with $z_{d e_i} \neq 0$: such $i$ exists, because if $z_{d e_j} = 0$ for all $j$, then applying the relation with $\alpha = d e_j$, $\beta = d e_j$, $\gamma = (d-1) e_j + e_l$, $\delta = e_j + (d-1) e_l$ for any $l$ (check $\alpha + \beta = 2 d e_j = \gamma + \delta$) gives $0 = z_\gamma z_\delta$; iterating such relations forces all $z_\alpha = 0$, contradicting $z \neq 0$.
Normalise by rescaling $z$ so that $z_{d e_i} = 1$. Define $x_i := 1$ and for $j \neq i$,
\begin{align*}
x_j := z_{(d-1) e_i + e_j} \in k.
\end{align*}
We claim $z_\alpha = x^\alpha$ for all $\alpha \in \mathcal{I}$. We prove this by induction on $\alpha_i$ (the $i$-th component of $\alpha$), downward from $d$.
\emph{Base case $\alpha_i = d$:} Then $\alpha = d e_i$ and $z_\alpha = z_{d e_i} = 1 = x_i^d = x^\alpha$ (since $x_i = 1$). If $\alpha_i = d-1$, then $\alpha = (d-1) e_i + e_j$ for some $j \neq i$, and $z_\alpha = x_j$ by definition, while $x^\alpha = x_i^{d-1} x_j = x_j$.
\emph{Inductive step.} Suppose $z_\beta = x^\beta$ holds for all $\beta$ with $\beta_i \ge r+1$, for some $r \le d-2$. Take $\alpha$ with $\alpha_i = r$. Pick any $j \neq i$ with $\alpha_j \ge 1$ (such $j$ exists since $|\alpha| = d > r = \alpha_i$). Let
\begin{align*}
\gamma &:= \alpha + e_i - e_j \quad \text{(so } \gamma_i = r+1, \gamma_j = \alpha_j - 1 \ge 0\text{)}, \\
\delta &:= \alpha - e_i + e_j \quad \text{(so } \delta_i = r-1 \ge 0 \text{ needs } r \ge 1\text{)}.
\end{align*}
If $r \ge 1$, the relation with $\alpha + (d e_i) = \gamma + \delta'$ for appropriate $\delta'$ produces the needed identity directly. A cleaner substitution: apply the quadratic relation with multi-indices $\alpha$ and $d e_i$ on one side and $\gamma$ and $((d-1) e_i + e_j')$-type on the other. Explicitly, set $\beta := d e_i$. Then $\alpha + \beta$ has $i$-th coordinate $r + d$, and the relation
\begin{align*}
z_\alpha z_{d e_i} = z_{\alpha + e_i} z_{d e_i - e_i + e_{\text{?}}}
\end{align*}
— more concretely, whenever $\alpha_j \ge 1$, the identity $\alpha + d e_i = (\alpha + e_i - e_j) + ((d-1) e_i + e_j)$ is componentwise valid, so
\begin{align*}
z_\alpha \cdot z_{d e_i} = z_{\alpha + e_i - e_j} \cdot z_{(d-1) e_i + e_j}.
\end{align*}
Now $(\alpha + e_i - e_j)_i = r + 1$, so by the inductive hypothesis $z_{\alpha + e_i - e_j} = x^{\alpha + e_i - e_j}$. And $z_{(d-1) e_i + e_j} = x_j$. Also $z_{d e_i} = 1$. Hence
\begin{align*}
z_\alpha = x^{\alpha + e_i - e_j} \cdot x_j = x^\alpha \cdot \frac{x_i \cdot x_j}{x_j} = x^\alpha,
\end{align*}
(using $x_i = 1$; in general $x^{\alpha + e_i - e_j} \cdot x_j = x^\alpha \cdot x_i$, and $x_i = 1$ finishes). This completes the inductive step.
Hence $z_\alpha = x^\alpha$ for all $\alpha$, i.e. $z = \nu_d([x_0 : \cdots : x_n])$ lies in the image. Therefore the image equals the vanishing locus of the quadratic relations, which is Zariski-closed.
[/proof]
[/claim]
\textbf{Injectivity of $\nu_d$.} Suppose $\nu_d(p) = \nu_d(q)$ for $p = [x_0 : \cdots : x_n]$ and $q = [y_0 : \cdots : y_n]$. Then there exists $\mu \in k^\times$ with $x^\alpha = \mu \, y^\alpha$ for all $\alpha \in \mathcal{I}$. Pick $i$ with $x_i \neq 0$. The monomial $\alpha = d e_i$ gives $x_i^d = \mu y_i^d$, so $y_i \neq 0$. Pick $\lambda \in k$ with $\lambda^d = \mu$ — this uses that $k$ is algebraically closed: the polynomial $T^d - \mu$ has a root in $k$. (This is the one place in the proof where algebraic closure is essential.) For any $j$, the monomial $\alpha = (d-1) e_i + e_j$ gives $x_i^{d-1} x_j = \mu y_i^{d-1} y_j$. Dividing by $x_i^d = \mu y_i^d$ yields $x_j / x_i = y_j / y_i$, so $p = q$ in $\mathbb{P}^n_k$.
\textbf{Morphism inverse on the image.} By the claim, the inverse $\nu_d^{-1} : \nu_d(\mathbb{P}^n_k) \to \mathbb{P}^n_k$ is described locally as follows. On the open subset $\{z_{d e_i} \neq 0\} \subset \nu_d(\mathbb{P}^n_k)$, it sends $[z_\alpha] \mapsto [z_{d e_i} : z_{(d-1) e_i + e_1} : \cdots : z_{(d-1) e_i + e_n}]$ (with the $i$-th slot $z_{d e_i}$ and the other slots given by the $z_{(d-1) e_i + e_j}$ for $j \neq i$). These are homogeneous polynomials of degree $1$ in the $(z_\alpha)$, so the inverse is a morphism on each such chart. The charts $\{z_{d e_i} \neq 0\}$ for $i = 0, \ldots, n$ cover $\nu_d(\mathbb{P}^n_k)$ (by the first paragraph of the proof of the claim: some $z_{d e_i} \neq 0$ on any nonzero point of the image). Hence $\nu_d^{-1}$ is a morphism. Combined with injectivity and closedness of the image, $\nu_d$ is a closed embedding.
[/step]
[step:Identify $X_d$ with the preimage of a hyperplane on $\mathbb{P}^{N-1}_k$]
Write the degree-$d$ homogeneous polynomial $F$ in the monomial basis:
\begin{align*}
F(X_0, \ldots, X_n) = \sum_{\alpha \in \mathcal{I}} c_\alpha X^\alpha, \qquad c_\alpha \in k,
\end{align*}
not all $c_\alpha = 0$. Define the linear form on $\mathbb{P}^{N-1}_k$
\begin{align*}
L(Z) := \sum_{\alpha \in \mathcal{I}} c_\alpha Z_\alpha,
\end{align*}
a homogeneous degree-$1$ polynomial. The hyperplane
\begin{align*}
H := V(L) \subset \mathbb{P}^{N-1}_k
\end{align*}
is closed. By construction,
\begin{align*}
L(\nu_d(p)) = \sum_\alpha c_\alpha x^\alpha = F(p),
\end{align*}
so $\nu_d(p) \in H$ iff $p \in X_d$. Hence $\nu_d^{-1}(H) = X_d$, and by the injectivity from Step 2, $\nu_d(X_d) = \nu_d(\mathbb{P}^n_k) \cap H$.
[/step]
[step:Identify the complement of $H$ with affine space $\mathbb{A}^{N-1}_k$]
The complement of any hyperplane in $\mathbb{P}^{N-1}_k$ is isomorphic to $\mathbb{A}^{N-1}_k$. This is a standard fact (coordinate freedom of projective space under $\operatorname{PGL}_N$): given any hyperplane $H = V(L)$ with $L = \sum_\alpha c_\alpha Z_\alpha \neq 0$, the map
\begin{align*}
\mathbb{P}^{N-1}_k \setminus H &\xrightarrow{\sim} \mathbb{A}^{N-1}_k, \\
[Z_\alpha]_{\alpha \in \mathcal{I}} &\mapsto \left( Z_\beta / L(Z) \right)_{\beta \in \mathcal{I} \setminus \{\alpha_0\}}
\end{align*}
is an isomorphism of varieties, where $\alpha_0 \in \mathcal{I}$ is any index with $c_{\alpha_0} \neq 0$ (so the coordinates $\{Z_\beta : \beta \neq \alpha_0\} \cup \{L\}$ form a basis of the degree-$1$ forms on $\mathbb{P}^{N-1}_k$, in which $L$ plays the role of the "zeroth" coordinate). The fraction $Z_\beta/L(Z)$ is well-defined on $\mathbb{P}^{N-1}_k \setminus H = \{L \neq 0\}$ because both numerator and denominator are linear in $Z$, so the ratio is invariant under rescaling representatives.
Equivalently: after a linear change of coordinates $\mathbb{P}^{N-1}_k \to \mathbb{P}^{N-1}_k$ (an isomorphism of varieties given by a $\operatorname{GL}_N(k)$ matrix sending the basis $\{Z_\alpha\}$ to a new basis $\{L, Z_{\beta_1}, \ldots, Z_{\beta_{N-1}}\}$ with $L$ in the first slot), the hyperplane $H$ becomes $\{Z_0' = 0\}$ where $Z_0'$ is the new first coordinate, and the complement is the standard affine chart $U_0' \cong \mathbb{A}^{N-1}_k$ by the [Affine Cover of Projective Space](/theorems/2129).
Hence $\mathbb{P}^{N-1}_k \setminus H$ is an affine variety isomorphic to $\mathbb{A}^{N-1}_k$.
[/step]
[step:Identify $U_d$ with a closed subvariety of $\mathbb{P}^{N-1}_k \setminus H$]
By Step 3, $\nu_d(U_d) = \nu_d(\mathbb{P}^n_k) \setminus (\nu_d(\mathbb{P}^n_k) \cap H) = \nu_d(\mathbb{P}^n_k) \cap (\mathbb{P}^{N-1}_k \setminus H)$. The Veronese image $\nu_d(\mathbb{P}^n_k)$ is Zariski-closed in $\mathbb{P}^{N-1}_k$ by Step 2, so its intersection with the open set $\mathbb{P}^{N-1}_k \setminus H$ is a closed subset of $\mathbb{P}^{N-1}_k \setminus H$ (in the subspace topology).
Since $\mathbb{P}^{N-1}_k \setminus H \cong \mathbb{A}^{N-1}_k$ is affine by Step 4, a closed subset of it is cut out by polynomials in the affine coordinates, hence is itself an affine variety. Therefore $\nu_d(U_d)$ is an affine variety.
Finally, $\nu_d|_{U_d} : U_d \to \nu_d(U_d)$ is a bijection by injectivity (Step 2). By the closed embedding property established in Step 2, $\nu_d$ has a morphism inverse on its image, so in particular $\nu_d|_{U_d}$ is an isomorphism of varieties onto its image. Hence $U_d \cong \nu_d(U_d)$ is an affine variety, completing the proof.
[guided]
The geometric content of this step is one basic principle about Zariski topology: \emph{a closed subset of an affine variety is again an affine variety}. Concretely, if $Y \subset \mathbb{A}^M_k$ is the zero locus of some polynomials and $Y' \subset Y$ is closed in the subspace topology, then $Y'$ is the zero locus of a larger polynomial set, hence affine in its own right.
We have $\nu_d(\mathbb{P}^n_k) \subset \mathbb{P}^{N-1}_k$ closed (Step 2) and $\mathbb{P}^{N-1}_k \setminus H$ open with $\mathbb{P}^{N-1}_k \setminus H \cong \mathbb{A}^{N-1}_k$ (Step 4). Their intersection is a closed subset of the affine variety $\mathbb{P}^{N-1}_k \setminus H$. In the affine coordinates $z_\beta := Z_\beta / L(Z)$ on $\mathbb{P}^{N-1}_k \setminus H$, the Veronese image is cut out by the dehomogenised quadratic relations from Step 2; their common zero set is an affine variety.
Composing with the isomorphism $\nu_d|_{U_d} : U_d \to \nu_d(U_d)$ (Step 2's closed embedding), we conclude $U_d$ is isomorphic as a variety to an affine variety, hence is affine.
[/guided]
[/step]