 trigonometric - Maple Help

combine/trig

combine trigonometric terms Calling Sequence combine(f, trig); Parameters

 f - any expression Description

 • Products and powers of trigonometric terms involving sin, cos, sinh and cosh are combined into a sum of trigonometric terms by repeated application of the transformations

$\mathrm{sin}\left(a\right)\mathrm{sin}\left(b\right)\to \frac{1}{2}\mathrm{cos}\left(a-b\right)-\frac{1}{2}\mathrm{cos}\left(a+b\right)$

$\mathrm{sin}\left(a\right)\mathrm{cos}\left(b\right)\to \frac{1}{2}\mathrm{sin}\left(a-b\right)+\frac{1}{2}\mathrm{sin}\left(a+b\right)$

$\mathrm{cos}\left(a\right)\mathrm{cos}\left(b\right)\to \frac{1}{2}\mathrm{cos}\left(a-b\right)+\frac{1}{2}\mathrm{cos}\left(a+b\right)$

 • where  ${\mathrm{sin}\left(a\right)}^{2}$  and  ${\mathrm{cos}\left(b\right)}^{2}$  are special cases of the above. The form of the result is a sum of trigonometric terms whose arguments are integral linear combinations of the original arguments.
 • An important special case is when the input is a polynomial in $\mathrm{sin}\left(x\right)$ and $\mathrm{cos}\left(x\right)$ over a field, in which case the result is a canonical form; namely,

$\left(\sum _{i=-n}^{n}{a}_{i}\mathrm{sin}\left(ix\right)\right)+\left(\sum _{i=-n}^{n}{b}_{i}\mathrm{cos}\left(ix\right)\right)$

 • where ${a}_{i}$, ${b}_{i}$ are in the field and $n$ is bounded by the total degree of the input polynomial in $\mathrm{sin}\left(x\right)$ and $\mathrm{cos}\left(x\right)$. Examples

 > $\mathrm{combine}\left({\mathrm{sin}\left(x\right)}^{2},\mathrm{trig}\right)$
 $\frac{{1}}{{2}}{-}\frac{{\mathrm{cos}}{}\left({2}{}{x}\right)}{{2}}$ (1)
 > $\mathrm{combine}\left(\mathrm{sinh}\left(x\right)\mathrm{cosh}\left(x\right),\mathrm{trig}\right)$
 $\frac{{\mathrm{sinh}}{}\left({2}{}{x}\right)}{{2}}$ (2)
 > $\mathrm{combine}\left(2\mathrm{sin}\left(x\right)\mathrm{cos}\left(y\right),\mathrm{trig}\right)$
 ${\mathrm{sin}}{}\left({x}{+}{y}\right){+}{\mathrm{sin}}{}\left({x}{-}{y}\right)$ (3)
 > $f≔{\mathrm{sin}\left(x\right)}^{2}\mathrm{cos}\left(x\right)+3{\mathrm{cos}\left(x\right)}^{3}+2\mathrm{sin}\left(x\right)\mathrm{cos}\left(x\right)$
 ${f}{≔}{{\mathrm{sin}}{}\left({x}\right)}^{{2}}{}{\mathrm{cos}}{}\left({x}\right){+}{3}{}{{\mathrm{cos}}{}\left({x}\right)}^{{3}}{+}{2}{}{\mathrm{sin}}{}\left({x}\right){}{\mathrm{cos}}{}\left({x}\right)$ (4)
 > $\mathrm{combine}\left(f,\mathrm{trig}\right)$
 $\frac{{5}{}{\mathrm{cos}}{}\left({x}\right)}{{2}}{+}\frac{{\mathrm{cos}}{}\left({3}{}{x}\right)}{{2}}{+}{\mathrm{sin}}{}\left({2}{}{x}\right)$ (5)
 > $f≔512{\mathrm{sin}\left(x\right)}^{5}{\mathrm{cos}\left(x\right)}^{5}$
 ${f}{≔}{512}{}{{\mathrm{sin}}{}\left({x}\right)}^{{5}}{}{{\mathrm{cos}}{}\left({x}\right)}^{{5}}$ (6)
 > $\mathrm{combine}\left(f,\mathrm{trig}\right)$
 ${\mathrm{sin}}{}\left({10}{}{x}\right){+}{10}{}{\mathrm{sin}}{}\left({2}{}{x}\right){-}{5}{}{\mathrm{sin}}{}\left({6}{}{x}\right)$ (7)