find indeterminates of an expression - Maple Help

indets - find indeterminates of an expression

 Calling Sequence indets(expr) indets(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.

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}+{ⅇ}^{{z}^{2}}$
 ${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}}+{ⅇ}^{{x}^{2}}+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)$
 $\left\{{}\right\}$ (14)
 > $\mathrm{indets}\left(x,\mathrm{constant}\right)$
 $\left\{{}\right\}$ (15)