# 1D Schrodinger/Laplace equation via finite differences: incompatible eigenvalues

I need to solve a variant of the 1D Schrodinger's equation equation using finite differences, so I decided to play a little bit with the real-space representation of some operators.

Using the appropriate stencils, I first defined the first and second derivative operators in a matrix form as:

$[\partial_x] \equiv \frac{1}{2} \left[ \begin{array}{rrrrr} 0 & 1 & 0 &\cdots& 0 \\ -1 & 0 & 1 & & 0 \\ 0 & -1 & 0 & & 0 \\ \vdots& & &\ddots& 1 \\ 0 & 0 & 0 & -1 & 0 \\ \end{array} \right]$

$[\partial_x^2] \equiv \left[ \begin{array}{rrrrr} -2 & 1 & 0 &\cdots& 0 \\ 1 & -2 & 1 & & 0 \\ 0 & 1 & -2 & & 0 \\ \vdots& & &\ddots& 1 \\ 0 & 0 & 0 & 1 &-2 \\ \end{array} \right]$

I can also define a matrix that is the product of two first-order derivative matrices, i.e., $[\partial_x]^2$. As expected, I found that acting either $[\partial_x]^2$ or $[\partial_x^2]$ on a vector $(x^2)^T$ gives the same result, except for the border region.

However, the eigenvalues of $[\partial_x^2]$ and $[\partial_x]^2$ are quite different:

What am I missing here? Shouldn't I be able to think of $[\partial_x]$ as an operator, and if so, shouldn't $[\partial_x]^2 \approx [\partial_x^2]$? Why do they behave similarly when I apply them on vectors, but not when I calculate the eigendecomposition?

To make things more confusing, it seems like the $\mathrm{eig}([\partial_x^4])\approx \mathrm{eig}([\partial_x^2]^2)$.

Actually matrices $[\partial_x]^2$ and $[\partial_x^2]$ are quite different (they should be).
Stencil $[\partial_x]^2$ just looks like a differential operator, but it has very low order of approximation for second derivative.
Instead of matrix product, you need to use convolution to build second order stencil from the first order one $[\partial_x]$ (time domain design).