I found this method in this book for solving the Poisson equation with error converging with $\mathcal{O}(h^4)$. However, when I try to implement it for the 1D equation $-u''(x)=f(x)$, it only converges with around $\mathcal{O}(h^2)$. The math is as follows:Using Taylor Series, we get $$\frac{1}{h^2}[-u_{i-1} + 2u_i - u_{i+1}] = -u''_i-\frac{h^2}{12}u^{(4)}_i + \mathcal{O}(h^4).$$Substituting in $$-u^{(4)} = \frac{1}{h^2}[-u''_{i-1} + 2u''_i - u''_{i+1}] + \mathcal{O}(h^2)$$we get $$\frac{1}{h^2}[-u_{i-1} + 2u_i - u_{i+1}] = f_i+\frac{1}{12}(f_{i-1} -2f_i +f_{1+1})_i + \mathcal{O}(h^4)$$where $u_i =u(x_i)$ and $f_i = f(x_i)$.This means that solving the system $$\frac{1}{h^2}Au = f-\frac{1}{12}Af$$where $A$ is of the form $$ A = \left[ \begin{array}{c} 2&-1&0&0 \\-1&2&-1&0 \\ 0&-1&2&-1 \\ 0&0&-1&2\end{array}\right]  $$should result in an error that converges with $\mathcal{O}(h^4)$. But when I implement this (in Matlab), halving the step-size $h$ results in approximately quartering the error.Is there something wrong with my math?(If necessary, I can include the Matlab code here. But as of now I'm thinking the problem lies with the math.)
Mehrstellenverfahren for Poisson?
discretization;poisson