# 1-dim. linear finite elements, von neumann boundary condition.

We have the inhomogeneous poisson equation $-\Delta u = f$ on the unit interval and a non-uniform mesh $0=x_0 \ldots x_N=1$. When we write down the stiffness matrix we get a linear system of dimension $N+1$.

Enforcing Dirichlet boundary conditions, the dimension reduces by 1 for each side of the boundary.

What about von Neumann boundary conditions? For example, if I use a Dirichlet boundary condition $u(1)=b$ and a von neumann boundary condition $u'(0)=a$ how do the dimensions change?

First of all the Dirichlet side will cut the dimension by 1 again. It seems to me that the dimension should stay at $N$ even with von neumann at the other side but I don't know how to show it.

A Neumann boundary condition simply gets into the system of equations through the Green's first identity when applied to the Laplacian term, i.e.:

$$\int_L u_{xx} \, \omega \, dx = u_x(1) \omega(1) - u_x(0) \omega(0) - \int_L u_x \omega_x \, dx,$$ where $\omega$ is the test function used in your FEM approach. Since you have $u(1) = b$, you may enforce $\omega(1) = 0$, but on the other hand, for the VN b.c. just substitute it back in the previous equation, yielding:

$$\int_L u_{xx} \, \omega \, dx = -a \, \omega(1) - \int_L u_x \omega_x \, dx,$$ which will be further simplified if you conveniently choose $\omega(x)$ such that $\omega(0) = 1$, i.e., for example choosing $\omega(x)$ as the family of piecewise linear polynomials in $[0,1]$, known as hat functions. Therefore, we would have:

$$u(x) = \sum_{i=0}^N u_n \omega_n (x) = u_N \omega_N(x) + \sum_{i=0}^{N-1} u_n \omega_n(x),$$ where $u_n$ are the unknowns. The Dirichlet boundary condition tells us:

$$u(1) = u_N \cdot 1 + 0 = b \Rightarrow u_N = b,$$ and we have reduced the order of the system by 1, as you pointed out before. Notice now that substituting the VN b.c. would tell us nothing and therefore $u_N$ remains unknown.

I hope this helps.

Cheers!

• Elaborate answer, thanks. So my (educated) guess that the dimension of the system to solve is $N$ is correct from what you said? – Horstenson Apr 30 '14 at 20:51
• Yes, it is, Horstenson. You may extend this approach to 2D problems as well. Cheers! – Dmoreno May 1 '14 at 9:07