combine - Maple Programming Help

combine

combine terms into a single term

 Calling Sequence combine(f) combine(f, n) combine(f, n, opt1, opt2, ...)

Parameters

 f - any expression, or set or list of expressions n - name or a list or set of names opt1, opt2, ... - (optional) names of options

Description

 • The combine function applies transformations which combine terms in sums, products, and powers into a single term. This function is applied recursively to the components of lists, sets, and relations; that is, f and n may be lists (or sets) of expressions and names, respectively.
 • For many functions, the transformations applied by combine are the inverse of the transformations that are applied by expand. For example, consider the well-known identity

$\mathrm{sin}\left(a+b\right)=\mathrm{sin}\left(a\right)\mathrm{cos}\left(b\right)+\mathrm{cos}\left(a\right)\mathrm{sin}\left(b\right)$

The combine function applies the identity from right to left, whereas the expand function does the reverse.

 • Subexpressions involving Int, Sum, and Limit are combined into one expression where possible using linearity; that is,  $\mathrm{c1}f\left(a,\mathrm{range}\right)+\mathrm{c2}f\left(b,\mathrm{range}\right)$ ==> $f\left(\mathrm{c1}a+\mathrm{c2}b,\mathrm{range}\right)$.
 • A specific set of transformations is obtained by specifying a second (optional) argument n (a name) which is one or a list of the following:

 For additional information and examples about the transformations applied by each of these, see combine[n] where n is an argument (a name) from the above list.
 • The symbolic option can be included to specify that formal symbolic manipulation of expressions is allowed without regard to the analytical issue of branches for multi-valued functions. For example, the expression sqrt(x)*sqrt(y) simplifies to sqrt(x*y) under the symbolic option. Without this option, the simplified result must take into account the different possible values of the (complex) sign of x and y.
 Note: When the symbolic option is specified, any branch of a multi-valued function can be chosen during the simplification process. The result of such an operation is in general not valid over the whole complex plane and can lead to incorrect results if you assume the expressions represent analytical functions.
 • The combine function maps over functions. Therefore combine(f(a)) is the same as map(combine,f(a)).

