Artificial intelligent assistant

Understanding Energy minimization and poisson equation Let $M$ be a Riemmanian manifold and $X$ be a vector field thereon. My question is why are these two problems equivalent?: \begin{equation} \operatorname{argmin}_{\phi}\int_M |\nabla \phi - X|^2 \end{equation} and \begin{equation} \Delta \phi = \nabla\cdot X, \end{equation} where $\Delta$ is the Laplace-Belmati operator on $M$, $\nabla \cdot$ is the divergence operator and $\nabla$ is the gradient.

Let $F(\phi) = \int_M |\
abla \phi - X|^2$. The Euler-Lagrange condition for $\phi$ (for it to be a critical point of $F$) is that $$DF_\phi (\eta) = \frac d{dt} \Big|_{t=0} F(\phi + t \eta) = 0$$ for all smooth $\eta$. Bringing the derivative inside the integral and applying the product rule we get

$$ 2\int_M \
abla \eta \cdot (\
abla \phi - X) = 0.$$

Integrating by parts we see $$\int_M \eta (\Delta \phi - \
abla \cdot X) = 0;$$

so since this is true for all $\eta$ we arrive at the Euler-Lagrange equation $$\Delta \phi - \
abla \cdot X = 0.$$

Thus every minimizer satisfies this equation. To prove that a solution of this equation is a minimizer, note that when considered as a function of $\
abla \phi$, $F$ is convex; so if we require $\int \phi = 0$ (to remove the symmetry of adding constants) then the only critical point is the global minimum.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 14574d75c46b885efc032ad422d3c582