Quadratic Lagrange triangle (source code)

= Quadratic Lagrange triangle
{title2=$P=\mathcal P_2(K)$}

= CG2 triangle
{c}
{synonym}

The <quadratic Lagrange triangle> uses degree-at-most-two <polynomials> on a nondegenerate <triangle>, with <point evaluation> at its three <polygon vertices> and three edge <midpoints> as the six <finite element degrees of freedom>. If $\lambda_i$ are the <affine functions> of its <barycentric coordinate system>, the cardinal shape functions are
$$
N_i=\lambda_i(2\lambda_i-1),\qquad N_{ij}=4\lambda_i\lambda_j\quad(i<j).
$$
At a <polygon vertex>, one coordinate in the <barycentric coordinate system> is one and the others vanish; at an edge <midpoint>, two are $1/2$ and the third is zero. These values prove the cardinal property. Since $\dim\mathcal P_2(K)=6$, this is an <unisolvent finite element>. Matching the two endpoint values and <midpoint> value on a shared <edge of a polygon> matches the whole quadratic restriction, producing a continuous global <conforming finite element space>.