 indets - Maple Help

indets

find indeterminates of an expression Calling Sequence indets(expr) indets(expr, typename) indets[flat](expr) indets[flat](expr, typename) Parameters

 expr - any expression typename - (optional) the name of a type Description

 • The command indets with only one argument returns a set containing all the indeterminates of expr.
 • The argument expr is viewed as a rational expression (an expression formed by applying only the operations +, -, *, / to its subexpressions). Therefore, expressions such as $\mathrm{sin}\left(x\right)$, $f\left(x,y\right)$, and $\sqrt{x}$ are treated as indeterminates.
 • Expressions of type constant, such as sin(1), $f\left(3,5\right)$, and $\sqrt{2}$, are not considered to be indeterminates in the single-argument case.
 • If a second argument typename is specified then the value returned is a set containing all subexpressions in expr which are of type typename, including subexpressions which may not have been considered to be indeterminates in the single-argument case.
 • If the flat option is supplied as an index to the indets command, then Maple will not recursively look inside any subexpressions of the given typename for further (nested) subexpressions of that type. Examples

 > $\mathrm{indets}\left(xy+\frac{z}{x}\right)$
 $\left\{{x}{,}{y}{,}{z}\right\}$ (1)
 > $\mathrm{indets}\left(3{x}^{2}-5xy+6-{y}^{2}\right)$
 $\left\{{x}{,}{y}\right\}$ (2)
 > $a≔5x-3\mathrm{sin}\left(y\right)+x{y}^{4}+\mathrm{exp}\left({z}^{2}\right)$
 ${a}{≔}{5}{}{x}{-}{3}{}{\mathrm{sin}}{}\left({y}\right){+}{x}{}{{y}}^{{4}}{+}{{ⅇ}}^{{{z}}^{{2}}}$ (3)
 > $\mathrm{indets}\left(a\right)$
 $\left\{{x}{,}{y}{,}{z}{,}{{ⅇ}}^{{{z}}^{{2}}}{,}{\mathrm{sin}}{}\left({y}\right)\right\}$ (4)
 > $\mathrm{indets}\left(a,\mathrm{function}\right)$
 $\left\{{{ⅇ}}^{{{z}}^{{2}}}{,}{\mathrm{sin}}{}\left({y}\right)\right\}$ (5)
 > $\mathrm{indets}\left(a,\mathrm{constant}\right)$
 $\left\{{-3}{,}{2}{,}{4}{,}{5}\right\}$ (6)
 > $\mathrm{indets}\left(a,\mathrm{trig}\right)$
 $\left\{{\mathrm{sin}}{}\left({y}\right)\right\}$ (7)
 > $\mathrm{indets}\left(a,\mathrm{name}\right)$
 $\left\{{x}{,}{y}{,}{z}\right\}$ (8)
 > $\mathrm{indets}\left(a,\mathrm{atomic}\right)$
 $\left\{{-3}{,}{2}{,}{4}{,}{5}{,}{x}{,}{y}{,}{z}\right\}$ (9)
 > $e≔{x}^{\frac{1}{2}}+\mathrm{exp}\left({x}^{2}\right)+f\left(9\right):$
 > $\mathrm{indets}\left(e\right)$
 $\left\{{x}{,}\sqrt{{x}}{,}{{ⅇ}}^{{{x}}^{{2}}}\right\}$ (10)
 > $\mathrm{indets}\left(e,\mathrm{constant}\right)$
 $\left\{{2}{,}{9}{,}\frac{{1}}{{2}}{,}{f}{}\left({9}\right)\right\}$ (11)
 > $\mathrm{indets}\left(e,\mathrm{function}\right)$
 $\left\{{{ⅇ}}^{{{x}}^{{2}}}{,}{f}{}\left({9}\right)\right\}$ (12)

Efficiently selecting all occurrences of functions f and g from an expression:

 > $\mathrm{indets}\left(e,'\mathrm{specfunc}\left(\mathrm{anything},\left\{f,g\right\}\right)'\right)$
 $\left\{{f}{}\left({9}\right)\right\}$ (13)

When there are no occurrences of the specified type, an empty set is returned:

 > $\mathrm{indets}\left(262\right)$
 ${\varnothing }$ (14)
 > $\mathrm{indets}\left(x,\mathrm{constant}\right)$
 ${\varnothing }$ (15)

If the flat option is supplied as an index to indets, Maple will stop recursion into an expression once a matching subexpression has been found.

 > $\mathrm{indets}\left(\mathrm{sin}\left(x\right)\right)$
 $\left\{{x}{,}{\mathrm{sin}}{}\left({x}\right)\right\}$ (16)
 > $\mathrm{indets}\left[\mathrm{flat}\right]\left(\mathrm{sin}\left(x\right)\right)$
 $\left\{{\mathrm{sin}}{}\left({x}\right)\right\}$ (17)
 > $\mathrm{indets}\left[\mathrm{flat}\right]\left(\left[f\left(g\left(\left[x\right]\right)\right)\right],\mathrm{function}\right)$
 $\left\{{f}{}\left({g}{}\left(\left[{x}\right]\right)\right)\right\}$ (18)
 > $\mathrm{indets}\left[\mathrm{flat}\right]\left(\left[f\left(g\left(\left[x\right]\right)\right)\right],\mathrm{list}\right)$
 $\left\{\left[{f}{}\left({g}{}\left(\left[{x}\right]\right)\right)\right]\right\}$ (19) Compatibility

 • The indets command was updated in Maple 2016.
 • The flat option was introduced in Maple 2016.
 • For more information on Maple 2016 changes, see Updates in Maple 2016.