Solution (source code)

= Solution

Let $d=\Delta x$, impose $u_0=u_{M+1}=0$, and write the <method of lines> system as $U'=LU$, where
$$
L=D_2+\kappa D_1,\qquad
D_2=d^{-2}\operatorname{tridiag}(1,-2,1),\quad
(D_1)_{m,m+1}=\frac1{2d},\quad(D_1)_{m+1,m}=-\frac1{2d}.
$$
Thus $D_2$ is a negative definite <symmetric matrix> and $D_1$ is a <skew-symmetric matrix>. Use the mesh-weighted <Euclidean norm> $\|U\|_d^2=d\sum_{m=1}^M|u_m|^2$. Discrete <summation by parts> yields the <centered Dirichlet drift-diffusion energy identity>
$$
\frac12\frac d{dt}\|U\|_d^2
=d\operatorname{Re}(U^*LU)
=-\frac1d\sum_{m=0}^{M}|u_{m+1}-u_m|^2\leq0.
$$
Consequently
$$
\boxed{\|e^{tL}U^0\|_d\leq\|U^0\|_d,\qquad t\geq0.}
$$
The same estimate controls perturbations and is uniform in the number of grid points and in the fixed drift coefficient. Finite-dimensional linear ODE theory guarantees existence, so this proves <stability of a numerical method> for the semidiscretization.

The factor $d^{1/2}$ simply rescales the vector norm and does not change the induced <matrix> norm. Equivalently the symmetric part is $(L+L^*)/2=D_2$, whose largest <eigenvalue> is $-4d^{-2}\sin^2[\pi/(2(M+1))]<0$. This is the <Euclidean logarithmic norm>, rather than generally the <spectral abscissa> of a nonnormal <matrix>. No periodic <Fourier mode> assumption has been made: the zero endpoint terms are part of the proof. In particular positivity of both off-diagonal coefficients is not needed for this $L^2$ stability result.