evala - Maple Help

verify/expand

verify the equality of two objects when expanded

verify/normal

verify the equality of two objects when normalized

verify/simplify

verify the equality of two objects when simplified

verify/evala

verify the equality of two objects in algebraic number fields

 Calling Sequence verify(expr1, expr2, expand) verify(expr1, expr2, 'expand'(opt1, opt2, ...)) verify(expr1, expr2, normal) verify(expr1, expr2, 'normal'(expanded)) verify(expr1, expr2, simplify) verify(expr1, expr2, 'simplify'(opt1, opt2, ...)) verify(expr1, expr2, evala) verify(expr1, expr2, 'evala'(opt1, opt2, ...))

Parameters

 expr1, expr2 - anything, assumed to be of type algebraic opt1, opt2, ... - optional parameters passed to expand or simplify or evala

Description

 • The verify(expr1, expr2, expand), verify(expr1, expr2, normal), verify(expr1, expr2, simplify), and verify(expr1, expr2, evala) calling sequences return true if the difference between the arguments expr1 and expr2 is zero after having applied the procedures expand, normal, simplify, and evala, respectively.
 • Any optional parameters are passed on as subsequent arguments to the appropriate procedures.
 • These verifications are symmetric.
 • Because expand, normal, simplify, and evala are Maple procedures, they must be enclosed in single quotes to prevent evaluation.
 • If expr1 and expr2 are of type relation, the verification is applied to each side of the relation.
 • If expr1 and expr2 are lists, the verification is applied element-wise.  If the lists have differing lengths, then false is returned.
 • If either expr1 or expr2 is not of type algebraic, relation, or list, then false is returned.

Examples

 > $a≔\mathrm{Array}\left(1..3,\left[1,2,{\left(x-1\right)}^{2}\right]\right)$
 ${a}{≔}\left[\begin{array}{ccc}{1}& {2}& {\left({x}{-}{1}\right)}^{{2}}\end{array}\right]$ (1)
 > $b≔\mathrm{Array}\left(1..3,\left[1,2,{x}^{2}-2x+1\right]\right)$
 ${b}{≔}\left[\begin{array}{ccc}{1}& {2}& {{x}}^{{2}}{-}{2}{}{x}{+}{1}\end{array}\right]$ (2)
 > $\mathrm{verify}\left(a,b,'\mathrm{Array}'\right)$
 ${\mathrm{false}}$ (3)
 > $\mathrm{verify}\left(a,b,'\mathrm{Array}'\left('\mathrm{expand}'\right)\right)$
 ${\mathrm{true}}$ (4)
 > $\mathrm{verify}\left(\frac{{f\left(x\right)}^{2}-1}{f\left(x\right)-1},f\left(x\right)+1\right)$
 ${\mathrm{false}}$ (5)
 > $\mathrm{verify}\left(\frac{{f\left(x\right)}^{2}-1}{f\left(x\right)-1},f\left(x\right)+1,'\mathrm{normal}'\right)$
 ${\mathrm{true}}$ (6)
 > $\mathrm{verify}\left(\frac{1}{x}+\frac{x}{x+1},\frac{x+1+{x}^{2}}{{x}^{2}+x},'\mathrm{expand}'\right)$
 ${\mathrm{false}}$ (7)
 > $\mathrm{verify}\left(\frac{1}{x}+\frac{x}{x+1},\frac{x+1+{x}^{2}}{{x}^{2}+x},'\mathrm{normal}'\right)$
 ${\mathrm{true}}$ (8)
 > $\mathrm{verify}\left(\left[a,{4}^{\frac{1}{2}}+3\right],\left[a,5\right],'\mathrm{list}'\right)$
 ${\mathrm{false}}$ (9)
 > $\mathrm{verify}\left(\left[a,{4}^{\frac{1}{2}}+3\right],\left[a,5\right],'\mathrm{list}'\left('\mathrm{normal}'\right)\right)$
 ${\mathrm{false}}$ (10)
 > $\mathrm{verify}\left(\left[a,{4}^{\frac{1}{2}}+3\right],\left[a,5\right],'\mathrm{list}'\left('\mathrm{simplify}'\right)\right)$
 ${\mathrm{false}}$ (11)
 > $\mathrm{verify}\left(\left[a,{4}^{\frac{1}{2}}+3\right],\left[a,5\right],'\mathrm{simplify}'\right)$
 ${\mathrm{false}}$ (12)
 > $\mathrm{verify}\left(\mathrm{abs}\left(x\right),\mathrm{sqrt}\left({x}^{2}\right),'\mathrm{simplify}'\right)$
 ${\mathrm{false}}$ (13)
 > $\mathrm{verify}\left(\mathrm{abs}\left(x\right),\mathrm{sqrt}\left({x}^{2}\right),'\mathrm{simplify}'\left('\mathrm{assume}'='\mathrm{real}'\right)\right)$
 ${\mathrm{true}}$ (14)
 > $\mathrm{verify}\left(R=1-{\mathrm{cos}\left(x\right)}^{2},R={\mathrm{sin}\left(x\right)}^{2},'\mathrm{simplify}'\right)$
 ${\mathrm{true}}$ (15)
 > $\mathrm{r1}≔\mathrm{RootOf}\left(4{\mathrm{_Z}}^{3}-8{\mathrm{_Z}}^{2}-7\mathrm{_Z}+3,\mathrm{index}=2\right)$
 ${\mathrm{r1}}{≔}{\mathrm{RootOf}}{}\left({4}{}{{\mathrm{_Z}}}^{{3}}{-}{8}{}{{\mathrm{_Z}}}^{{2}}{-}{7}{}{\mathrm{_Z}}{+}{3}{,}{\mathrm{index}}{=}{2}\right)$ (16)
 > $\mathrm{r2}≔\mathrm{RootOf}\left(4{\mathrm{_Z}}^{3}-8{\mathrm{_Z}}^{2}-7\mathrm{_Z}+3,2.562..2.57\right)$
 ${\mathrm{r2}}{≔}{\mathrm{RootOf}}{}\left({4}{}{{\mathrm{_Z}}}^{{3}}{-}{8}{}{{\mathrm{_Z}}}^{{2}}{-}{7}{}{\mathrm{_Z}}{+}{3}{,}{2.562}{..}{2.57}\right)$ (17)
 > $\mathrm{verify}\left(\mathrm{r1},\mathrm{r2},'\mathrm{evala}'\right)$
 ${\mathrm{true}}$ (18)