> 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
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