selectfun - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

# Online Help

###### All Products    Maple    MapleSim

selectfun

selects for a specified function

 Calling Sequence selectfun(e, f) selectfun(e, f, x)

Parameters

 e - expression f - name, or list or set of names; function name(s) x - (optional) name, or list or set of names; variable name(s)

Description

 • The selectfun command searches an expression e for the function with operator name f, or, if f is a list or set of names, then selectfun searches e for any one of these functions.
 • It returns a set consisting of all the matching subexpressions g of e such that either op(0,g)=f or member(op(0,g),f) according to whether f is a name or is a list or set of names.
 • If the optional third argument x is specified, the selectfun command requires the subexpressions g be function(s) f of x (or function(s) f of a member of x if x is a set or list).

Examples

 > $e≔\mathrm{sin}\left(x\right)+\mathrm{exp}\left(y\right)+1$
 ${e}{≔}{\mathrm{sin}}{}\left({x}\right){+}{{ⅇ}}^{{y}}{+}{1}$ (1)
 > $\mathrm{selectfun}\left(e,\mathrm{exp}\right)$
 $\left\{{{ⅇ}}^{{y}}\right\}$ (2)
 > $\mathrm{selectfun}\left(e,\mathrm{cos}\right)$
 ${\varnothing }$ (3)
 > $\mathrm{selectfun}\left(e,\mathrm{exp},y\right)$
 $\left\{{{ⅇ}}^{{y}}\right\}$ (4)
 > $\mathrm{selectfun}\left(e,\mathrm{exp},x\right)$
 ${\varnothing }$ (5)
 > $\mathrm{selectfun}\left(e,\mathrm{exp},\left[x,y\right]\right)$
 $\left\{{{ⅇ}}^{{y}}\right\}$ (6)
 > $\mathrm{selectfun}\left(e,\left\{\mathrm{cos},\mathrm{sin}\right\},x\right)$
 $\left\{{\mathrm{sin}}{}\left({x}\right)\right\}$ (7)

 See Also