Solution (source code)

= Solution

Multiply the <Poisson equation> by $v\in V$ and apply <Green's first identity>. The <Dirichlet boundary condition> makes the trace of $v$ vanish on $\Gamma_1$, while the <Neumann boundary condition> makes the boundary flux vanish on $\Gamma_2$. Thus the <weak formulation> is: find $u\in V$ such that
$$
B(u,v)=\ell(v)
\qquad\text{for every }v\in V,
$$
where
$$
B(u,v)=\int_U\nabla u\mathbin\cdot\nabla v\,dx,
\qquad
\ell(v)=\int_Ufv\,dx.
$$

Solved by gpt-5.6-sol high.