4.3 Expressions and Equations: How Maple "thinks"

Your calculator can calculate with numbers. Maple can calculate with unknown quantities; that is, variables. For example:
> x+z;

		     x + z

> " ^ 6;

			   6
		    (x + z)
Notice the double quote mark ("). It always stands for the previous expression; so above, it stands for x+z.

Continuing the example:

> expand( " );

	    6      5         4  2       3  3       2  4        5    6
	   x  + 6 x  z + 15 x  z  + 20 x  z  + 15 x  z  + 6 x z  + z

The built-in function expand knows how to expand an algebraic expression (i.e. multiply out all the terms in parentheses).

Conversely, Maple knows how to factor algebraic expressions:

> factor(");

			  6
		   (x + z)

Another useful function that can be applied to any expression is simplify(), which applies various known algebraic and trig identities to try and simplify an expression:

> sin(x)^2 + 3 * cos(x)^2;

			         2           2
			    sin(x)  + 3 cos(x)

> simplify(");

				       2
				2 cos(x)  + 1

Keith Orpen, who is still writing this, would like to hear your comments and suggestions.