32
8/4/2019 Manual para aprender a usar Scientific Workplace (ingles) http://slidepdf.com/reader/full/manual-para-aprender-a-usar-scientific-workplace-ingles 1/32 TCIDATATCIstyle=Article/ART3.LAT,dep,mathart1 1

Manual para aprender a usar Scientific Workplace (ingles)

Embed Size (px)

Citation preview

Page 1: Manual para aprender a usar Scientific Workplace (ingles)

8/4/2019 Manual para aprender a usar Scientific Workplace (ingles)

http://slidepdf.com/reader/full/manual-para-aprender-a-usar-scientific-workplace-ingles 1/32

TCIDATATCIstyle=Article/ART3.LAT,dep,mathart1

1

Page 2: Manual para aprender a usar Scientific Workplace (ingles)

8/4/2019 Manual para aprender a usar Scientific Workplace (ingles)

http://slidepdf.com/reader/full/manual-para-aprender-a-usar-scientific-workplace-ingles 2/32

Scientic WorkPlace Demonstration Document

Roger Hunter and Fred Richman and John Thomas and Elbert Walker

Contents

1 Introduction 3

2 Getting Started 32.1 Where to Place the Insertion Point . . . . . 32.2 How Scientic WorkPlace  Selects an Ex-

pression . . . . . . . . . . . . . . . . . . . . 32.3 Selecting Expressions for Operations . . . . 42.4 A Keyboard Shortcut for Evaluate . . . . . 42.5 Stopping a Computation . . . . . . . . . . . 42.6 The Settings Menu . . . . . . . . . . . . . . 4

3 Working with Expressions and Functions 53.1 The Slash Operator (/) . . . . . . . . . . . 5

3.2 Standard Mathematical Functions . . . . . 63.3 More Operations . . . . . . . . . . . . . . . 73.4 Some Special Operations and Commands . 73.5 Constants . . . . . . . . . . . . . . . . . . . 83.6 Polynomials . . . . . . . . . . . . . . . . . . 83.7 Limits . . . . . . . . . . . . . . . . . . . . . 93.8 Dierentiation . . . . . . . . . . . . . . . . 93.9 Indenite Integration . . . . . . . . . . . . . 93.10 Sequences of Operations . . . . . . . . . . . 103.11 Denite Integrals . . . . . . . . . . . . . . . 103.12 Numerical Integration . . . . . . . . . . . . 113.13 Innite Series . . . . . . . . . . . . . . . . . 113.14 Substituting a Value into an Expression . . 11

4 Matrices 114.1 Standard Operations . . . . . . . . . . . . . 114.2 The Matrices Submenu . . . . . . . . . . . . 12

5 Solving Systems of Equations 135.1 Solve Exact . . . . . . . . . . . . . . . . . . 135.2 Solve Numeric . . . . . . . . . . . . . . . . . 145.3 Solve Integer . . . . . . . . . . . . . . . . . 145.4 Solve Recursion . . . . . . . . . . . . . . . . 14

6 Modular Arithmetic 146.1 The Integers modulo m . . . . . . . . . . . 14

6.2 Matrices Modulo m . . . . . . . . . . . . . . 156.3 Polynomials Modulo m . . . . . . . . . . . . 156.4 Polynomials Modulo Polynomials . . . . . 15

7 Denitions 157.1 New Denition, Undene, Show Deni-

tions, and Clear Denitions . . . . . . . . . 157.2 Denitions with Deferred Evaluation . . . . 187.3 Remembering Solutions . . . . . . . . . . . 187.4 Save Denitions & Restore Denitions . . . 18

7.5 Functions of Several Variables . . . . . . . . 187.6 Row and Column Arguments . . . . . . . . 187.7 Matrix Valued Functions . . . . . . . . . . . 197.8 Piecewise-Dened Functions . . . . . . . . . 197.9 Access to Other Maple Functions . . . . . . 197.10 User Dened Maple Functions . . . . . . . . 19

8 2D Plots 208.1 Frame Properties Dialog Box . . . . . . . . . 208.2 Plotting More than one Function at a Time . 208.3 Plot Components Page . . . . . . . . . . . . 218.4 Axes & View Page . . . . . . . . . . . . . . . 218.5 Plotting Points . . . . . . . . . . . . . . . . . 218.6 Conformal Plots . . . . . . . . . . . . . . . . 218.7 Plots of Vector and Gradient Fields . . . . . . 218.8 Parametric Equations . . . . . . . . . . . . . 228.9 Implicit Equations . . . . . . . . . . . . . . . 228.10 Polar Coordinates . . . . . . . . . . . . . . . 228.11 Parametric Polar Plots . . . . . . . . . . . . 22

9 3D Plots 229.1 Plotting Tools for 3D Plots . . . . . . . . . . 229.2 Implicit Functions . . . . . . . . . . . . . . . 239.3 Parameterized Surfaces . . . . . . . . . . . . 239.4 Curves in Space . . . . . . . . . . . . . . . . 239.5 Cylindrical Coordinates . . . . . . . . . . . . 239.6 Parameterized Surfaces in Cylindrical Coordi-

nates . . . . . . . . . . . . . . . . . . . . . . 249.7 Spherical Coordinates . . . . . . . . . . . . . 249.8 Parameterized Surfaces in Spherical Coordinates 249.9 Exercises . . . . . . . . . . . . . . . . . . . . 249.10 Solutions to Exercises . . . . . . . . . . . . . 24

10 Calculus 2510.1 Implicit Dierentiation . . . . . . . . . . . . 2510.2 Iterate . . . . . . . . . . . . . . . . . . . . . 2510.3 Find Extrema . . . . . . . . . . . . . . . . . 2510.4 Methods of Integration . . . . . . . . . . . . 2610.5 Pictures of Riemann Sums . . . . . . . . . . 2610.6 Approximation Methods . . . . . . . . . . . . 26

11 Dierential Equations 2711.1 Exact Methods . . . . . . . . . . . . . . . . . 2711.2 Initial Value Problems . . . . . . . . . . . . . 27

12 Vector Calculus 2812.1 Dot and Cross Products . . . . . . . . . . . . 2812.2 Vector Norms . . . . . . . . . . . . . . . . . 2912.3 Gradient, Divergence and Curl . . . . . . . . 2912.4 Hessian . . . . . . . . . . . . . . . . . . . . . 2912.5 Jacobian . . . . . . . . . . . . . . . . . . . . 29

2

Page 3: Manual para aprender a usar Scientific Workplace (ingles)

8/4/2019 Manual para aprender a usar Scientific Workplace (ingles)

http://slidepdf.com/reader/full/manual-para-aprender-a-usar-scientific-workplace-ingles 3/32

12.6 Curl and Vector Potential . . . . . . . . . . . 3012.7 D ivergence . . . . . . . . . . . . . . . . . . 30

13 Statistics 3013.1 Lists and Matrices . . . . . . . . . . . . . . 3013.2 Mean, Median, Mode, Moment, Quantile,

Mean Deviation, Standard Deviation, andVariance . . . . . . . . . . . . . . . . . . . . 30

13.3 Correlation and Covariance . . . . . . . . . . 31

13.4 Random Numbers . . . . . . . . . . . . . . . 3113.5 Distributions and Densities . . . . . . . . . . 31

Introduction

The work on this interface between Scientic Word  andMaple was supported by a National Science FoundationSBIR (Small Business Innovation Research) grant. Thegoal is to provide an interface which:

1. Uses natural mathematical notation only, and

2. Uses free-form editing.

Scientic Word 's interface satises both criteria. Allof the signicant problems arise from the free-form require-ment. Maple and Mathematica both have notebook sys-tems which use the natural form for output, but whichinsist upon complete, syntactically correct, mathematicalexpressions, allowing the user only minimal variation inways to enter a given expression. We want to make senseout of as many dierent forms as possible, not requiringthe user to adhere to a rigid syntax or just one way of writ-ing an expression. For example, it is essential that bothR dxx

andR 

1x

dx be acceptable. The ease of use is furtherenhanced by the acceptance of incomplete forms which areoften seen in the literature, such as R x2 for R x2dx.

This implementation covers much of high school andundergraduate level mathematics, and is a useful mathe-matical tool. Also, it has great potential as a classroomdevice and is being tested in this regard. The combina-tion of a free form scientic word processor and compu-tational package makes it a possible replacement for theblackboard.

The system consisting of  Scientic Word  and its in-terface to Maple is called Scientic WorkPlace . It is newand dierent and we are very interested in receiving feed-back from our users. Any suggestions or reactions wouldbe appreciated. Our address is

TCI Software Research1190 Foster RoadLas Cruces, NM 88001tel 505-522-4600fax 505-522-0116email [email protected]

Getting Started

The current system is described using a series of examplesthat you can try. These examples range from trivial arith-

metic to advanced linear algebra. They include completecomputations and various pathologies and oddities. Thisle is write protected so that computing in it won't messit up. And you can save it under some other name anduse the new le to play with. In any case, we suggest thatyou print out a copy. Then you can nd quickly examplesand explanations of computations of various kinds, usingthe table of contents. The document is loosely structuredaround the Maple menu.

Before you start, check that the word Maple appearson the menu at the top of the Scientic WorkPlace windowto the right of Tools. If not, your installation is incomplete.

We'll start with two examples of factoring.

Factoring a Number Place the insertion point withinthe number 234567890 and from the Maple menuchoose Factor. Note that the answer is placed imme-diately to the right, following an = sign. The result,; 2 325 3803 3607, contains only where nec-essary. The presence of the superscript following the3 means that is not necessary before the following5. Scientic WorkPlace automatically chooses integer

factorization.Factoring a Polynomial Place the insertion point

within x5 + 7x3 41x4y 41x2y + 80x3y2 + 80xy2 52y3x2 52y3; =

x2 + 1

(7x 13y) (2y + x)2 and

choose Factor from the Maple menu. Scientic Work-Place automatically chooses polynomial factorization.

Where to Place the Insertion Point

Scientic WorkPlace shows mathematics in red. Whenthe insertion point is within mathematics, the Math/Texticon at the top of the screen displays a red M . When wesay \place the insertion point in the following expression",

anywhere that shows the red M  is sucient. Valid posi-tions are anywhere within, or immediately to the right of,the expression. The position immediately to the left of theexpression is not valid.

Expand Place the insertion point in the expression x 2y)2(7x 13y)(x2 + 1) and from the Maple menuchoose xpand. You should get the polynomial in theprevious example x 2y)2(7x 13y)(x2 +1) = 7x5 +7x341x4y41x2y +80x3y2+80xy252y3x252y3,of course.

How Scientic WorkPlace  Selects an Expression

When you place the insertion point in a mathematical ex-pression and choose an operation from the Maple menu,Scientic WorkPlace automatically selects either the en-tire expression, or the part containing the insertion pointwhich is enclosed between a combination of text and binaryrelations, depending on the operation you chose. Here aresome examples that illustrate the various possibilities.

An Equation Place the insertion point anywhere withinthe equation x + 3x = 1 and from the Maple menu

3

Page 4: Manual para aprender a usar Scientific Workplace (ingles)

8/4/2019 Manual para aprender a usar Scientific Workplace (ingles)

http://slidepdf.com/reader/full/manual-para-aprender-a-usar-scientific-workplace-ingles 4/32

choose Solve + Exact. In this case, Scientic Work-Place selected the entire expression. The solutionis not equal to the original expression, so ScienticWorkPlace does not make it part of the original equa-tion:

2x + 3x = 1, Solution is :

x = 15

Now place the insertion point in the left hand  side of the equation and from the Maple menu choose Evalu-

ate.2x + 3x = 5x = 1

This time, Scientic WorkPlace selected only the lefthand side of the equation for evaluation. Notice toothat since the result of the evaluation was equal tothe original expression, the result was placed next tothe expression, preceded by an equals sign. The in-sertion point is placed at the right end of the resultso that you can select another operation to apply tothe result without moving the insertion point.

Selecting Expressions for Operations

If you want to restrict the computation to a particu-lar selection, or override Scientic WorkPlace's automaticchoice, you can use a selection. The next few examplesillustrate this feature. There are two options.

Operating on a Selection Use the mouse or the shiftand rrow keys to select (x + y)5 in the expression

(x + y)5

7x 13y3

+ sin 2x, from the Maple menuchoose Expand.

(x + y)5

7x 13y3

+ sin 2x : x5 + 5x4y + 10x3y2 +10y3x2 + 5xy4 + y5

Scientic WorkPlace puts the answer to the right of thewhole expression, following a colon (:). In general, ci-entic WorkPlace assumes that the result of applyingan operation to a selection is not equal to the entireoriginal expression and so it places the result at theend of the mathematics, separated by something (inthis case a colon) in text.

