19.07.2014 Views

Contents - Student subdomain for University of Bath

Contents - Student subdomain for University of Bath

Contents - Student subdomain for University of Bath

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

22 CHAPTER 1. INTRODUCTION<br />

• The simplify command is used to apply simplification rules<br />

to an expression.<br />

• The simplify/expr calling sequence searches the expression,<br />

expr, <strong>for</strong> function calls, square roots, radicals, and powers. It<br />

then invokes the appropriate simplification procedures.<br />

• symbolic Specifies that <strong>for</strong>mal symbolic manipulation <strong>of</strong> expressions<br />

is allowed without regard to the analytical issue <strong>of</strong><br />

branches <strong>for</strong> multi-valued functions. For example, the expression<br />

sqrt(x^2) simplifies to x under the symbolic option. Without<br />

this option, the simplified result must take into account the<br />

different possible values <strong>of</strong> the (complex) sign <strong>of</strong> x.<br />

Maple does its best to return a normal <strong>for</strong>m, but can be fooled: <strong>for</strong> example<br />

RootOf ( Z 4 + b Z 2 + d ) √<br />

− 1/2 −2 b + 2 √ b 2 − 4 d,<br />

which is actually zero (applying figure 3.2), does not simplify to zero under<br />

Maple 11.<br />

Because simplification may <strong>of</strong>ten require expansion, e.g. to take (x−1)(x+1)<br />

to x 2 − 1, the two are <strong>of</strong>ten confused, and indeed both Macsyma and Reduce<br />

(internally) used ratsimp and *simp (respectively) to denote what we have<br />

called expansion.<br />

1.2.4 An example <strong>of</strong> simplification<br />

This section is inspired by an example in [Sto12]. Consider<br />

(cos (x)) 3 sin (x) + 1 2 (cos (x))3 sin (x) + 2 (cos (x)) 3 cos (2 x) sin (x) +<br />

1<br />

2 (cos (x))3 cos (4 x) sin (x) − 3 2 cos (x) (sin (x))3 −<br />

2 cos (x) cos (2 x) (sin (x)) 3 − 1 2 cos (x) cos (4 x) (sin (x))3 .<br />

(1.2)<br />

Typing this into Maple simply collects terms, giving<br />

3<br />

2 (cos (x))3 sin (x) + 2 (cos (x)) 3 cos (2 x) sin (x) +<br />

1<br />

2 (cos (x))3 cos (4 x) sin (x) − 3 2 cos (x) (sin (x))3 −<br />

2 cos (x) cos (2 x) (sin (x)) 3 − 1 2 cos (x) cos (4 x) (sin (x))3 .<br />

(1.3)<br />

combine(%,trig), i.e. using the multiple angle <strong>for</strong>mulae to replace trigonometric<br />

powers by sin / cos <strong>of</strong> multiples <strong>of</strong> the angles, gives<br />

3<br />

8 sin (4 x) + 1 4 sin (2 x) + 1 4 sin (6 x) + 1 16<br />

sin (8 x) . (1.4)<br />

expand(%,trig) (i.e. using the multiple angle <strong>for</strong>mulae in the other direction)<br />

gives<br />

4 sin (x) (cos (x)) 7 − 4 (cos (x)) 5 (sin (x)) 3 , (1.5)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!