Variational formulation of second order differential equation

distribution-theoryfinite element methodfunctional-analysisordinary differential equations

I am given the following differential equation.
Let $\Omega = (a,b)\subset\mathbb{R},\ f:\Omega \rightarrow\mathbb{R},\ \alpha,\beta \in \mathbb{R}$ and
$$
-u'' + u = f \\
u(a)= \alpha, u(b) = \beta
$$

Since this is an inhomogeneous problem, I choose a function $u_\varphi$ with $u_\varphi|_\Gamma = u|_\Gamma$ such that I can treat the problem like a homogeneous one, by finding a function $u_0$ with $u_0(a)=u_0(b)=0$, such that
$$u = u_\varphi + u_0.$$
The DEQ can then be written as

$$
-(u_0 + u_\varphi)'' + u_0 + u_\varphi = f \\
$$

To find the variational formulation for $u_0$, I test with an arbitrary testfunction $v$ with compact support:

$$\int_\Omega (-(u_0 + u_\varphi)'' + u_0 + u_\varphi)v dx= \int_\Omega fvdx
$$

yielding
$$\int_\Omega (-u_0''+u_0)v dx=\int_\Omega \nabla u_0 \nabla v dx + \int_\Omega u_0v dx = \int_\Omega (f +u_\varphi'' – u_\varphi)vdx
$$

which we usually write compactly as
$$
a(u_0,v) + \int_\Omega u_0v dx = F(v).
$$

This integral in the last equation bothers me, since I cannot get rid of it. Is there a way to do so?

Thanks!

Best Answer

The problem at hand can be reduced to a (somewhat more general) normed problem: $$ \frac{d^2 T}{d\xi^2} - p^2 T(\xi) = F(\xi) $$ The left hand side of this normed problem is handled with help of the following references:

  1. Understanding Galerkin method of weighted residuals
  2. Are there any two-dimensional quadrature that only uses the values at the vertices of triangles?

The second reference shows that vertex integration is the most stable one. If we employ this for the right hand side, then the integral $$ \int_0^1 F(\xi)f(\xi)\,d\xi $$ results in a load vector $\vec{F}$ instead of $0$ . Giving for the system of equations as a whole (read the first reference): $$ \begin{bmatrix} E_{0,0}^{(1)} & E_{0,1}^{(1)} & 0 & 0 & 0 & \cdots \\ E_{1,0}^{(1)} & E_{1,1}^{(1)}+E_{0,0}^{(2)} & E_{0,1}^{(2)} & 0 & 0 & \cdots \\ 0 & E_{1,0}^{(2)} & E_{1,1}^{(2)}+E_{0,0}^{(3)} & E_{0,1}^{(3)} & 0 & \cdots \\ 0 & 0 & E_{1,0}^{(3)} & E_{1,1}^{(3)}+E_{0,0}^{(4)} & E_{0,1}^{(4)} & \cdots \\ \cdots & \cdots & \cdots & \cdots & \cdots & \cdots \end{bmatrix} \begin{bmatrix} T_1 \\ T_2 \\ T_3 \\ T_4 \\ T_5 \\ \cdots \end{bmatrix} = \begin{bmatrix} F_1 \\ F_2 \\ F_3 \\ F_4 \\ F_5 \\ \cdots \end{bmatrix} $$ with the boundary conditions properly imposed.
The original problem - with $x$ and $u$ instead of $\xi$ and $T$ - is recovered by employing the following transformations. Herewith: $\xi_k \;\rightarrow\; x_k$ and $T_k \;\rightarrow\; u_k$ : $$ x = (b-a)\xi+a \quad \Longrightarrow \quad \begin{cases} x = a \;\leftrightarrow\; \xi = 0 \\ x = b \;\leftrightarrow\; \xi = 1 \end{cases} \\ u = (\beta-\alpha)T+\alpha \quad \Longrightarrow \quad \begin{cases} u = \alpha \;\leftrightarrow\; T = 0 \\ u = \beta \;\leftrightarrow\; T = 1 \end{cases} $$ Note. Variational formulation and Galerkin method are the same in this case.

Related Question