Replacing a Selection Scientic WorkPlace will let youreplace part of an expression by the result of a com-putation on that part. Suppose you want to replace(x2y)2 in the expression x 2y)2(7x 13y)(x2 + 1)by its expansion. Select (x

2y)2 in left(x

2y2(7x

13y)(x2 + 1) and hold down the ctrl key (Windows)or the cmd key (Mac) while choosing Expand from theMaple menu.

(x 2y)2

(7x 13y)(x2 + 1)

The eect is that (x 2y)2 is replaced by x2 4xy + 4y2.It has no parentheses around it, but since it remainsselected, you can simply click on () to add the neededparentheses. Now return the expression to its originalform by selecting

x2 4xy + 4y2

; holding down the

ctrl/cmd key, and from the Maple menu choosingFactor. Here are some more examples.

1. Select the denominator in 2x2+2x+1(x+1)(x1) , hold down the

ctrl/cmd key, and from the aple menu choose Ex-pand. Now undo what you just did by doing the ap-propriate operations.

2. 2x2+2x+1(x+1)(x1)

3. Select 2x2+ 2x in the numerator of q 

2x2+2x+1(x+1)(x1) , hold

down the ctrl/cmd key, and from the Maple menuchoose Factor.

4.q 

2x(x+1)+1(x+1)(x1)

5. Select 7891011 in the denominator of  52801234567891011

and factor it, replacing 7891011 by the result. Nowreplace the numerator by its factored form.

6. 253511123456325371233

This \computing in place", that is, holding downthe ctrl/cmd key while performing operations from theMaple menu on a selection, is a key feature of ScienticWorkPlace. It provides a very convenient way to manipu-late expressions into the form desired.

It is even possible to force Scientic WorkPlace towork with text. Try selecting 7 and from the Maple menuchoosing Evaluate.

A Keyboard Shortcut for Evaluate

Pressing ctrl/cmd + e acts the same as choosing Evalu-ate from the Maple menu. (There are some exceptions.)This is generally easier than choosing Maple and thenchoosing Evaluate with the mouse.

Stopping a Computation

Most computations are done more or less instantaneously,but there are some that take several minutes to complete.Occasionally it is convenient to be able to have Maplestop computing and return control to Scientic WorkPlace.This is accomplished by choosing ctrl + break (Win-dows) or cmd + . (Mac) after a computation has begun.Try it out by applying Factor to 291 + 3. Maple will actu-ally factor this in two or three minutes, but you can stopthe computation if you wish.

291 + 3 = 97 317 1589 80621 71463 5064708073

The Settings Menu

The number of digits used in numerical computations andthe display of numerical results are controlled by choicesfrom the Settings menu. From the Maple menu chooseSettings. The Engine Parameters page shows the settingsthat you can make. We concern ourselves only with therst three now. They have to do only with computations 

4

Page 5: Manual para aprender a usar Scientific Workplace (ingles)

8/4/2019 Manual para aprender a usar Scientific Workplace (ingles)

http://slidepdf.com/reader/full/manual-para-aprender-a-usar-scientific-workplace-ingles 5/32

using oating point arithmetic, that is, with numbers with 

decimals in them. Their settings do not aect computa-tion or display of integer and rational number arithmetic.The rst choice, Digits Used in Computations, is self ex-planatory. You can choose any integer up to 1000. If alarge number is chosen, computations may be signicantlyslower. You can try various settings later on numericalintegration and the like to see just how speed is aected.

Digits Used in Display is simply the number of digits

put on the screen. This setting does not aect accuracy incomputations. Nonsignicant trailing zeros are suppressedand scientic notation is avoided where possible. If theThreshold for Scientic Notation is set to the positive in-teger n, then any decimal number whose absolute valuerounds to a number 10n will be displayed in scientic no-tation. What a number rounds to depends on the numberof display digits. The program insures that the scienticnotation threshold cannot exceed the number of displaydigits. For example, when Digits Used in Display = 5 anysetting of the scientic notation threshold greater than 5is equivalent to Threshold for Scientic Notation = 5.

In the examples below, put Digits Used in Computation

= 10, igits Used in Display = 5, and Threshold for ScienticNotation = 4 Evaluate the following expressions, and see if these evaluations agree with what you think they shouldbe.

1. 1:2345 = 1: 2345

2. 1:23454 = 1: 2345

3. 1:23455 = 1: 2346

4. 12:3456 = 12: 346

5. 1234:56 = 1234: 6

6. 12345:6 = 12346:

7. 12345:0 103 = 1: 2345 107

8. 999994 1:0 = 9: 9999 105

9. 999995 1:0 = 1: 0 106

10. 999996:0 = 1: 0 106

11. 999986:0 = 9: 9999 105

12. 999995:9 102

13. 999994:

102

14. 999995:0 1012

15. 888895 1:0

16. 889995 1:0

17. 899995 1:0

18. 123 :01

19. 123 :0001

20. 123 :00001

21. 123 :000001

22. 12 :00001

23. 12 :000001

The Series Order for ODE Solutions item species thenumber of terms you get in a series solution of a dierential

equation.The Error Level setting determines what messages aregiven to you when making a computation. The higher thelevel the more messages you get. Here are the meaningsof the various error levels:

Level Meaning0 No messages under any circumstances1 Beep if there is an error2 Display errors in a dialog box3 Display memory use in status area4 Show all Maple commands sent in the

status area5 3 and 4

6 Show memory use in dialog boxes7 Show all Maple commands sent indialog boxes

8 6 and 7

Working with Expressions and Functions

The Slash Operator (/)

Interpreting the slash operator in the absence of adequateparentheses is an entertaining pastime. There is a specialkeyboard command to obtain Scientic WorkPlace's  inter-pretation of an expression. It is ctrl/cmd + ?. Applythis command to the following expressions, seeing if youcan predict each interpretation. Of course, possible ambi-guities can always be eliminated by adding parentheses.

a=bc = abc

a=b + c = ab + ca=b(c + d) = ab (c + d)

(a + b)=(c + d) = a+b(c+d)

Note the dierence in the treatment of  = in the nexttwo examples:

sin =2 = sin 2sin a= cos b = sina

cos ba=bc sin = abc sin sin =(a + b)(c + d) = sin (a+b) (c + d)

a=bc = abc2=3(4) = 2

342=(3)4 = 2

34sin =2(3) = sin 2 3 = 1sin =(2)3 = sin 23 = 1

2sin =(2)(3)sin =(2 3)sin 2

5

Page 6: Manual para aprender a usar Scientific Workplace (ingles)

8/4/2019 Manual para aprender a usar Scientific Workplace (ingles)

http://slidepdf.com/reader/full/manual-para-aprender-a-usar-scientific-workplace-ingles 6/32

Standard Mathematical Functions

There are over 2500 functions in Maple, and one goal is tobe able to use them easily via Scientic WorkPlace . Manyof these are directly available in Scientic WorkPlace . Thefollowing examples illustrate the use of several of the mostcommon and simplest.

For trigonometric functions, the parentheses aroundthe argument are optional. For most functions however,it is customary to put parentheses around the argument.Scientic WorkPlace  does not care whether you put paren-theses, brackets, or braces. In fact, for most functions of one variable, Scientic WorkPlace  does not care whetheror not you put anything around the argument. Gener-ally, the functions that do not require parentheses aroundtheir arguments are those for which common usage is toleave them o. But Scientic WorkPlace  has to decidewhat the argument is, parenthesized or not. From theMaple menu choose Evaluate for the expressions cos xy,cos x

R ydy, cos cos =2cos x, and

R cos xdx and note the

behavior.Of course, one can always parenthesize away any pos-

sible ambiguities. But the point is to have a system thatwill correctly interpret common mathematical expressions.For example, in

R cos xdx, the system should know that dx

is not part of the argument of cos, and it does.If you prefer to work only with ordinary functions

that require parentheses, you can set this choice. From theMaple menu choose Settings, and on the Denition Optionspage check the Convert Trigtype to Ordinary box.

Apply Evaluate and Evaluate Numerically to the fol-lowing expressions.

1. exp(2)

2. exp2

3. arcsin1

4. sin1x

What did you expect Evaluate Numerically to do tothis one?

5. sin1 12

6. sin 230

7. ln e

There is a dierence in the result of Evaluate and Eval-uate Numerically in this one.

8. ln10

9. log e

10. log 10

11. log 1010

12. 4!

13. 100!

Factor the result of applying Evaluate to 100!. To dothis, just put the insertion point in the result and fromthe Maple menu choose Factor.

14. (5)

15. 5

16. (5:3)

17. (100)

18. [(101:0])

19. gcd(2; 4; 6; 8; 10)

20. gcd(x2 + 2x + 1; x2 1)

21. gcd(123450; 67891050)

The last two examples illustrate Scientic Work-

Place 's ability to distinguish between polynomials and in-tegers when called upon to take gcd's.

There are many other commonplace functions cur-rently implemented, and several will now be demonstrated.They are all available directly from the Scientic Work-

Place  keyboard or by clicking the appropriate icons in theScientic WorkPlace  window. Clicking with the mouse iseasier until one learns the keyboard commands. Now trythe Maple menu commands Evaluate, Evaluate Numerically,Simplify, Factor, and Expand on the following expressions.

1. 62

2. 6 3

3. 6=3

4. 203

Note the dierence in behavior between Evaluate andEvaluate Numerically here.

5. 20 3

6. 20=3

7. 5(4)(3)

8. 5 4 3

9. 5 4 3

10. (5) 4 3

11.p 

256

12. 62

p 12345 Note the various dierent results from the

various commands.

13.P5i=1 i

14.Pnj=1 j3 Factor the result of this one.

6

Page 7: Manual para aprender a usar Scientific Workplace (ingles)

8/4/2019 Manual para aprender a usar Scientific Workplace (ingles)

http://slidepdf.com/reader/full/manual-para-aprender-a-usar-scientific-workplace-ingles 7/32

15. j40j The vertical bars here come from the keyboard,or from the ()[] dialog box. They are equivalent. Thevertical bar on the leq  panel may not be used todenote absolute value.

16. abs(40) To enter abs, you may use the custom namefeature of the sin cos dialog box.

17. k69:0k You should get a syntax error here. Mapleexpects a matrix or vector of length at least two inside

kk. Try evaluating k(3; 4)k. The double bars on the panel may not be used for this purpose.

18.52

19.

10025

20. Try Check Equality on a2 b2 = (a b) (a + b), on

256 = 256:0 and on a = b. The fact that 256 = 256:0is a little surprising, but that is Maple's choice.

More Operations

This section illustrates the use of some of the other opera-

tions available through Scientic WorkPlace . First, simpli-cations and expansions of various trigonometric expres-sions are illustrated.

1. sin 2x + cos 2x

From the Maple menu choose Simplify. Also chooseCombine + Trig Functions.

2. sin2

Here, choose Expand, and apply Combine + Trig Func-tions to the result. Do the same to the next two.On some of these, execute the commands \in place".

That is, select the expression, and hold down thectrl/cmd key while choosing the menu com-mand. Don't forget this facility.

3. sin(a + b)

4. tan(a + b)

5. sin(2a + 3a)

On this last one, most any command exceptExpand will yield sin(5a): Try them all. Nowchoose Expand, and to the result, apply ombine+ Trig Functions.

6. sin(2a + 3b)Apply Expand and on the result execute Com-bine + Trig Functions. The result of Expand maybe too long to go on one line. You canview the result by scrolling horizontally.ctrl/cmd + space breaks but keeps the ex-pression \as one" so that computations canbe made on it. Execute Expand on the fol-lowing two and Combine + Trig Functions on theresults.

7. sinh(a + b)

8. tanh(2a + b)

Apply Evaluate and then Simplify to the follow-ing:

9. (sin a)=(cos a)

10. (sinh a)=(cosh a)

Expressions involving powers, exponentials,and logarithms can be simplified and ex-panded using the commands Powers, Exponentials,and ogs under the Combine submenu item. Hereare some examples of these computations.

11. exp a exp b

Try Simplify and Combine + Exponentials.

12. exp2a exp3b

13. exp(2a + 3b)

14. eaeb

Apply Expand and then Combine + Exponentialson the result. implify does the same thing asCombine + Exponentials.

15. exp(2a)

16. ln2a

Choose Expand and then Combine + Logs on theresult. Do the same to the next one.

17. ln(6ab2)

18. xa+2

Choose Expand and then apply Combine + Powers.Do the same for the next one. Simplify doesthe same thing as Combine + Powers here.

19. ax+ybx+z

20. axbx (Maple doesn't seem to let you get thisinto the form ab)x.)

21. exp(a2) + ln ab

Some Special Operations and Commands

We have been applying the various Maple command toexpressions, for example, Factor to x2

y2. Many com-

mands will operate entrywise on vectors and matrices of expressions. These commands include Evaluate, valuateNumerically, Combine, Simplify, Factor, and Expand. Applythese commands to the following matrices.

1. (1; 2; 3; 4; 5; 6)

2.

ln e

p 16 3

6 3p 

8 4

7

Page 8: Manual para aprender a usar Scientific Workplace (ingles)

8/4/2019 Manual para aprender a usar Scientific Workplace (ingles)

http://slidepdf.com/reader/full/manual-para-aprender-a-usar-scientific-workplace-ingles 8/32

3.

6! 22 3x + 2x

ln a + ln b x3 y3 sin2 x + cos2 x

4.

22 4481 65

mod3

The results of a computation may be too long to ton a line on the screen. \Allow breaks" have been pro-grammed in so that such results have line breaks in themif needed. (Such breaks cannot occur in expressions such

as matrices, vectors, fractions, and so on.) Evaluate thefollowing to see examples of this.

1.P50i=0 xi

2. 50!

Also Shift + Space may be used to introduce possibleline breaks in mathematical expressions. Occasionally, anexpression such as a matrix is just too big to t on a line.But you may use the horizontal scroll bar at the bottomof the screen to see the entire result.

Constants

Scientic WorkPlace  recognizes various constants. Theseinclude e;; and i: Here are a few illustrations.

Put the insertion point after e and choose EvaluateNumerically from the Maple menu. Alternatively, you couldselect the e before applying the operation. Now do thesame for and i2. Note the behavior when choosing Eval-uate and when choosing Evaluate Numerically on the fol-lowing items.

1. e

2.

3. i

4. j1 + ij5. abs(1 + i)

6. ex

7. eiie

8.P3n=1 i3

9.P3i=1 i3

Look carefully at the last example. It shows that idoes not always mean sqrt1, and illustrates how Scien-

tic WorkPlace  must decide whether i is reallyp 1 or

 just another variable.

Polynomials

Here we want to illustrate the usual operations on poly-nomials. The special commands for polynomials are inthe menu gotten by choosing Polynomials from the Maplemenu. The choices there are Divide, Partial Fractions,Roots, Sort, and Companion Matrix. Divide applied to aquotient of polynomials f (x)=g(x) with integer coecientsgives q (x)+r(x)=g(x); where the deg r(x) < deg g(x): Par-tial Fractions is also an item on the |sf Calculus menusince a typical application is to integration. Roots ndsthe roots of a polynomial with complex coecients, andSort puts the terms of a polynomial in decreasing orderof powers. Companion Matrix simply gives the companionmatrix of a polynomial.

There are many other commands available to apply topolynomials, such as Simplify, Factor, Expand, and so on, aswell as the usual operations of addition and multiplication.

1. Apply Evaluate to gcd(5(x2 1); 10x 10)

2. Apply Expand, and then Factor the result.5 (x + 1)

3(x

1)2

3. Factor the following expression and then Expand theresult. 5 x5 + 5x4 10x3 10x2 + 5x + 5

4. Try applying Combine Powers, and Evaluate, and im-plify to 5x5 + 5x410x310x2 + 5x + 5 + 4x63x5 +x2 6

5. Apply Partial Fractions to 2x2+2x1(x+1)(x1)

6. Apply Partial Fractions to 2x2+2x1(x+1)2(x2x1)2

7. Apply Simplify to x+2x+1 + 3x

x1

8. Apply Factor to x+2x+1 + 3xx1 . Note that factor andsimplify are the same in this context.

9. Apply Expand to x+2x+1 + 3x

x1

10. Apply Partial Fractions to x+2x+1 + 3x

x1

The feature of computing in place is very handy in ma-nipulating polynomials. For example, applying Sim-

plify to x+2x+1 + 3x

x1 gives 2 2x2+2x1(x+1)(x1) , and if you want

the denominator to be multiplied out, just select itand choose Expand while holding down the ctrl/cmdkey.

11. Apply Polynomials + Divide to 6x3

+5x2

x+1x+3

12. Apply Polynomials + Divide to (6x3+5x2x+1)=(x+3)

13. Apply Polynomials + Roots to x3 + 3x2 + 3x + 1

Note that multiplicities are given. Compare with thefollowing.

14. Apply Polynomials + Roots to x5+5x410x310x2+5x + 5

8

Page 9: Manual para aprender a usar Scientific Workplace (ingles)

8/4/2019 Manual para aprender a usar Scientific Workplace (ingles)

http://slidepdf.com/reader/full/manual-para-aprender-a-usar-scientific-workplace-ingles 9/32

15. Apply Polynomials + Roots to ax2 + bx + c

16. Apply Polynomials + Roots to x3 + 3x + 1

Maple uses the usual formulas for nding roots of polynomials of degree 3 or less. If you want the rootsof this polynomial in simpler form, change one of thecoecients to a decimal and Maple will evaluate theroots numerically. Compare with the following exam-ple.

17. Apply Polynomials + Roots to x3 + 3:0x + 1

18. Apply Polynomials + Roots to x4 2x 3

Maple uses the formula to nd the roots of this fourthdegree polynomial, and displays these roots in a col-umn matrix. But Maple will not nd the roots sym-bolically of just any old fourth degree polynomial. Seewhat happens in the next example.

19. Apply Polynomials + Roots to x4 + 2x3 + x2 + 3x 5 Here Maple in eect just returns the polynomial.Change one of the coecients to decimal form. Itthen will give the four roots as a column matrix.

20. Apply Polynomials + Roots to x5 + 7x2 + x + 1

21. Apply Polynomials + Roots to x5 +(7+i)x2 +x + + i

22. Apply Polynomials + Roots to x5 + 7x2 + 3ix + e

23. Apply Polynomials + Companion Matrix to x3 + ax2 +bx + c

Maple insists on a monic polynomial.

Limits

You can take limits. The function lim is one of the func-

tions that can be chosen when you click the sin cos icon.You can also get it by typing \lim" while in mathematicsmode. To evaluate a limit, choose Evaluate from the Maplemenu or ctrl/cmd + E. Evaluate the following limits.

1. limx!0sinxx : 1

2. limx!1p x2+3x+1p 16x2+x+2

3. limx!0+xjxj

4. limx!0 x= jxj5. limy!0

y

jyjlimx!1

1

x

6. limx!01x arccos x

7. (x + 1)2 + limx!0sinxx + (a + by)2

Dierentiation

Scientic WorkPlace   recognizesvarious notations for dierentiation, including the formsddx ;dn

dx ; Dx:Dxy; Dxsyt; @ @x ; and @ n

@xsyt ; where s + t = n:Also note in the examples below that parentheses, brack-ets, and braces are equally acceptable. Notice how Scien-

tic WorkPlace  handles the ill-formed expressions in thelist below.

Place the insertion point anywhere in the expressionddx(x2). Choose Evaluate from the Maple menu (or choosectrl/cmd + E. Now do the same for the following ex-pressions.

1. dx2

dx : 2x

2. ddx

x2 : 2x

3. Dxx2 = 2x

4. Dx[x2]

5. Dx(x2)

6. @ @xx2

7. @ @xfx2g

8. @ 2

@x2 x2 + 3x : 2 + 3x

9. @ 2

@x2 ((x2 + 3x)

10. @ 2

@x2 (x2 + 3x

11. @ 2

@x2x2 + 3x)

12. @ 2

@x2 (x2 + 3x]

13. @ @x@yx2y3 : 6xy2

Scientic WorkPlace  will do implicit derivatives also.mplicit Dierentiation is under the Calculus menu and willbe discussed in connection with that menu.

Indenite Integration

Next we illustrate computing indenite integrals. A basicproblem for Scientic WorkPlace  here is to decide what tointegrate and to choose the variable of integration.

Place the insertion point anywhere in the expression

R (ax2 + bx+c)dx. From the maple menu, choose Evaluate,

or choose ctrl/cmd + E. In this case, the expression tobe integrated is syntactically correct. Scientic WorkPlace 

not only allows any syntactically correct expression in theintegrand, but also is forgiving. For example, evaluate thefollowing expressions.

1.R 

1xdx

2.R dxx

3.R 

ax2 + bx + cdx

9

Page 10: Manual para aprender a usar Scientific Workplace (ingles)

8/4/2019 Manual para aprender a usar Scientific Workplace (ingles)

http://slidepdf.com/reader/full/manual-para-aprender-a-usar-scientific-workplace-ingles 10/32

4.R 

ax2

5.R 

1xn

In these three examples, Scientic WorkPlace  had tochoose a variable of integration, and x was chosen.If a variable of integration is not specied, Scientic 

WorkPlace  will choose a variable of integration andthe choice generally is the last symbol appearing. Thefollowing integrals illustrate this.

6.R 

ax

7.R 

xb

8.R 

xadx

9.R 

1x2+y2

10.R x2

x2+y2

If the insertion point is placed within a mathemati-cal expression, trl/cmd + ? gives Scientic Work-

Place 's interpretation of that expression. Try this onthe expressions above.

In choosing a variable of integration for you when theintegrand contains no dened expressions, Scientic 

WorkPlace  generally picks the last variable found. Inquotients, it picks the last variable in the numerator.If there is no variable in the numerator, as in the ex-ample int 1

x2+y2 , it then looks at the denominator andpicks the last variable there. Thus the results above.Of course, you can avoid having Scientic WorkPlace 

pick a variable of integration by specifying it your-self with the usual dx notation. Finally, notice whathappens on the next three.

11. R f 

12.R 

f (x)

13.R 

f (x)dx

The last three integrals should really be no surprise.In the rst, f  is treated just like x, and the complete ex-pression is

R f df . In the second, since f  is not dened

as a function, Scientic WorkPlace  interprets f (x) as theproduct f  x. It then chooses x as the variable of inte-gration, and the complete expression is intf  xdx. Thethird expression is treated the same as the second. If  f has been dened as a function, as we will learn how to do

later, thenR 

f (x)dx will be the integral of the expressionf (x) with respect to the variable x, as it should be.

Sequences of Operations

Here are some examples which shows how you might per-form sequences of computations, exploring as you go.

Sequences of Computations Place the insertion pointwithin the expression

R eax cos bxdx and choose Evalu-

ate from the aple menu. Without moving the insertion

point, choose Factor. The sequence of expressions isR eax cos bxdx = a

a2+b2 eax cos bx + ba2+b2 eax sin bx =

(eax) a cos bx+b sin bxa2+b2 .

Now place the insertion point in the expressionR 2x cos bxdx and perform the following sequence of 

computations from the Maple menu: Evaluate, Sim-plify, Combine Trig Functions, and implify. The com-plete sequence of expressions you should see is as fol-lows.R 

2x cos bxdx =ln 2

ln2 2+b22x ln 2

ln2 2+b22x tan2 1

2bx+21+x b

ln2 2+b2tan 1

2bx

1+tan2 12bx

=

21+x ln2 cos2 12bx(ln2)2x+21+xb sin 1

2bx cos 1

2bx

ln2 2+b2=

12(ln2 2+b2)

21+x ln2cos bx + 12(ln2 2+b2)

21+x ln 2 fracln2ln2 2 + b22x + 1

2(ln2 2+b2)21+xb sin bx =

2x ln2 cos bx+b sin bxln2 2+b2

Notice that the form of the nal result is the same asin the rst example. Here, you are experiencing thedierence between the way Maple handles exponen-tials and powers, and possibly the limitations on mem-

ory when Maple and Scientic WorkPlace  are runningtogether.

These examples illustrate how you can interact withthe system to explore for the result you want. The inter-action is both smooth and natural. You might also exper-iment with other sequences of operations|it is possible toend up with ever larger expressions by choosing the wrongoperations.

Denite Integrals

To evaluate a denite integral, place the insertion point in

the expression to be evaluated and from the Maple menu,choose Evaluate, or ctrl/cmd + E, or Evaluate Numeri-cally. Try the three choices on int10xdx.

Evaluate the following denite integrals. Some of them may take Maple a little time to compute.

1.R 0

sin xdx

2.R 10 ln xdx

3.R 10

exdx

4.R 0

x lnsin xdx

5.R 10 exdx

6.R 10

ex2

dx

7.R 11

1x5 dx

8.R 10

1x2 dx

9.R 11

1x2 dx

10.R 10

1x2 dx

10

Page 11: Manual para aprender a usar Scientific Workplace (ingles)

8/4/2019 Manual para aprender a usar Scientific Workplace (ingles)

http://slidepdf.com/reader/full/manual-para-aprender-a-usar-scientific-workplace-ingles 11/32

11.R 10dx

(1+x)p x

12.R 10

cosxp x

dx

13.R 10

lnxdx1x

14.R 10

lnxdx1x2

15.

R 10x3

ex1dx

16.R 10x13

ex1dx

Numerical Integration

Numerical integration can be performed by selecting Eval-uate Numerically on the Maple menu. Try this on the ex-amples below. Some of them take a couple of minutes.

1.R 10

ex2

dx

2.R 10

sin x3dx

3. R 10 sin3 100x5dx

4.R 40

cos x log xdx

5.R 10 x:8

p 1 x4dx

Innite Series

Many expressions can be expanded in innite series bychoosing Series on the Maple menu with the expressionselected. A dialog box comes up with two choices to bemade, the number of terms in the expansion, and what toexpand in powers of. The default for the number of termsis 5. The Expand in Powers of  box must be lled in.

1. ex Expand in powers of  x.

2. e2x+3y Expand in powers of  x 1.

3. e2x+3y Expand in powers of y 2.

4. x sin x Expand in powers of  x.

5. x sin x Expand in powers of  y.

6.p 1x4x2 Expand in powers of  x + 1.

Substituting a Value into an Expression

We currently accept these forms:exprjsupersub expr]

supersub [expr]

supersub exprjsupersub and

exprjsub expr]sub [expr]sub exprjsubNote that the rst three forms in each list have \expr"

surrounded by a \fence" from the Brackets dialog box, andthe left fence delimiter is the \null delimiter"; that is, anempty bracket. The null delimiter does not print, althoughit is visible on screen as a dotted vertical line.

The sub and superscripts contain the substitutionsthat are to be made in the expression. If only a subscript

is present, the expression is evaluated at those substitu-tions. If both are present, we get the expression with thesuperscript substitutions minus the expression with thesubscript substitutions. Apply Evaluate to the followingexamples:

xy]x=5x=2

