# L2-Projection using quadratic basis functions

I am trying to understand 1D $L^2$-projections using quadratic basis functions. Using 3 data points, and the Lagrange polynomial it is easy enough to see how to write out 3 basis functions. With the hat functions from the linear basis, it is easy to see how to expand a function. The hat functions are like delta-functions. With the quadratic basis I am having trouble writing out an explicit expression for the basis function because there are three functions in the same interval. (Fig 8.36 here : https://people.fh-landshut.de/~maurer/femeth/node265.html#SHP3).

The next step of what I am looking to do is construct the so called "mass matrix". Is there a way to visualize the quadratic basis like a hat-function? Once the basis functions are known, the mass matrix elements can be computed by looking at the overlap between the basis functions, L2-inner product.

Mass matrix structure for the linear-hat functions (x's denote a non-zero entry):

Edit:

This information is based off of the accepted answer below, which gives good references for figuring this out.

Structure of the mass matrix with quadratic basis functions:

• I don't understand your question. Are you trying to visualize the quadratic interpolation functions? If that's the case, the figure you ever to is av depiction of them. It also seems that you are trying to program the Finite Element Method. Mar 15 '15 at 3:59
• Yes ultimately I am learning about the finite element method. Before I get there though, I am learning about just L^2-projection. I know how to plot the quadratic interpolation functions. I understand how to use them to approximate a function with 3-nodes. But I am unsure how to extend the quadratic interpolation functions to a larger range say k+1 points. Is this something that can be done? I've done it for the linear interpolation functions. I don't understand how to think of these 3-functions as a single basis function, for which I can compute the mass matrix.
– wgwz
Mar 15 '15 at 13:24
• Let me rephrase that. You have 3 questions: 1) Is it possible to use higher order polynomials for the FEM?, 2) How do you interpolate a function, or, how do you find the coefficients for the linear combination of basis functions?, 3) After knowing how to interpolate, how to form the _mass matrix? Am I right? All these questions have answers, but please rewrite your question. Mar 15 '15 at 14:35
• @nicoguaro Hi, I am not asking 1). Yes, for 2.) and 3.). The post below has helped me with some of my confusion.
– wgwz
Mar 19 '15 at 2:24

• Can you take a look the structure of the mass matrix I have? It's shown in the original post. I suppose it's incorrect, as I have some rows with 5 non-zeros. Looking at the quadratic basis functions you posted, it seems that $M_{3,4} = (\phi_3, \phi_4)$ certainly has some overlap and hence a non-zero value. Whereas an entry like $M_{4,6}$ is a not for basis functions with common support so it is zero. Perhaps I viewing these functions the wrong way. The picture I posted shows non-zero values as x's.