打破方程式但不失一致性

打破方程式但不失一致性

在此处输入图片描述

\split在工作中使用align但这不是我想要的输出。我想分解方程,但不想失去等号处方程的对齐。PS 我在 Beamer 课程 exampleblock 中工作。

下面是代码:

\begin{frame}{Type Two Error}
\let\thefootnote\relax\footnotetext{Rukhsana Sayed}
\begin{exampleblock}{Example Continued}
\begin{align*}
\alpha &= p(X \in \omega : H_0)\\
\alpha &= p(X = 3, 4, 5 : P \frac{1}{2})\\ 
\alpha &= p(X = 3 / P = \frac{1}{2}) + p(X = 4 / P = \frac{1}{2}) + p(X = 5 / P = \frac{1}{2}) \\
\begin{split} \alpha &= ^5 C_3 \times (\frac{1}{2})^3 \times (\frac{1}{2})^{5 - 3} + ^5 C_4  \times (\frac{1}{2})^4 \times (\frac{1}{2})^{5 - 4} + ^5 C_5 \times (\frac{1}{2})^5 \\ \times (\frac{1}{2})^{5 - 5}
\end{split}
\end{align*}
\end{exampleblock}
\end{frame}

答案1

这是一个具有嵌套aligned环境的解决方案:

\documentclass{beamer}
\usepackage{amsmath}

\begin{document}

    \begin{frame}{Type Two Error}
    \let\thefootnote\relax\footnotetext{Rukhsana Sayed}
    \begin{exampleblock}{Example Continued}
    \begin{align*}
    \alpha &= p(X \in \omega : H_0)\\
    \alpha &= p(X = 3, 4, 5 : P \frac{1}{2})\\
    \alpha &= p(X = 3 / P = \frac{1}{2}) + p(X = 4 / P = \frac{1}{2}) + p(X = 5 / P = \frac{1}{2}) \\
     \alpha &=\begin{aligned}[t] ^5 C_3 \times (\frac{1}{2})^3 \times (\frac{1}{2})^{5 - 3} + ^5 C_4 \times (\frac{1}{2})^4 \times (\frac{1}{2})^{5 - 4} + {}^5 C_5 \times (\frac{1}{2})^5 \\ \times (\frac{1}{2})^{5 - 5}
     \end{aligned}
    \end{align*}
    \end{exampleblock}
    \end{frame}

\end{document} 

在此处输入图片描述

答案2

你错过了&续行中的 。

不过,我会在不同的地方分开。并移除所有\alpha除第一个符号之外的所有符号。

我还会在行之间添加一些垂直空间,以更好地显示最后一行分为两行。

最后^5 C_3不是很好,应该是{}^5C_3或者指数应该附加到符号=+。我用 替换\frac{1}{2}\tfrac{1}{2}这样可以减少这些分数的突出程度。

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{align*}
\alpha &= p(X \in \omega : H_0)\\[1ex]
       &= p(X = 3, 4, 5 : P = \tfrac{1}{2})\\[1ex]
       &= p(X = 3 / P = \tfrac{1}{2}) 
        + p(X = 4 / P = \tfrac{1}{2})
        + p(X = 5 / P = \tfrac{1}{2}) \\[1ex]
      \begin{split}
       &= {}^5 C_3 \times (\tfrac{1}{2})^3 \times (\tfrac{1}{2})^{5 - 3} + 
          {}^5 C_4  \times (\tfrac{1}{2})^4 \times (\tfrac{1}{2})^{5 - 4} \\
       &\qquad + 
          {}^5 C_5 \times (\tfrac{1}{2})^5 \times (\tfrac{1}{2})^{5 - 5}
      \end{split}
\end{align*}

\end{document}

在场beamer并不重要。

在此处输入图片描述

或者,使用aligned

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{align*}
\alpha &= p(X \in \omega : H_0)\\[1ex]
       &= p(X = 3, 4, 5 : P = \tfrac{1}{2})\\[1ex]
       &= p(X = 3 / P = \tfrac{1}{2}) 
        + p(X = 4 / P = \tfrac{1}{2})
        + p(X = 5 / P = \tfrac{1}{2}) \\[1ex]
       &=
       \begin{aligned}[t]
       &{}^5 C_3 \times (\tfrac{1}{2})^3 \times (\tfrac{1}{2})^{5 - 3} + 
          {}^5 C_4  \times (\tfrac{1}{2})^4 \times (\tfrac{1}{2})^{5 - 4} \\
       &\quad + 
          {}^5 C_5 \times (\tfrac{1}{2})^5 \times (\tfrac{1}{2})^{5 - 5}
      \end{aligned}
\end{align*}

\end{document}

在此处输入图片描述

答案3

使用包multlined中定义的环境mathtools(嵌套在align*环境中):

\documentclass{beamer}
\usepackage{mathtools}

\begin{document}

    \begin{frame}{Type Two Error}
    \let\thefootnote\relax\footnotetext{Rukhsana Sayed}
    \begin{exampleblock}{Example Continued}
    \begin{align*}
    \alpha & = p(X \in \omega : H_0)\\
    \alpha & = p(X = 3, 4, 5 : P \frac{1}{2})\\
    \alpha & = p(X = 3 / P = \frac{1}{2}) + p(X = 4 / P = \frac{1}{2}) + p(X = 5 / P = \frac{1}{2}) \\
    \alpha & = \begin{multlined}[t] 
                ^5 C_3 \times (\frac{1}{2})^3 \times (\frac{1}{2})^{5 - 3} + ^5 C_4
                \times (\frac{1}{2})^4 \times \\
                (\frac{1}{2})^{5 - 4} + {}^5 C_5 \times (\frac{1}{2})^5 \times (\frac{1}{2})^{5 - 5}
               \end{multlined}
    \end{align*}
    \end{exampleblock}
    \end{frame}

\end{document} 

在此处输入图片描述

相关内容