xy]x=2

(x + y)4ix+y=z

xy]x=2;y=3

xy]x=4;y=5x=2;y=3

[xy]x=4;y=5x=2;y=3

xyjx=4;y=5x=2;y=3R 

sin xdxx=1

x=0R sin xdx

10R 

sin xdxjx=1x=0R 

sin xdxj10When the superscript and subscript are just numbers,

the expression must contain only one variable, otherwiseScientic WorkPlace  reports an error.

Matrices

Standard Operations

Maple has a large linear algebra package that containsmany operations on matrices. Choosing Matrices from theMaple menu brings up a host of operations that can be per-formed on a single matrix. Scientic WorkPlace  performsthe usual matrix addition, multiplication, and operationsbetween scalars and matrices. These are illustrated in thefollowing list.

1. From the Maple menu, chooseEvaluate. 1 2

4 3 +

5 68 7

.

The result,

6 8

12 10

, appears with square brackets

around it. Scientic WorkPlace  uses the same brack-ets for the result as appeared in the expression. Thisapplies to parentheses and brackets.

2. Evaluate the expression a

1 24 3

+ b

5 68 7

.

Try various other Maple commands on this one, likeSimplify and xpand. Evaluate the following three ma-trix expressions.

3.

1 24 3

5 68 7

4.

5 68 7

2

5.

5 68 7

1

Evaluate this one numerically also.

11

Page 12: Manual para aprender a usar Scientific Workplace (ingles)

8/4/2019 Manual para aprender a usar Scientific Workplace (ingles)

http://slidepdf.com/reader/full/manual-para-aprender-a-usar-scientific-workplace-ingles 12/32

6. Apply Factor to this matrix.

5 68 7

Such operations as Factor operate on each entry of thematrix.

7. Apply Evaluate to the expression 5+

1 24 3

Notice

how this is handled. The 5 is treated as 5 times the 22 identity matrix. This is convenient when evaluatingpolynomials at matrices, as in the following example.

8.

1 24 3

2 5

1 24 3

2

9. The exponential function is dened for matrices. Eval-

uatet

1 24 3

. Of course, it's for expressions such

as these that one needs to be able to denote a ma-trix by a symbol, that is, to make such denitions as

A =

1 24 3

and then write etA. We will learn how

to do this in the section on denitions.

The Matrices Submenu

The following examples illustrate using the commands inthe Matrices submenu. Apply the command indicated.

1. Adjugate

a bc d

2. Concatenate

a bc d

1 2 34 5 6

3. Characteristic Polynomial

a bc d

This operation chose the variable X  for the polyno-

mial. Its ritual for choosing the variable should neverconfuse that variable with a matrix entry. For exam-

ple, nd the characteristic polynomial of 

xX y

.

Column Basis

1 23 4

4. Condition Number

1 23 4

5. Deniteness Tests

1 23 4

6. Determinant a b

c d

There is a function det available directly, either bytyping it in while in mathematics mode or by clickingon it in the list under sin cos. So one may also compute

a determinant by applying Evaluate to det

1 23 4

,

for example. Try it. Now evaluate det

0@ 1 a a2

1 b b2

1 c c2

1A

and factor the result.

7. Try the matrix commands Eigenvectors and Eigenval-ues on the matrices

cos sin sin cos

and

1 23 4

. Try both Exact

and Numeric when appropriate.

8. The command Fill Matrix... allows easy entry of ma-trices of various special kinds. The menu that comesup is self explanatory. For example, to enter a 3 3identity matrix, choose Fill Matrix... , set Rows and

Columns to 3, and choose Identity in the window of the menu. Experiment with this command. See whathappens when you choose a 56 matrix and Identity.The Band option requires that you enter a list like\a;b;c" with an odd number of entries. Entering thelists \0", \1", and \0; ; 1" will generate respectively,a zero matrix, an identity matrix, and a Jordan block.The Dened by function option allows you to dene afunction like f (i; j) = 1

i+j1, enter f  in the box as the

name of the function, and generate a Hilbert matrix.

Fill Matrix... has another important function. If you

have a matrix such as24

1 2 3

5 5 47 8 935

and would like

the lower right 2 2 corner to be the zero matrix,then select this corner of the matrix, and under FillMatrix... choose zero. Try it. The lower right corneris replaced by the 2 zero matrix. No new matrix iscreated|a replacement is made.

There seems to be no way to insert a new matrix withFill Matrix... with alignment other than center align-ment for columns and center alignment for placementin text. But you can always change the alignments of a matrix using the Scientic WorkPlace  revise button.

9. Fraction Free Gaussian Elimination

a bc d

10. Gaussian Elimination

0@ 2 1 0

1 2 10 1 2

1A

11. Choosing Hermitian Transpose on the Matrix menu hasthe obvious result. One may also get the Hermitiantranspose of a matrix by using the superscript H . Try

it on

i 2 + i

4i 3 2i

12. Inverse0@ 2

1 0

1 2 10 1 2

1A You can also take the in-

verse of a matrix A by evaluating 1. Try it.

13. Jordan Form

0@ 2 1 0

1 2 10 1 2

1A This produces a fac-

torization of the matrix as P JP 1where J  is in Jor-dan form. This holds for the rational canonical formalso, and is illustrated below.

12

Page 13: Manual para aprender a usar Scientific Workplace (ingles)

8/4/2019 Manual para aprender a usar Scientific Workplace (ingles)

http://slidepdf.com/reader/full/manual-para-aprender-a-usar-scientific-workplace-ingles 13/32

14. Minimum Polynomial

a bc d

As in the case of characteristic polynomials, the sys-tem nds a variable for the minimum polynomial. Youdo not have to specify it.

15. Norm

0@ 2 1 0

1 2 10 1 2

1AThere are other norms This

one is the 2-norm.0@ 2 1 01 2 1

0 1 2

1A2

gives the

same norm. In the section on denitions, other normsof matrices are illustrated.

16. Null Space Basis

0@ 2 1 0

2 1 00 1 2

1A

17. Orthogonality Test

cos sin sin cos

18. Permanent a b

c d

19. QR

0@ 2 1 0

2 1 00 1 2

1A

20. Rank

0@ 2 1 0

2 1 00 1 2

1A

21. Rational Canonical Form

a bc d

22. Row Reduced Echelon Form0@ 2

1 0

2 1 00 1 2

1A

23. Reshape

0@ 2 1 0

2 1 00 1 2

1A Try this on matrices of var-

ious shapes.

24. Row Basis

0@ 2 1 0

2 1 00 1 2

1A

25. Singular Values

1 23 4

26. SVD produces a factorization of the form U DV  whereD is the diagonal matrix of singular values and U  andV  are orthogonal matrices. This operation works onlyon matrices of numbers. Try it on the matrix above.

27. Smith Normal Form

1 23 4

28. Trace

a bc d

29. Transpose

a bc d

You can also get the transpose of 

a matrix using a superscript T  Evaluate

a bc d

T .

Solving Systems of Equations

Solve on the Maple menu gives solutions to equations andsystems of equations. There are four choices under the

