[proofplan]
We rewrite the weak equation as the operator equation $A_\lambda u = f$, where $A_\lambda = -\Delta - \lambda I_{L^2(U)}$ is the Dirichlet realization in $L^2(U)$ and $I_{L^2(U)}: L^2(U) \to L^2(U)$ denotes the identity operator. The operator is self-adjoint, so [the Fredholm alternative](/page/The%20Fredholm%20Alternative) identifies its range with the orthogonal complement of its kernel. The kernel is exactly the eigenspace $E_\lambda$, giving the solvability criterion, and subtracting two solutions gives uniqueness modulo $E_\lambda$.
[/proofplan]
[step:Identify the weak equation with the shifted Dirichlet Laplacian]
Let $D(A_\lambda)$ denote the set of all $u \in H^1_0(U)$ for which there exists a function $g \in L^2(U)$ satisfying
\begin{align*}
\int_U gv\, d\mathcal{L}^n = \int_U \nabla u \cdot \nabla v\, d\mathcal{L}^n - \lambda \int_U uv\, d\mathcal{L}^n \quad \text{for every } v \in H^1_0(U).
\end{align*}
For $u \in D(A_\lambda)$, define
\begin{align*}
A_\lambda u := g.
\end{align*}
The function $g$ is unique because $H^1_0(U)$ is dense in $L^2(U)$, so $A_\lambda$ is a well-defined linear operator
\begin{align*}
A_\lambda : D(A_\lambda) \subset L^2(U) \to L^2(U).
\end{align*}
By this definition, a function $u \in H^1_0(U)$ solves the weak problem precisely when $u \in D(A_\lambda)$ and $A_\lambda u = f$ in $L^2(U)$.
Moreover, $u \in \ker A_\lambda$ if and only if
\begin{align*}
\int_U \nabla u \cdot \nabla v\, d\mathcal{L}^n = \lambda \int_U uv\, d\mathcal{L}^n \quad \text{for every } v \in H^1_0(U).
\end{align*}
Thus
\begin{align*}
\ker A_\lambda = E_\lambda.
\end{align*}
[/step]
[step:Show that solvability forces orthogonality to the eigenspace]
Assume $u \in H^1_0(U)$ solves the weak problem. Let $\phi \in E_\lambda$. Since $\phi$ is an eigenfunction, using $v = u$ in the weak eigenvalue identity for $\phi$ gives
\begin{align*}
\int_U \nabla \phi \cdot \nabla u\, d\mathcal{L}^n = \lambda \int_U \phi u\, d\mathcal{L}^n.
\end{align*}
Using $v = \phi$ in the weak equation for $u$ gives
\begin{align*}
\int_U \nabla u \cdot \nabla \phi\, d\mathcal{L}^n = \lambda \int_U u\phi\, d\mathcal{L}^n + \int_U f\phi\, d\mathcal{L}^n.
\end{align*}
The Euclidean dot product and multiplication of real-valued functions are symmetric, so the left-hand sides agree and the two $\lambda$-terms agree. Subtracting the two identities yields
\begin{align*}
\int_U f\phi\, d\mathcal{L}^n = 0.
\end{align*}
Since $\phi \in E_\lambda$ was arbitrary, $f$ is orthogonal in $L^2(U)$ to every element of $E_\lambda$.
[guided]
Assume $u \in H^1_0(U)$ is a weak solution. We want to prove that every eigenfunction $\phi \in E_\lambda$ is $L^2$-orthogonal to $f$. The reason to test against $\phi$ is that the same bilinear expression appears in both the equation for $u$ and the eigenvalue equation for $\phi$.
Fix $\phi \in E_\lambda$. By the definition of $E_\lambda$, the identity
\begin{align*}
\int_U \nabla \phi \cdot \nabla v\, d\mathcal{L}^n = \lambda \int_U \phi v\, d\mathcal{L}^n
\end{align*}
holds for every $v \in H^1_0(U)$. Since $u \in H^1_0(U)$, we may choose $v = u$ and obtain
\begin{align*}
\int_U \nabla \phi \cdot \nabla u\, d\mathcal{L}^n = \lambda \int_U \phi u\, d\mathcal{L}^n.
\end{align*}
On the other hand, the weak equation for $u$ says that
\begin{align*}
\int_U \nabla u \cdot \nabla v\, d\mathcal{L}^n = \lambda \int_U uv\, d\mathcal{L}^n + \int_U fv\, d\mathcal{L}^n
\end{align*}
for every $v \in H^1_0(U)$. Since $\phi \in H^1_0(U)$, we may choose $v = \phi$ and obtain
\begin{align*}
\int_U \nabla u \cdot \nabla \phi\, d\mathcal{L}^n = \lambda \int_U u\phi\, d\mathcal{L}^n + \int_U f\phi\, d\mathcal{L}^n.
\end{align*}
The two left-hand sides are equal because $\nabla u \cdot \nabla \phi = \nabla \phi \cdot \nabla u$ pointwise. The two eigenvalue terms are equal because $u\phi = \phi u$ pointwise. Subtracting the first displayed identity from the second therefore leaves exactly
\begin{align*}
\int_U f\phi\, d\mathcal{L}^n = 0.
\end{align*}
Because the choice of $\phi \in E_\lambda$ was arbitrary, $f$ is orthogonal to all of $E_\lambda$ in $L^2(U)$.
[/guided]
[/step]
[step:Apply the Fredholm alternative to obtain a solution from the orthogonality condition]
Assume
\begin{align*}
\int_U f\phi\, d\mathcal{L}^n = 0 \quad \text{for every } \phi \in E_\lambda.
\end{align*}
The Dirichlet Laplacian on a bounded [open set](/page/Open%20Set) has compact resolvent, and therefore the shifted operator $A_\lambda = -\Delta - \lambda I$ is a self-adjoint Fredholm operator on $L^2(U)$. By the [Fredholm alternative](/theorems/72) for [self-adjoint operators](/page/Self-Adjoint%20Operators) with compact resolvent (citing a result not yet in the wiki: [Fredholm Alternative](/theorems/219) for Self-Adjoint Operators with Compact Resolvent),
\begin{align*}
\operatorname{Range}(A_\lambda) = (\ker A_\lambda)^\perp.
\end{align*}
From the first step, $\ker A_\lambda = E_\lambda$. The assumed orthogonality condition says exactly that $f \in E_\lambda^\perp$. Hence $f \in \operatorname{Range}(A_\lambda)$, so there exists $u \in D(A_\lambda) \subset H^1_0(U)$ such that
\begin{align*}
A_\lambda u = f.
\end{align*}
By the definition of $A_\lambda$, this $u$ is a weak solution of the resonant Dirichlet problem.
[/step]
[step:Describe all solutions as one solution plus the eigenspace]
Assume $u \in H^1_0(U)$ and $w \in H^1_0(U)$ are weak solutions. Define $z := u - w \in H^1_0(U)$. Subtracting the weak equation for $w$ from the weak equation for $u$ gives
\begin{align*}
\int_U \nabla z \cdot \nabla v\, d\mathcal{L}^n = \lambda \int_U zv\, d\mathcal{L}^n \quad \text{for every } v \in H^1_0(U).
\end{align*}
Thus $z \in E_\lambda$, so $u = w + z$ differs from $w$ by an element of $E_\lambda$.
Conversely, if $u$ is a weak solution and $\phi \in E_\lambda$, then for every $v \in H^1_0(U)$,
\begin{align*}
\int_U \nabla (u+\phi) \cdot \nabla v\, d\mathcal{L}^n = \int_U \nabla u \cdot \nabla v\, d\mathcal{L}^n + \int_U \nabla \phi \cdot \nabla v\, d\mathcal{L}^n.
\end{align*}
Using the weak equation for $u$ and the eigenvalue identity for $\phi$ gives
\begin{align*}
\int_U \nabla (u+\phi) \cdot \nabla v\, d\mathcal{L}^n = \lambda \int_U (u+\phi)v\, d\mathcal{L}^n + \int_U fv\, d\mathcal{L}^n.
\end{align*}
Therefore $u+\phi$ is also a weak solution. Hence, whenever one solution $u$ exists, the set of all solutions is exactly $u + E_\lambda$.
[/step]