4.1.1. Weak formulation

The most basic example is usually the Poisson equation, which is usually taken as prime example for the finite element method. The Poisson equation for an unknown function \(u(\vec{x})\) with a source function \(g(\vec{x})\), both defined on an \(n\)-dimensional domain \(\Omega\) with position vector \(\vec{x}\) reads

(4.1)\[\begin{aligned} -\nabla^2 u=g\,. \end{aligned}\]

Here, \(\nabla^2\) is the Laplace operator, reading \(\sum_i^n \partial_{x_i}^2\) in Cartesian coordinates. Of course, this equation requires boundary conditions at the boundaries of \(\Omega\), which can be split into Dirichlet boundaries, \(u=u_\text{D}\) on \(\Gamma_\text{D}\), and Neumann boundaries, \(\nabla u\cdot \vec{n}=j_\text{N}\) on \(\Gamma_\text{N}\) with outward normal \(\vec{n}\), so that \(\partial\Omega=\Gamma=\Gamma_\text{D}\cup\Gamma_\text{N}\).

The key point in the finite element method is to cast the strong formulation (4.1) to a weak formulation. This is achieved as follows: Let \(v\) be an arbitrary function defined on \(\Omega\). Upon multiplication of (4.1) by \(v\), followed by a spatial integration over the domain \(\Omega\) leads to:

(4.2)\[\begin{aligned} -\int_\Omega\nabla^2 u\:v\:\mathrm{d}^n x=\int_\Omega g\:v\:\mathrm{d}^n x\,. \end{aligned}\]

Now, we treat the term on the lhs by integration by parts to arrive at

(4.3)\[\begin{aligned} \int_\Omega\nabla u\cdot \nabla v\:\mathrm{d}^n x-\int_\Gamma\nabla u\cdot \vec{n}\:v\:\mathrm{d}S=\int_\Omega g\:v\:\mathrm{d}^n x\,. \end{aligned}\]

When we now demand that \(v=0\) on the Dirichlet boundaries \(\Gamma_\text{D}\) (which is a necessary restriction for Dirichlet boundary conditions), the Neumann boundary condition \(\nabla u\cdot \vec{n}=j_\text{N}\) can be inserted directly in the surface integral:

(4.4)\[\begin{aligned} \int_\Omega\nabla u\cdot \nabla v\:\mathrm{d}^n x-\int_{\Gamma_\text{N}} j_\text{N}\:v\:\mathrm{d}S=\int_\Omega g\:v\:\mathrm{d}^n x\,. \end{aligned}\]

Finally, upon introducing the shorthand integral notations

(4.5)\[\begin{split}\begin{aligned} \left(a,b\right)&=\int_\Omega a\: b \:\mathrm{d}^n x \qquad & \left(\vec{a},\vec{b}\right)&=\int_\Omega \vec{a}\cdot \vec{b} \:\mathrm{d}^n x \\ \langle a,b \rangle&=\int_{\Gamma_\text{N}} a\: b \:\mathrm{d}S \qquad & \langle \vec{a},\vec{b} \rangle&=\int_{\Gamma_\text{N}} \vec{a}\cdot \vec{b} \:\mathrm{d}S \end{aligned}\end{split}\]

and putting all in residual form, i.e. putting all terms on one side, we arrive at

(4.6)\[\begin{aligned} \left(\nabla u,\nabla v\right)-\left(g, v\right)-\left\langle j_\text{N}, v\right\rangle=0\,. \end{aligned}\]

It can be shown that the weak formulation (4.6) together with the Dirichlet conditions \(u|_{\Gamma_\text{D}}=u_\text{D}\) is equivalent to the strong formulation (4.1) together with both types of boundary conditions, as long as \(v\) may be chosen arbitrary (with the requirement to have \(v=0\) on \(\Gamma_D\)).

However, the weak formulation has several features that make it appealing: The order of the spatial derivatives has been reduced from second to first order and the implementation of the Neumann conditions is now just an interface integral. Of course, it also comes at the price that spatial integrals have to be carried out to obtain a solution and that the arbitrary test function \(v\) is appearing in the weak formulation. However, the combination of integrals and test functions provides a neat way of solving the equations numerically on versatile geometries and in all kinds of dimensions.