# Finite elements/Weak form of Poisson equation

## The Equivalent Variational Problem

So far, we have seen mathematical models in PDE form. That is not the only way of developing a model even though it is commonly used.

Many finite element models are based on an alternative form called the variational problem. The problem is formulated as one where the goal is to minimize a functional.

The variational form and the partial differential equation form are equivalent for the same problem. Each can be derived from the other.

Let us look at a simplified problem - the Poisson equation. Simplify it further by assuming that the temperature is prescribed to be zero on the entire boundary.

### Functional

The first stage is to find a functional that applies to the problem.This is the most difficult part of the process. One way of finding the right functional is to try out a number of different forms and see if they correspond to known differential equations. This process is relatively easy for linear problems but not for nonlinear problems.

Recall that a functional converts a function (${\displaystyle v(\mathbf {x} )}$) to a real number.

For the Poisson equation, we can find a functional by thinking in terms of the membrane problem. In that problem, the total potential energy is stored energy of the membrane minus the work done by the force. The functional can be written in the form

${\displaystyle {\text{(18)}}\qquad I(v)={\frac {1}{2}}\int _{\Omega }|{\boldsymbol {\nabla }}v|^{2}~dV-\int _{\Omega }f~v~dV~.}$

where ${\displaystyle v\equiv v(\mathbf {x} )}$. The functional in equation (18) represents the total potential energy of the membrane. The first term of the functional represents the stored energy and the second term represents the work done by the applied forces. For the membrane the solution is the one that minimizes potential energy.

Since the same functional also works for the heat conduction problem (same PDE), we can minimize the functional to get at the temperature field that we seek.

### Minimization problem

The Poisson equation for the heat conduction problem can then be written as

${\displaystyle {\text{Find a function}}~T~{\text{such that}}~I(T)\leq I(v)~{\text{for all admissible}}~v.}$

What are admissible functions? In brief, these are functions that satisfy the following requirements (in this particular case)

• They are continuously differentiable on ${\displaystyle {\bar {\Omega }}}$ where ${\displaystyle {\bar {\Omega }}:=\Omega \cup \Gamma }$.
• They satisfy the boundary condition ${\displaystyle v=0}$ on ${\displaystyle \Gamma _{T}}$.

To summarize, the minimization problem is:

{\displaystyle {\begin{aligned}&{\mathsf {Minimization~Problem~for~Poisson's~Equation}}\\&\\&{\text{Find a function}}~T~{\text{in}}~{\mathcal {X}}~{\text{that satisfies}}\\&\\&I(T)\leq I(v)~{\text{for all functions}}~v~{\text{in}}~{\mathcal {X}}\\&\\&{\text{where}}~I(v)={\frac {1}{2}}\int _{\Omega }|{\boldsymbol {\nabla }}v|^{2}~dV-\int _{\Omega }f~v~dV\\&\\&{\mathcal {X}}=\{{\text{Continuously differentiable functions on}}~{\bar {\Omega }}~{\text{that vanish on}}~\Gamma _{T}\}\end{aligned}}}


### Finding a minimum

Let us take a simple function of one variable, say ${\displaystyle h(x)}$. See Figure 1(a). If a minimum exists, we can find it by checking where the slope ${\displaystyle h^{'}(x)=0}$.

A similar idea is used when we try to minimize a functional. See Figure 1(b).

For our problem, we have to find a minimizing function ${\displaystyle T(\mathbf {x} )}$ from the space of all admissible functions ${\displaystyle v(\mathbf {x} )}$.

The process of finding this minimizing function has the following steps:

• Assume that a minimizing function exists.
• Let this minimizing function be ${\displaystyle T(\mathbf {x} )}$.
• Choose an arbitrary function ${\displaystyle v(\mathbf {x} )\in {\mathcal {X}}}$.
• Form a new function ${\displaystyle T(\mathbf {x} )+\epsilon v(\mathbf {x} )}$.
• If we consider only the dependence of ${\displaystyle \epsilon }$, we can treat the functional ${\displaystyle I(T+\epsilon v)}$ as a function only of ${\displaystyle \epsilon }$, that is, ${\displaystyle I(T+\epsilon v)\equiv F(\epsilon )}$.
• Now, the minimum is achieved when ${\displaystyle \epsilon =0}$. Hence,
${\displaystyle {\text{(19)}}\qquad \left.{\cfrac {d}{d\epsilon }}F(\epsilon )\right|_{\epsilon =0}=0~~~~\Leftrightarrow ~~~~\left.{\cfrac {d}{d\epsilon }}I(T+\epsilon v)\right|_{\epsilon =0}=0}$
• Recall that the functional to be minimized is
${\displaystyle {\text{(20)}}\qquad I(v)={\frac {1}{2}}\int _{\Omega }|{\boldsymbol {\nabla }}v|^{2}~dV-\int _{\Omega }f~v~dV}$
Plug (20) into (19) and you will get
${\displaystyle {\text{(21)}}\qquad {\int _{\Omega }{\boldsymbol {\nabla }}T\bullet {\boldsymbol {\nabla }}v~dV=\int _{\Omega }f~v~dV}}$
(Show that this is true.)
• Equation (21) can be solved for ${\displaystyle T(\mathbf {x} )}$ and is called the variational boundary value problem.

The variational boundary value problem for the Poisson's equation form of the heat equation is

{\displaystyle {\begin{aligned}&{\mathsf {Variational~BVP~for~Poisson's~Equation}}\\&\\&{\text{Find a function}}~T~{\text{in}}~{\mathcal {X}}~{\text{that satisfies}}\\&\\&\int _{\Omega }{\boldsymbol {\nabla }}T\bullet {\boldsymbol {\nabla }}v~dV=\int _{\Omega }f~v~dV\quad {\text{for all}}~v\in {\mathcal {X}}\end{aligned}}}

 Figure 1(a). Minimizing a function.
 Figure 1(b). Minimizing a functional.

### Do I NEED to know the functional?

If the PDE form of the BVP is known, then we can derive the variational form directly from the PDE!

This process has the following steps:

• Start with the PDE BVP. Let's look at the Poisson equation for heat conduction as an example. The PDE is
${\displaystyle {\text{(23)}}\qquad -k\nabla ^{2}T=Q~~{\text{or,}}~~~-\nabla ^{2}T=f}$
where ${\displaystyle f:=Q/k}$.
• Choose an arbitrary function ${\displaystyle v(\mathbf {x} )\in {\mathcal {X}}}$.
• Multiply (23) by ${\displaystyle v}$ and integrate over ${\displaystyle \Omega }$. We get
${\displaystyle {\text{(24)}}\qquad -\int _{\Omega }(\nabla ^{2}T)~v~dV=\int _{\Omega }f~v~dV~~~{\text{or,}}~~~-\int _{\Omega }[{\boldsymbol {\nabla }}\bullet ({\boldsymbol {\nabla T}})]~v~dV=\int _{\Omega }f~v~dV~.}$
• The left hand side of the equation has second derivatives. We want simplify things so that only first derivatives are involved. To do this, we use the identity
${\displaystyle {\boldsymbol {\nabla }}\bullet (a\mathbf {b} )=({\boldsymbol {\nabla }}a)\bullet \mathbf {b} +a({\boldsymbol {\nabla }}\bullet b)}$
where ${\displaystyle a}$ is a scalar valued function (${\displaystyle v}$ in our case), and ${\displaystyle \mathbf {b} }$ is a vector valued function (like ${\displaystyle {\boldsymbol {\nabla T}}}$). Apply this identity to the first term in equation (24). We get
${\displaystyle -\int _{\Omega }[{\boldsymbol {\nabla }}\bullet (v{\boldsymbol {\nabla T)}}-({\boldsymbol {\nabla }}v)\bullet ({\boldsymbol {\nabla }}T)]~dV=\int _{\Omega }f~v~dV~.}$
Rearrange to get
${\displaystyle {\text{(25)}}\qquad -\int _{\Omega }{\boldsymbol {\nabla }}\bullet (v{\boldsymbol {\nabla T)}}~dV+\int _{\Omega }({\boldsymbol {\nabla }}T)\bullet ({\boldsymbol {\nabla }}v)~dV=\int _{\Omega }f~v~dV~.}$
• The first term is (25) still has second derivatives. Apply the Gauss divergence theorem
${\displaystyle \int _{\Omega }{\boldsymbol {\nabla }}\bullet \mathbf {b} ~dV=\int _{\Gamma }\mathbf {n} \bullet \mathbf {b} ~dA}$
where ${\displaystyle \mathbf {b} }$ is a vector valued function and ${\displaystyle \mathbf {n} }$ is the normal to the boundary ${\displaystyle \Gamma }$. The first term of (25) becomes
${\displaystyle \int _{\Omega }{\boldsymbol {\nabla }}\bullet (v{\boldsymbol {\nabla T)}}~dV=\int _{\Gamma }\mathbf {n} \bullet (v{\boldsymbol {\nabla }}T)~dA=\int _{\Gamma }v({\boldsymbol {\nabla }}T)\bullet \mathbf {n} ~dA=\int _{\Gamma }v{\frac {\partial T}{\partial n}}~dA~.}$
• The final form of (25) is called the Weak Form of the PDE and is written as
${\displaystyle {\text{(26)}}\qquad {-\int _{\Gamma }v{\frac {\partial T}{\partial n}}~dA+\int _{\Omega }({\boldsymbol {\nabla }}T)\bullet ({\boldsymbol {\nabla }}v)~dV=\int _{\Omega }f~v~dV~.}}$

At this point, we can break the integral over the boundary into two parts - an integral over ${\displaystyle \Gamma _{T}}$ and another over ${\displaystyle \Gamma _{q}}$, that is

${\displaystyle -\int _{\Gamma }v{\frac {\partial T}{\partial n}}~dA=-\int _{\Gamma _{T}}v{\frac {\partial T}{\partial n}}~dA-\int _{\Gamma _{q}}v{\frac {\partial T}{\partial n}}~dA~.}$

Recall that the function ${\displaystyle v\in {\mathcal {X}}}$ has to meet the requirement that ${\displaystyle v=0}$ on ${\displaystyle \Gamma _{T}}$. Therefore,

${\displaystyle \int _{\Gamma _{T}}v{\frac {\partial T}{\partial n}}~dA=0~.}$

We also have the boundary condition that the boundary is insulated (${\displaystyle \partial T/\partial n=0}$) on ${\displaystyle \Gamma _{q}}$. This implies that

${\displaystyle \int _{\Gamma _{q}}v{\frac {\partial T}{\partial n}}~dA=0~.}$

Then, the weak form becomes

${\displaystyle {\text{(27)}}\qquad {\int _{\Omega }({\boldsymbol {\nabla }}T)\bullet ({\boldsymbol {\nabla }}v)~dV=\int _{\Omega }f~v~dV~.}}$

which is the same as the variational boundary value problem (21). We have arrived at the variational BVP without knowing the functional to be minimized!

##### Remarks
• Note that the variational BVP implicitly contains the flux boundary condition and we do not have to apply it separately when solving the BVP. This type of BC is called a natural boundary condition.
• The prescribed boundary condition is not satisfied by the variational BVP and has to be applied explicitly when solving the BVP. This type of BC is called an essential boundary condition.

You will often see the variational BVP (27) written in the form

${\displaystyle {a(T,v)=\langle f,v\rangle }}$

where

{\displaystyle {\begin{aligned}a(T,v)&=\int _{\Omega }({\boldsymbol {\nabla }}T)\bullet ({\boldsymbol {\nabla }}v)~dV\\\langle f,v\rangle &=\int _{\Omega }f~v~dV~.\end{aligned}}}

Here ${\displaystyle \langle f,v\rangle }$ is a linear functional ${\displaystyle f}$ acting on ${\displaystyle v}$ and ${\displaystyle a(.,.)}$ is an example of a symmetric bilinear form. A bilinear form is an operator that maps a pair of elements to the real numbers, and which is linear in each of its slots. Let ${\displaystyle c_{1}}$ and ${\displaystyle c_{2}}$ be constants, and let ${\displaystyle u}$, ${\displaystyle v}$, and ${\displaystyle w}$ be functions. Then a bilinear form has the properties that

{\displaystyle {\begin{aligned}a(c_{1}~u+c_{2}~v,w)&=c_{1}~a(u,w)+c_{2}~a(v,w)\\(c_{1}~u+c_{2}~v,w)&=c_{1}~(u,w)+c_{2}~(v,w)\end{aligned}}}

A symmetric bilinear form has the additional property that

${\displaystyle a(u,v)=a(v,u)~;~~~~(u,v)=(v,u)}$

(Show that equation (27) is actually a symmetric bilinear form.)