Solve menu: Exact Numeric, Integer, and Recursion.

Solve Exact

To solve 2x = 4, choose Solve + Exact. The solution ap-pears after the equation. Try it. Do the same for theequation y3 y 1 = 0.

A system of equations is written by entering the equa-tions in an n 1 matrix, one equation to a row. Alterna-tively, a system of equations can be typed into a display,using the enter key to add additional equations. Whenwe have the same number of unknowns as equations, weput the insertion point anywhere in the system and choose

Solve + Exact. The variables are found automatically. Trythe following examples.

1. This is a 2 1 matrix.x2 + 3y2 = 7x2 2y2 = 2

2. This is a display.

x + y 2z = 1

2x 4y + z = 0

2y 3z = 1

3.

2x y = 1x + 3z = 4x y 3z = 3

A system of linear equations can also be dealt with bysolving its matrix version. The last two examples abovecorrespond to the two matrix equations below. Use Solve+ Exact to solve these equations and compare the solutionswith those you obtained above.

1.

24 1 1 2

2 4 10 2 3

3524 x

yz

35 =

24 1

01

35

2.24 2 1 0

1 0 31 1 3

3524 x

yz

35=

24 1

4335

There is no problem when the number of unknownsmatches the number of equations, but when there are moreunknowns than equations, Maple must be told which un-knowns to solve for. To solve the following equation, youmust specify the unknown. Put the insertion point any-where in the equation and choose Solve + Exact. A dialogbox comes up asking you to choose the variable(s) to solvefor. Solve rst for x and then for y.

13

Page 14: Manual para aprender a usar Scientific Workplace (ingles)

8/4/2019 Manual para aprender a usar Scientific Workplace (ingles)

http://slidepdf.com/reader/full/manual-para-aprender-a-usar-scientific-workplace-ingles 14/32

ex = y+1y1

Here is a system with 2 equations and 3 unknowns.Solve it for x and y, and then for x and z. To do it, justclick anywhere in the system, choose Solve + Exact and llout the dialog box with \x; y" or \; z".

2x y = 1x + 3z = 4

Solve the following two systems for various combina-tions of the unknowns.

2x

y2 = 1x + 3z = 4 When solving for x and y; or for y and

z, the solution to this system is given in terms of the rootsof a quadratic.

2x y = ex

x + 3z = 4The solution to the following system is given in terms

of the roots of a cubic.

2x y2 = 1

x + 3z = 4

y + z2 = 2

The next system is the same, but with a oating pointnumber in it. In this case, only real solutions are returned.

2x y2 = 1:0x + 3z = 4y + z2 = 2

Solve Numeric

Solve + Numeric is meant to be used only on special oc-casions.footnotet is used mainly on birthdays, weddings,Bar Mitzvahs, and occasions when equations involving ex-ponentials must be solved. If answers are desired in dec-imal form, put one of the coecients in the equations inoating point form and use Solve + Exact.

Solve + Numeric is used primarily when solving (sys-tems of) transcendental equations. Solve + Numeric at-tempts to nd a single real solution, but may fail evenif solutions exit. The important feature is that you canrequire that variables take values in specied search inter-vals. Specifying appropriate search intervals may result ina successful calculation. Try these examples:

1. 10x = ex Use Solve + Exact and note what happens.Now do the next two using Solve + Numeric.

2. 10x = ex; x 2 (1;1) Note the red comma and noimbedded spaces.

3. Displays can also be used for equations with searchintervals.

10x = ex

x 2 (0; 1)

4.

0@ x2 + y2 = 5

x2 y2 = 1x 2 (0; 4)

1A Use Solve + Numeric. Note that if 

(x; y) is a solution, then so is (x;y).

5.

0BB@

x2 + y2 = 5x2 y2 = 1

x 2 (0; 4)y 2 (0;1)

1CCA Use Solve + Numeric.

Solve Integer

Solve + Integer nds integer solutions to equations andsystems of equations. Use Solve + Integer on the followingexamples.

1. 3x + 4y = 10

2.3x + 2y = 53x z = 1

Solve Recursion

Solve + Recursion nds solutions to a recursion or a systemof recursions. Try the following examples.

1. y(n + 2) + 3y(n + 1) + 2y(n) = 0

2.

y(n + 2) + 3y(n + 1) + 2y(n) = 0y(0) = 2

y(1) = 1

3.

y(n + 1) + z(n) = n + 2n+1

z(n + 1) y(n) = n + 3 2n

y(1) = 1z(1) = 2

Modular Arithmetic

The Integers modulo m

The basic computation Scientic WorkPlace  does here is toevaluate alimfuncmodm where a is and integer and m is apositive integer. Place the insertion point in the expressionand apply Evaluate. The answer is the least non-negativeresidue. For example 34 mod 4 = 2, and 69mod13 = 9.

You can also evaluate a1 mod m if  a and m arerelatively prime. In particular, you can always evaluatea1 mod p where

isaprimeand

aisnotamultipleof p.Forexample231limfuncmod3 = 2,and hence 232 mod 3 = 1. So you can solve congruencesax b mod m by calculating a1b mod : Solving the con-

gruence 25x 8 mod13, we get 251

8limfuncmod13 =5. (Note that applying Solve + Exact to 25x 8 limfuncmod13 leads to a parsing error. Scientic Work-

Place  does not understand the notation directly.) In-deed, 25 (5) mod13 = 8. You can solve systems of con-gruences (if the moduli are relatively prime in pairs) bysolving them two at a time and thus reducing to one con-gruence. To solve the system

x 45 mod237

x 19 mod419

14

Page 15: Manual para aprender a usar Scientific Workplace (ingles)

8/4/2019 Manual para aprender a usar Scientific Workplace (ingles)

http://slidepdf.com/reader/full/manual-para-aprender-a-usar-scientific-workplace-ingles 15/32

we have x = 45 + 237k, and substituting into the secondcongruence gives 45 + 237k 19 mod419. Thus 237k 19 45 mod19, and k 2371(19 45)mod419 = 60.Hence x = 45 + 237 60 = 14265. The solution is uniquemodulo (237 419) = 99303. Solve the following systemof congruences and check your answer.

x 36 mod111

x 18 mod237

x 120 mod 419.To calculate powers modulo m; write anmod m and

evaluate. You can dene things rst if you wish. Forexample, make thedenitions = 2789596378267275; n = 3848590389047349,and m = 2838490563537459. Calculate nmod m and27895963782672753848590389047349 mod 2838490563537459.These calculations are done rather quickly.

Matrices Modulo m

The mod function also works with matrices. Here are someexamples.

1.

5 8 129 4 34

mod 3 =

2 2 00 1 1

2.

0@ 3 7 5

5 4 82 0 5

1A1

mod11 =

0@ 9 9 3

2 5 13 3 10

1A

3.

0@ 3 7 5

5 4 82 0 5

1A

0@ 9 9 3

2 5 13 3 10

1A mod 11 =

0

@1 0 00 1 0

0 0 1

1

ANote that the rst operates entry-wise. In the sec-

ond, the matrix inverse is taken, operating mod 11. In thethird the left side is multiplied out and the result is givenmod 11.

Polynomials Modulo m

The mod function can also be combined with polyno-mials. The expression p(x) mod5 returns the polyno-mial p(x) with its coecients reduced mod 5: For example8x2+ 42x31mod5 = 3x2+ 2x + 4. Evaluate reduces eachof the coecients modulo 5. Notice that parentheses were

not required around the polynomial.

1.

8x2 + 42x 31

(13x 23) mod7. If you apply Ex-pand to this expression, you get 6x3 + 5x2 + 3x +6. If you apply Evaluate, you get

x2 + 4

(6x + 5)

To get the latter multiplied out mod7, expandx2 + 4

(6x + 5), getting 6x3 + 5x2 + 24x + 20, and

reduce this mod 7. Of course, you could have mul-tiplied

8x2 + 42x 31

(13x 23) out rst by using

the Maple command Expand, and then reduced mod 7.But the simplest thing to do is to apply Expand.

2. Apply Factor to 6x3 + 5x2 + 3x + 6mod 7

3. Evaluate the following expression and apply Factorto the result, operating mod 7.

9x2 + 39x 29

+

23x2 + 13x 23

Polynomials Modulo Polynomials

Two polynomials f (x) and g(x) are congruent modulo apolynomial q (x) if and only if  f (x)

g(x) is a multiple of 

q (x), in which case we write

f (x) g(x) (mod q (x)) .

Evaluating g(x)mod q (x) gives a polynomial of minimaldegree that is congruent to g(x) modulo q (x). Evaluatethe next two expressions.and apply Polynomial + Divide tothe third one.

1. x3 + 3x2 + 3x + 1mod x + 1

2. x5 4x2 + 3x 1mod x3 x2 + x 1

3. x54x2+3x1

x3

x2

+x1

Denitions

If you choose Dene from the Maple menu, the submenuthat comes up has seven items: New Denition, Undene,Show Denitions, Clear Denitions, Save Denitions, RestoreDenitions, and Dene Maple Name. Here is how theywork.

New Denition, Undene, Show Denitions, andClear Denitions

There are two basic kinds of new denitions:

1. Dening a symbol a to be an expression, such as x2+2,

or a matrix such as

1 23 4

, or a vector, and so on;

2. Dening a function f  using an expression, for examplef (x) = x2 +2. Now a and f  are mathematical objectsof dierent kinds, and as such have dierent behaviorand accept dierent operations on them.

To make a denition, such as p = ax2 + bx + c, putthe insertion point anywhere in the equation, or select theexpression, and choose New Denition from the Dene sub-

menu. This makes the assignment, and from then on, prepresents the expression ax2 + bx + c. It is not a func-tion, and in particular p(2) is not 4a + 2b + c, but 2 p =

2ax2+2bx+2c . On the other hand,R 

pdx = ax3

3 +bx2

2 +cx,

and dpdx

= 2ax + b.

To use a symbol, say A, for the matrix

a bc d

,

click anywhere in the equation A =

a bc d

(or se-

lect the whole thing if you prefer), and choose Dene

15

Page 16: Manual para aprender a usar Scientific Workplace (ingles)

8/4/2019 Manual para aprender a usar Scientific Workplace (ingles)

http://slidepdf.com/reader/full/manual-para-aprender-a-usar-scientific-workplace-ingles 16/32

+ New Denition. Then one can operate on A as withany matrix. For example, make the denition and thencompute A2, 5A, and A1, using Evaluate or ctrl/cmd

+ e. The results will be 2 =

a2 + bc ab + bdca + dc bc + d2

,

5A =

5a 5b5c 5d

, and A1 =

dadbc badbc cadbc

aadbc

.

The menu items Undene, Show Denitions, and ClearDenitions are self explanatory. Show Denitions exhibits

all denitions in force. Clear Denitions clears all deni-tions that have been made. To clear particular denition,put the cursor anywhere in the dening expression andchoose Undene. Alternately, select the symbol denedand choose Undene. The symbol does not have to be inthe dening expression. For example if  a has been de-ned by a = 2x + 4, then selecting any \a" anywhere, intext or in mathematics, and choosing Undene clears thedenition of  a.

Below are some more examples for you to try. Beforeyou start, Clear Denitions. It is easy to forget that somesymbol has been dened to be some expression, and if thatsymbol is used later, you can get surprising results. For

example, if you made the denition a = x2, forgot aboutit, and later computed

R asds, expecting to get as

2

2 , youare in for a surprise. In some complicated computation,the error may not be apparent. So choose Clear Denitionsnow.

Make the denitions p = ax2 + bx + c, q  = 4y2 +

3xy + 2, and A =

1 x + y4 3

. Evaluate the following

expressions.

1. p + q 

2. pq 

3. 3 p + 4q 

4. p=(x + 1) Apply Polynomials + Divide to this one andthe next.

5. q=(y2 + 1)

6. A2

7. pA

8.R 

pdx

9. dpdx

10.R 

p

11. Dx( pq )

12.R 

pqdy

13.R R 

pqdydxp

14. q mod2

If the integrand contains dened expressions, and novariable of integration is specied, the choice of that vari-able is made by Maple, and in ambiguous situations theresults can be unpredictable. Rework the last two exam-ples above after making the denitions a = x + y, andb = x + y.

If the insertion point is placed within a mathematicalexpression, ctrl/cmd + ? gives Scientic WorkPlace 'sinterpretation of that expression. Try this on the expres-

sions above and on the following expressions. Note thatwhen the integrand contains dened expressions and novariable of integration is specied, the variable of inte-gration is shown as ?, indicating that Scientic WorkPlace 

cannot determine it. \?" is also used in sums and productswhen the index is not specied and dened expressions arepresent. Compare

P3x=1 a with

P31 a using ctrl/cmd +

?. Also, perform the integrations indicated, and note thechoice made by Maple in the ambiguous cases.

1.R 

xa

2.R 

xadx

3.R 

1x2+y2

4.R x2

x2+y2

It is legitimate to dene expressions in terms of otherexpressions. For example, one can dene r = 3 p cq  ands = nr + dpdx .

Now make the denitions r = 3 pcq , s = nr+ dpdx

, a =2x+ 3y and = ax and perform the following calculationson them. Remember that p and q  have previously beendened as p = ax2 + bx + c and q = 4y2 + 3xy + 2.

1. r + cq 

2.R 

(s nr)dx

3. a

4. dadx

To dene the function f  whose value at x is ax2 +bx + c, write f (x) = ax2 + bx + c, put the insertion pointanywhere in the equation and choose New Denitions fromthe submenu Dene. Now the symbol

representsthefunctionsodefined; andbehaveslikeafunctio

f(y)=ay2+by+c denes the same function. The symbolused for the function argument in making the denitiondoes not matter. You can even use a previously denedsymbol or the symbol f  itself. Here are two examples.Dene the functions g and h and then evaluate them at t.Clear Denitions before you start.

1. g(x) = x sin x

2. Evaluate g(t)

3. h(x) = x2

16

Page 17: Manual para aprender a usar Scientific Workplace (ingles)

8/4/2019 Manual para aprender a usar Scientific Workplace (ingles)

http://slidepdf.com/reader/full/manual-para-aprender-a-usar-scientific-workplace-ingles 17/32

4. Evaluate h(t)

