对齐问题

对齐问题

我不知道如何使第一个等式v_{n}(\rho)与第二个等式对齐。

\begin{equation}
\begin{split}
\rho^{n+1}e^{-\rho/2}\frac{d^{2}v_{n}(\rho)}{d\rho^{2}}
\begin{aligned}[t]
&+\Biggl[(n+1)-\frac{\rho}{2}+(n+1)-\frac{\rho}{2}\Biggr]\rho^{n}e^{- 
\rho/2}\frac{dv_{n}(\rho)}{d\rho}\\
&+\Biggl[
\begin{aligned}[t]
&-\frac{\rho}{2}+\Biggl[n\Biggl(n+1-\frac{\rho}{2}\Biggr)-\frac{\rho} 
{2}\Biggl(n+1-\frac{\rho}{2}\Biggr)\Biggr]\\
&+\Biggl(-\frac{\rho^{2}}{4}+\frac{Ze^{2}}{\hbar}\sqrt{\frac{\mu} 
{2|E|}}\rho-n(n+1)\Biggr)\Biggr]\rho^{n-1}e^{-\rho/2}v_{n}(\rho)
\end{aligned}
\end{aligned}\\
&=0\\
\rho v''_{n}(\rho)+(2n+2-\rho)v_{n}(\rho)-(n+1-\lambda)v_{n}(\rho)
&=0
\end{split}
\end{equation}

答案1

\documentclass{article}
\usepackage[margin=1in]{geometry}
\usepackage{mathtools}
\begin{document}
\begin{equation}
\begin{aligned}
\rho^{n+1}\mathrm{e}^{-\rho/2}\frac{\mathrm{d}^{2}v_{n}(\rho)}{\mathrm{d}\rho^{2}}
\begin{aligned}[t]
&+\Biggl[(n+1)-\frac{\rho}{2}+(n+1)-\frac{\rho}{2}\Biggr]\rho^{n}\mathrm{e}^{- 
\rho/2}\frac{\mathrm{d}v_{n}(\rho)}{\mathrm{d}\rho}\\
&+\Biggl[
\begin{aligned}[t]
&-\frac{\rho}{2}+\Biggl[n\Biggl(n+1-\frac{\rho}{2}\Biggr)-\frac{\rho} 
{2}\Biggl(n+1-\frac{\rho}{2}\Biggr)\Biggr]\\
&+\Biggl(-\frac{\rho^{2}}{4}+\frac{Ze^{2}}{\hbar}\sqrt{\frac{\mu} 
{2|E|}}\rho-n(n+1)\Biggr)\Biggr]\rho^{n-1}\mathrm{e}^{-\rho/2}v_{n}(\rho)
\mathrlap{{}=0}
\end{aligned}
\end{aligned}
&\\
\rho v''_{n}(\rho)+(2n+2-\rho)v_{n}(\rho)-(n+1-\lambda)v_{n}(\rho)
&=0\\
\end{aligned}
\end{equation}
\end{document}

在此处输入图片描述

我个人喜欢使用subequations

\documentclass{article}
\usepackage[margin=1in]{geometry}
\usepackage{amsmath}
\begin{document}
\begin{subequations}
\begin{align}
  \begin{aligned}[b]
    \rho^{n + 1} \mathrm{e}^{-\rho / 2} \frac{\mathrm{d}^2 v_n(\rho)}{\mathrm{d} \rho^2}
      & + \Biggl[ (n + 1) - \frac{\rho}{2} + (n + 1) - \frac{\rho}{2} \Biggr]
        \rho^n \mathrm{e}^{-\rho / 2} \frac{\mathrm{d} v_n(\rho)}{\mathrm{d} \rho} \\
      & + \Biggl[ -\frac{\rho}{2} + \Biggl[ n \Biggl( n + 1 - \frac{\rho}{2} \Biggr) 
        - \frac{\rho}{2} \Biggl( n + 1 - \frac{\rho}{2} \Biggr) \Biggr] \\
      & \qquad + \Biggl( -\frac{\rho^2}{4} + \frac{Z e^2}{\hbar} \sqrt{ \frac{\mu}{2 \lvert E\rvert}} \rho
        - n\, (n + 1) \Biggr) \Biggr] \rho^{n - 1} \mathrm{e}^{-\rho / 2} 
        v_n(\rho)
  \end{aligned} &= 0 \\
  \rho\, v''_n\,(\rho) + (2 n + 2 - \rho)\, v_n(\rho) - (n + 1 - \lambda)\, v_n(\rho) &= 0
\end{align}
\end{subequations}
\end{document}

在此处输入图片描述

答案2

以下是使用 ottom- 构造的更简单、自然alignb实现aligned

在此处输入图片描述

\documentclass{article}

\usepackage[margin=1in]{geometry}% Just for this example
\usepackage{amsmath}

\begin{document}

\begin{align}
  \begin{aligned}[b]
    \rho^{n + 1} e^{-\rho / 2} \frac{\mathrm{d}^2 v_n(\rho)}{\mathrm{d} \rho^2}
      & + \Biggl[ (n + 1) - \frac{\rho}{2} + (n + 1) - \frac{\rho}{2} \Biggr]
        \rho^n e^{-\rho / 2} \frac{\mathrm{d} v_n(\rho)}{\mathrm{d} \rho} \\
      & + \Biggl[ -\frac{\rho}{2} + \Biggl[ n \Biggl( n + 1 - \frac{\rho}{2} \Biggr) 
        - \frac{\rho}{2} \Biggl( n + 1 - \frac{\rho}{2} \Biggr) \Biggr] \\
      & \qquad + \Biggl( -\frac{\rho^2}{4} + \frac{Z e^2}{\hbar} \sqrt{ \frac{\mu}{2 \lvert E\rvert}} \rho
        - n (n + 1) \Biggr) \Biggr] \rho^{n - 1} e^{-\rho / 2} v_n(\rho)
  \end{aligned} &= 0 \notag \\
  \rho v''_n(\rho) + (2 n + 2 - \rho) v_n(\rho) - (n + 1 - \lambda) v_n(\rho) &= 0
\end{align}

\end{document}

对于中心方程数,以下内容有效:

在此处输入图片描述

\begin{gather}
  \begin{aligned}
    \begin{aligned}[b]
      \rho^{n + 1} e^{-\rho / 2} \frac{\mathrm{d}^2 v_n(\rho)}{\mathrm{d} \rho^2}
        & + \Biggl[ (n + 1) - \frac{\rho}{2} + (n + 1) - \frac{\rho}{2} \Biggr]
          \rho^n e^{-\rho / 2} \frac{\mathrm{d} v_n(\rho)}{\mathrm{d} \rho} \\
        & + \Biggl[ -\frac{\rho}{2} + \Biggl[ n \Biggl( n + 1 - \frac{\rho}{2} \Biggr) 
          - \frac{\rho}{2} \Biggl( n + 1 - \frac{\rho}{2} \Biggr) \Biggr] \\
        & \qquad + \Biggl( -\frac{\rho^2}{4} + \frac{Z e^2}{\hbar} \sqrt{ \frac{\mu}{2 \lvert E\rvert}} \rho
          - n (n + 1) \Biggr) \Biggr] \rho^{n - 1} e^{-\rho / 2} v_n(\rho)
    \end{aligned} &= 0 \\
    \rho v''_n(\rho) + (2 n + 2 - \rho) v_n(\rho) - (n + 1 - \lambda) v_n(\rho) &= 0
  \end{aligned}
\end{gather}

考虑在代码中使用缩进和/或间距,以便更清楚地看到对齐的元素。

相关内容