hierarchical basis functions finite element

459 Views Asked by At

I am using the hierarchical basis functions on the reference element $[-1,1]$ which are $$\theta_1(\xi)=1/2(1-\xi) $$ $$\theta_2(\xi)=1-\xi^2$$ $$\theta_3(\xi)=1/2(1+\xi) $$ By using the Galerkin finite element method for the Poissson equation $$u_h(x)=u(x_{i})(x_{i+1}-x)/h +u(x_{i+1/2})( 1-4((x-x_{i+1/2})/h)^2) + u(x_{i+1})(x-x_{i})/h$$ on $[x_i,x_{i+1}]$.

I am wondering if it is correct or not. I checked with the $u''=1$ which the exact solution is $u(x)=x/2(x-1)$.

For example checking $u(0.0113)=-0.0056$ on $[0,0.1]$ with h=0.1, where $u(0)=0,~u(0.05)=-0.02375,~u(0.1)=-0.045$. But $u_h(0.0113)=-0.0146$ which has the high error. What is the problem?