The denition of a function f  may be undone by high-lighting any  `f" anywhere and choosing Undene. Alter-nately, you can put the insertion point in the deningequation and choose Undene. lear Denitions of courseundenes everything, functions and expressions.

If you choose Show Denitions from the Dene sub-menu, a window comes up showing the denitions in force,

both of expressions, or assignments, and of functions. Inthe case of assignments, we show the denition that Mapleactually made using full evaluation, rather than the de-nition we sent to Maple. In the case of functions we showthe denition we sent to Maple, rather than the denitionMaple made.

If a dierential equation has been solved numerically,the name of the function constructed appears in the ShowDenitions window, with the indication that it is the re-sult of a numerical process. See the section on dierentialequations.

If  g and h are previously dened functions, then thefollowing equations are examples of legitimate ones for

making denitions. Each time you redene f , the newdenition replaces the old one.

1. Dene + New Denition f (x) = 2g(x)

2. Evaluate f (t)

3. Dene + New Denition f (x) = g(x) + h(x)

4. Evaluate f (t)

5. Dene + New Denition f (x) = g(x) h(x)

6. Evaluate f (t)

7. Dene + New Denition f (x) = g(x)h(x)

8. Evaluate f (t)

9. Dene + New Denition f (x) = g(x)=h(x)

10. Evaluate f (t)

11. Dene + New Denition f (x) = (g(x))2

12. Evaluate f (t)

13. Dene + New Denition f (x) = eg(x)

14. Evaluate f (t)

15. Dene + New Denition f (x) = g(x)h(x)

16. Evaluate f (t)

17. Dene + New Denition f (x) = g(h(x))

18. Evaluate f (t)

The standard operations, such as integration and dif-ferentiation, are available for functions in the follow-ing ways:

19.R 

f (x)dx

20. ddxf (x)

21. Dxf (x)

22. df (x)dx

23. f 0(x)

What is really happening is that we are operating on

expressions, not functions. That is, we always use f (x),or f (y), and so on, but never f  alone. We have not imple-mented an algebra of functions.

Note also (as illustrated by the last example above)that \prime" has been implemented as the dierential op-erator on functions. While we are free to use z0 = x + yas the name of an expression, we are not allowed to use z0

as the name of a function to be dened. When f  has beendened as the name of a function, f 0(x) is its derivative atx and f 00(2) is its second derivative evaluated at 2.

Now make the denitions f (x) = x2 + 2x + c, andg (x) = xy c, and do the following calculations.

1. f (0)

2. f 0(1)

3. g00(t)

4. f (y)

5. f (g(0))

6. f (2) g(c)

7. f (g(x))

8. Dxf (g(x))

9.R 10

f (x)dx

10.R 10

f (z)dz

11.R 10

f (c)dc

12. Dxf (x)

13.R 

Dxf (x)dx

14. DxR 

f (x)dx

15. f 0(s)

16. f 0(g(x))Here are some additional features involving Dene.

17. Get series expansions for a and f (x) after making thedenitions a = e2x+3y and f (x) = x sin x.

18. Polynomial functions can be evaluated at matrices.

Dene A =

1 23 4

and p(x) = x2 5x 2: Can

you explain the result when you evaluate (A)? Be surethat you press ctrl/cmd + e twice.

17

Page 18: Manual para aprender a usar Scientific Workplace (ingles)

8/4/2019 Manual para aprender a usar Scientific Workplace (ingles)

http://slidepdf.com/reader/full/manual-para-aprender-a-usar-scientific-workplace-ingles 18/32

19. In dealing with matrix equations, the matrices maycontain parameters, have more than one column andmay be dened expressions. To illustrate this, dene

A =

1 23 4

, b =

2 1 46 2 10

and from the Solve

submenu apply Exact to the following equations.

20. AX  = b

Now dene A = s 23 4 and b =

26 and apply

Solve + Exact to

21. AX  = b

For some reason Maple will allow a multicolumn bor an A with parameters, but not both in the sameequation.

22. Clear denitions and dene f (x; y) = 23x2y +456xy +512mod7. Evaluate

23. f (x; y)

24. f (12; 2c)

25. Dene + New Denition f (t) = 3t2+ 5t+6mod x2 + 1.Evaluate

26. f (x2 + x + 2)

27. f (x2 + 1). Warning: Do not dene f (x) = 3x2 +5x +6mod x2 + 1 and evaluate f (some polynomial inx). This will change the modulus and give nonsenseanswers.

Denitions with Deferred Evaluation

Several users have complained about Maple denitions,

which in SWP2.01 uses the Maple default of full evalu-ation. The process of full evaluation applies the resultsof previous denitions to candidates for new denitions.Thus, if the denition a = 1 is followed by the denitionx = a , then x has a value of 1 under full evaluation .Subsequent changes to the value of  a do not aect x: Un-der deferred evaluation, any changes to a will change thevalue of  x: The process of deferred evaluation is now usedin Scientic WorkPlace .

In particular, recursive denitions are no longer al-lowed.

Remembering Solutions

Solving an equation or system of equations leads to solu-tions, but the resulting equations are not denitions. Inorder to use the solutions, select an equation and applyDene + New Denition.

For example, recall the system

x + y 2z = 1

2x 4y + z = 0

2y 3z = 1

whose exact solution is

z = 54 ; y = 11

8 ; x = 178

. To use

x, y, and z, select the equation x = 178 and apply Dene

+ New Denition; select the equation y = 118 and apply

Dene + New Denition; and select the equation z = 54

and apply Dene + New Denition. This process can bedone conveniently with a mouse by selecting an equationand clicking the dene icon or from the Dene submenuchoosing New Denition.

Save Denitions & Restore Denitions

Choosing Save Denitions from the Maple menu has theeect of storing all the currently active denitions in theworking copy of the current document, and when the doc-ument is saved, the denitions are saved with it. Re-store Denitions is just the reverse|it takes any deni-tions stored with the current document and makes themcurrently active. Note that each invocation of  Save Den-itions overwrites any denitions that may have been pre-viously saved, so if you want to add some denitions tothose already saved, you must choose Restore Denitionsbefore Save Denitions. Denitions are saved and restored

in the order in which they were made.The fact that active denitions are currently associ-ated with the Maple session rather than a specic doc-ument is sometimes a source of confusion. The Maplesession lasts as long as we are continuously in cientic 

WorkPlace , even though we may edit a number of dif-ferent documents during the session. To see this, makeseveral denitions, choose Show Denitions to verify thatthey are in eect, and then open a new document. ChooseShow Denitions again and note that the same denitionsare still in eect. This can be a convenience if you areworking on related documents and want to use these def-initions, but if not, Clear Denitions will get rid of them,

and Restore Denitions will activate any denitions storedwith the new document.

The Denition Options on the Settings Menu speci-es the default behavior of saving and restoring denitionswhen saving and opening documents.

Functions of Several Variables

Functions of several variables are dened by writing anequation such as (x; y; z) = ax + y2 + 2z, or g(x; y) =2x + sin3xy for example, clicking in the equation andchoosing New Denition. Just as in the case of functionsof one variable, we always operate on expressions gotten

by evaluating the function at a point.

Row and Column Arguments

If we want a number of values of a function, it is conve-nient to be able to pass all the data to Maple in an arrayand have it return an array of the same dimensions con-taining the function values. We have implemented this forarrays which are row or column matrices. Thus if we de-

18

Page 19: Manual para aprender a usar Scientific Workplace (ingles)

8/4/2019 Manual para aprender a usar Scientific Workplace (ingles)

http://slidepdf.com/reader/full/manual-para-aprender-a-usar-scientific-workplace-ingles 19/32

ne R =

a b c d

and C  =

2664

0123

3775, then sin R =

sin a sin b sin c sin d

and sin C  =

2664

0sin1sin2sin3

3775 when

we apply Evaluate or ctrl/cmd + e. It works the same

way for user dened functions and their derivatives, andfor raising to powers. Thus 2R =

2a 2b 2c 2d

and

R2 =

a2 b2 c2 d2

. When both the base and ex-ponent are rows or columns, the result is always a matrixwhose rows correspond to the base and whose columns cor-respond to the exponent, whether or not those arrays arerows or columns. Explore this by working the followingexamples. First dene R and C  as above, and also de-ne S  =

0 1 2 3

and f (x) = x sin x. Remove the

denitions after you have nished the examples.

1. f (C )

2. f (S )3. f 0(S )

4. f 00(S )

5. 3C 

6. 3S 

7. log R

8. RC 

9. RS 

Matrix Valued Functions

We can dene functions, such as this one, whose values arematrices.

(x) =

x sin x

ex x3

At the moment all we can do with them is evaluate

and dierentiate. For example, () =

0

e 3

and

(i) =

i i sinh 1 i3

. Evaluate 0(x) and 0(), and

other forms for dierentiation.

Piecewise-Dened Functions

Another class of matrix-valued functions are the piecewise-dened functions which are dened by dierent expressionson dierent parts of their domain. Here are two examples.

Note that we have made some very strict conditions 

concerning the structure of case functions . They must bespecied in a 3 column matrix with at least two rows, withthe functional values in the rst column, \if" or \ if " inthe second, and the range condition in the third column.

The range conditions should be entered in the order of increasing values. We have also assumed that the matrixis fenced with a left brace and the empty right delimiter.The two following examples should clarify matters.

Dene + New Denition

f (x) =

8<

:

x + 2 if   x < 02 if 0 x 1

2=x if 1 < x

and evaluate f (0), f (1), and f (2).Evaluate

f 0(x) =

8>>>><>>>>:

1 if x < 0undened if x = 0

0 if x < 1undened if x = 1 2x2 if  1 < x

Plot 2D + Rectangular f (x)Dene + New Denition

h(x) = x + 2 if   x < 1

3=x if 1 x

and evaluate the following.

1.R 20

h(t)dt

2.R 10

(x + 2) dx

3.R 21

3xdx

4.R 10

(x + 2) dx +R 21

3x

dx

Access to Other Maple Functions

You can access Maple functions that are not supporteddirectly in cientic WorkPlace . Here is how you do it.Choose Dene Maple Name under the Dene submenu. Fillout the dialog box that comes up. If nextprime is theMaple functions you want, type in nextprime(x). In theScientic WorkPlace  line, use a single character unless youhave a custom name prepared: In any case follow it by theargument \(x) ". Leave the le name blank. Then checkthe appropriate Maple package. Then choose OK. That'sit.

The items Undene, Show, Save, and Restore under theDene submenu work for these Maple function as for thosedened in Scientic WorkPlace . Clear Denitions does not

remove these. They must be removed one at a time usingUndene. The format in Show Denitions for the Maplefunctions is a bit dierent, so you can tell which are ac-cessed from Maple and which are Scientic WorkPlace  -dened.

User Dened Maple Functions

You can access user-dened functions written in Maple.While in a Maple session, save the function to a le

19

Page 20: Manual para aprender a usar Scientific Workplace (ingles)

8/4/2019 Manual para aprender a usar Scientific Workplace (ingles)

http://slidepdf.com/reader/full/manual-para-aprender-a-usar-scientific-workplace-ingles 20/32

 lename.m . To access `yourfunction(x)' do the follow-ing. While in Scientic WorkPlace  , choose Dene MapleName. Fill out the dialog box with `yourfunction(x)' in therst line, and so on. The File line must give the completepath. It should read `/dirname/subdirname/lename.m'Note the forward slashes. Also you should check all appro-priate Maple packages. The items in the Dene submenuwork the same way for these functions as for the Maple-dened functions.

2D Plots

The plotting capabilities of  Scientic WorkPlace  are amongits most powerful and useful features. For example, beingable to plot functions and expressions quickly, revise the plots,and examine the results adds an experimental dimension toproblem solving that was not easily accessible in the past.

We begin by discussing the various items under the Plot2D menu. To plot an expression involving one variable, suchas x sin x, put the insertion point in x sin x and from the Plot2D submenu, choose ectangular. A frame containing a plotof the expression appears in-line after the expression, with

the lower edge resting on the text baseline and the insertionpoint at the right of the plot The rst attempt at a plotuses default parameters, with x ranging from 5 to 5, andthe range of  y depending on the expression. In the Settingsmenu you can change the default size of the plot box. Makethat plot now of  x sin x.

A single click of the mouse with the pointer inside theframe causes 8 black handles to appear. We say that the 

  frame has been selected . In this state, you resize the frameby grabbing one of the handles and dragging. The cornerhandles leave the opposite vertex xed while moving the twosides adjacent to the handle. The edge handles move only thecorresponding edge in or out. Either type of change stretchesor shrinks a plot in the view, along with the frame. Resizingthe frame retains the same limits on the view. If the frame hasbeen selected, you can move it up and down by placing themouse pointer inside it, holding down the left mouse buttonand dragging. Experiment with these things on the plot of x sin x you have just made.

There are various ways in which you can instruct Scien-

tic WorkPlace  to plot. If you want to plot y = x sin x, youcan do any one of the following things.

1. Click in x sin x or highlight it and choose Plot 2D +Rectangular.

2. Dene y to be the expression x sin x, put the cursor justto the right of  y; or highlight y and choose Plot 2D +Rectantular.

3. Dene the function f (x) = x sin x, put the cursor inf (x), or highlight f (x), or highlight the function f , andchoose Plot 2D + Rectangular.

Now plot the function y = x sin 1x . Double click the

mouse with the pointer inside the frame. Eight gray handlesappear on the frame, and the mouse pointer takes the shape

of a hand when it is over the view. We say that the view has 

been selected .To translate a view, select the view by double-clicking,

move the mouse pointer over the view, so that it takes on theshape of a hand, and click and drag the frame. An outline of the frame moves as you drag, while the plot remains xed.When you release the mouse button, the frame is redrawn atits original position with a translated view. This feature isused to \pan" across the Cartesian plane in any direction to

capture dierent portions of the plot. Experiment with thisusing the plot of  x sin 1

x that was made above.

Frame Properties Dialog Box

You use the Frame Properties dialog box to specify framedimensions precisely and to determine how the frame is placedin your document. This time we will work with the plot of the piecewise dened function

h(x) =

8<

:

x2 1 if x < 11 x2 if  1 x 1x2 1 if  1 < x

First, dene h and plot it. Now select the frame, or select theview, or put the cursor immediately to the right of the picture.From the Edit menu, choose Properties + Frame. You usethe page that comes up to specify frame dimensions preciselyand to determine how the frame is placed in your document.(You can get the same page to come up by selecting the frameor the view and using the properties icon.) You determinethe placement of the frame by choosing In line, Displayed,or loating. When a frame is In line, you can move it up ordown within the line as described before. An in-line framebehaves like a word in the text, in the sense that when youenter additional items to the left of it, the frame is pushedalong in the line.

Displayed and oating frames both appear on the screencentered on a separate line. They behave dierently whenprinted. A oating frame may be moved (\oated") fromits on-screen position to facilitate page-breaking. A displayedframe is printed at the same place relative to the surroundingtext as it appears in the screen display. Floating frames tendto work well if the document contains only a few plots orpictures. However, if there are a signicant number of oat-ing frames the printed pages may not be what you expect.In such a case you may nd one graphic at the top of eachpage, and these graphics may appear many pages after thereference in the text. The remaining graphics may appear

clumped together at the very end of the manuscript.Display a frame by choosing Displayed from the Framepage. Do not select the plot and click the icon for displayedmathematics. That icon is designed to create displays of mathematics and is not suited for displaying plots or pic-tures.

Plotting More than one Function at a Time

To plot several expressions of the same variable at once,seperate them with red commas, put the cursor in the list

20

Page 21: Manual para aprender a usar Scientific Workplace (ingles)

8/4/2019 Manual para aprender a usar Scientific Workplace (ingles)

http://slidepdf.com/reader/full/manual-para-aprender-a-usar-scientific-workplace-ingles 21/32

and choose the appropriate plot command. If you alreadyhave a plot and want to add to it the plot of another expres-sion, simply drag the expression into the plot. If  f (x) is adened function, you can add it to a plot by dragging f  orf (x) into the plot. Remember, for a piecewise-dened func-tion though, drag the name, not the expression f (x). Youcan also add plots using the dialog boxes described below.

Plot Components Page

Plot the polynomial x3 83

x2 53

x+2 and sin2x on the samegraph. To do it, click anywhere in x3 8

3x2 53x + 2; sin2x

and choose Plot 2D + Rectangular. Do it. The plot doesnot look too good since sin2x is hardly visible. Select theview or the frame or put the cursor immediately to the rightof the picture. From the Edit menu choose Properties + PlotComponents. A page comes up that lets you do a number of things. Read the discussion below and then make a decentpicture out of the plot you just created. (You can also getthis page to come up by selecting the view (or the frame) orby putting the cursor immediately to the right of the pictureand choosing the properties icon.)

The item box in the upper left corner of the page showsone of the expressions or functions you are plotting in theview. These are referred to as \items" and listed by ItemNumber. You can view all current functions or expressionsplotted by clicking the up-down arrows. You can change thecurves that are plotted by editing the displayed item, addinga new item, or removing an item from the list. To changean item, edit it in the box. To add an item, select Add Item,and then type the item in the empty box that comes up. Todelete an item from the list, click the arrows until the item isdisplayed in the box, and then select Delete Item.

You set the sampling interval by editing the numbers inthe Domain Intervals.

The plot is determined by the data points computed.You can increase the accuracy of the graph by increasing theSample Size. Because increasing the Sample Size slows downthe plotting process, you may want a relatively small numberof data points for real-time demonstrations and a relativelylarge number of data points for printed documents.

In a plot, the data points computed are connected eitherby line segments or are displayed as points, depending on yourchoice of Line or oint under Plot Style. The default is Line,which connects the points with lines. You can change theappearance of a Line Plot by changing Line Style, Line Color,or Thickness. You can also choose Point, which displays onlythe computed points. You can select the symbol used to plot

the points with Point Symbol.

Axes & View Page

You have a choice of Axes Scaling between Standard, Log, orLog-Log. You can specify the Axes Type as Normal, Boxed,Framed or None. The choices Normal and None are self-explanatory. The Boxed appearance shows the plot inside arectangular frame, and Framed displays the left and lower

edges of the box. All of these choices (except None) displaynumerical labels on the axes or box edges.

You specify the view by typing numbers into the ViewIntervals boxes or by selecting Default. If you select UseDefault, the view is determined automatically to maximizethe information contained in the plot. The x- and y-axescan have quite dierent scales, and the curve is normally nottruncated at the top or bottom. Select Equal Scaling on EachAxis to force the y-axis to use the same scale as the x-axis.

Plotting Points

Instead of plotting an expression, you can specify directlya set of points and make a plot which simply connectsthese points with straight lines in the order in which thepoints are listed. For example, put the insertion point in[(1; 1); (1; 2); (2; 2); (2; 1); (1; 1)] and choose Plot 2D + Rec-tangular. You need to revise the plot and set appropriateranges for x and y to make this look like the square that itis.

Various formats for the points are acceptable. In the listabove, the parentheses around the points are not required.

But the outside square brackets must be square brackets.The points may be entered as an n 2 matrix.

Conformal Plots

A complex function F (z) (z and F (z) are both complex) isa challenge to graph, because the usual graph would requirefour dimensions. A conformal plot of a complex functionF (z) is the image of a two-dimensional rectangular grid of horizontal and vertical line segments. The default is an 11 by11 grid, with intervals 0 x 1 and 0 y 1 subdividedinto 10 equal subintervals. If  F (z) is analytic, then it pre-serves angles at every point at which F 0(z) 6= 0, and hence

the image is a grid composed of two families of curves thatintersect at right angles.To create a conformal plot of an expression such as z2 +

2z 1, put the insertion point in the expression and chooseConformal from the lot 2D submenu. The number of gridlines and the view can be changed in the dialog box. Doconformal plots of the following.

1. z2

2. z2 + 2z 1

3.z 1

z + 1

Plots of Vector and Gradient Fields

A function that assigns a vector to each point of a region intwo- or three-dimensional space is called a vector eld. Theoperation Plot Vector Field requires a pair of expressions intwo variables representing the horizontal and vertical com-ponents of the vector eld. To plot a vector eld, type apair of two-variable expressions representing the horizontaland vertical components of a vector eld into a column vec-tor. With the insertion point in the vector, choose Vector

21

Page 22: Manual para aprender a usar Scientific Workplace (ingles)

8/4/2019 Manual para aprender a usar Scientific Workplace (ingles)

http://slidepdf.com/reader/full/manual-para-aprender-a-usar-scientific-workplace-ingles 22/32

Field from the Plot 2D submenu. Try it with the vector eld(x; y) = [x + y; x y].

The vector eld that assigns to each point (x; y) thegradient of  f  at (x; y) is called the gradient eld associated 

with the function  f . To plot a gradient eld, leave the inser-tion point in the expression for f (x; y) and from the Plot 2Dsubmenu, choose Gradient. Try it on f (x; y) = x2 + 2y2.

Parametric Equations

So far we have dealt only with the menu item Plot 2D +Rectangular.

If you bring up the Plot Properties for a parametric plot,one choice you have is between Cartesian and Polar coordi-nates. The default range for

istheinterval

[-5,5]:Iftherangeof tisbig; theplotmaybedrawnoveritself severaltimes:Forthisparticularplot;r estrictingtherangeto[0,2]gives a much sharper image.

Implicit Equations

The equation of a circle cannot be rewritten as a function of one variable. You can plot the set of points satisfying such anequation using the 2D implicit plot feature. Put the insertionpoint in the equation and select Plot 2D + Implicit. Do itwith the equation of the circle (x 1)2 + (y + 1)2 = 1: Nowthis picture is pretty bad. Bring up the plot dialog box andx it. First, unequal scales on the x- and yaxes can causedistortion of geometric gures. Click the Equal scaling oneach axis box to make this gure look like a circle. The xrange should be set to [0; 2] and the y range [2; 0]. Andyou can increase the grid settings. Experiment with this plotand with other implicit ones.

Polar Coordinates

In polar coordinates a point P  is specied by giving the angle that the ray from the origin to the point P  makes with thepolar axis and the directed distance r from the origin. If thepolar axis is taken to be the x-axis then the equations thatrelate rectangular coordinates to polar coordinates are givenby

x = r cos ; y = r sin

or equivalently,

x

2

+ y

2

= r

2

; tan =

y

x

To make a polar plot, write an expression for the distance rin terms of the angle , click in that expression and choosePlot 2D + Polar. Try it on r = sin 2. Change the settingsin the dialog plot box to make it into a good picture.

Parametric Polar Plots

The polar plot of  = r2 is obtained as the 2D polar plot of the vector

r; r2

. Plot this via Plot 2D + Parametric, revise

the rst plot that appears, choose Polar and set the parameterrange to 0 to 10. This is a special case of dening both theradius r and the angle in terms of a third variable t. Forexample, you can get the polar plot of the parametric curvedened by the equations = 1 sin t, = cos t as the polarplot of the vector (1 sin t; cos t) using Parametric from thePlot 2D submenu. Revise the rst plot, choosing Polar andparameter range 0 t 2. Try it out.

3D Plots

The environment for plotting curves and surfaces in space isvery similar to the environment for plotting in the plane. Theview is a box, a rectangular solid determined by inequalitiesof the form x0 x x1, y0 y y1, and z0 z z1.

The frame is a rectangular region of the computer screen, just as before. Scientic WorkPlace  chooses a default viewwith 5 x 5, 5 y 5, and with the z-coordinatesdetermined automatically. If you use other variable names,the order is determined alphabetically. To plot an expressionin two variables, such as x2y2, put the insertion point in itand choose lot 3D + Rectangular. If you want to plot several

expressions at once, enter them separated by (red) commas.To add an expression to a 3D plot select it and drag it ontothe plot.

You can plot a dened function of two variables in twodierent ways. Select the function name f  or select the ex-pression f (x) and from the Plot 3D menu, choose Rectangu-lar. To add a function to a 3D plot, drag it onto the plot

Do a 3D rectangular plot of  f (x; y) = xy(x2+y2)2

with

view 1 x 1, 1 y 1, and 5 z 5: (Thedefault z range produces a plot that contains only a singlevertical line.)

Try out the various plotting tools described below on the

plot of  f (x; y) and on other plots of your choice.

Plotting Tools for 3D Plots

Selecting the frame or the view, and bringing up the FrameProperties and the Picture Properties dialog boxes are doneexactly the same as for 2D plots.

Most of the choices in the dialog box are analogous tothe ones for 2D plots, but there are some dierences. (Theability to \pan" by dragging the frame when view has beenselected is not fully implemented for 3D plots.) The plot is de-termined by the data points computed. You can increase thequality of the graph by increasing the Sample Size. Increas-

ing the Sample Size also slows down the plotting process,of course. So you may want to specify a relatively smallnumber of grid points for real-time demonstrations and a rel-atively large number of grid points for printed documents.The grid points computed are connected by polynomial sur-faces or curves, or are simply displayed as points, dependingon your choice of Style.

Patch connects the points by small patches of polyno-mial surfaces and a wire frame grid.

22

Page 23: Manual para aprender a usar Scientific Workplace (ingles)

8/4/2019 Manual para aprender a usar Scientific Workplace (ingles)

http://slidepdf.com/reader/full/manual-para-aprender-a-usar-scientific-workplace-ingles 23/32

Patch [No Grid] is the same as Patch but without thegrid.

Patch & Contour adds level curves to the patches.

Contours is a set of level curves on a transparent sur-face.

Wire Frame is the default for Style. It has been chosenfor the default because 3D plots are redrawn quickly

in that style. It connects the points by straight linesegments on a transparent surface.

Hidden Line is the same as Wire Frame except that thesurface is opaque.

Points displays only the computed points.

You can change the Lighting from the default 0 to 1{4.Color choices include XYZ, XY, Z, Z Hue, Z Grayscale, orNo Coloring. The color choice Z means that the color choicedepends only on the z-coordinate, whereas XYZ means thatcolor is a function of all three coordinates.

Finally, you can specify the appearance of the axes as

Normal, None, Boxed, or Frame.

Normal gives the usual x-, y-, and z-axes if the origin iscontained inside the view box and otherwise draws threeaxes as close as possible to the origin.

Boxed shows the plot inside a box frame.

Frame displays the left edge and two lower edges of thebox.

Implicit Functions

To obtain an implicit plot of an equation involving two vari-

ables, enter the equation in your document, and from the Plot3D submenu, choose mplicit. Do it with x2 + y2 + z2 + 1 =(x + y + z + 1)2 with Boxed axes, range 5 x 5,5 y 5, and 5 z 5, Turn set at 111, and Tilt setat 60.

Parameterized Surfaces

Parameterized surfaces are given by equations of the form= f (s; t), y = g(s; t) and z = h(s; t). These are very generaland allow you to generate a wide variety of interesting plots.To make these plots, enter the expressions in a vector, makingeach expression a separate component. With the insertion

point in the vector, choose Rectangular from the Plot 3Dsubmenu.

The parameterized surface dened by the equations

x = s sin s cos ty = s cos s cos tz = s sin t

can be created as the 3D rectangular plot of the vector[s sin s cos t; s cos s cos t; s sin t] Do this plot with 0 s 2and t .

Curves in Space

A space curve is dened by three functions x = f (t), y =g(t), z = h(t) of a single variable. To plot such a curve,enter the three dening expressions as the components of athree-element vector. With the insertion point in the vector,from the Plot 3D menu choose Tube. To change the radiusor the view, double-click the plot, click revise, and change thesettings. The \fat curve" is designed to show which parts of the curve are close to the observer and which are far away.Otherwise, a curve in space is dicult to visualize. Now doa tube plot of the space curve

x = 10cos t 2cos5t + 15 sin 2t

y = 15cos2t + 10sin t 2sin5t

z = 10 cos 3t

In the dialog plot box set the radius to 1 and 0 t 2. A\thin curve" can be drawn by setting the radius to 0 in thedialog box.

By typing an expression in t for the radius and choosingthe curve to be a straight line, you can get surfaces of revolu-

tion. Try this for the line given by x = t; y = z = 0, the ra-dius set to 1sin t, and the range for t set to 2 t 2.The spine of the surface of revolution can be any line.

Try a plot with the line dened by x = 2t; y = 3t; z = t,radius 4 + sin 3t + 2cos 5t, framed axes, and 5 t 5.

Cylindrical Coordinates

In the cylindrical coordinate system, a point P  is representedby a triple (r;;z), where (r; ) represents a point in polarcoordinates and z is the usual rectangular third coordinate.Thus, to convert from cylindrical to rectangular coordinates,we use the equations

x = r cos y = r sin z = z

and to go from rectangular to cylindrical coordinates, we usethe equations

r2 = x2 + y2 tan =y

xz = z

The default assumption is that r is a function of  andz. So you only have to write down this expression. Youcan plot more than one expression at once by separating theexpressions with (red) commas. Also, you can plot severalsurfaces on the same axes by dragging expressions onto aplot.

Now plot the cylinder r = 1 obtained as the 3D cylindri-cal plot of the expression 1, with 0 2, and 0 z 1.With the same ranges for and r, do a 3D cylindrical plotof  r = 1 z.

Dene r(; z) = z +sin and do a cylindrical 3D plot byhighlighting r. Set the limits 0 4 and 1 z 1.

23

Page 24: Manual para aprender a usar Scientific Workplace (ingles)

8/4/2019 Manual para aprender a usar Scientific Workplace (ingles)

http://slidepdf.com/reader/full/manual-para-aprender-a-usar-scientific-workplace-ingles 24/32

Parameterized Surfaces in Cylindrical Coordinates

You plot the parameterized surface r = f (s; t), = g(s; t),z = h(s; t) in cylindrical coordinates by entering the expres-sions for r, , and z into a vector (f (s; t); g(s; t); h(s; t)) andchoosing Cylindrical from the Plot 3D submenu.

To plot the \spiral staircase" z = , do a 3D cylindricalplot of the vector [r;;], with 0 r 1 and 4.

Spherical CoordinatesThe spherical coordinates (;;) locate a point P  in spaceby giving the distance from the origin, the angle projectedonto the xy-plane, and the angle with the positive z-axis.The conversion into rectangular coordinates is given by

x = sin cos y = sin sin z = cos

and the distance formula implies

2 = x2 + y2 + z2

The default assumption is that is a function of  and . You can plot more than one surface on the same axes inthe usual way. To make a spherical plot, enter an expressioninvolving and in your document, and with the insertionpoint in the expression, select Plot 3D + Spherical. Try it onthe expression 2, with limits 0 2 and 0 2:

You can create a spherical plot of a dened functionof  and , such as (; ) = (1:2) sin(). Select eitherthe function name or the expression (; ) and from thePlot 3D submenu, choose spherical. Try it on (; ) =(1:2) sin(), and set the limits to 1 2, and 0 .

Parameterized Surfaces in Spherical Coordinates

Parameterized surfaces are given by equations of the form = f (s; t), = g(s; t), and ' = h(s; t). These are verygeneral and allow you to generate a wide variety of interestingplots. Enter the dening expressions as the three componentsof a vector, and with the insertion point in the vector, fromthe Plot 3D submenu choose Spherical.

The 3D spherical plot of the vector [;; 1] gives the cone' = 1. Do this plot, setting 0 1 and 0 2.

Plot the surface dened by = s, = s2 + t2, ' = tby entering the three expressions as coordinates of a vector.Take 0 s 1 and 0 t 1.

Exercises

Here are some exercises for you to try. They involve plottingin various ways. Solutions follow.

1. Use Implicit under the Plot 2D submenu to plot the conicsections x2 + y2 = 1, x2 y2 = 1, and x + y2 = 0 allon the same coordinate axes.

2. Use Implicit under the Plot 2D submenu to plot the conicsections (x1)2 + (y + 2)2 = 1, (x1)2(y + 2)2 = 1,and (x1)+(y+2)2 = 0 on one pair of coordinate axes.With the hand symbol visible over the view, translate theview so that the curves match the curves in Exercise 1.

3. Plot x2 + y2 = 4 and x2 y2 = 1 together. How manyintersection points are there? Verify your estimate bytyping the formulas into a matrix and choosing Numericfrom the Solve submenu.

4. Plot the astroid x2=3 + y2=3 = 1.

5. Plot the folium of Descartes x3 + y3 = 6xy.

6. Plot the surface z = sin xy, with 5 x 5 and5 y 5. Compare the location of the ridges withthe implicit plot of the three curves xy = 2 , xy = 5

2 ,and xy = 3

2 .

7. A standard calculus problem involves nding the in-tersection of two right circular cylinders of radius 1.View this problem by choosing ectangular from thePlot 3D submenu to plot the two parametric surfaces[s; cos t; sin t] and [cos t;s; sin t].

8. Do the two space curves

[(2 + sin t)10cos t; (2 + cos t)10sin t; 3sin3t]

and[[10cos t; 10sin t; 3sin3t] 1intersect?UseTubefromtheP

9. View the intersection of the sphere x2 + y2 + z2 = 1 andthe plane x + y + z = 1

2 by choosing Implicit from thePlot 3D submenu. Verify that the points of intersectionlie on an ellipse (it is actually a circle) by solving x +

y + z =

1

2 for z, substituting this value into the equationx2 + y2 + z2 = 1 and calculating the discriminant of theresulting equation.

10. Explore the meaning of contours by plotting the surfacez = xy and selecting Patch & Contour as a Style inthe Rectangular dialog box. Rotate the surface untilonly the top face of the cube is visible and interpret themeaning of the curves you see. Rotate the cube untilthe top face just disappears and interpret the meaningof the contours.

Solutions to Exercises

1. Plot 2D + Implicit: x2+ y2 = 1; x2y2 = 1; x+y2 = 0(Take 2 x 2 and 2 y 2.)

2. Plot 2D + Implicit: (x 1)2 + (y + 2)2 = 1; (x 1)2(y + 2)2 = 1; (x 1)+ (y + 2)2 = 0 (Take 1 x 3and 4 y 0.)

3. Plot 2D + Implicit: x2 + y2 = 4; x2 y2 = 1 (Take5 x 5 and 5 y 5.)

24

Page 25: Manual para aprender a usar Scientific Workplace (ingles)

8/4/2019 Manual para aprender a usar Scientific Workplace (ingles)

http://slidepdf.com/reader/full/manual-para-aprender-a-usar-scientific-workplace-ingles 25/32

Solve + Numeric:

x2 + y2 = 4x2 y2 = 1

x 2 (1; 2)y 2 (1; 2)

, Solution is :

fx = 1:58113883; y = 1:224744871g

4. Plot 2D + Implicit: jxj2=3 + jyj2=3 = 1 (Take 1 x 1 and 1 y 1.)

Without the absolute values, Scientic WorkPlace  re-

turns only the rst quadrant portion of the graph.

5. Plot 2D + Implicit: x3 + y3 = 6xy (Take 5 x 5and 5 y 5.)

6. Plot 3D + Rectangular: sin xy (Take 5 x 5 and5 y 5.)

Plot 2D + Implicit: xy = =2; xy = 5=2; xy = 3=2(Take 5 x 5 and 5 y 5.)

7. Plot 3D + Rectangular: [s; cos t; sin t]; [cos t;s; sin t](Take 2 s 2 and 0 t 2.)

8. Plot 3D + Tube:

[(2 + sin t)10cos t; (2 +cos t)10sin t; 3sin3t]; [20cos t; 20sin t;3sin3t] (Take0 t 2.)

Solve + Exact:

(2 + sin t)10 cost = 20 cos s(2 + cos t)10sin t = 20sin s

3sin3t = 3sin3s, Solution is :

ft = 0; s = 0g ; ft = ; s = g9. Plot 3D + Implicit: x2 + y2 + z2 = 1; x + y + z = 1=2:

(Take 1 x 1, 1 y 1, and 1 z 1.)

10. Plot 3D + Rectangular: xy

(Take 1 x 1, 1 y 1, Turn 90; Tilt 0; andchoose the style Patch & Contour.)

(Take 1 x 1, 1 y 1, Turn 90; Tilt 90; andchoose the style Patch & Contour.)

Calculus

We have already discussed the basic operations of dierentia-tion and integration. There are various items on the Calculusmenu relating to those operations. These items will be ex-plained now.

Implicit Dierentiation

An equation such as y2 = sin xy denes y as a dieren-tiable function of  x but we cannot solve for y in terms of x. However, we can still nd dydx via implicit dierentiation.

It is one of the items on the menu. Suppose we want dydxand y2 = sin xy Put the insertion point in the expressionand choose Implicit Dierentiation. Up comes a box askingfor the dierentiation variable. Choose x and OK and youget 2yy0 + (cos (xy)) (y + xy0) = 0. Now you can solve for

y0 or, if you wanted y00, do Implicit Dierentiation again. In

the rst case you getn

y0 = (cos xy) y2y+(cosxy)x

oand in

the second, 2y0y0 + 2yy00 (sin(xy)) (y + xy0) (y + xy0) +(cos(xy)) (y0 + y0 + xy00) = 0. Solving this for y00 gives

2(y0)2(sinxy)y22(sinxy)yxy0(sinxy)x2(y0)2+2(cosxy)y0

2y+(cosxy)x :

Things are not always so easy. For example, you may notbe able to solve for y0 in terms of  x and y. Here are someexamples to try.

1. y2 = x

2. 2y = x2 + sin y

3. x2 xy + y2 = 5

4. If y2 + xy 1 = 0, nd d2ydx2 at (0;1):

Iterate

You can solve many equations of the form f (x) = x numeri-cally using terate from the Calculus submenu. You start withan estimate x0 for the root, and Iterate returns the list of val-ues f (x

0), (f (x

0)), f (f (f (x

0))), f (f (f (f (x

0)))), up to the

number of iterations you specify. In appropriate situations,these values converge to a root of the equation f (x) = x.Here is an example.

Choose Iterate from the Calculus submenu. In the dialogbox that comes up, enter cos as the iteration function, select1:0 as initial value and 10 as the number of iterations. Youshould get a vector of values ending with :74424 (if digitsdisplayed is set to 5).

The entry in the iteration function box must be the func-

tion name : And you can't use cos2, for example. To iteratethat function, dene f (x) = cos2(x) and enter f  in the boxfor the iteration function.

Applying iteration to the function g(x) = x f (x)

f 0(x) isNewton's method for nding zeroes of the function f . Try iton the following functions.

1. xcos x In this example, you should get :73909 startingat :5 and doing 10 iterations. Compare with solvingnumerically restricting the solution to the interval (0; 1).

That is, apply Solve + Numeric tox = cos xx 2 (0; 1)

.

2. x(2 x2)

3. x2 + 1

Find Extrema

Find Extrema on the Calculus menu nds extrema of func-tions subject to equality constraints using the method of La-grange Multipliers. Maple nds two things|the set of ex-treme values and a set S  of candidates for points at whichthe extreme values are assumed. S  may contain extraneoussaddle points which correspond to no extreme value, and theordering of extrema and points in S  need not be the same asthe extrema, so that one is obliged to evaluate the function at

25

Page 26: Manual para aprender a usar Scientific Workplace (ingles)

8/4/2019 Manual para aprender a usar Scientific Workplace (ingles)

http://slidepdf.com/reader/full/manual-para-aprender-a-usar-scientific-workplace-ingles 26/32

each point of  S  to classify it. In some cases the informationreturned by Maple in S  may be only a set of equations thatstill must be solved to nd the points at which the extremevalues are assumed. With that in mind, try these examples.Note that the equations and constraints are collected in amatrix, with the function in the rst row and the constraintsin subsequent rows.

1.x3 y2

x + y = 0

2.

p x2 + y2 z

x2 + y2 = 16x + y + z = 10

3.x2 + y2 + z2

3x + 2y + z = 6x + y + z = 1

You can also nd local maxima and minima of a functionwithout constraints. In this case, just put the insertion pointin the expression and choose Find Extrema. Try Find Extremaon f (x) = cos x + sin 3x. Of course, if there is an extreme

value at x, then there is one at x + 2. Now try it onf (x) = cos x + sin3:0x. The latter yields only one criticalnumber, although there many more. Compare the value atthis critical number with the corresponding value given forcos x + sin 3x.

Methods of Integration

Even though Scientic WorkPlace  can evaluate many inte-grals directly, several standard techniques of integration suchas integration by parts, substitution, and partial fractions arealso available.

The integration by parts formula states thatZ 

u dv = uv Z 

v du:

To evaluateR 

x ln xdx by parts, put the insertion point inthe expression and choose Integrate by Parts from the Cal-culus submenu. Enter ln x as the part to be dierentiated,that is, u in the formula above. Choose OK. You should get12

(ln x) x2 R 12

x dx. Here are some examples for you towork on.

1.R 

ln xdx

2. R x2 ln xdx

3.R 

x cos xdz

4.R 

x2exdx

5.R 

ex cos xdx

The change of variables formula states that if  u = g(x),then du = g0(x)dx and hence

Z f (g(x))g0(x) dx =

Z f (u) du

To calculate the integralR 

x sin x2dx put the insertion pointin the expression and choose Change Variable from the Cal-culus submenu, and in the substitution box enter u = x2 andchoose OK. You should get

R 12

sin u du, which is integrableon sight. Following are some examples for you.

1.R 

x2p 

x3 + 1dx

2.R dx

1+4x2

3.R dxxp x

4.R 

sin5 x cos3 xdx

The Method of Partial Fractions is based on the factthat a factorable rational function can be written as a sum of simpler fractions. To evaluate using partial fractions, select

the integrand 3x2+2x+4(x1)2(x2+1) and holding down the ctrl/cmd

key, choose artial Fractions from the Calculus submenu. You

should getR 

92(x1)2

12(x1) + 1

2frac2 + xx2 + 1

dx

after addingR 

, parentheses, and dx: Now you can integrate

each piece. Of course Maple will evaluate R 3x2+2x+4

(x

1)2(x2+1)dx

directly. Some examples for you to try follow.

1.R 

5x3(x+1)(x2)

dx

2.R 

2x + 9x3x22x5

dx

3.R 

1 + 1x2 8x2+7

dx

Pictures of Riemann Sums

Plot Approx. Integral on the Calculus menu illustrates graph-ically the approximation of the area under a curve by RiemannSums. You can plot pictures of Riemann sums obtained byusing midpoints, left endpoints, or right endpoints of subin-tervals. The Riemann sum determined by the midpoints isthe sum of the areas of rectangles whose heights are deter-mined by midpoints of subintervals, and analogously for leftand for right endpoints. The default is to plot using mid-points and the default number of boxes is 10. But you maychoose left, right, or both endpoints by revising the plot. Tomake these plots for x sin x, leave the insertion point insidethe expression and choose Plot Approx. Integral. Try it out.Reset the x range and number of boxes as desired.

Approximation Methods

Scientic WorkPlace  supports the midpoint method, thetrapezoidal rule and Simpson's rule for approximating deniteintegrals. With the insertion point in the expression x sin x,from the Calculus submenu choose Approximate Integral andselect the appropriate method in the dialog box. You get anexpression for the approximate integral, which you can evalu-ate numerically. Do it for the three methods, integrating overthe interval [0; ] using 10 subintervals, evaluate the integralint0x sin xdx, and compare the four answers.

26

Page 27: Manual para aprender a usar Scientific Workplace (ingles)

8/4/2019 Manual para aprender a usar Scientific Workplace (ingles)

http://slidepdf.com/reader/full/manual-para-aprender-a-usar-scientific-workplace-ingles 27/32

Dierential Equations

Under Solve + ODE from the Maple menu one may choosefour methods of solution: Exact, Laplace, Numeric, and eries.To implement, put the insertion point in the equation, orsystem of equations with its side conditions (if any), andchoose one of the methods. If there is any doubt about whatthe independent variable is, a dialog box will appear askingyou to specify it.

Exact Methods

Apply Solve ODE + Exact, Solve ODE + Laplace, and SolveODE + Series to each of the following. We solve some nu-merically shortly.

1. y0 = sin x

2. y0 = sin x + t

3. y0 = y + x

4. y0 = y + eax

5. Dxy = sin x + cos x

6. Dxy = sin x + cos x + t

7. y0 = y +sin x On the same axes, plot the three solutionswith 1; 2; and 3 for the constant C 1.

8. y00 + y = x2

Following are some systems of equations. They are en-tered in n 1 matrices or in a display. To solve, put the in-sertion point in the matrix and choose one of Exact, Laplace,or Series.

1. Here is a 2 1 matrix. Dxy z = 1Dxz + y = 1

2. Here is a display. Use the enter key to add additionalequations.

y0 = x

x0 = y

3.y0 = xx0 = y

4.x0 = x + y zy0 = x + y + z

z0 = x y + z

Initial Value Problems

Here are some systems with initial conditions. Again, systemsof dierential equations, along with any boundary conditionsare entered via 1 matrices. Along with the other methods,these can be solved numerically. The solution appears as inthe rst example below. It announces that a function hasbeen dened. This function will appear in the list of den-itions made, saying \y, Maple numerical process Number n", where n is the n-th function so dened. These functionsmay be evaluated and plotted. To plot these numerical so-lutions, use Plot 2D + ODE. You can plot them using Plot2D + Rectangular, but it is much slower. However to com-pare graphically a numerical solution to an exact one, plotthem both using Plot 2D + Rectangular. Solve the systemsbelow using the various methods, and compare them graphi-cally to the numerical ones. Of course to do this for the seriessolutions, you must rst chop o the big O term.

1.y0 = sin xy(0) = 1

, Exact solution is : y (x) = cos x + 2

2.y0 = 2y

y(0) = 2

3.y00 = 2yy(0) = 2y0(0) = 1

4.Dxy + 2y = e2x

y (0) = 1

5.dydx

+ y = e2x

y(0) = 0

6.

Dxxy y = 0

y(0) = 1y0 (0) = 0

, Exact solution is : y (x) =12e2x+ 1

2

ex

7.

Dxy z = 1Dxz + y = 1y(0) = 0z(0) = 0

For systems of two equations such as

this, you can also plot the phase plane.

8.

d2x

dt2

+ bdx

dt

+ cx = 0

x0 (0) = v0

x(0) = x0

9.

d2x

dt2+ 0:2

dx

dt+ x = 0

x0 (0) = 0

x(0) = 1

27

Page 28: Manual para aprender a usar Scientific Workplace (ingles)

8/4/2019 Manual para aprender a usar Scientific Workplace (ingles)

http://slidepdf.com/reader/full/manual-para-aprender-a-usar-scientific-workplace-ingles 28/32

, Exact solution is : x (t) = 1:0exp(: 1t)cos : 99499t+: 1005exp(: 1t)sin : 99499t

10. whose plot is:

11.

Systems that are solved numerically generate denedfunctions. The exact method produces equations, but nofunction denitions. Select the equation and apply Dene +

New Denition to treat the solution as a function.For example, Solve ODE + Exact applied to the system

Dxxy y = 0

y(0) = 1

y0 (0) = 0

generates the output

Exact solution is: y (x) =1

2ex +

1

2ex

Select the equation y (x) = 12ex + 1

2ex and apply Dene +

New Denition. Now y is dened as a function, which canbe evaluated and plotted.The solution is two functions y; z and putting the inser-

tion point in y; z and choosing Plot 2D + Phase Plane doesit. Try it on the solution to this system.

1. An exact solution, which you can get using Solve ODE+ Exact gives two expressions in x, and treating x as theparameter, the 2D rectangular plot gives you the phaseplane. Try it.

2.

y0 = xx0 = yx(0) = 0y(0) = 1

3.

y0 = xx0 = y

x(0) = 0y(0) = 1

4.

x0 = x + y zy0 = x + y + zz0 = x y + zx(0) = 1y(0) = 1z(0) = 1

Subscripted dependent variables are allowed. Here aresome examples.

5.Dxy1 + y1 = e2x

y1 (0) = 1

6.Dxxy1 y1 = 0y1(0) = 1y01 (0) = 0

And here are a couple of non-linear equations. Laplacedoes nothing, as Laplace Transforms are only appropriate forlinear equations. There is no series solution in the secondexample, since ln x doesn't have a series expansion aboutx = 0 in powers of x.

1.y0 = y2 + 4y(0) = 2

2.(x + 1)y0 + y = ln x

y(1) = 10

Vector Calculus

Vectors may be specied in several dierent ways: as 1 by n

matrices like

1 2 3

, as n by 1 matrices like

24 1

01

35,

or as n-tuples within brackets or parentheses like [3; 2; 1] and2;1; 0).

Dot and Cross Products

Here are some examples using dot and cross products. Begin

by dening =

1 2 3

, b =

0@ 1

01

1A, c = [3; 2; 1], and

d = (2;1; 0).

1. (1; 2; 3) (3; 2; 1)

2. a c

3. (1; 2; 3) (3; 2; 1)

4. a c

5. (1; 2; 3) 24 1

0135 (3; 2; 1)

6. (1; 2; 3) b (3; 2; 1)

7. a b c

8. (1; 2; 3) (3; 2; 1) (1; 0; 1)

9. a c (1; 0; 1)

10. (1; 2; 3) (3; 2; 1) (1; 0; 1)

The last example is computed correctly even though thetriple product is not associative since these operations as-sociate from left to right by default. If the dot had beenrst and the cross second we would have gotten the incorrectresult

(1; 0; 1) (1; 2; 3) (3; 2; 1) = 4

24 3

21

35 ,

which of course could be done correctly using parentheses

(1; 0; 1) ((1; 2; 3) (3; 2; 1)) = 8.

28

Page 29: Manual para aprender a usar Scientific Workplace (ingles)

8/4/2019 Manual para aprender a usar Scientific Workplace (ingles)

http://slidepdf.com/reader/full/manual-para-aprender-a-usar-scientific-workplace-ingles 29/32

Vector Norms

Vector norms have been implemented for every positive in-

teger n with the usual denition: kckn = (P jcijn)1=n. For

the vector c = [3; 2; 1]; we have kck1 = 6, kck2 =p 

14 =

3:7417, kck6 = 6p 

794 = 3:043, and kck1 = 3. The defaultkck is the 2-norm. You might wish to verify the results aboveby placing the insertion point to the left of the equal signs andpressing ctrl/cmd + e. Norm may be applied directly to

n-tuples representing vectors: k(1; 2; 3; 4)k = p 30. The twopairs of vertical lines used in the norm symbol can be foundon the brackets menu (select the item and apply brackets).`k' is on the menu under the 1@  icon, or you can type \Vert"while pressing the ctrl/cmd key.

