I am trying to understand the Answer to my previous question here: https://math.stackexchange.com/a/4716803/965485
I want to simulate this system of ODEs where $\vec{u} = (u_1, u_2, \cdots, u_n, \cdots, u_N)$ and with Dirichlet boundary conditions $u_1 =0$, $u_N = 0$
$$i\dot{u}_n = \sum \limits_{\substack{m\in 1:N \\ m\neq n}} \frac{u_n - u_m}{|n-m|^{1+\alpha}} - |u_n|^2 u_n$$
What is the corresponding Matrix-vector equation with the given boundary conditions?
Consider the first equation, $n=1$: \begin{align} i\dot{u}_1 &= \sum\limits_{\substack{m\in1:N\\m\neq 1}}\frac{u_1 - u_m}{|1-m|^{1+\alpha}} - |u_1|^2u_1\\ &= \frac{u_1 - u_N}{|1-N|^{1+\alpha}}+\sum\limits_{\substack{2\leq m\leq N-1}}\left (\frac{u_1}{|1-m|^{1+\alpha}}\right ) - \sum\limits_{\substack{2 \leq m \leq N-1}}\left (\frac{u_m}{|1-m|^{1+\alpha}}\right ) - |u_1|^2 u_1\\ 0 &= -\sum\limits_{\substack{2 \leq m \leq N-1}}\left (\frac{u_m}{|1-m|^{1+\alpha}}\right ) \end{align} Likewise, for $n=N$ \begin{align} i\dot{u}_N &= \sum\limits_{\substack{m\in1:N\\m\neq 1}}\frac{u_N - u_m}{|N-m|^{1+\alpha}} - |u_N|^2u_N\\ 0 &= -\sum\limits_{\substack{2 \leq m \leq N-1}}\left (\frac{u_m}{|N-m|^{1+\alpha}}\right ) \end{align} For $2\leq n\leq N-1$, \begin{align} i\dot{u}_{n} &= \frac{u_n}{|n-1|^{1+\alpha}} + \sum\limits_{\substack{2 \leq m \leq N-1 \\ m\neq n}}\frac{u_n}{|n-m|^{1+\alpha}} - \sum\limits_{\substack{2 \leq m \leq N-1 \\ m\neq n}} \frac{u_m}{|n-m|^{1+\alpha}} + \frac{u_n}{|n-N|^{1+\alpha}} - |u_n|^2 u_n \end{align}
The Answer shown in the link above said the first and last equations drop and we only need to solve the $N-2$ remaining equations. But why is that so? There are non-zero terms on the right-hand-side of the first and last equation