显示长三角恒等式运算

显示长三角恒等式运算

我正在尝试排版一些三角恒等式操作,但当我生成 PDF 时,行被截断了。我不确定如何让它显示在多行上。我确实看过其他类似的帖子,但我搞不懂。

      \begin{align*}
          2 \sin\left(\frac{x+y}{2}\right) \cos\left(\frac{x-y}{2}\right) &= 2\left(\sin\left(\frac{x}{2}\right)\cos\left(\frac{y}{2}\right) + \sin\left(\frac{y}{2}\right)\cos\left(\frac{x}{2}\right)\right)\left(\cos\left(\frac{x}{2}\right)\cos\frac{y}{\
2} + \sin\left(\frac{x}{2}\right)\sin\left(\frac{y}{2}\right)\right)\\
                                                &= 2\biggl(\sin(\frac{x}{2})\cos(\frac{x}{2})\cos^{2}(\frac{y}{2}) + \sin^{2}(\frac{x}{2})\cos(\frac{y}{2})\sin(\frac{y}{2}) + \sin(\frac{y}{2})\cos(\frac{y}{2})\cos^{2}(\frac{x}{2}) \notag \\
                                                &= \sin^{2}(\frac{y}{2})\cos(\frac{x}{2})\sin(\frac{x}{2}\biggr) \notag \\
                                                &= 2\sin(\frac{x}{2})\cos(\frac{x}{2})\cos^{2}(\frac{y}{2}) + 2\sin^{2}(\frac{x}{2})\cos(\frac{y}{2})\sin(\frac{y}{2}) + 2\sin(\frac{y}{2})\cos(\frac{y}{2})\cos^{2}(\frac{x}{2}) \notag \\
                                                &= 2\sin^{2}(\frac{y}{2})\cos(\frac{x}{2})\sin(\frac{x}{2}) \notag \\
                                                &= \sin(x)\cos^{2}(\frac{y}{2}) + \sin(x)\sin^{2}(\frac{y}{2}) + \sin(y)\cos^{2}(\frac{x}{2}) + \sin(y)\sin^{2}(\frac{x}{2}) \\
                                                &= (\sin(x))(\cos^{2}(\frac{y}{2} + \sin^{2}(\frac{y}{2})) + \sin(y)(\cos^{2}(\frac{x}{2} + \sin^{2}(\frac{x}{2}) \\
                                                &= \sin (x)+ \sin (y)
      \end{align*}

对此进行编码以避免线路被切断的最佳方法是什么?

在此处输入图片描述

答案1

我不会以那种方式呈现身份,坦白地说,我认为这从教学角度来说并不适合。

无论如何,您可以分离第一条线,假装它的宽度很小,然后分割两条较长的线。

\documentclass{article}
\usepackage{amsmath}

\begin{document}

We know the addition and subtraction formulas
\begin{gather*}
\sin(a+b)=\sin a\cos b+\cos a\sin b \\
\sin(a-b)=\sin a\cos b-\cos a\sin b
\end{gather*}
If we sum the two identities, we obtain
\begin{equation*}
\sin(a+b)+\sin(a-b)=2\sin a\cos b
\end{equation*}
If we set $x=a+b$ and $y=a-b$, we have
\begin{equation*}
a=\frac{x+y}{2},\qquad b=\frac{x-y}{2}
\end{equation*}
and we obtain the ``sum-to-product'' formula
\begin{equation*}
\sin x+\sin y=2\sin\frac{x+y}{2}\cos\frac{x-y}{2}
\end{equation*}
Replacing $y$ with $-y$ we get
\begin{equation*}
\sin x-\sin y=2\sin\frac{x-y}{2}\cos\frac{x+y}{2}
\end{equation*}

We can also prove the first sum-to-product formula in
an obnoxiously boring way:
\begin{align*}
\makebox[0pt][l]{$\displaystyle2\sin\frac{x+y}{2}\cos\frac{x-y}{2}$}\qquad&
\\[1ex]
&= 2\left(\sin\frac{x}{2}\cos\frac{y}{2} + \sin\frac{y}{2}\cos\frac{x}{2}\right)
    \left(\cos\frac{x}{2}\cos\frac{y}{2} + \sin\frac{x}{2}\sin\frac{y}{2}\right)
\\[1ex]
&= 2\Bigl(\sin\frac{x}{2}\cos\frac{x}{2}\cos^{2}\frac{y}{2} + 
          \sin^{2}\frac{x}{2}\cos\frac{y}{2}\sin\frac{y}{2}
\\ &\qquad+
          \sin\frac{y}{2}\cos\frac{y}{2}\cos^{2}\frac{x}{2} +
          \sin^{2}\frac{y}{2}\cos\frac{x}{2}\sin\frac{x}{2}
   \Bigr)
\\[1ex]
&= 2\sin\frac{x}{2}\cos\frac{x}{2}\cos^{2}\frac{y}{2} +
   2\sin^{2}\frac{x}{2}\cos\frac{y}{2}\sin\frac{y}{2} +
\\ &\qquad+
   2\sin\frac{y}{2}\cos\frac{y}{2}\cos^{2}\frac{x}{2} +
   2\sin^{2}\frac{y}{2}\cos\frac{x}{2}\sin\frac{x}{2}
\\[1ex]
&= \sin x\cos^{2}\frac{y}{2} + \sin x\sin^{2}\frac{y}{2} +
   \sin y\cos^{2}\frac{x}{2} + \sin y\sin^{2}\frac{x}{2}
\\[1ex]
&= \sin x\Bigl(\cos^{2}\frac{y}{2} + \sin^{2}\frac{y}{2}\Bigr) +
   \sin y\Bigl(\cos^{2}\frac{x}{2} + \sin^{2}\frac{x}{2}\Bigr)
\\[1ex]
&= \sin x+ \sin y
\end{align*}

\end{document}

在此处输入图片描述

答案2

我也不是一个数学家,但是通过变量替换u=x/2v=y/2,推导可以重新表述——我相信更简单——如下。

在此处输入图片描述

\documentclass{article} % or some other suitable document class
\usepackage{amsmath}    % for align* environment
\begin{document}
Put $u=x/2$ and $v=y/2$. Then 
\begin{align*}
\smash[b]{2\sin\Bigl(\frac{x+y}{2}\Bigr) \cos\Bigl(\frac{x-y}{2}\Bigr)}
   &= 2\sin(u+v)\cos(u-v)\\
   &= 2(\sin u\cos v + \sin v\cos u)(\cos u\cos v + \sin u\sin v)\\
   &= 2(\sin u\cos u\cos^2 v + \sin^2 u\cos v\sin v \\
   &\qquad + \sin v\cos v\cos^2 u + \sin^2 v\cos u\sin u) \\
   &= 2\sin u\cos u\cos^2 v + 2\sin^2 u\cos v\sin v \\
   &\qquad + 2\sin v\cos v\cos^2 u + 2\sin^2 v\cos u\sin u \\
   &= \sin x\cos^2 v + \sin x\sin^2 v + \sin y\cos^2 u + \sin y\sin^2 u \\
   &= \sin x(\cos^2v + \sin^2 v) + \sin y(\cos^2 u + \sin^2 u) \\
   &= \sin x+ \sin y\,.
\end{align*}
\end{document}

答案3

我不是数学家,所以我只限于你的推导的 LaTeX 方面。通过使用包\MoveEqLeft的宏mathtool\left...用 和替换,添加缺失\Bigl..的括号并用方括号替换外括号:\right...Biglr...

\documentclass{article}
\usepackage{geometry}
%---------------- show page layout. don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%

\usepackage{mathtools}

\begin{document}
      \begin{align*}
    \MoveEqLeft[3]
2 \sin\Bigl(\frac{x+y}{2}\Bigr) \cos\Bigl(\frac{x-y}{2}\Bigr)   \\
    & = 2\Bigl[\sin\Bigl(\frac{x}{2}\Bigr)\cos\Bigl(\frac{y}{2}\Bigr) +
               \sin\Bigl(\frac{y}{2}\Bigr)\cos\Bigl(\frac{x}{2}\Bigr)\Bigr]
         \Bigl[\cos\Bigl(\frac{x}{2}\Bigr)\cos\frac{y}{2} +
               \sin\Bigl(\frac{x}{2}\Bigr)\sin\Bigl(\frac{y}{2}\Bigr)\Bigr]         \\
    & = 2\Bigl[\sin\Bigl(\frac{x}{2}\Bigr)\cos\Bigl(\frac{x}{2}\Bigr)\cos^{2}\Bigl(\frac{y}{2}\Bigr) +
                \sin^{2}\Bigl(\frac{x}{2}\Bigr)\cos\Bigl(\frac{y}{2}\Bigr)\sin\Bigl(\frac{y}{2}\Bigr) +
                \sin\Bigl(\frac{y}{2}\Bigr)\cos\Bigl(\frac{y}{2}\Bigr)\cos^{2}\Bigl(\frac{x}{2}\Bigr)\Bigr] \\
    & = \sin^{2}\Bigl(\frac{y}{2}\Bigr)\cos\Bigl(\frac{x}{2}\Bigr)\sin\Bigl(\frac{x}{2}\Bigr)   \\
    & = 2\sin\Bigl(\frac{x}{2}\Bigr)\cos\Bigl(\frac{x}{2}\Bigr)\cos^{2}\Bigl(\frac{y}{2}\Bigr) +
        2\sin^{2}\Bigl(\frac{x}{2}\Bigr)\cos\Bigl(\frac{y}{2}\Bigr)\sin\Bigl(\frac{y}{2}\Bigr) + 2\sin\Bigl(\frac{y}{2}\Bigr)\cos\Bigl(\frac{y}{2}\Bigr)\cos^{2}\Bigl(\frac{x}{2}\Bigr)  \\
    & = 2\sin^{2}\Bigl(\frac{y}{2}\Bigr)\cos\Bigl(\frac{x}{2}\Bigr)\sin\Bigl(\frac{x}{2}\Bigr)  \\
    & = \sin(x)\cos^{2}\Bigl(\frac{y}{2}\Bigr) + \sin(x)\sin^{2}\Bigl(\frac{y}{2}\Bigr) + 
        \sin(y)\cos^{2}\Bigl(\frac{x}{2}\Bigr) + \sin(y)\sin^{2}\Bigl(\frac{x}{2}\Bigr)                             \\
    & = \sin(x)\Bigl[\cos^{2}\Bigl(\frac{y}{2}\Bigr) + \sin^{2}\Bigl(\frac{y}{2}\Bigr)\Bigr] +
        \sin(y)\Bigl[\cos^{2}\Bigl(\frac{x}{2}\Bigr) + \sin^{2}\Bigl(\frac{x}{2}\Bigr)\Bigr]          \\
    & = \sin(x)+ \sin(y)
      \end{align*}
\end{document}

我有

在此处输入图片描述

(红线表示文本块边框)

编辑: 但是,您不能省略三角函数参数周围的所有括号:

...
      \begin{align*}
    \MoveEqLeft[3]
2 \sin\frac{x+y}{2} \cos\frac{x-y}{2}   \\
    & = 2\Bigl(\sin\frac{x}{2}\cos\frac{y}{2} +
               \sin\frac{y}{2}\cos\frac{x}{2}\Bigr)
         \Bigl(\cos\frac{x}{2}\cos\frac{y}{2} +
               \sin\frac{x}{2}\sin\frac{y}{2}\Bigr)         \\
    & = 2\Bigl(\sin\frac{x}{2}\cos\frac{x}{2}\cos^{2}\frac{y}{2} +
                \sin^{2}\frac{x}{2}\cos\frac{y}{2}\sin\frac{y}{2} +
                \sin\frac{y}{2}\cos\frac{y}{2}\cos^{2}\frac{x}{2}\Bigr) \\
    & = \sin^{2}\frac{y}{2}\cos\frac{x}{2}\sin\frac{x}{2}   \\
    & = 2\sin\frac{x}{2}\cos\frac{x}{2}\cos^{2}\frac{y}{2} +
        2\sin^{2}\frac{x}{2}\cos\frac{y}{2}\sin\frac{y}{2} + 2\sin\frac{y}{2}\cos\frac{y}{2}\cos^{2}\frac{x}{2}  \\
    & = 2\sin^{2}\frac{y}{2}\cos\frac{x}{2}\sin\frac{x}{2}  \\
    & = \sin x\cos^{2}\frac{y}{2} + \sin x\sin^{2}\frac{y}{2} +
        \sin y\cos^{2}\frac{x}{2} + \sin y\sin^{2}\frac{x}{2}                             \\
    & = \sin x\Bigl(\cos^{2}\frac{y}{2} + \sin^{2}\frac{y}{2}\Bigr) +
        \sin y\Bigl(\cos^{2}\frac{x}{2} + \sin^{2}\frac{x}{2}\Bigr)          \\
    & = \sin x+ \sin y
      \end{align*}
...

在此处输入图片描述

相关内容