LREtools - Maple Programming Help

Home : Support : Online Help : Mathematics : Factorization and Solving Equations : LREtools : LREtools/shift

LREtools

 shift
 integer shift of an expression
 delta
 single or iterated differencing of an expression

 Calling Sequence shift(e, var) shift(e, var, i) delta(e, var) delta(e, var, n)

Parameters

 e - expression var - variable name i - (optional) integer n - (optional) positive integer

Description

 • shift returns the expression equivalent to $\mathrm{subs}\left(\mathrm{var}=\mathrm{var}+i,e\right)$, where i is assumed to be 1 in the two argument case.
 • This procedure knows about various Maple constructs, like diff, where the variable must not be simply substituted.  Currently shift knows about diff, Diff, int, Int, sum, Sum, product, and Product.
 • Additional constructs can be added by the user.  If the procedure LREtools/shift/f is defined then the function call LREtools[shift](f(n,x), n, 3) will invoke LREtools/shift/f(f(n,x), n, 3) to compute the shift.
 • delta(e, var) is defined to be shift(e, var, 1)-e and delta(e, var, n) is defined to be delta(shift(e, var, 1)-e, var, n-1).  Thus differencing is also user-extensible by providing the extension for shift.

Examples

 > $\mathrm{with}\left(\mathrm{LREtools}\right):$
 > $\mathrm{shift}\left({x}^{5},x\right)$
 ${\left({x}{+}{1}\right)}^{{5}}$ (1)
 > $\mathrm{shift}\left({x}^{5},x,3\right)$
 ${\left({x}{+}{3}\right)}^{{5}}$ (2)
 > $\mathrm{shift}\left(f\left(x\right),x,-2\right)$
 ${f}{}\left({x}{-}{2}\right)$ (3)
 > $\mathrm{shift}\left(\frac{ⅆ}{ⅆx}f\left(x\right),x\right)$
 ${\mathrm{D}}{}\left({f}\right){}\left({x}{+}{1}\right)$ (4)
 > $\mathrm{δ}\left(\mathrm{sin}\left(n\right),n\right)$
 ${\mathrm{sin}}{}\left({n}{+}{1}\right){-}{\mathrm{sin}}{}\left({n}\right)$ (5)
 > $\mathrm{δ}\left(\mathrm{cos}\left(n\right),n,2\right)$
 ${\mathrm{cos}}{}\left({n}{+}{2}\right){-}{2}{}{\mathrm{cos}}{}\left({n}{+}{1}\right){+}{\mathrm{cos}}{}\left({n}\right)$ (6)
 > $\mathrm{δ}\left({\prod }_{x}\phantom{\rule[-0.0ex]{5.0px}{0.0ex}}g\left(x\right),x\right)$
 ${\prod }_{{x}}\phantom{\rule[-0.0ex]{5.0px}{0.0ex}}{g}{}\left({x}{+}{1}\right){-}{\prod }_{{x}}\phantom{\rule[-0.0ex]{5.0px}{0.0ex}}{g}{}\left({x}\right)$ (7)