1
$\begingroup$

I'm reading the book "The Finite Element Method: Theory, Implementation, and Applications" by Larson and Bengzon. In the first chapters there are presented two methods for approximating polynomials. There is the statement that the $L^2$-projection $P_hf$ is the best approximation to $f$ when measuring the error $f-P_hf$ in the $L^2$ norm and I understand the proof of it. However, when I look at the examples provided (L2-projection linear interpolation), the $L^2$-projection "looks" like a worse approximation. It's also said that linear interpolation is exact at nodes $x_i$, when $P_hf$ gives a good on average approximation, but it also doesn't "look" that way.

Could someone explain why is it that way? Is it because we're measuring the error in the $L^2$ norm, which somehow behaves unintuitively? If yes, then why would we use that norm? And also, I thought that $L^2$ norm is sort of the equivalent of Euclidian norm for functions.

$\endgroup$
1
  • 1
    $\begingroup$ I would recommend redoing their computation and checking the L2 norm of the difference between the function and each approximation. I agree that it looks off. Perhaps they just made a mistake with the computation. $\endgroup$ Commented Oct 15, 2024 at 9:32

1 Answer 1

1
$\begingroup$

I stumbled upon the same issue. A numerical check shows that the linear interpolant features indeed a smaller L2 error than the L2 projection. This also consistently holds if you make the resolution finer and finer.

Here is the explanation: The L2 projection is computed via a linear system Ax=b. The system matrix A is exact (up to machine precision), but the right hand side b involves integrals of a nonlinear function that are approximated with the trapezoidal rule. This leads to an inexact b, and the error associated with the trapezoidal rule seem to dominate. Hence, the L2 projection in the figure looks worse, is worse, but is only an approximation of the exact L2 projection.

If you replace the trapezoidal rule with the Simpson rule, you will obtain an L2-projection that features a lower error than the linear interpolant. Mind that this is still not the exact projection (unless the function you want to project is a parabola).

$\endgroup$

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.