Gradient, Divergence and Curl

Gradient, divergence, and curl are notable omissions from theVector Calculus submenu since they are implemented as \r",\r", and \r" followed by Evaluate. Divergence and curloperate on 3-dimensional vector elds whose components arefunctions of an ordered list of \eld variables". Our default

is that the eld variables are x, y, and z, in that order, butthis can be changed with Set Basis Variables on the VectorCalculus submenu. Here are some examples using the defaultvariables, but rst make the following denitions.

1. F  = [yz; 2xz;xy]

2. G = (xz; 2yz;z2)

3. H  =

yz 2xz xy

4. f  = xyz

Now evaluate the following.

1.r

2. r G

3. r H 

4. r F 

5. r G

6. r H 

7. rf 

8. r (yz; 2xz;xy)

9.

r (xz; 2yz;z2)

10. r (xyz)

Since gradients are often calculated for scalar functionsof n arbitrary variables we have implemented gradient cur-rently by using all  the variables that appear in the function,and assuming that the variables are ordered lexicographically.At the moment this seems better to us than the alternativesof resetting a standard list of basis variables or popping a di-alog box to ask for a variable list. The downside is illustratedin these examples:

1. r cuv + v2w

=

uv;cv;cu + 2vw;v2

2. rxy = (y; x)

