|\^/| Maple V Release 3 (SUNY at Albany) ._|\| |/|_. Copyright (c) 1981-1994 by Waterloo Maple Software and the \ MAPLE / University of Waterloo. All rights reserved. Maple and Maple V <____ ____> are registered trademarks of Waterloo Maple Software. | Type ? for help. Warning: new definition for norm Warning: new definition for trace > f := x -> (2*x^4-2*x^2+x+5) / (x^2-3*x-5); f := x -> (2*x^4-2*x^2+x+5) / (x^2-3*x-5); 4 2 2 x - 2 x + x + 5 f := x -> ------------------- 2 x - 3 x - 5 > > g := x -> (xf := x -> (2*xf := x -> (2*x^2+x+5) / (xf := x -> (2*x^4-2*x^2-3*x-5); 2-3*x-5); 5 4 x - x g := x -> ------------------------------------ 5 4 3 2 x - 6 x + 5 x + 26 x - 48 x + 18 > F := x -> (1-x)^(1/3) / (1+x^2); F := x -> (1-x)^(1/3) / (1+x^2); 1/3 (1 - x) F := x -> ---------- 2 1 + x >interface(plotdevice=x11); interface(plotdevice=x11); > plot(x,x); plot(x,x); > plot(f); plot(f); > factor(denom(f(x))); factor(denom(f(x))); 2 x - 3 x - 5 > sove(denom(f(x))=0); sove(denom(f(x))=0); 2 sove(x - 3 x - 5 = 0) > solve(denom(f(x))=0); solve(denom(f(x))=0); 1/2 1/2 3/2 + 1/2 29 , 3/2 - 1/2 29 > fsolve(denom(f(x))=0); fsolve(denom(f(x))=0); -1.192582404, 4.192582404 > x0 := ""[2]; x0 := ""[2]; 1/2 x0 := 3/2 - 1/2 29 > x1 := """[1]; x1 := """[1]; 1/2 x1 := 3/2 + 1/2 29 > limit(f(x), x=x1); limit(f(x), x=x1); bytes used=1168548, alloc=851812, time=2.07 undefined > limit(f(x),x=x1,left); limit(f(x),x=x1,left); - infinity > limit(f(x),x=x0); limit(f(x),x=x0); undefined > limit(f(x),x=x0,left); limit(f(x),x=x0,left); infinity > evalf(x0); evalf(x0); -1.192582404 > plot(f(x), x=-2..0); plot(f(x), x=-2..0); > plot(f(x), x=-1.5..-1); plot(f(x), x=-1.5..-1); > sn := solve(numer(f(x))=0); sn := solve(numer(f(x))=0); 4 2 sn := RootOf(2 _Z - 2 _Z + _Z + 5) > fsolve(sn); fsolve(sn); > evalf(sn); evalf(sn); - 1.021241745 - .6484864618 I > sn := fsolve(numer(f(x))=0); sn := fsolve(numer(f(x))=0); sn := > sn; sn; > sn := fsolve(numer(f(x))=0); sn := fsolve(numer(f(x))=0); sn := > sn; sn; > numer(f(x)); numer(f(x)); 4 2 2 x - 2 x + x + 5 > fsolve("=0,x); fsolve("=0,x); > solve(""); solve(""); Error, (in solve) invalid arguments > solve(numer(f(x))=0); solve(numer(f(x))=0); 4 2 RootOf(2 _Z - 2 _Z + _Z + 5) > ?RootOf ?RootOf FUNCTION: RootOf - A Representation for Roots of Equations CALLING SEQUENCE: RootOf(expr) RootOf(expr, x) PARAMETERS: expr - an algebraic expression or equation x - a variable name SYNOPSIS: - The function RootOf is a place holder for representing all the roots of an equation in one variable. In particular, it is the standard representation for Maple's algebraic numbers, algebraic functions, and finite fields GF(p^k), p prime, k > 1. - Maple automatically generates RootOfs to express the solutions to polynomial equations and systems of equations, eigenvalues, and rational function integrals. Maple knows how to apply diff, series, evalf, and simplify to RootOf expressions. The alias function is often used with RootOfs to obtain a more compact notation.  - If x is not specified, then expr must be either a univariate expression or an expression in _Z. In this case, the RootOf represents the roots of expr with respect to its single variable or _Z, respectively. If the first argument is not an equation, then the equation expr = 0 is assumed. - The RootOf function checks the validity of its arguments, and solves it for polynomials of degree one. The RootOf is expressed in a single-argument canonical form, obtained by making the argument primitive and expressing the RootOf in terms of the global variable _Z. - If expr is an irreducible polynomial over a field F then alpha = RootOf(expr) represents an algebraic extension field K over F of degree degree(expr, x) where elements of K are represented as polynomials in alpha. - Evaluation in the context of evala uses the RootOf notation for the represen- tation of algebraic numbers and algebraic functions. - Evaluation in the context of the mod operator uses the RootOf notation for the representation of finite fields. The elements of the finite field GF(p^k) are represented as polynomials in RootOf(expr) where expr is an irreducible polynomial of degree k mod p (i.e. an algebraic extension over  the integers mod p).  - RootOfs are not restricted to algebraic extensions. They can be used to represent the solutions of transcendental equations, for example RootOf(cos(x)=x, x). EXAMPLES: > RootOf(x^2+1=0); 2 RootOf(_Z + 1) > RootOf(x^2-a*x=b, x); 2 RootOf(_Z - a _Z - b) > RootOf(a*b^2+a/b, b); 3 RootOf(_Z + 1) > RootOf(a*x+b, x); - b/a > RootOf(x^3-1, x) mod 7;  3  RootOf(_Z + 6) RootOf(x^2-2*x+1, x) mod 5; 1 > alias(alpha = RootOf(x^2+x+1)): > Normal(1/alpha) mod 2; alpha + 1 SEE ALSO: convert[RootOf], alias, evala, mod, allvalues, Roots, algnum, solve, type[RootOf], inifcns bytes used=2168728, alloc=1376004, time=4.92 > > ?allvalues ?allvalues FUNCTION: allvalues - evaluate all possible values of expressions involving RootOfs CALLING SEQUENCE: allvalues(expr) allvalues(expr, 'd') PARAMETERS: expr - any expression, table, list, or set of expressions 'd' - the character 'd' SYNOPSIS: - The most common application of allvalues is to evaluate expressions returned from solve involving RootOfs. - Typically, a RootOf represents more than one value. Thus, expressions involv- ing RootOfs will generally evaluate to more than one value or expression. The procedure allvalues will return, in an expression sequence, all such values (or expressions) generated by the combinations of different values of the RootOfs.  - The procedure allvalues will attempt to evaluate expressions exactly using solve. The roots of nth degree polynomial equations where n <= 4 can be obtained exactly. Where roots cannot be obtained exactly, allvalues will use fsolve to obtain a numerical solution. In this case, no symbolic constants can be used in the particular RootOf argument. - The procedure allvalues will recognize &RootOf as an inert RootOf operator. It will be treated in exactly the same manner as RootOf. - The optional second parameter 'd' is used to specify that RootOfs of the same equation represent the same value and they should not be evaluated indepen- dently of one another. - Nested RootOfs are supported by allvalues. EXAMPLES: > expr := RootOf(_Z^2-1) + 1/RootOf(_Z^4-1)^2; 2 1 expr := RootOf(_Z - 1) + ---------------- 4 2 RootOf(_Z - 1)  > allvalues(expr); q > > sn := solve(numer(f(x))=0); sn := solve(numer(f(x))=0); 4 2 sn := RootOf(2 _Z - 2 _Z + _Z + 5) > allvalues(sn); allvalues(sn); - 1.021241745 - .6484864618 I, - 1.021241745 + .6484864618 I, 1.021241745 - .8156805205 I, 1.021241745 + .8156805205 I >