LearningGuide

2 assumptions there are two means of imposing

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

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: gt; simplify( expr ); cos(x)4 (cos(x) + 1) Simpliﬁcation rules are recognized for trigonometric expressions, logarithmic and exponential expressions, radical expressions, expressions with powers, RootOf expressions, and various special functions. If you specify a particular simpliﬁcation rule as an argument to the simplify command, then it uses only that simpliﬁcation rule (or that class of rules). > expr := ln(3*x) + sin(x)^2 + cos(x)^2; expr := ln(3 x) + sin(x)2 + cos(x)2 > simplify( expr, trig ); ln(3 x) + 1 > simplify( expr, ln ); ln(3) + ln(x) + sin(x)2 + cos(x)2 6.1 Mathematical Manipulations > simplify( expr ); • 169 ln(3) + ln(x) + 1 For a list of built-in simpliﬁcation rules, refer to the ?simplify help page. Simpliﬁcation with Assumptions Maple may not perform a simpliﬁcation as you would. Although you know that a variable has special properties, Maple treats the variable in a more general way. > expr := sqrt( (x*y)^2 ); expr := > simplify( expr ); x2 y 2 x2 y 2 The option assume=property speciﬁes that simplify assume that all the unknowns in the expression have that property. > simplify( expr, assume=real ); |x y | > simplify( expr, assume=positive ); xy You can also use the general assume facility to place assumptions on individual variables. See 6.2 Assumptions. Simpliﬁcation with Side Relations Sometimes you can simplify an expression using your own special-purpose transformation rule. The simplify command allows you do to this by means of side relations . > expr := x*y*z + x*y + x*z + y*z; 170 • Chapter 6: Evaluation and Simpliﬁcation expr := x y z + x y + x z + y z > simplify( expr, { x*z=1 } ); xy + yz + y + 1 You can give one or more side relations in a set or list. The simplify command uses the given equations as additional allowable simpliﬁcations. Specifying the order in which simplify performs the simpliﬁcation provides another level of control. > expr := x^3 + y^3; expr := x3 + y 3 > siderel := x^2 + y^2 = 1; siderel := x2 + y 2 = 1 > simplify( expr, {siderel}, [x,y] ); y3 − x y2 + x > simplify( expr, {siderel}, [y,x] ); x3 − y x2 + y • In the ﬁrst case, Maple makes the substitution x2 = 1 − y 2 in the expression, then attempts to make substitutions for y 2 terms. Not ﬁnding any, it stops. • In the second case, Maple makes the substitution y 2 = 1 − x2 in the expression, then attempts to make substitutions for x2 terms. Not ﬁnding any, it stops. The simplify routine is based on Gr¨bner basis manipulations of o polynomials. For more information, refer to the ?simplify,siderels help page. 6.1 Mathematical Manipulations • 171 Sorting Algebraic Expressions Maple prints the terms of a polynomial in the order the polynomial was ﬁrst created. To sort the polynomial by decreasing degree, use the sort command. > poly := 1 + x^4 - x^2 + x + x^3; poly := 1 + x4 − x2 + x + x3 > sort( poly ); x4 + x3 − x2 + x + 1 Note that sort reorders algebraic expressions in place, replacing the o...
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