combine/range - Maple Programming Help

Home : Support : Online Help : Mathematics : Algebra : Expression Manipulation : Combining : combine/range

combine/range

combine ranges

 Calling Sequence combine(e, 'range')

Parameters

 e - any expression

Description

 • Expressions involving calls to an operator F of two arguments, the second of which is of the form name = range, in which the range is either a discrete or continuous range, are combined by applying the transformations:

$F\left(f\left(x\right),x=a\mathrm{..}b\right)+F\left(g\left(x\right),x=c\mathrm{..}d\right)\to F\left(f\left(x\right),x=a\mathrm{..}d\right)$

 whenever the operator F, first arguments $f\left(x\right)$ and $g\left(x\right)$, and ranges $a..b$ and $c..d$ satisfy one of the following conditions.
 • $F=\mathrm{Int}$ or $F=\mathrm{int},c=b$, and $f\left(x\right)=g\left(x\right)$
 • $F=\mathrm{Int}$ or $F=\mathrm{int},c=a$, and $f\left(x\right)=-g\left(x\right)$
 • $F=\mathrm{Int}$ or $F=\mathrm{int},b=d$, and $f\left(x\right)=-g\left(x\right)$
 • $F=\mathrm{Sum}$ or $F=\mathrm{sum},c=1+b$, and $f\left(x\right)=g\left(x\right)$
 • $F=\mathrm{Sum}$ or $F=\mathrm{sum},c=a$ and $b and $f\left(x\right)=-g\left(x\right)$
 • For the results of combine/range to be valid, the operator F must be a function of two arguments, the second of which has the form name = range and is additive over ranges.
 • Knowledge of the summation and integral operators is supported in the library. You can add to the knowledge of which operators can be manipulated by combine/range  by assigning to one of the environment variables _EnvRangeCombinableContinuous or _EnvRangeCombinableDiscrete. Each should be a set of names of operators F. Operators in the set _EnvRangeCombinableDiscrete are combined in the same way as Sum, while those in _EnvRangeCombinableContinuous are combined like integrals. The environment variable _EnvRangeCombinable is used internally and should not be modified directly by users.
 • By calling the procedure combine/range directly, you can set the values of combinable operators for a single call by passing an extra (second) argument in the form of a list of two sets. The first member of the list is the set of operators that can be combined using continuous ranges (Int-like), and the second member of the list should be a set of the names of Sum-like operators whose ranges are to be treated as discrete.
 • The power of combine/range is controlled by the values of the environment variables Testzero and Normalizer. These are used to detect matching range endpoints and matching first arguments. Resetting Testzero gives you local control over the combining power of this procedure.

Examples

 > ${{∫}}_{a}^{b}f\left(x\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}x+{{∫}}_{a}^{c}\left(-f\left(x\right)\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}x$
 ${{∫}}_{{a}}^{{b}}{f}{}\left({x}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}{+}{{∫}}_{{a}}^{{c}}\left({-}{f}{}\left({x}\right)\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}$ (1)
 > $=\mathrm{combine}\left(,'\mathrm{range}'\right)$
 ${{∫}}_{{a}}^{{b}}{f}{}\left({x}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}{+}{{∫}}_{{a}}^{{c}}\left({-}{f}{}\left({x}\right)\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}{=}{{∫}}_{{b}}^{{c}}\left({-}{f}{}\left({x}\right)\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}$ (2)
 > ${\sum }_{j=a}^{b}\phantom{\rule[-0.0ex]{5.0px}{0.0ex}}f\left(j\right)+{\sum }_{j=b+1}^{d}\phantom{\rule[-0.0ex]{5.0px}{0.0ex}}f\left(j\right)$
 ${\sum }_{{j}{=}{a}}^{{b}}\phantom{\rule[-0.0ex]{5.0px}{0.0ex}}{f}{}\left({j}\right){+}{\sum }_{{j}{=}{1}{+}{b}}^{{d}}\phantom{\rule[-0.0ex]{5.0px}{0.0ex}}{f}{}\left({j}\right)$ (3)
 > $=\mathrm{combine}\left(,'\mathrm{range}'\right)$
 ${\sum }_{{j}{=}{a}}^{{b}}\phantom{\rule[-0.0ex]{5.0px}{0.0ex}}{f}{}\left({j}\right){+}{\sum }_{{j}{=}{1}{+}{b}}^{{d}}\phantom{\rule[-0.0ex]{5.0px}{0.0ex}}{f}{}\left({j}\right){=}{\sum }_{{j}{=}{a}}^{{d}}\phantom{\rule[-0.0ex]{5.0px}{0.0ex}}{f}{}\left({j}\right)$ (4)

combine/range is sensitive to assumptions:

 > ${\sum }_{j=a}^{b}\phantom{\rule[-0.0ex]{5.0px}{0.0ex}}f\left(j\right)+{\sum }_{j=a}^{d}\phantom{\rule[-0.0ex]{5.0px}{0.0ex}}\left(-f\left(j\right)\right)$
 ${\sum }_{{j}{=}{a}}^{{b}}\phantom{\rule[-0.0ex]{5.0px}{0.0ex}}{f}{}\left({j}\right){+}{\sum }_{{j}{=}{a}}^{{d}}\phantom{\rule[-0.0ex]{5.0px}{0.0ex}}\left({-}{f}{}\left({j}\right)\right)$ (5)
 > $=\mathrm{combine}\left(,'\mathrm{range}'\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}assuming\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}b
 ${\sum }_{{j}{=}{a}}^{{b}}\phantom{\rule[-0.0ex]{5.0px}{0.0ex}}{f}{}\left({j}\right){+}{\sum }_{{j}{=}{a}}^{{d}}\phantom{\rule[-0.0ex]{5.0px}{0.0ex}}\left({-}{f}{}\left({j}\right)\right){=}{\sum }_{{j}{=}{1}{+}{b}}^{{d}}\phantom{\rule[-0.0ex]{5.0px}{0.0ex}}\left({-}{f}{}\left({j}\right)\right)$ (6)
 > $G\left(f\left(x\right),x=a..b\right)+G\left(f\left(x\right),x=b..c\right)$
 ${G}{}\left({f}{}\left({x}\right){,}{x}{=}{a}{..}{b}\right){+}{G}{}\left({f}{}\left({x}\right){,}{x}{=}{b}{..}{c}\right)$ (7)
 > $=\mathrm{combine}\left(,'\mathrm{range}',\left[\left\{'G'\right\},\left\{\right\}\right]\right)$
 ${G}{}\left({f}{}\left({x}\right){,}{x}{=}{a}{..}{b}\right){+}{G}{}\left({f}{}\left({x}\right){,}{x}{=}{b}{..}{c}\right){=}{G}{}\left({f}{}\left({x}\right){,}{x}{=}{a}{..}{c}\right)$ (8)