
combine - combine terms of the same algebraic structure

Calling sequence:

combine(e [ , fn ])

Parameters:
e   --   expression
fn  --   optional name like sqrt, sincos

Summary:

The call combine(e) combines terms of the same algebraic structure.  The
function combine maps onto sets, lists and arrays, and also onto polynomials
and series where combine maps onto the coefficients.  For expressions of
type DOM_FUNC_ENV the function attribute combine will be called with the
operands of expr.

With a second argument, the function funcattr(combine,expr2text(fn))
is called. This enables the user to extend the function combine. The list of
possible options can be obtained with map([op(op(combine,3))],op,1).

>>  combine(sin(x)+x*y*x^E);

                                 E + 1
                       sin(x) + y x

>>  combine(sqrt(2)*sqrt(3),sqrt);

                               1/2
                              6

>>  combine(sin(a)*cos(b),sincos);

                    sin(a + b)   sin(- a + b )
                    ---------- - -------------
                        2            2

See also:  expand , factor , simplify

