Nicematrix de tamaño infinito

Nicematrix de tamaño infinito

Estoy intentando escribir una versión nicematrix de esta matriz tridiagonal (tamaño infinito), ya que el entorno pmatrix genera una versión muy fea.

\begin{equation}
\begin{pmatrix}
    -\lambda & \lambda             & 0                    & 0       & \dots  \\
    \mu      & -(\lambda+\mu)      & \lambda              & 0       &        \\
    0        & 2\mu                & -(\lambda+2\mu)      & \lambda &        \\
    \vdots   &                     & \ddots               & \ddots  & \ddots
\end{pmatrix}
\end{equation}

Así que ingenuamente escribí

\begin{equation}
\begin{pNiceMatrix}
    -\lambda & \lambda             & 0                    & 0       & \Cdots  \\
    \mu      & -(\lambda+\mu)      & \lambda              & 0       &        \\
    0        & 2\mu                & -(\lambda+2\mu)      & \lambda &        \\
    \Vdots   &                     & \Ddots               & \Ddots  & \Ddots
\end{pNiceMatrix}
\end{equation}

Pero el resultado no funciona en absoluto.

Supongo que el problema proviene de la falta de indicaciones para poner fin a mi \Ddots. Pero entonces, ¿cómo se supone que debo gestionar matrices de tamaño infinito?

Editar

Estoy proporcionando un ejemplo mínimo completo, con la clase de documento en la que estoy trabajando.

\documentclass{article}

\usepackage{nicematrix}

\begin{document}
\begin{equation}
\begin{pNiceMatrix}
    -\lambda & \lambda             & 0                    & 0       & \Cdots  \\
    \mu      & -(\lambda+\mu)      & \lambda              & 0       &        \\
    0        & 2\mu                & -(\lambda+2\mu)      & \lambda &        \\
    \Vdots   &                     & \Ddots               & \Ddots  & \Ddots
\end{pNiceMatrix}
\end{equation}
\end{document}

Los resultados de la compilación se ven un poco diferentes a las imágenes que proporcioné porque tenía un paquete de fuentes. Pero el problema sigue ahí.

Respuesta1

Los comandos \Ldots, \Cdots, \Vdots, \Ddotsy \Iddotsestán destinados a usarse entre celdas que no están vacías. Entonces puedes hacer las células \NotEmpty.

ingrese la descripción de la imagen aquí

\documentclass{article}

\usepackage{nicematrix}

\begin{document}

\[
\begin{pNiceMatrix}
    -\lambda  & \lambda        & 0               & 0         & \Cdots  \\
    \mu       & -(\lambda+\mu) & \lambda         & 0         &         \\
    0         & 2\mu           & -(\lambda+2\mu) & \lambda   &         \\
    \Vdots    &                & \Ddots          & \Ddots    & \Ddots  \\
    \NotEmpty &                &                 & \NotEmpty & \NotEmpty
\end{pNiceMatrix}
\]

\end{document}

Respuesta2

¿Quizás con \phantomesto sea suficiente para usted?

\documentclass[border=5mm]{standalone}
\usepackage{nicematrix}
\begin{document}
$\begin{pNiceMatrix}
    -\lambda & \lambda             & 0                    & 0       & \Cdots  \\
    \mu      & -(\lambda+\mu)      & \lambda              & 0       &        \\
    0        & 2\mu                & -(\lambda+2\mu)      & \lambda &        \\
    \Vdots   &                     & \Ddots               & \Ddots  & \Ddots\\
\phantom{}&\phantom{}&\phantom{}&\phantom{.}&\phantom{.}
\end{pNiceMatrix}$
\end{document}

ingrese la descripción de la imagen aquí

información relacionada