MTM - Maple Help

Home : Support : Online Help : Connectivity : MTM Package : MTM/collect

MTM

 collect
 collect coefficients

 Calling Sequence collect(A, v)

Parameters

 A - polynomial, Array of polynomials v - (optional) expression

Description

 • For polynomial A, the function collect(A,v) will return a polynomial equal to A, but with coefficients of like powers of v collected.
 • If the parameter v is omitted, then v is taken to be the default symbol given by findsym(A,1).
 • If A is an array, then collect(A,v) will return an array M with the same dimensions of A. For each element a of A, the corresponding element in M will have the value collect(a,v).

Examples

 > $\mathrm{with}\left(\mathrm{MTM}\right):$
 > $f≔a\mathrm{ln}\left(x\right)-\mathrm{ln}\left(x\right)x-x$
 ${f}{:=}{a}{}{\mathrm{ln}}{}\left({x}\right){-}{\mathrm{ln}}{}\left({x}\right){}{x}{-}{x}$ (1)
 > $\mathrm{collect}\left(f,\mathrm{ln}\left(x\right)\right)$
 $\left({a}{-}{x}\right){}{\mathrm{ln}}{}\left({x}\right){-}{x}$ (2)
 > $\mathrm{with}\left(\mathrm{MTM}\right):$
 > $g≔∫{x}^{2}\left({ⅇ}^{x}+{ⅇ}^{-x}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}ⅆx$
 ${g}{:=}{{x}}^{{2}}{}{{ⅇ}}^{{x}}{-}{2}{}{x}{}{{ⅇ}}^{{x}}{+}{2}{}{{ⅇ}}^{{x}}{-}\frac{{{x}}^{{2}}}{{{ⅇ}}^{{x}}}{-}\frac{{2}{}{x}}{{{ⅇ}}^{{x}}}{-}\frac{{2}}{{{ⅇ}}^{{x}}}$ (3)
 > $h≔∫{x}^{3}\left({ⅇ}^{x}+{ⅇ}^{-x}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}ⅆx$
 ${h}{:=}{{x}}^{{3}}{}{{ⅇ}}^{{x}}{-}{3}{}{{x}}^{{2}}{}{{ⅇ}}^{{x}}{+}{6}{}{x}{}{{ⅇ}}^{{x}}{-}{6}{}{{ⅇ}}^{{x}}{-}\frac{{{x}}^{{3}}}{{{ⅇ}}^{{x}}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