<s>[INST] Eigenvalues of almost symmetric matrix after discretizing a PDE are negative 
Let $h > 0$. Define, for every positive integer $n$, $a_n = a + n \cdot h,$ 
  and $a_{n+1/2} = a + \left( n + \frac{1}{2} \right) \cdot h, $where $a \in (0,1)$. How can we prove that the eigenvalues of the matrix $$A_{n+1} = \begin{pmatrix} -\frac{a_{1+1/2}+a_{0+1/2}}{a_1} & \frac{a_{1+1/2}}{a_1} & 0 &  0 & \cdots & 0 & 0 &0 \\
\frac{a_{1+1/2}}{a_2} & -\frac{a_{2+1/2} + a_{1+1/2}}{a_2} & \frac{a_{2+1/2}}{a_2} &0 & \cdots & 0 &0 &0 \\
\vdots & \vdots & \vdots &\vdots & \cdots &\vdots & \vdots & \vdots \\
0 & 0&  0 & 0& \cdots & \frac{a_{n-1 + 1/2}}{a_n} & -\frac{a_{n+1/2} + a_{n-1 + 1/2}}{a_n} & \frac{a_{n+1/2}}{a_n} \\
0 & 0& 0& 0& \cdots & 0 & \frac{a_{n+1/2} + a_{n+1+1/2}}{a_{n+1}} & -\frac{a_{n+1/2} + a_{n+1+1/2}}{a_{n+1}} \end{pmatrix}$$ are real and non-positive?

From each row $i$ from the above matrix, we can multiply that row with $a_i$ and we get a similar matrix with $A$ (so has the same eigenvalues), so we can forget about the denominator of each term. However, the matrix is not symmetric, but almost as the last two rows on the matrix do not agree on 2 entries. How can we get past this and prove the desired result?
This comes from discretizing the $y$-part of the partial differential equation (with second-order central difference formula) $$y \cdot \frac{\partial f}{\partial x}(x,y) = \frac{\partial }{\partial y} \left(y \cdot \frac{\partial f}{\partial y}(x,y) \right), $$ with conditions: $y \in (a,1+a), x 
 \in \mathbb{R}, f(x,a) = 1, \forall x \in \mathbb{R}, \frac{\partial f}{\partial y}(x,1+a) = 0, \forall x \in \mathbb{R}.$ 
 [/INST] Let $\{e_1,e_2,\ldots,e_{n+1}\}$ be the standard basis of $\mathbb R^{n+1}$. Then $A=DP$ where $D=-\operatorname{diag}\left(\frac{1}{a_1},\ldots,\frac{1}{a_{n+1}}\right)$ is a negative diagonal matrix and
$$
P=a_{0+\frac12}e_1e_1^T+\sum_{i=1}^na_{i+\frac12}(e_i-e_{i+1})(e_i-e_{i+1})^T+a_{n+1+\frac12}e_{n+1}e_{n+1}^T.
$$
$P$ is positive semidefinite because it is a positively weighted sum of rank-$1$ positive semidefinite matrices. It is also nonsingular because
\begin{aligned}
&Px=0\\
&\ \Rightarrow\ x^TPx=0\\
&\ \Rightarrow\ x^Te_1e_1^Tx=x^T(e_1-e_2)(e_1-e_2)^Tx=\cdots=x^T(e_n-e_{n+1})(e_n-e_{n+1})^Tx=x^Te_{n+1}e_{n+1}^Tx=0\\
&\ \Rightarrow\ e_1^Tx=(e_1-e_2)^Tx=\cdots=(e_n-e_{n+1})^Tx=e_{n+1}^Tx=0\\
&\ \Rightarrow\ x=0.
\end{aligned}
Therefore $P$ is positive definite. Since $A$ is the product of a negative definite matrix and a positive definite matrix, it has a negative spectrum.
</s>