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
  • $\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 at 9:32

1 Answer 1

-1
$\begingroup$

Well spotted. What the graph displays is not the $L^2$ projection on p/w linear continuous elements. It is either a mistake or they talk about the $L^2$ projection on some other space. That approximation is far off... Note that their figure captions seem inconsistent as well with $i=1,\dots,6$ and $0,\dots,5$.

Play around with it, here is an Octave code:

n=6;
h=1/(n-1);
c=(0:h:1)'; %coordinates
p0=c(1:end-1); %left
p1=c(2:end); %right
f=@(x) 2*x.*sin(2*pi*x)+3;% rhs
b=h/6* ( [0;f(p1) + 2*f((p1+p0)/2)]+[f(p0) + 2*f((p1+p0)/2);0] );%simposon rule
M = h*spdiags(ones(n,1)*[1/6,2/3,1/6],[-1,0,1],n,n);
M(1,1)=h/3; M(n,n)=h/3;% mass matrix
x = M\b;
figure,plot(0:.02:1,f(0:.02:1),'-b'),hold on
plot(c,f(c),'-r'),plot(c,x,'-k'),legend('true f','interpolation','L2 proj')
hold off
$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .