SAMPLE MAPLE SESSION FOR MANIPULATING DICTIONARIES Note: ">" indicates line typed by the user to maple willy% maple |\^/| MAPLE V ._|\| |/|_. Copyright (c) 1981-1990 by the University of Waterloo. \ MAPLE / All rights reserved. MAPLE is a registered trademark of <____ ____> Waterloo Maple Software. | Type ? for help. > dic := { x4=5-x1-2*x2-3*x3 , > x5=3- x1-x2-2*x3 , > z= 5*x1 + 6*x2 + 9*x3}; dic := {x4 = 5 - x1 - 2 x2 - 3 x3, x5 = 3 - x1 - x2 - 2 x3, z = 5 x1 + 6 x2 + 9 x3} > dic1:=solve(dic,{z,x1,x4}); dic1 := {x1 = - x5 + 3 - x2 - 2 x3, x4 = - x3 + 2 + x5 - x2, z = - 5 x5 + 15 + x2 - x3} > dic2:=solve(dic1,{z,x1,x2}); dic2 := { x2 = - x4 - x3 + 2 + x5, z = - 2 x3 - 4 x5 + 17 - x4, x1 = - 2 x5 + 1 + x4 - x3 } > ?help FUNCTION: help - descriptions of syntax, datatypes, and functions CALLING SEQUENCE: ?topic or ?topic,subtopic or ?topic[subtopic] or help(topic); or help(topic,subtopic); or help(topic[subtopic]); SYNOPSIS: ?intro introduction to Maple ?library Maple library functions and procedures ?index list of all help categories ?index, list of help files on specific topics ? explanation of a specific topic ?, explanation of a subtopic under a topic ?distribution for information on how to obtain Maple ?copyright for information about copyrights - Note 1: The recommended way to invoke help is to use the question mark. - Note 2: When invoking help using the function call syntax, help(topic), Maple keywords (reserved words) must be enclosed in backquotes. For example, help(quit) causes a syntax error. Use help(`quit`) instead. Note that the string delimiter is the backquote (`), not the apostrophe ('), nor the double quote ("). When using the question mark syntax for help, no quotes are required. - Note 3: A command must end with a semicolon, followed by RETURN or ENTER, before Maple will execute it and display the result. The semicolon can appear on the next line if you forget to end the command with it, but it must appear. There can be multiple commands on one line, separated by semicolons or colons. An exception to this is when a line starts with a question mark in which case help is invoked and no semicolon is required. - To contact Waterloo Maple Software, see ?distribution. To contact the authors of Maple, see ?scg. SEE ALSO: keywords, quotes, colons, quit, example, scg, distribution, TEXT > ?solve FUNCTION: solve - solve equations CALLING SEQUENCE: solve(eqns, vars) PARAMETERS: eqns - an equation or set of equations vars - (optional) an unknown or set of unknowns SYNOPSIS: - The most common application of solve is to solve a single equation, or to solve a system of equations in some unknowns. A solution to a single equa- tion eqns solved for the unknown vars is returned as an expression. To solve a system of equations eqns for unknowns vars, the system is specified as a set of equations and a set of unknowns. The solution is returned as a set of equations. - Multiple solutions are returned as an expression sequence. Wherever an equa- tion is expected, if an expression expr is specified then the equation expr = 0 is understood. If vars is not specified, indets(eqns,name) is used in place of vars. - When solve is unable to find any solutions, the expression NULL is returned. This may mean that there are no solutions or that solve was unable to find the solutions. - To assign the solutions to the variables, use the command assign. - For solving differential equations use dsolve; for purely floating-point solutions use fsolve; use isolve to solve for integer roots; msolve to solve modulo a prime; rsolve for recurrences, and linalg[linsolve] to solve matrix equations. - Further information is available for the subtopics solve[] where is one of floats functions identity ineqs linear radical scalar series system - For systems of polynomial equations, the function grobner[gsolve] which uses a Grobner-basis approach may be useful. EXAMPLES: > solve(cos(x) + y = 9, x); Pi - arccos(y - 9) > solve({x+y=1, 2*x+y=3}, {x,y}); {x = 2, y = -1} > solve({a*x^2*y^2, x-y-1}, {x,y}); {x = 1, y = 0}, {x = 0, y = -1} SEE ALSO: dsolve, fsolve, isolve, msolve, rsolve, assign, isolate, match, linalg[linsolve], simplex, grobner, solve[] where is one of: floats, functions, identity, ineqs, linear, radical, scalar, series, system > quit; bytes used=234212, alloc=196572, time=.483