A quadratic optimization problem I have leads to a system of linear equations which I want to solve explicitly (with a closed formula). We are searching for $(s_{1},s_{2},s_{3},...,s_{N})$ such that
$$As=x$$ where $A$ is an $N\times N$ band (pentadiagonal) symmetric matrix \begin{equation*} A= \begin{pmatrix} 2 & -1 & -1 & 0 & 0 &0 & 0& \dots &0 &0 &0 & 0 & 0 \\\\ -1 & 3 & -1 & -1 &0 &0& 0& \dots &0 & 0 & 0 &0 &0 \\\\ -1 & -1 & 4 & -1 & -1 & 0 & 0& \dots & 0&0 & 0 & 0 & 0 \\\\ 0 & -1 & -1 & 4 & -1 & -1 &0&\dots & 0& 0 & 0 & 0 & 0\\\\ \dots & \dots & \dots & \dots & & & & & & \dots & \dots & \dots& \dots \\\\ 0 & 0 & 0 & 0 & 0 & 0& 0& \dots & -1 & -1 & 4 & -1 & -1 \\\\ 0 & 0 & 0 & 0 & 0 & 0& 0& \dots & 0 & -1 & -1 & 3 & -1 \\\\ 0 & 0 & 0 & 0 & 0 & 0& 0& \dots & 0 & 0 &-1 & -1 & 2 \\\\ \end{pmatrix} \end{equation*}
The sum of lines (or equivalently the sum of columns) of this matrix is $0$. The diagnoal is of the form $(2,3,4,4,4,....,4,4,4,3,2)$ (length of $N$ where $N$ is greater than 10).
$x$ is a vector whose sum of components is $0$.
The system is singular and we know we can set $s_{1}=0$. We are actually only interested to express $s_{i}-s_{j}$ $(i,j=1,...,N)$as a function of the components of $x$ with a closed formula.
Is there are closed form solution for the $s_{i}-s_{j}$?
I have tried to stepwise solve the system but it is getting quite complex, I wonder if there is not a smarter way to get to a closed formula.