如何對齊圖中所示的下列方程組?

如何對齊圖中所示的下列方程組?

如果IEEEeqnarray環境不是最適合這種特定對齊方式,那麼最好使用的環境是什麼?

輸出

\documentclass[11pt,a4paper]{article}
\usepackage{blindtext}
\usepackage{mathtools}
\usepackage{IEEEtrantools}
\begin{document}
\begin{IEEEeqnarray*}{rCl}
(x-a)(x-2a)(x-3a)(x-4a)=x^{4}-P_{1}x^{3}+P_{2}x^{2}-P_{3}x+P_{4}.\\
\shortintertext{Here}
P_{1}&=&a+2a+3a+4a=10a,\\
P_{2}&=&1\times 2a^{2}+1\times 3a^{2}+1\times 4a^{2}+2\times 4a^{2}+3\times 4a^{2}=35a^{2},\\
P_{3}&=&2\times 3\times 4a^{3}+1\times 3\times 4a^{2}+1\times 2\times 4a^{3}+1\times 2\times 3a^{3}=50a^{3},\\
P_{4}&=&1\times 2\times 3\times 4a^{4}=24a^{4}.
\shortintertext{so that}
(x-a)(x-2a)(x-3a)(x-4a)=x^{4}-10ax^{3}+35a^{2}x^{2}-50a^{3}x+24a^{4}.
\end{IEEEeqnarray*}
\end{document}

答案1

您的對齊方式的呈現並不是那麼準確。因此,我認為以下內容就足夠了:

在此輸入影像描述

\documentclass{article}
\usepackage{array}
\begin{document}
\[
  (x - a)(x - 2a)(x - 3a)(x - 4a) = x^4 - P_1 x^3 + P_2 x^2 - P_3 x + P_4.
\]
Here
\[
  \renewcommand{\arraystretch}{1.3}
  \begin{array}{r@{}>{{}}l@{}r@{}>{{}}l}
    P_1 &= a+2a+3a+4a &&= 10a, \\
    P_2 & \multicolumn{3}{@{}l}{{}= 1 \times 2a^2 + 1 \times 3a^2 + 1 \times 4a^2 + 2 \times 4a^2 + 3 \times 4a^2} \\
      &&&= 35a^2,\\
    P_3 & \multicolumn{3}{@{}l}{{}= 2 \times 3 \times 4a^3 + 1 \times 3 \times 4a^2 + 1 \times 2\times 4a^3 + 1 \times 2 \times 3a^3} \\
      &&&= 50a^3,\\
    P_4 &= 1 \times 2 \times 3 \times 4a^4 &&= 24a^4, \\
  \end{array}
\]
so that
\[
  (x - a)(x - 2a)(x - 3a)(x - 4a) = x^4 - 10ax^3 + 35a^2 x^{2} - 50a^3 x + 24a^4.
\]
\end{document}

不嚴格遵守的多重對齊(有些線使用對齊點,有些則不)很難用標準align和朋友來實現。使用array可以藉助 來規避這個困難\multicolumn

使用array包裹上面並不是真正需要的,但無論如何我已經使用了它。

答案2

為什麼不採用這種簡單的方法呢?

\documentclass{article}

\usepackage{mathtools}

\begin{document}

\noindent We have
\begin{align*}
\MoveEqLeft (x - a)(x - 2a)(x - 3a)(x - 4a)
  = x^{4} - P_{1}x^{3} + P_{2}x^{2} - P_{3}x + P_{4}\\
\intertext{where}
  P_{1} &= a + 2a + 3a + 4a = 10a,\\
  P_{2} &= 1 \cdot 2a^{2} + 1 \cdot 3a^{2} + 1 \cdot 4a^{2} + 2 \cdot 4a^{2} + 3 \cdot 4a^{2} = 35a^{2},\\
  P_{3} &= 2 \cdot 3 \cdot 4a^{3} + 1 \cdot 3 \cdot 4a^{2} + 1 \cdot 2 \cdot 4a^{3} + 1 \cdot 2 \cdot 3a^{3}= 50a^{3},\\
  P_{4} &= 1 \cdot 2 \cdot 3 \cdot 4a^{4} = 24a^{4},
\intertext{so that}
\MoveEqLeft (x - a)(x - 2a)(x - 3a)(x - 4a)
  = x^{4} - 10ax^{3} + 35a^{2}x^{2} - 50a^{3}x + 24a^{4}.
\end{align*}

\end{document} 

在此輸入影像描述

答案3

我將這樣做:

\documentclass{article}

\usepackage{mathtools}

\begin{document}

\noindent We have
\begin{equation*}
  (x - a)(x - 2a)(x - 3a)(x - 4a)
  = x^{4} - P_{1}x^{3} + P_{2}x^{2} - P_{3}x + P_{4}
\end{equation*}
where
\begin{align*}
  P_{1} &= a + 2a + 3a + 4a\\
        &= 10a,\\
  P_{2} &= 1 \cdot 2a^{2} + 1 \cdot 3a^{2} + 1 \cdot 4a^{2} + 2 \cdot 4a^{2} + 3 \cdot 4a^{2}\\
        &= 35a^{2},\\
  P_{3} &= 2 \cdot 3 \cdot 4a^{3} + 1 \cdot 3 \cdot 4a^{2} + 1 \cdot 2 \cdot 4a^{3} + 1 \cdot 2 \cdot 3a^{3}\\
        &= 50a^{3},\\
  P_{4} &= 1 \cdot 2 \cdot 3 \cdot 4a^{4}\\
        &= 24a^{4},
\end{align*}
so that
\begin{equation*}
  (x - a)(x - 2a)(x - 3a)(x - 4a)
  = x^{4} - 10ax^{3} + 35a^{2}x^{2} - 50a^{3}x + 24a^{4}.
\end{equation*}

\end{document}

輸出

相關內容