In the rst case, the user is apt to be thinkingof  c as a constant parameter, and expecting the answer

cv;cu + 2vw;v2

and in the second he might be thinking3-dimensionally and expecting (y;x; 0).

Scalar Potential on the Vector Calculus submenu is the\inverse" of the gradient in the sense that it nds a scalar

function whose gradient is the given vector eld, or tells youthat such a function does not exist. Here are some examplesof scalar potential with the standard basis variables:

1. (x;y;z), Scalar potential is 12

z2 + 12

y2 + frac12x2

2. (x; z; y), Scalar potential is yz + 12x2

3. (y; z; x), Scalar potential does not exist

In the next example evaluate and then choose ScalarPotential on the menu (since the vector eld is a gradient, ithas the original function as a scalar potential):

r xy2 + yz3We noted earlier that a user would expect ucv + v2w to

be the potential of the vector eld

cv;cu + 2vw;v2

. Wedo get this answer because when we nd a dierent number of variables than the number of components in the eld vector,a dialog box asks for the eld variables, which we enter as\u;v;w". The dialog box will also appear when we ask forthe scalar potential of  (y;x; 0).

Hessian

The Hessian  is the matrix of second partial derivatives of ascalar expression of n variables. The order of the variables af-fects the ordering of the rows and columns of the Hessian, and

