Eval - Maple Programming Help

Eval

evaluate an expression

Calling Sequence

 Eval(a, x=n) $\genfrac{}{}{0}{}{a}{\phantom{x=n}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{|}\phantom{\rule[-0.0ex]{0.1em}{0.0ex}}\genfrac{}{}{0}{}{\phantom{a}}{x=n}$ Eval(a, x1=n1, x2=n2, ...) $\genfrac{}{}{0}{}{a}{\phantom{{x}_{1}={n}_{1},{x}_{2}={n}_{2}}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{|}\phantom{\rule[-0.0ex]{0.1em}{0.0ex}}\genfrac{}{}{0}{}{\phantom{a}}{{x}_{1}={n}_{1},{x}_{2}={n}_{2}}$

Parameters

 a - expression x, x1, x2, ... - names n, n1, n2, ... - evaluation points

Description

 • The Eval function is a placeholder for evaluation at a point. The expression a is evaluated at x=n (x1=n1, x2=n2, ... for the multivariate case).
 • To perform an evaluation of an expression or a polynomial over the rational numbers, use the eval command.
 • You can enter the command Eval using either the 1-D or 2-D calling sequence. For example, Eval(x^7 + x + 1, x=1) is equivalent to $\genfrac{}{}{0}{}{\left({x}^{7}+x+1\right)}{\phantom{x=1}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{|}\phantom{\rule[-0.0ex]{0.1em}{0.0ex}}\genfrac{}{}{0}{}{\phantom{\left({x}^{7}+x+1\right)}}{x=1}$.
 • The call Eval(a, x=n) mod p evaluates the polynomial a at x=n modulo p. The polynomial a must be a multivariate polynomial over a finite field. For this calling sequence, a can also be a Matrix or Vector of polynomials.
 • The call modp1(Eval(a, n), p) evaluates the polynomial a at x=n modulo p where a must be a univariate polynomial in the modp1 representation, with n an integer and p an integer > 1.

Examples

 > $\genfrac{}{}{0}{}{\left({x}^{7}+x+1\right)}{\phantom{x=1}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{|}\phantom{\rule[-0.0ex]{0.1em}{0.0ex}}\genfrac{}{}{0}{}{\phantom{\left({x}^{7}+x+1\right)}}{x=1}$
 $\genfrac{}{}{0}{}{\left({{x}}^{{7}}{+}{x}{+}{1}\right)}{\phantom{{x}{=}{1}}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{|}\phantom{\rule[-0.0ex]{0.1em}{0.0ex}}\genfrac{}{}{0}{}{\phantom{\left({{x}}^{{7}}{+}{x}{+}{1}\right)}}{{x}{=}{1}}$ (1)
 > $\mathrm{value}\left(\right)$
 ${3}$ (2)
 > $\genfrac{}{}{0}{}{\left({x}^{2}+y\right)}{\phantom{x=3,y=2}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{|}\phantom{\rule[-0.0ex]{0.1em}{0.0ex}}\genfrac{}{}{0}{}{\phantom{\left({x}^{2}+y\right)}}{x=3,y=2}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathbf{mod}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}5$
 ${1}$ (3)
 > $\mathrm{alias}\left(\mathrm{α}=\mathrm{RootOf}\left({x}^{4}+x+1\right)\right):$
 > $a≔{x}^{4}+\mathrm{α}{x}^{2}+1$
 ${a}{≔}{{x}}^{{4}}{+}{\mathrm{α}}{}{{x}}^{{2}}{+}{1}$ (4)
 > $\genfrac{}{}{0}{}{a}{\phantom{x=\mathrm{α}}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{|}\phantom{\rule[-0.0ex]{0.1em}{0.0ex}}\genfrac{}{}{0}{}{\phantom{a}}{x=\mathrm{α}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathbf{mod}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}5$
 ${{\mathrm{α}}}^{{3}}{+}{4}{}{\mathrm{α}}$ (5)
 > $\genfrac{}{}{0}{}{∫f\left(x\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}ⅆx}{\phantom{x=y}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{|}\phantom{\rule[-0.0ex]{0.1em}{0.0ex}}\genfrac{}{}{0}{}{\phantom{∫f\left(x\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}ⅆx}}{x=y}$
 $\genfrac{}{}{0}{}{{∫}{f}{}\left({x}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}}{\phantom{{x}{=}{y}}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{|}\phantom{\rule[-0.0ex]{0.1em}{0.0ex}}\genfrac{}{}{0}{}{\phantom{{∫}{f}{}\left({x}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}}}{{x}{=}{y}}$ (6)
 > $\genfrac{}{}{0}{}{\mathrm{Matrix}\left(\left[\left[{x}^{2}+y\right]\right]\right)}{\phantom{x=3,y=2}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{|}\phantom{\rule[-0.0ex]{0.1em}{0.0ex}}\genfrac{}{}{0}{}{\phantom{\mathrm{Matrix}\left(\left[\left[{x}^{2}+y\right]\right]\right)}}{x=3,y=2}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathbf{mod}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}5$
 $\left[\begin{array}{r}{1}\end{array}\right]$ (7)
 >