= Reaction-diffusion finite element matrix
{title2=$K=S+M$}
For $-u''+u=f$ with homogeneous <Dirichlet boundary conditions>, the conforming <piecewise-linear hat functions> on a uniform grid give a diffusion <stiffness matrix> $S$ and a <mass matrix> $M$. Their nonzero entries are $S_{ii}=2/h$, $S_{i,i+1}=-1/h$, $M_{ii}=2h/3$, and $M_{i,i+1}=h/6$, with symmetric counterparts. The sum is a <positive-definite matrix> because its coefficient <quadratic form> is $\int((u_h')^2+u_h^2)$. For forcing $f(x)=x$, the load at $x_i$ is $hx_i$.
Back to article page