Examples

 > $\mathrm{combine}\left({{∫}}_{a}^{b}x\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}x-\left({{∫}}_{a}^{b}{x}^{2}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}x\right)\right)$
 ${{\int }}_{{a}}^{{b}}\left({-}{{x}}^{{2}}{+}{x}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}$ (1)
 > $\mathrm{combine}\left(\left(\underset{x→a}{{lim}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}x\right)\left(\underset{x→a}{{lim}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{x}^{2}\right)+c\right)$
 $\underset{{x}{\to }{a}}{{lim}}{}\left({{x}}^{{3}}{+}{c}\right)$ (2)

The use of the inert Limit function can lead to errors.

 > $\mathrm{combine}\left(\left(\underset{x→0}{{lim}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}\frac{1}{x}\right)\left(\underset{x→0}{{lim}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}x\right)\right)$
 $\underset{{x}{\to }{0}}{{lim}}{}{1}$ (3)
 > $\mathrm{combine}\left(\left(\underset{x→0}{lim}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}\frac{1}{x}\right)\left(\underset{x→0}{lim}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}x\right)\right)$
 ${\mathrm{undefined}}$ (4)
 > $\mathrm{combine}\left(\left|{x}^{2}\right|\left|y+1\right|,\mathrm{abs}\right)$
 ${\left|{x}\right|}^{{2}}{}\left|{y}{+}{1}\right|$ (5)
 > $\mathrm{f1}≔\sqrt{3}\sqrt{2}+\sqrt{y}\sqrt{{x}^{2}-1}$
 ${\mathrm{f1}}{≔}\sqrt{{3}}{}\sqrt{{2}}{+}\sqrt{{y}}{}\sqrt{{{x}}^{{2}}{-}{1}}$ (6)
 > $\mathrm{combine}\left(\mathrm{f1},\mathrm{radical}\right)$
 $\sqrt{{6}}{+}\sqrt{{y}}{}\sqrt{{{x}}^{{2}}{-}{1}}$ (7)
 > $\mathrm{combine}\left(\mathrm{f1},\mathrm{radical},\mathrm{symbolic}\right)$
 $\sqrt{{6}}{+}\sqrt{{y}{}\left({{x}}^{{2}}{-}{1}\right)}$ (8)
 > $\mathrm{combine}\left(4{\mathrm{sin}\left(x\right)}^{3},\mathrm{trig}\right)$
 ${-}{\mathrm{sin}}{}\left({3}{}{x}\right){+}{3}{}{\mathrm{sin}}{}\left({x}\right)$ (9)
 > $\mathrm{combine}\left({\left({ⅇ}^{x}\right)}^{2}{ⅇ}^{y},\mathrm{exp}\right)$
 ${{ⅇ}}^{{2}{}{x}{+}{y}}$ (10)
 > $\mathrm{combine}\left({ⅇ}^{\mathrm{sin}\left(a\right)\mathrm{cos}\left(b\right)}{ⅇ}^{\mathrm{cos}\left(a\right)\mathrm{sin}\left(b\right)},\left[\mathrm{trig},\mathrm{exp}\right]\right)$
 ${{ⅇ}}^{{\mathrm{sin}}{}\left({a}{+}{b}\right)}$ (11)
 > $\mathrm{combine}\left(\left[2\mathrm{sin}\left(x\right)\mathrm{cos}\left(x\right),2{\mathrm{cos}\left(x\right)}^{2}-1\right],\mathrm{trig}\right)$
 $\left[{\mathrm{sin}}{}\left({2}{}{x}\right){,}{\mathrm{cos}}{}\left({2}{}{x}\right)\right]$ (12)
 > $\mathrm{assume}\left(0
 > $\mathrm{combine}\left(2\mathrm{ln}\left(y\right)-\mathrm{ln}\left(z\right),\mathrm{ln}\right)$
 ${\mathrm{ln}}{}\left(\frac{{{\mathrm{y~}}}^{{2}}}{{\mathrm{z~}}}\right)$ (13)
 > $\mathrm{combine}\left({\left({x}^{a}\right)}^{2},\mathrm{power}\right)$
 ${{x}}^{{2}{}{a}}$ (14)
 > $\mathrm{combine}\left(\mathrm{Ψ}\left(-x\right)+\mathrm{Ψ}\left(x\right),\mathrm{Ψ}\right)$
 ${2}{}{\mathrm{\Psi }}{}\left({x}\right){+}{\mathrm{cot}}{}\left({x}{}{\mathrm{\pi }}\right){}{\mathrm{\pi }}{+}\frac{{1}}{{x}}$ (15)

Compare the following examples. The extra arguments restrict the combining transformations.

 > $\mathrm{combine}\left(4{\mathrm{sin}\left(x\right)}^{3}+{ⅇ}^{y}{ⅇ}^{x}\right)$
 ${-}{\mathrm{sin}}{}\left({3}{}{x}\right){+}{3}{}{\mathrm{sin}}{}\left({x}\right){+}{{ⅇ}}^{{\mathrm{y~}}{+}{x}}$ (16)
 > $\mathrm{combine}\left(4{\mathrm{sin}\left(x\right)}^{3}+{ⅇ}^{y}{ⅇ}^{x},\mathrm{trig}\right)$
 ${-}{\mathrm{sin}}{}\left({3}{}{x}\right){+}{3}{}{\mathrm{sin}}{}\left({x}\right){+}{{ⅇ}}^{{\mathrm{y~}}}{}{{ⅇ}}^{{x}}$ (17)
 > $\mathrm{combine}\left(4{\mathrm{sin}\left(x\right)}^{3}+{ⅇ}^{y}{ⅇ}^{x},\mathrm{exp}\right)$
 ${4}{}{{\mathrm{sin}}{}\left({x}\right)}^{{3}}{+}{{ⅇ}}^{{\mathrm{y~}}{+}{x}}$ (18)
{"ft_lang_label":"__label__en","ft_lang_prob":0.6883915,"math_prob":1.000002,"size":3187,"snap":"2020-10-2020-16","text_gpt3_token_len":1123,"char_repetition_ratio":0.14891611,"word_repetition_ratio":0.0,"special_character_ratio":0.20897396,"punctuation_ratio":0.10682493,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9995192,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-02-17T05:39:46Z\",\"WARC-Record-ID\":\"<urn:uuid:2e9fb5e2-97d1-4fad-9356-162e94f6455f>\",\"Content-Length\":\"362838\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:cbd8e39d-ef29-464c-b4ce-3640fb38b8e3>\",\"WARC-Concurrent-To\":\"<urn:uuid:a8d10554-2f0d-47ae-9b2c-0cde6dddff8b>\",\"WARC-IP-Address\":\"199.71.183.28\",\"WARC-Target-URI\":\"https://www.maplesoft.com/support/help/Maple/view.aspx?path=combine\",\"WARC-Payload-Digest\":\"sha1:EHWC53AIKI6WYJ3TYKVKCDCQP77O4FEE\",\"WARC-Block-Digest\":\"sha1:3DI3LPOIESUC3LYOBFFZKWGACNU72IUY\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-10/CC-MAIN-2020-10_segments_1581875141653.66_warc_CC-MAIN-20200217030027-20200217060027-00007.warc.gz\"}"}