we take partials in lexicographical order. A possible sourceof irritation is the inclusion of something in the variable listwhich you intend to be a constant parameter, like c in cxyz.In this case, you will have to delete the rst row and columnof the resulting matrix to get what you want. Choose Hessianon the vector calculus menu in these examples:

1. xyz

2. x2 + y3

3. uvw

4. wxyz

Also dene f (x; y; z) = 3xy2z and choose Hessian withthe selection (x; y; z)

Jacobian

A Jacobian  is the matrix of partial derivatives of the entriesin a vector eld. Jacobians are like Hessians, in that the orderof the variables in the variable list determines the order of thecolumns of the matrix, and lexicographic order is apt to becorrect. The number of variables should be the same as the

29

Page 30: Manual para aprender a usar Scientific Workplace (ingles)

8/4/2019 Manual para aprender a usar Scientific Workplace (ingles)

http://slidepdf.com/reader/full/manual-para-aprender-a-usar-scientific-workplace-ingles 30/32

dimension of the vector, and if it isn't, either a parameterhas been included in the variable list or the vector eld isindependent of one of the variables. In this case a dialog boxasks the user for the list of variables. Here are some examplesto try (in each case the variable list is \x; y; z"):

1. (yz;xz;xy)

2. y is missing (x2z; x + z;xz2)

3. c is extra (x2z; y + c;yz2)

Curl and Vector Potential

The current approach is to assume that these operations ap-ply to scalar or vector functions of a set of exactly 3 standard 

basis variables . The default is \x; y; z", but as noted aboveyou can specify your own set of basis variables using VectorCalculus + Set Basis Variables. This seems better than pop-ping a dialog box whenever one of these operations is used.Example:

r (xy;yz;zx) = (y;z;x). Vector potential isleft(

12

z2 + xy;yz; 0

Notice that we didn't get the eld we started with whenwe asked for a vector potential of its curl. That is becausethe vector potential is determined only up to a eld whosecurl is zero. We check that this is the case:

r (12z2; 0; zx) = (0; 0; 0)Try the same experiment after changing the basis vari-

ables to u;v;w.r (uv;vw;uw) = (v;w;u). Vector potential is

left(12w2 + uv;vw; 0

The vector eld can be written as the triple (v; w; u) aswell as a column matrix. Try choosing Vector Potential for(v; w; u).

Divergence

The divergence is the sum of the derivatives of the ith com-ponent of the vector eld with respect to the ith variable. Atthe moment divergence applies only to 3-dimensional eldswith whatever set of basis variables is in eect.

r (xy;yz;zx) = y + z + x

Statistics

Scientic WorkPlace  supports a number of the standard sta-tistical distribution functions and densities, including a facilityfor getting random samples from dierent families of distrib-

utions. It also will do statistical operations on data.The items Mean, Median, Mode, Moment, Quantile

Standard Deviation, and Variance on the Statistics submenutake a single argument that can be presented as a list of dataor as a matrix. The result of an operation is a number, or,in the case of a matrix, a number for each column.

The items Correlation, Covariance, and Fit Curve toData on the Statistics submenu take a single argument thatmust be a matrix. For the curve tting commands, thecolumns must be labeled with variable names. The menu

item Random Numbers on the Statistics submenu allows youto get random samples from families of distributions listed inthe dialog box that appears when you choose Random Num-bers.

Lists and Matrices

Scientic WorkPlace  stores data in lists or in matrices. Num-bers in a list should be separated by commas, with the num-bers and commas both in mathematics mode. A list can bereshaped into a matrix using Matrices + Reshape.

An ASCII le containing a list of numbers separated bycommas or appearing as a column can be imported into a Sci-

entic WorkPlace  document. The le should have a nameof type lename.txt. From the File menu, choose ImportContents, the ASCII lter, and enter the name of the lecontaining the list. Add commas between the numbers if needed, and then select the entire list and change to mathe-matics. You can then work with the data as a list or reshapeit into a matrix by choosing Reshape from the Matrices sub-menu. Of course a matrix itself can be reshaped using thesame procedure.

Mean, Median, Mode, Moment, Quantile, Mean Deviation,Standard Deviation, and Variance

These items from the Statistics submenu take a single argu-ment which must be a list, a matrix, or a labeled matrix. Alabeled matrix is one whose entry in the rst row and rstcolumn is not numeric. In this case the rst row is meant tobe variable names. The only computations that require suchmatrices are the regression ones. Other computations maybe applied to labeled matrices, but the operations ignore therst row. Examples follow.

1. Find the mean, median, etc. of the data

23; 5;6; 18; 23;22; 5. To do it, put the insertion pointin this list and choose the appropriate item from the Sta-tistics submenu.

Notice the dierence between the second moment aboutthe mean and the variance. Variances are computed assample variances. That is, n 1 is used as the divisorrather than n, where n is the number of data points.

A median of a data set is a number such that at leasthalf the numbers in the set are equal to or less than it,and at least half the numbers in the set are equal toor greater than it. If two dierent numbers satisfy thiscriteria, their midpoint is taken as the median.

The pth quantile of a set; where p is a number betweenzero and one, is a number q  p satisfying the conditionthat the fraction p of the numbers fall below q  p andthe fraction 1  p lie above q  p. The :5th quantile is amedian or 50th percentile, while the 0:25th quantile isthe rst quartile or the 25th percentile, and so forth.The pth quantile is not unique, and the particular oneMaple chooses to return is a bit mysterious.

Reshape the list above into a 7 by 1 matrix and do thesame computations.

30

Page 31: Manual para aprender a usar Scientific Workplace (ingles)

8/4/2019 Manual para aprender a usar Scientific Workplace (ingles)

http://slidepdf.com/reader/full/manual-para-aprender-a-usar-scientific-workplace-ingles 31/32

2. Apply the operations above to the data given by the

matrix

24 23 5 6

18 23 225 0 0

35.

3. Apply the operations above to the data given by the

matrix

0BBBB@

x y z1 1 43 2 55 3 6

7 4 7

1CCCCA

.

4. Apply the operations above to the data given by the

matrix

24 a b

c df g

35. Of course Median and Quantile make

no sense on this one.

Correlation and Covariance

These two operate on m n matrices and return n n ma-trices. Apply them to the following sets of data.

1.

26641 1 43 2 55 3 67 4 7

3775

2.

0BB@

43 6277 6654 599 61

1CCA

3.

24 50 12

31 261 47

35

4.

2664a b c50 12 18

31 26 621 47 91

3775

Random Numbers

The random number generators in Scientic WorkPlace  giveyou random samples from one of several families of distrib-ution functions: Beta, Binomial, Cauchy, Chi-Square, Expo-nential, F, Gamma, Hypergeometric, Normal, Poisson, Stu-dent's T, Uniform, and Weibull. From the Statistics sub-menu, choose Random Numbers and from the dialog box

that comes up, choose the distribution (with appropriate pa-rameters) and how large a sample you want. Random samplescome back as lists. Try it out.

Distributions and Densities

Scientic WorkPlace  includes several families of distribu-tions: Normal, Student's T, Chi-square, F, Exponential,Weibull, Gamma, Beta, Uniform, Binomial, Poisson, and Hy-pergeometric. We give a table here listing the name of thedistribution, the name used by Scientic WorkPlace  for the

cumulative distribution function, and the parameters eachtakes (df = degrees of freedom). If the cumulative distribu-tion functions is named FunctionDist; then the density func-tion is named FunctionDen, and the inverse of the cumulativefunction is named FunctionInv.

Normal NormalDist(x; mean, std dev)Student's T TDist(x; df)Chi-Square ChiSquareDist(x; df)

Exponential ExponentialDist(x; mean)F FDist(x; num df, den df )Weibull WeibullDist(x; shape, scale)Gamma GammaDist(x; shape, scale)Cauchy CauchyDist(x; median, something)Beta BetaDist(x; rst shape, second shape)Uniform UniformDist(x; left end, right end )Binomial BinonialDist(x; tries, prob of success)Hypergeometric HypergeomDist(x; pop, successes, tries)Poisson PoissonDist(x; mean)

When typed in mathematics mode, Scientic Work-

Place  will recognize these function names and they will

appear in gray when you type their last letter. Some of these names are quite long, so you may want to use Auto-matic Substitution under the Tools menu so you can usefewer keystrokes. Or, you may want to give them othernames. For example, if you would rather use n for thenormal density with mean 2 and variance 4, make the de-nition n(x) = NormalDen(x; 2; 4). Actually, you can usea comma instead of the semicolon to separate the argu-ment from the parameters. So you can dene, for example,f (x;y;x) = UniformDen x; y; z).

Following are some examples for you to try out.

1. If the parameters are left o the Normal, then it assumes

a standard normal, that is that the mean is 0 and thestandard deviation is 1. valuate the standard normaldistribution function at 2:44. You should get :99266.

Plot the standard normal distribution function. Does.:99266 look about right from the plot?

2. EvaluateR 01 NormalDen(x)dx and

limfuncNormalDist(0).

3. EvaluateR 11 x NormalDen x; 4; 1)dx.

4. EvaluateR 11(x 4)2 NormalDen x; 4; 1)dx.

5. Plot on the same axis the three normal den-sity functions with mean and variances given by(0; 1); (0; 5); (0; :5); and (1; 1). Do the same thingfor the normal distributions functions with those para-meters.

6. Calculate Student's t distribution function with one de-gree of freedom at 63:66. Calculate the inverse of Stu-dent's t distribution with one degree of freedom at theanswer you just got. Do the same thing for three degreesof freedom at :97847.

31

Page 32: Manual para aprender a usar Scientific Workplace (ingles)

8/4/2019 Manual para aprender a usar Scientific Workplace (ingles)

http://slidepdf.com/reader/full/manual-para-aprender-a-usar-scientific-workplace-ingles 32/32

7. Calculate TDist(6; 5) + TDist(6;5). Explain.

8. EvaluateR 01 TDen(x; 5)dx and limfuncTDist(0; 5).

9. EvaluateR 11 x TDen(x; 5)dx.

10. Plot on the same axis the density functions for Student'st with 1 degree of freedom and with 15 degrees of free-dom. Do the same thing for the distribution functions.