Although the simplify command may seem to be the most

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: y. You can also factor polynomials over algebraic extensions. For details, refer to the ?factor help page. The expand Command The expand command is essentially the reverse of factor. It causes the expansion of multiplied terms as well as a number of other expansions. This is among the most useful of the manipulation commands. Although you might imagine that with a name like expand the result would be larger and more complex than the original expression; this is not always the case. In fact, expanding some expressions results in substantial simplification. > expand((x+1)*(x+2)); x2 + 3 x + 2 > expand(sin(x+y)); sin(y ) cos(x) + cos(y ) sin(x) > expand(exp(a+ln(b))); ea b The expand command is quite flexible. You can you specify that certain subexpressions be unchanged by the expansion and program custom expansion rules. Although the simplify command may seem to be the most useful command, this is misleading. Unfortunately, the word simplify is rather vague. When you request to simplify an expression, Maple examines your expression, tests many techniques, and then tries applying the appropriate simplification rules. However, this might take a little time. As well, Maple may not be able to determine what you want to accomplish since universal mathematical rules do not define what is simpler. When you do know which manipulations will make your expression simpler for you, specify them directly. In particular, the expand command 36 • Chapter 2: Mathematics with Maple: The Basics is among the most useful. It frequently results in substantial simplification, and also leaves expressions in a convenient form for many other commands. The convert Command This command converts expressions between different forms. For a list of common conversions, see Table 2.3. > convert(cos(x),exp); 1 (x I ) 1 1 e + 2 2 e(x I ) > convert(1/2*exp(x) + 1/2*exp(-x),trig); cosh(x) > A := Matrix([[a,b],[c,d]]); A := ab cd > convert(A, ’listlist’); [[a, b], [c, d]] > convert(A, ’set’); {a, b, d, c} > convert(%, ’list’); [a, b, d, c] The normal Command This command transforms rational expressions into factored normal form , numerator , denominator 2.6 Expression Manipulation Table 2.3 Common Conversions • 37 Argument polynom exp, expln, expsincos parfrac rational radians, degrees set, list, listlist temperature units Description series to polynomials trigonometric expressions to exponential form rational expressions to partial fraction form floating-point numbers to rational form between degrees and radians between data structures between temperature scales between units where the numerator and denominator are relatively prime polynomials with integer coefficients. > rat_expr_2 := (x^2 - y^2)/(x - y)^3 ; rat _expr _2 := x2 − y 2 (−y + x)3 > normal(rat_expr_2); y+x (−y + x)2 > normal(rat_expr_2, ’expanded’); y+x y 2 − 2 x y + x2 The expanded option transforms rational expressions into expanded normal form . The combine Command This command combines terms in sums, products, and powers into a single term. These transformations are, in some cases, the reverse of the transformations that expand...
View Full Document

This note was uploaded on 08/27/2012 for the course MATH 1100 taught by Professor Nil during the Spring '12 term at National University of Singapore.

Ask a homework question - tutors are online