包含矩阵的长方程的格式化?

包含矩阵的长方程的格式化?

我在格式化这个方程式时遇到了问题。它包含一个 5x1 矩阵,并且矩阵中单元格的内容相当长。总之,它不适合放在页面上。我应该使用split()还是还有其他选择?

\begin{equation} 
\varphi_{i,j,k}^{n+1} = \varphi_{i,j,k}^{n} + \delta t \frac{1}{|x^3|}
\begin{smallmatrix} 
\frac{1}{2}((\rho v_1)_{i,j+1,k}-(\rho v1)_{i,j-1,k})\delta x + \frac{1}{2}((\rho v_2)_{i+1,j,k}-(\rho v_2)_{i-1,j,k})\delta y + \frac{1}{2}((\rho v_3)_{i,j,k+1}-(\rho v_3)_{i,j,k-1})\delta z\\
\frac{1}{2}((\rho v_1^2+p)_{i,j+1,k}-(\rho v_1^2+p)_{i,j-1,k})\delta x + \frac{1}{2}((\rho v_1 v_2)_{i+1,j,k}-(\rho v_1 v_2)_{i-1,j,k})\delta y + \frac{1}{2}((\rho v_1 v_3)_{i,j,k+1}-(\rho v_1 v_3)_{i,j,k-1})\delta z\\
\frac{1}{2}((\rho v_2 v_1)_{i,j+1,k}-(\rho v_2 v_1)_{i,j-1,k})\delta x + \frac{1}{2}((\rho v_2^2+p)_{i+1,j,k}-(\rho v_2^2+p)_{i-1,j,k})\delta y + \frac{1}{2}((\rho v_2 v_3)_{i,j,k+1}-(\rho v_2 v_3)_{i,j,k-1})\delta z\\
\frac{1}{2}((\rho v_3 v_1)_{i,j+1,k}-(\rho v_3 v_1)_{i,j-1,k})\delta x + \frac{1}{2}((\rho v_3 v_2)_{i+1,j,k}-(\rho v_3 v_2)_{i-1,j,k})\delta y + \frac{1}{2}((\rho v_3^2+p)_{i,j,k+1}-(\rho v_3^2+p)_{i,j,k-1})\delta z\\
\frac{1}{2}(((\rho E+p)v_1)_{i,j+1,k}-((\rho E+p)v_1)_{i,j-1,k})\delta x + \frac{1}{2}(((\rho E+p)v_2)_{i+1,j,k}-((\rho E+p)v_2)_{i-1,j,k})\delta y + \frac{1}{2}(((\rho E+p)v_3)_{i,j,k+1}-((\rho E+p)v_3)_{i,j,k-1})\delta z\\
\end{smallmatrix} 
\end{equation}

答案1

% arara: pdflatex

\documentclass{article}
\usepackage{mathtools}

\begin{document}
\begin{equation} 
\varphi_{i,j,k}^{n+1} = \varphi_{i,j,k}^{n} + \delta t \frac{1}{|x^3|}\mathbf{A}
\end{equation}
where
\begin{equation} 
\mathbf{A}=\frac{1}{2} \mathbf{B}
\begin{pmatrix} 
\partial x\\\partial y\\\partial z
\end{pmatrix} 
\end{equation}
where 
\begin{equation} 
\mathbf{B}= \begin{pmatrix} 
a & b & c\\
d & e & f\\
g & h & i
\end{pmatrix} 
\end{equation}
where
\begin{align*}
a &= (\rho v_1)_{i,j+1,k}-(\rho v_1)_{i,j-1,k}\\
b &= (\rho v_2)_{i+1,j,k}-(\rho v_2)_{i-1,j,k}\\
&\mathrel{\phantom{=}}\dots
\end{align*}
\end{document}

在此处输入图片描述

相关内容