Doing Mathematics
with
Scienti c WorkPlace
Rand
Scienti c Notebook
RUsers' Guide to Computing
Version 5.5
Doing Mathematics
with
Scienti c WorkPlace
Rand
Scienti c Notebook
RUsers' Guide to Computing
Version 5.5
Darel W. Hardy
Colorado State University
Carol L. Walker
electronic, mechanical, photocopying, recording, or otherwise—without the prior written permis-sion of the publisher, MacKichan Software, Inc., Poulsbo, Washington.
Information in this document is subject to change without notice and does not represent a com-mitment on the part of the publisher. The software described in this document is furnished under a license agreement and may be used or copied only in accordance with the terms of the agree-ment. It is against the law to copy the software on any medium except as speci cally allowed in the agreement.
Printed in the United States of America 10 9 8 7 6 5 4 3 2 1 Trademarks
Scienti c WorkPlace, Scienti c Word, Scienti c Notebook, and EasyMath are registered trademarks of MacKichan Software, Inc. EasyMath is the sophisticated parsing and translating system included in Scienti c WorkPlace, Scienti c Word, and Scienti c Notebook that al-lows the user to work in standard mathematical notation, request computations from the under-lying computational system (MuPAD in this version) based on the implied commands embedded in the mathematical syntax or via menu, and receive the response in typeset standard notation or graphic form in the current document. MuPAD is a registered trademark of SciFace GmbH. Acro-bat is the registered trademark of Adobe Systems, Inc. TEX is a trademark of the American Math-ematical Society. TrueTEX is a registered trademark of Richard J. Kinch.PDFTEX is the copyright
of Hàn Th´ê Thành and is available under the GNU public license. Windows is a registered trade-mark of Microsoft Corporation. MathType is a tradetrade-mark of Design Science, Inc. ImageStream Graphics Filters and ImageStream are registered trademarks of Inso Kansas City Corporation:
ImageStream Graphic Filters Copyright 1991-1999 Inso Kansas City Corporation All Rights Reserved
All other brand and product names are trademarks of their respective companies. The spelling portion of this product utilizes the Proximity Linguistic Technology.
This document was produced withScienti c WorkPlace.
Authors: Darel Hardy and Carol Walker
Manuscript Editors: Susan Bagby and George Pearson Compositor: MacKichan Software Inc.
to the memory of our parents
Alice DeVinny Hardy
and
Contents
Preface
xxi
1
Basic Techniques for Doing Mathematics
1
Inserting Text and Mathematics 1
Basic Guidelines 1
Displaying Mathematics 4
Centering Plots, Graphics and Text 5
Basic Guidelines for Computing 5
Evaluating Expressions 5
Interpreting Expressions 8
The Compute Menu and Toolbar 8
Selecting Mathematical Expressions 9
Computing in Place 13
Stopping a Computation 14
Computational Engine 14
Error Handling 15
Frequently Asked Questions 16
2
Numbers, Functions, and Units
19
Integers and Fractions 19
Addition and Subtraction 19
Multiplication and Division 20
Mixed Numbers and Long Division 21
Elementary Number Theory 21
Prime Factorization 21
Factorials 23
Binomial Coef cients 23
Real Numbers 24
Basic Operations 24
Powers and Radicals 25
Rationalizing a Denominator 27
Numerical Approximations 28
Scienti c Notation 29
Computation and Display of Numerical Results 29
Functions and Relations 32
Absolute Value 33
Maximum and Minimum 33
Greatest and Smallest Integer Functions 34 Checking Equality and Inequality 35
Union, Intersection, and Difference 37
Complex Numbers 38
Basic Operations 38
Real Powers and Roots of Complex Numbers 39
Real and Imaginary Parts of a Complex Number 40
Absolute Value 41
Complex Conjugate 42
Numerical Approximations of Complex Numbers 42
Units and Measurements 43
Units 43
Physical Quantities, Symbols and Keyboard Shortcuts 44
Compound Units 47
Arithmetic Operations with Units 48
Converting Units 48
3
Algebra
51
Polynomials and Rational Expressions 51
Sums, Differences, Products, and Quotients of Polynomials 51
Summation Notation 53
Sums and Differences of Rational Expressions 53
Partial Fractions 54
Products and Powers of Polynomials 55
Division by Polynomials 56
Collecting and Ordering Terms 56
Factoring Polynomials 57
Greatest Common Divisor of Two Polynomials 58
Roots of Polynomials 59
De ning Variables and Functions 63
Assigning Values to Variables 64
De ning Functions of One Variable 64
De ning Functions of Several Variables 66
Showing and Removing De nitions 66
Solving Polynomial Equations 67
Equations with One Variable 67
Equations with Several Variables 70
Systems of Equations 70
Numerical Solutions 71
Inequalities 73
Substitution 74
Substituting for a Variable 75
Evaluating at Endpoints 75
Exponents and Logarithms 76
Exponents and Exponential Functions 76
Logarithms and Logarithmic Functions 77
Solving Exponential and Logarithmic Equations 79
4
Trigonometry
85
Trigonometric Functions 85
Radians and Degrees 86
Solving Trigonometric Equations 87
Trigonometric Identities 89
Combining and Simplifying Trigonometric Expressions 91
Inverse Trigonometric Functions and Trigonometric Equations 93
Combining and Rewriting Inverse Trigonometric Functions 93 Trigonometric Equations and Inverse Trigonometric Functions 94
Hyperbolic Functions 95
Inverse Hyperbolic Functions 97
Complex Numbers and Complex Functions 98
Argument of a Complex Number 98
Forms of a Complex Number 99
Complex Powers and Roots of Complex Numbers 100
DeMoivre's Theorem 101
Complex Trigonometric and Hyperbolic Functions 101
Exercises 103
5
Function De nitions
109
Function and Expression Names 109
Valid Names for Functions and Expressions 109
Custom Names 110
Automatic Substitution 111
De ning Expressions and Functions 112
Assigning Values to Variables, or Naming Expressions 112
Functions of One Variable 114
Subscripts as Function Arguments 116
Piecewise-De ned Functions 117
De ning Generic Functions 118
De ning Generic Constants 119
Handling De nitions 119
Showing and Removing De nitions 119
Saving and Restoring De nitions 120
Assumptions About Variables 121
Formula 125
External Functions 128
Accessing Functions in MuPAD Libraries 128
User-De ned MuPAD Functions 130
Tables of Equivalents 130
Constants 130
Compute Menu Items 131
Equivalents for Functions and Expressions 137
Trigtype Functions 142
Determining the Argument of a Trigtype Function 143
Exercises 144
6
Plotting Curves and Surfaces
147
Getting Started With Plots 147
The Frame, the View, and the Plot Properties Dialog 148
Layout 150
Resizing the Frame 151
Frame Placement 151
Screen Display and Print Attributes 153
Plot Intervals and View Intervals for 2D Plots 153
Rectangular Coordinates 155
Polar Coordinates 155
Implicit Plots 156
Parametric Plots 156
Plotting Tools for 2D Plots 157
Zooming In and Out 157
Translating the View 158
Items Plotted 160
Expressions and Relations 160
Intervals and Sample Size 161
Plot Color and Plot Style 162 Adjust Plot for Discontinuities 162
Axes and Axis Scaling 163
Plot Captions, Keys, and Names 164
Plot Labels 165
2D Plots of Functions and Expressions 166
Expressions 166
De ned Functions 168
Continuous and Discontinuous Plots 169
Plotting Piecewise-De ned Functions 170
Special Functions 171
Polygons and Point Plots 173
Log and Log-Log Plots 178
Parametric Plots 179
Envelopes 181
Implicit Plots 182
Polar Coordinates 184
Parametric Polar Plots 184
Animated 2D Plots and the VCAM Window 185
Animated Plots in Rectangular Coordinates 187 Animated Plots in Polar Coordinates 189 Animated Implicit Plots 190
The View for 3D Plots 191
Plotting Tools and Dialogs for 3D Plots 192
The Plot Orientation Tool 192
The 3D Plot Properties Dialog 193
3D Plots of Functions and Expressions 199
De ned Functions 201
Parametric Plots 201
Curves in Space 206
Polygonal Paths 209
Cylindrical Coordinates 211
Spherical Coordinates 215
The VCAM Window and 3D Plots 218
Animated 3D Plots 219
Animated Plots in Rectangular Coordinates 219 Animated Plots in Cylindrical Coordinates 221 Animated Plots in Spherical Coordinates 223 Animated Implicit Plot 224
Animated Tube Plot 224
Plot Snapshots and Plot Default Options 225
Plot Snapshots and VCAM Files 225
Snapshot Generation and Removal 226
Snapshots as Pictures 226
Setting Plot Default Options 227
Universal Default Options for Plots 227 Default Plot Options for a Document 229
Exercises 231
7
Calculus
239
Evaluating Calculus Expressions 239
Limits 240
Notation for Limits 241
Special Limits 243
Tables of Values and Plots 243
Differentiation 246
Notation for Derivative 246 Plotting Derivatives 249
Generic Functions 251
Implicit Differentiation 252
Numerical Solutions to Equations 255
Optimization 259
Inde nite Integration 266 Interpreting an Expression 267 Sequences of Operations 268 Methods of Integration 268 Integration by Parts 268 Change of Variables 269 Partial Fractions 270 De nite Integrals 271
Entering and Evaluating De nite Integrals 272 Methods of Integration with De nite Integrals 274
Improper Integrals 275
Assumptions about Variables 277
De nite Integrals from the De nition 277
Pictures of Riemann Sums 278
Approximation Methods 281
Numerical Integration 288
Visualizing Solids of Revolution 290
Sequences and Series 295
Sequences 296
Series 297
Multivariable Calculus 302
Optimization 302
Taylor Polynomials in Two Variables 306 Total Differential 307
Iterated Integrals 308
Exercises 311
8
Matrix Algebra
319
Introduction 319
Changing the Appearance of Matrices 319
Creating Matrices 320
Revising Matrices 326
Concatenating and Stacking Matrices 328
Standard Operations 330
Matrix Addition and Scalar Multiplication 330 Inner Products and Matrix Multiplication 331
Rows and Columns 331
Identity and Inverse Matrices 331 Polynomials with Matrix Values 333 Operations on Matrix Entries 334
Row Operations and Echelon Forms 335
Gaussian Elimination and Row Echelon Form 335
Elementary Row Operations 336
Equations 337
Systems of Linear Equations 337
Matrix Equations 338
Matrix Operators 340
Trace 340
Transpose and Hermitian Transpose 341
Determinant 342
Adjugate 343
Permanent 344
Maximum and Minimum Matrix Entries 345
Matrix Norms 345
Spectral Radius 347
Condition Number 348
Exponential Functions 348
Polynomials and Vectors Associated with a Matrix 349
Characteristic Polynomial and Minimum Polynomial 349
Eigenvalues and Eigenvectors 351
Positive De nite Matrices 352
Vector Spaces Associated with a Matrix 353
The Row Space 353
The Column Space 355
The Left and Right Nullspaces 355
Orthogonal Matrices 356
The QR Factorization and Orthonormal Bases 356
Normal Forms of Matrices 358
Smith Normal Form 359
Hermite Normal Form 360
Companion Matrix and Rational Canonical Form 360
Jordan Form 363
Matrix Decompositions 365
Singular Value Decomposition (SVD) 365
PLU Decomposition 366 QR Decomposition 367 Cholesky Decomposition 367 Exercises 368
9
Vector Calculus
371
Vectors 371Notation for Vectors 371
Vector Sums and Scalar Multiplication 372
Dot Product 372
Cross Product 373
Vector Norms 376
Planes and Lines in R3 378
Gradient, Divergence, and Curl 381
Gradient 382
Divergence 383
Curl 384
Laplacian 385
Directional Derivatives 386
Plots of Vector Fields and Gradients 387
Plots and Animated Plots of 2D Vector Fields 387 Plots and Animated Plots of 3D Vector Fields 389 Plots and Animated Plots of 2D Gradient Fields 391 Plots and Animated Plots of 3D Gradient Fields 393
Scalar and Vector Potentials 395
Scalar Potentials 395
Matrix-Valued Operators 397
Hessian 397
Jacobian 399
Wronskian 400
Plots of Complex Functions 402
Conformal Plots 402
Animated Conformal Plots 403
Exercises 404
10 Differential Equations
409
Ordinary Differential Equations 409
Exact Solutions 409
Series Solutions 414
Heaviside and Dirac Functions 414
Laplace Transforms 416
Fourier Transforms 420
Initial-Value Problems and Systems of Ordinary Differential Equations 422
Exact Solutions 422
Series Solutions 425
Numerical Methods For Ordinary Differential Equations 425
Numerical Solutions for Initial-Value Problems 425 Graphical Solutions to Initial-Value Problems 426
Numerical Solutions to Systems of Differential Equations 427
Graphical Solutions to Systems of ODEs 428
Bessel Functions 429
Exercises 432
11 Statistics
435
Introduction to Statistics 435
Lists and Matrices 435
Importing Data from an ASCII File 436
Measures of Central Tendency 438
Median 439 Quantile 440 Mode 440 Geometric Mean 441 Harmonic Mean 442 Measures of Dispersion 443 Mean Deviation 443
Variance and Standard Deviation 444
Covariance 445
Moment 446
Correlation 447
Distributions and Densities 448
Cumulative Distribution Functions 448 Inverse Distribution Functions 449 Distribution Tables 449
Families of Continuous Distributions 449
Gamma Function 449 Normal Distribution 450 Student's t Distribution 451 Chi-Square Distribution 452 F Distribution 453 Exponential Distribution 454 Weibull Distribution 455 Gamma Distribution 456 Beta Distribution 457 Cauchy Distribution 457 Uniform Distribution 458
Families of Discrete Distributions 459
Binomial Distribution 459 Poisson Distribution 460 Hypergeometric Distribution 461 Random Numbers 462 Curve Fitting 463 Linear Regression 463
Polynomial Fit 465
Overdetermined Systems of Equations 469
Exercises 470
12 Applied Modern Algebra
473
Solving Equations 473
Integer Solutions 473
Continued Fractions 473
Recursive Solutions 474
Integers Modulo m 475
Multiplication Tables Modulo m 476
Inverses Modulo m 478
Solving Congruences Modulo m 479
Pairs of Linear Congruences 479
Systems of Linear Congruences 480
Extended Precision Arithmetic 480
Powers Modulo m 482
Generating Large Primes 482
Other Systems Modulo m 483
Matrices Modulo m 483
Polynomials Modulo m 485
Polynomials Modulo Polynomials 486
Greatest Common Divisor of Polynomials 487
Multiplicity of Roots of Polynomials 487 The Galois Field GFpn 489
Linear Programming 492
The Simplex Algorithm 492
Feasible Systems 493
Standard Form 494
The Dual of a Linear Program 494
Exercises 495
Preface
Scienti c WorkPlace and Scienti c Notebook provide a free-form interface to a com-puter algebra system that is integrated with a scienti c word processor. They are de-signed to t the needs of a wide range of users, from the beginning student trying to solve a linear equation to the professional scientist who wants to produce typeset-quality doc-uments with embedded advanced mathematical calculations. The text editors in Scien-ti c WorkPlace and ScienScien-ti c Notebook accept mathemaScien-tical formulas and equaScien-tions entered in natural notation. The symbolic computation system produces mathematical output inside the document that is formatted in natural notation, can be edited, and can be used directly as input to subsequent mathematical calculations.
Scienti c WorkPlace was originally developed as an interface to a computational system, with partial support from a National Science Foundation Small Business In-novation Research (SBIR) grant. The goal of the research conducted under the SBIR grant was to provide a new type of interface to computer algebra systems. The essential components of this interface are free-form editing and natural mathematical notation. Scienti c WorkPlace and Scienti c Notebook satisfy both criteria. They make sense out of as many different forms as possible, rather than requiring the user to adhere to a rigid syntax or just one way of writing an expression.
The computational components of Scienti c WorkPlace and Scienti c Notebook use a MuPAD engine. All versions use standard libraries furnished by Sciface Software. Scienti c WorkPlace and Scienti c Notebook provide easy, direct access to all the mathematics needed by many users. For the user familiar with MuPAD, they also allow access to the full range of MuPAD functions and to functions programmed in MuPAD. By providing an interface with little or no learning cost, Scienti c WorkPlace and Scienti c Notebook make symbolic computation as accessible as any Windows-based word processor.
Scienti c WorkPlace and Scienti c Notebook have great potential in educational settings. In a classroom equipped with appropriate projection equipment, the program's ease of use and its combination of a free-form scienti c word processor and computa-tional package make it a natural replacement for the chalkboard. You can use it in the same ways you would a chalkboard and you have the added advantage of the compu-tational system. You do not need to erase as you go along, so previous work can be recalled. Class notes can be edited and printed.
Scienti c WorkPlace and Scienti c Notebook provide a ready laboratory in which students can experiment with mathematics to develop new insights and to solve interest-ing problems; they also provide a vehicle for students to produce clear, well-written homework. For situations where the array of possibilities is beyond the scope of a course, you can hide some of the higher-level options on the Compute menu. To accom-plish this, from the Tools menu, choose Engine Setup and check Display Simpli ed Compute Menu.
This document, Doing Mathematics with Scienti c WorkPlace and Scienti c Note-book, describes the use of the underlying computer algebra systems for doing mathe-matical calculations. In particular, it explains how to use the built-in computer algebra
system MuPAD to do a wide range of mathematics without dealing directly with the syntax of the computer algebra system.
This document is organized around standard topics in the undergraduate mathematics curriculum. Users can nd the guidance they need without going to chapters involving mathematics beyond their current level. The rst four chapters introduce basic proce-dures for using the system and cover the content of the standard precalculus courses. Later chapters cover analytic geometry and calculus, linear algebra, vector analysis, dif-ferential equations, statistics, and applied modern algebra. Exercises are provided to encourage users to practice the ideas presented and to explore possibilities beyond those covered in this document.
Users with an interest in doing mathematical calculations are advised to read and ex-periment with the rst ve chapters—Basic Techniques for Doing Mathematics; Num-bers, Functions, and Units; Algebra; Trigonometry; and Function De nitions—which provide a good foundation for doing mathematical calculations. You may also nd it helpful to read parts of the sixth chapter Plotting Curves and Surfaces to get started creating plots. You can approach the remaining chapters in any order.
Experienced MuPAD users will nd it helpful to read about accessing other MuPAD functions and adding user-de ned MuPAD functions in the chapter Function De nitions. You will also want to refer to the tables in that chapter that pair MuPAD names with Scienti c WorkPlace and Scienti c Notebook names for constants, functions, and operations.
On-Line Help
The rst three items on the Help menu—Contents, Search, and Index—provide three routes for obtaining information.
Contents To reach the Contents page, press F1 or choose Contents from the
Help menu. Choose Computing Techniques for help arranged by topic, basically an on-line version of this manual. Once you are in a computing help document, the Next Document links take you sequentially through all of the computing help documents— click the right arrow on the Link Bar or choose Go + Links + Next Document. The Next Document links also take you sequentially through the tables of contents for the chapters of Computing Techniques.
Search For a discussion on a particular topic, choose Help + Search and enter key words. Search will nd topics in the General Information and Reference Library indexes as well as in the Computing Techniques index.
Index For a discussion on a particular computing topic, choose Help + Index + Computing Techniques. When you open an Index, use the drop-down list on the Navigate bar, click the GoTo Marker button on the Navigate or History toolbar, or choose Go + To Marker, and choose from the drop-down list that appears.
For a quick start in using Scienti c WorkPlace or Scienti c Notebook for text edit-ing and computedit-ing, pressF1 or choose the Contents menu under Help, and try Take
a Tour and Learn the Basics. You will also get many useful hints for computing by working quickly through documents provided with your system on the nplay subdirec-tory. If you save copies of the Help documents in Scienti c WorkPlace or Scienti c Notebook, you can interact with the mathematics they contain, experimenting with or reworking the included examples.
For information on the document-editing features of your system, the online Help describes how to create transportable LATEX documents without viewing the syntax of
LATEX, how to typeset with LATEXand PDFLATEX, and how to create HTML and RTF
output—see General Information under Contents or Index, or choose Search. These document-editing features are also described in the document, Creating Documents with Scienti c Word and Scienti c WorkPlace.
Conventions
Understanding the notation and the terms we use in our documentation will help you understand the instructions in this manual. We assume you are familiar with basic Win-dows procedures and terminology. In this manual, we use the notation and terms listed below.
General Notation
Text like this indicates text you should type exactly as it is shown. Text like this indicates the name of a menu, command, or dialog. TEXT LIKE THISindicates the name of a keyboard key.
Text like this indicates the name of a le or directory.
Text like this indicates a term that has special meaning in the context of the program. T ext like thisindicates an expression that is typed in mathematics mode.
The word choose means to designate a command for the program to carry out. As with all Windows applications, you can choose a command with the mouse or with the keyboard. Commands may be listed on a menu or shown on a button in a dia-log box. For example, the instruction “From the File menu, choose Open” means you should rst choose the File menu and then from that menu, choose the Open command. This is often abbreviated as File + Open. The instruction “choose OK” means to click the OK button with the mouse or pressTABto move the attention to
the OK button and then press theENTERkey on the keyboard.
The word check means to turn on an option in a dialog box.
When Compute menu commands are speci ed, the word Compute is usually sup-pressed. For example, when you see Evaluate, choose Compute + Evaluate. Keyboard Conventions
We also use standard Windows conventions to give keyboard instructions.
The names of keys in the instructions match the names shown on most keyboards. They appear like this:ENTER, F4,SHIFT.
A plus sign (+) between the names of two keys indicates that you must press the rst key and hold it down while you press the second key. For example,CTRL+Gmeans
that you press and hold down theCTRLkey, pressG, and then release both keys.
The notationCTRL+ word means that you must hold down theCTRLkey, type the
word that appears in bold type after the +, then release theCTRLkey. Note that if a
Obtaining Technical Support
If you can't nd the answer to your questions in the manuals or the online Help, you can obtain technical support from the website at
http://www.mackichan.com/techtalk/knowledgebase.html or at the Web-based Technical Support forum at
http://www.mackichan.com/techtalk/UserForums.htm
You can also contact the Technical Support staff by email, telephone, or fax. We urge you to submit questions by email whenever possible in case the technical staff needs to obtain your le to diagnose and solve the problem.
When you contact Technical Support by email or fax, please provide complete in-formation about the problem you're trying to solve. They must be able to reproduce the problem exactly from your instructions. When you contact them by telephone, you should be sitting at your computer with the program running. Please provide the follow-ing information any time you contact Technical Support:
The MacKichan Software product you have installed.
The version and build numbers of your installation (see Help / About). The serial number of your installation (see Help / System Features). The version of the Windows system you're using.
The type of hardware you're using, including network hardware. What happened and what you were doing when the problem occurred. The exact wording of any messages that appeared on your computer screen. I To contact technical support
Contact Technical Support by email, fax, or telephone between 8AMand 5PM
Pa-ci c Time:
Internet electronic mail address: support@mackichan.com Fax number: 360-394-6039
Telephone number: 360-394-6033
Toll-free telephone: 877-SCI-WORD (877-724-9673)
You can learn more about Scienti c WorkPlace and Scienti c Notebook on the MacKichan web site, which is updated regularly to provide the latest technical in-formation about the program. The site also houses links to other TEX and LATEX
re-sources. There is also an unmoderated discussion forum and an unmoderated email list so users can share information, discuss common problems, and contribute techni-cal tips and solutions. You can link to these valuable resources from the home page at http://www.mackichan.com.
Darel W. Hardy Carol L . Walker
1
Basic Techniques for Doing
Mathematics
In this chapter, we give a brief explanation, with examples, of each of the basic computa-tional features of Scienti c WorkPlace and Scienti c Notebook. You are encouraged to open a new document and work the examples as you proceed. You can begin comput-ing as soon as you have opened a le.
I To enter and evaluate an expression
1. From the Insert menu, choose Math. (If this choice does not appear, your insertion point is already in mathematics mode and you are ready for step 2.)
2. Enter a mathematical expression in the document—for example, 2+2. (It will appear red on your screen.)
3. Leaving the insertion point in the expression, from the Compute menu, choose Evaluate.
The expression 2 + 2 will be replaced by the evaluation 2 + 2 = 4.
Mathematics is automatically spaced differently from text as you enter it—for exam-ple, “2 + 2” rather than “2+2”—so you do not have to make adjustments.
Inserting Text and Mathematics
The blinking vertical line on your screen is referred to as the insertion point. You may have heard it called the insert cursor, or simply the cursor. The insertion point marks the position where characters or symbols are entered when you type or click a symbol. You can change the position of the insertion point with the arrow keys or by clicking a different screen position with the mouse. The position of the mouse is indicated by the mouse pointer, which assumes the shape of an I-beam over text and an arrow over mathematics.
Basic Guidelines
You can enter information in a document in either mathematics or text. The mathematics that you enter is recognized by the underlying computing engine as mathematics, and the text is ignored by the computing engine.
Text is entered at the position of the insertion point when the Toggle Text/Math button in the Standard toolbar shows .
Mathematics is entered at the position of the insertion point when the Toggle Text/-Math button on the Standard toolbar shows .
Show/Hide New Save Print Spelling Copy Undo Nonprinting Table
Open Open Preview Cut Paste Properties Toggle Zoom Factor
Location Text/Math
On the screen, mathematics appears in red and text in black. For information on changing this, see Help + Search + Screen Defaults.
Note See the preface (page xxiii) for notation and keyboard conventions used in this manual.
You can toggle between these two states by clicking the buttons shown earlier or by pressingCTRL+ Mor CTRL+ Ton the keyboard. Entering a mathematics symbol by
clicking a button on a toolbar automatically puts the state in mathematics at the position in which the symbol is entered. The state remains in mathematics as you enter characters or symbols to the right of existing mathematics, until you either toggle back into text or move the insertion point into text by using the mouse or by pressingRIGHT ARROW,
LEFT ARROW, orENTER. (To customize your system for toggling between mathematics and text, from the Tools menu, choose User Setup and click the Math tab. The choices include toggling with theSPACE BARor theINSERTkey. See Help + Search + User
Setup for further details.)
Choose Help + Search + toolbars + customizing the toolbars, if the Math Tem-plates toolbar referred to below—or any other toolbar you would like to use—does not automatically appear on your screen.
I To enter a fraction, radical, exponent, or subscript
1. Click on , , , or on the Math Templates toolbar.
or
From the Insert menu, choose Fraction, Radical, Superscript, or Subscript. or
PressCTRL + F,CTRL + R, CTRL+ H(or CTRL + UP ARROW), orCTRL + L (or
CTRL+DOWN ARROW).
2. Enter expressions in the input boxes.
The SPACEBARand ARROW keys move the insertion point through mathematical expressions and theTABkey toggles between input boxes.
I To use various symbols for multiplication and division Click your choice on the Symbol Cache toolbar.
or
Click the Binary Operations button on the Symbol Panels toolbar
and choose from symbols on the drop-down panel:
or
Use * and / on the keyboard.
You select a piece of text with the mouse by holding down the left mouse button while moving the mouse, or from the keyboard by holding down SHIFT and pressing RIGHT ARROWorLEFT ARROW. Your selection appears on the screen in reversed colors.
This technique is sometimes referred to as highlighting an area of the screen. This is also one of the ways you can select mathematics. See page 9 for a discussion of automatic and user selections for mathematics.
There is a variety of brackets available for mathematics expressions. Brackets en-tered from buttons or dialogs, or from the keyboard withCTRLpressed, are expanding
brackets (sometimes called fences)—both sides are entered and the resulting brackets change size (both height and width) depending on the contents. Expanding brackets will not break at the end of a line so lengthy expressions enclosed in expanding brackets may
need to be displayed. Left and right brackets entered from the keyboard (withoutCTRL
pressed) act independently. They also have xed height. I To enter brackets in a mathematics expression
Click or on the Math Templates toolbar.
or
Choose Insert + Brackets or click the Brackets button on the Math Objects toolbar, and choose Left and Right brackets from the Brackets dialog.
or
PressCTRL+ 9 orCTRL+ [ orCTRL+ SHIFT + [ on the keyboard for expanding brackets.
or
Type the appropriate keyboard symbols in mathematics.
Tip The appearance of the Toggle Text/Math button — or — re ects
the state at the position of the insertion point.
Displaying Mathematics
Mathematics can be centered on a separate line in a display. y = ax + b
I To create a display
2. Type a mathematical expression in the display, or select a piece of mathematics and drag it into the display.
You can begin with an existing mathematical expression and put it into a display. I To put mathematics in a display
1. Select the mathematics with click and drag orSHIFT+RIGHT ARROW.
2. Click the Display button on the Math Objects toolbar, or from the Insert menu, choose Display.
The default environment in a display is mathematics. You can, however, enter text in a display by toggling to text. Also, you can select mathematics or text in a display and change its state by toggling (see page 2).
Note PressingENTERimmediately before a display will add extra vertical space. If you do not want this space, place the insertion point immediately before the display and pressBACKSPACE. (This removes the “new paragraph” symbol.)
PressingENTER immediately after a display will add extra vertical space and
cause the next line to start a new paragraph. If you do not want this space or indention, place the insertion point at the start of the next line and pressBACKSPACE. (This removes
the “new paragraph” symbol.)
Centering Plots, Graphics and Text
If you have text that you wish to center on a separate line, the natural way to do this operation is with Centered, which you can choose from the Section/Body Tag pop-up menu at the bottom of your screen.
If you have a plot or graphic that you wish to center on a separate line, you should choose the Display setting in the Layout dialog, as discussed in Chapter 6, Plotting Curves and Surfaces. To center a group of plots or graphics, choose the In Line setting in the Layout dialog and use Centered. We generally advise against placing a plot inside the Insert + Display object, as this makes the plot itself a mathematical object, which can sometimes cause dif culties.
Basic Guidelines for Computing
When you respond to the request “place the insertion point in the expression,” place the insertion point within, or immediately to the right of, the expression. The position immediately to the left of a mathematical expression is not valid. You can check the state of the Toggle Text/Math button to verify that your insertion point is in mathematics or text.
To enter a mathematics expression for a computation, begin a new line with the mathe-matics expression or type the expression immediately to the right of text or a text space. If you enter mathematics immediately to the right of other mathematics, the expressions will be combined in ways you may not intend. A safe way to begin is to pressENTER
and start on a new line. I To add 3 and 8
1. Click (or choose Insert + Math, or pressCTRL+M) to toggle to mathematics
mode, so that the Text/Math button looks like . 2. Type 3 + 8.
3. Leaving the insertion point in the expression 3 + 8, do one of the following: Click the Evaluate button on the Compute toolbar.
or
From the Compute menu, choose Evaluate. or
PressCTRL+E.
This sequence of actions inserts = 11 to the right of the 3 + 8, resulting in the equation 3 + 8 = 11.
By following the same procedure, you can carry out the following operations and perform a vast variety of other mathematical computations.
Note The contents of the gray boxes (shaded background) display the mathematical expressions you enter, together with the results of the indicated operation. In general, throughout this document, the mathematical contents of gray boxes display both the input for an action and the results. In the case of plots, the input is displayed in the gray box and the results are displayed immediately following the gray box.
Add I Evaluate 235 + 813 = 1048 49:3 + 2:87 = 52:17 2 3 + 1 7 = 17 21 (x + 3) + (x y) = 2x y + 3 Subtract I Evaluate
96 27 = 69 2x2 5 (3x + 4) = 2x2 3x 9 49:3 2:87 = 46: 43 2 3 8 7 = 10 21 Multiply I Evaluate 82 37 = 3034 (936) ( 14) = 13104 14:2 83:5 = 1185:7 2 3 8 7 = 16 21 Divide I Evaluate 82 37 = 82 37 36=14 = 18 7 14:2 83:5 = 0:170 06 2 3 8 7 = 7 12
Important Except that it be mathematically correct, there are almost no rules about the form for entering a mathematical expression in Scienti c WorkPlace and Scienti c Notebook.
For example, the expressions
2 3 8 7 2 3 8 7 2 3= 8 7 (2=3) = (8=7)
are equally acceptable ways of entering a quotient of fractions. Also,
(936) (14) 936 14 936 14 936 14
and many other variations are acceptable for the same product. One of the few excep-tions to the claim of “no rules” is that “vertical” notation such as
24
+15 and
235
47 and 2)364
used when doing arithmetic by hand is not generally recognized. Write sums, differ-ences, products, and quotients of numbers in natural “linear” or fractional notation, such as 24 + 15 and 235 47 and 36 14 and 364=2 or3642 or 364 2.
Certain constants are recognized in their usual forms—such as , i, and e—as long as the context is appropriate. On the other hand, they are recognized as arbitrary constants, variables, or indices when appropriate to the context, helping to provide a completely natural way for you to enter and perform mathematical computations.
you can change in the Tools + Computation Setup dialog discussed on page 29. The examples in this document may differ in this respect from the answers you get with your system, and different examples in this document use different settings.
Interpreting Expressions
If your mathematical notation is ambiguous, it may still be accepted. However, the way it is interpreted may or may not be what you intended. To be safe, remove an ambiguity by placing additional parentheses in the expression.
I To check the interpretation of a mathematical expression 1. Leave the insertion point in the expression.
2. PressCTRL, and while holding it down, type ?
or
Choose Compute + Interpret.
I CTRL+ ?
1=3x + 4 = 13x + 4 1= (3x + 4) = (3x+4)1 1= (3x) + 4 = 3x1 + 4 1=3 (x + 4) = 13(x + 4)
Tip Although in most cases different shapes of brackets are interchangeable, as a gen-eral rule standard parentheses (3 + ) are better for grouping mathematical expressions than other types of brackets, because in a few very special cases, other brackets can be interpreted in a way you don't intend. Also, the expanding brackets you enter from the Insert menu or the Math Templates toolbar or with various keyboard shortcuts are generally better for grouping mathematical expressions than the single brackets on the keyboard.
The Compute Menu and Toolbar
Click Compute at the top of the screen and a drop-down menu will appear with a num-ber of computing choices, beginning with Evaluate, Evaluate Numerically, Simplify, Combine, Factor, and Expand.
The Compute toolbar contains some of the most often used choices from the Com-pute menu.
Solve Plot 3D Show Evaluate Exact Expand Rectangular Definitions
Evaluate Simplify Plot 2D New Numerically Rectangular Definition
I To perform a mathematics computation
1. Place the insertion point inside or to the right of the expression on which you want to perform an operation.
2. Click the button or menu item for the operation you want to perform.
Important Throughout this document, whenever computing commands are speci ed, the preceding Compute is implied. For example, when you see Evaluate, choose Com-pute + Evaluate.
Commands on the Compute menu can be executed from the keyboard following standard procedures.
I To execute a command on the Compute menu from the keyboard PressALTand, while holding down this key,
PressC(for Compute), followed by the command letter underlined on the
drop-down menu that appears.
If the command is followed by an arrow on the right of the menu, press ENTER
followed by another underlined command letter.
Some commands have a shorter keyboard shortcut. (CTRL+ KEYis an abbreviation
for “PressCTRLand, while holding down this key, pressKEY.”)
Shortcut Command
CTRL+E Compute + Evaluate
CTRL+SHIFT+E Compute + Evaluate (in-place replacement)
CTRL+ = Compute + De nitions + New De nition
There are many other keyboard shortcuts available. For a list of keyboard shortcuts for both mathematics and text, choose Help + Search + keyboard shortcuts and, from the list, choose keyboard shortcuts.
Selecting Mathematical Expressions
When you perform a mathematical operation, a mathematical expression is automati-cally selected for the operation, depending on the position of the insertion point and the
operation involved. We will refer to these as automatic selections. You can also force other selections by selecting mathematics with the mouse. We will refer to the latter as user selections.
Understanding Automatic Selections
When you place the insertion point in a mathematical expression and choose an opera-tion from the Compute menu, the automatic selecopera-tion depends primarily on the com-mand you choose. It also depends on the location of the mathematics, such as in-line, in a matrix, or in a display. The following two possibilities occur for mathematical objects that are typed in-line:
Selection of an expression, that part of the mathematics containing the insertion point that is enclosed between a combination of text and the class of symbols—such as =, <, or —known as binary relations. (Click on the Symbol Panels toolbar to see the full selection of binary relations.)
Selection of the entire mathematical object, such as an equation or inequality. Examples in the following two sections illustrate situations where these two types of selections occur.
Operations that Select an Expression
The majority of operations select an expression enclosed between text and binary opera-tions. Place the insertion point anywhere in the left side of the equation 2x + 3x = 1 + 4 except to the left of the 2, and choose Evaluate.
I Evaluate
2x + 3x = 5x = 1 + 4
The expression = 5x is inserted immediately after the expression 2x+3x. This time, only the expression on the left side of the equation was selected for evaluation. Since the result of the evaluation was equal to the original expression, the result was placed next to the expression, preceded by an equals sign. The insertion point is placed at the right end of the result so that you can select another operation to apply to the result without moving the insertion point.
Other commands, including Evaluate Numerically, Simplify, Combine, Factor, and Expand, make similar selections under similar conditions.
Operations that Select an Equation or Inequality
Place the insertion point anywhere within the equation 2x + 3x = 1 and click the Solve button on the Compute toolbar or, from the Solve submenu, choose Exact. I Solve + Exact
2x + 3x = 1, Solution is: 15
3x + 5 5x 3, Solution is: [4; 1)
In these cases, the entire mathematical object—that is, the equation or inequality— was selected. The other choices on the Solve submenu and the operation Check Equal-ity also select the entire mathematical object.
If the mathematics is not appropriate for the operation, no action is taken or no solution is found. For example, applying one of the Solve commands to x = y = z causes a syntax error, because of the pair of equals signs. You receive the message “No solution found.” For other inappropriate mathematics, you may see an error message, hear a beep, or see no action, depending on the Error Noti cation setting. You can change this setting in the Engine Setup dialog on the Tools menu (see page 15). Selections Inside Displays and Matrices
Operations may behave somewhat differently when mathematics is entered in a display or in a matrix. If you place the insertion point inside a display or matrix, the automatic selection is the entire array of entries, for any operation. Some operations apply to a matrix, and others to the entries of a matrix or contents of a display. If the operation is not appropriate for either a matrix or its entries or for all the contents of a display, you may receive a report of a syntax error.
Inside a display, the automatic selection is all the mathematics, and the result is generally returned outside the display. To select mathematics in a display, place the insertion point anywhere inside the display, and choose a command that operates on expressions or equations.
When you click or apply Evaluate with the insertion point in the left side of the displayed equation
2x + 3x = 3 + 5
you get the result : 5x = 8 in-line outside the display. Because the automatic selection includes all of the mathematics, this action evaluates both sides of the equation.
A multiple line display is useful for solving systems of equations, or equations with initial value conditions.
I Solve + Exact 5x + 2y = 3 6x y = 5 , Solution is: x = 13 17; y = 7 17
You can use a matrix to arrange mathematical expressions in a rectangular array. To create a matrix, choose Matrix from the Insert menu or click , set the number of rows and columns, and choose OK. If you see nothing on your screen, choose View and turn on Hidden Lines or Input Boxes. Type a number or mathematical expression in the input boxes of the matrix.
When you click or apply Evaluate to a matrix of expressions, all the expres-sions will be evaluated and the result will be returned as a matrix. Evaluate Numeri-cally, Simplify, Factor, and choices from the Combine submenu behave similarly. I Evaluate (or Simplify)
x + x 5 + 3 5=2 62 = 2x 8 5 2 36 I Evaluate Numerically x + x 5 + 3 5=2 62 ! = 2:0x 8:0 2:5 36:0 ! I Factor x + x 5 + 3 5=2 62 ! = 2x 2 3 5 2 2232 !
Selections Inside Tables
A table is not a mathematical object, and the behavior for mathematics inside a table is somewhat different than for mathematics in a matrix or display. If you have mathematics in a table, placing the insertion point in the mathematics will automatically select all of the mathematics in the cell that contains the insertion point. For example, Evaluate will select an equation if one is present, rather than just an expression. The result of the operation will appear in the cell.
Understanding User Selections
You can restrict the computation to a selection you have made and so override the auto-matic choice. Recall that you can select a piece of matheauto-matics by holding down the left mouse button while moving the mouse; your selection is the information that appears on the screen in reversed colors.
There are two options for applying operations to your selection—operating on a selection displays the result of the operation but leaves the selection intact, and replacing a selection replaces the selection with the result of the operation. Following are two examples illustrating the behavior of the system when operating on a selection. The option of replacing a selection is referred to as computing in place, and examples are shown in the next section.
I To operate on a user selection
1. Use the mouse or pressSHIFT+ARROWto select an expression.
2. Applying a command to the expression.
Example Use the mouse or pressSHIFT +ARROWto select 2 + 3 in the expression 2 + 3 x. From the Compute menu, choose Evaluate. The answer appears to the right of the expression, following a colon (:).
2 + 3 x : 5
Use the mouse or press SHIFT + ARROW to select (x + y)3 within the expression
(x + y)3(7x 13y)3+ sin2x. From the Compute menu, choose Expand. The answer appears to the right of the whole expression, following a colon.
(x + y)3(7x 13y)3+ sin2x : x3+ 3x2y + 3xy2+ y3
In general, the result of applying an operation to a user selection is not equal to the entire original expression, so the result is placed at the end of the mathematics, separated by something in text (in this case, a colon). You can then use the word-processing capabilities of your system to put the result where you want it in your document. I To replace a user selection
1. Use the mouse or pressSHIFT+ARROWto select an expression.
2. Press and holdCTRLwhile applying a command to the expression. or
For the command Evaluate, pressCTRL+SHIFT+E.
The system replaces the selected expression with the output of the command. This is an in-place computation, as described in the following section.
Computing in Place
With the help of theCTRLkey, you can perform any computation in place; that is, you
can replace an expression directly with the results of that computation. This “computing in place” is a key feature. It provides a convenient way for you to manipulate expressions into the forms you desire.
Select with the mouse the expression that you wish to replace, and while holding down the CTRLkey, choose the desired operation from the Compute menu. The re-sponse that replaces the original expression will remain selected, making it convenient to add parentheses around the new expression when needed simply by clicking the paren-theses button.
I Select expression and chooseCTRL+ Evaluate or chooseCTRL+SHIFT+E
I Select expression and chooseCTRL+ Expand
2345=567 is replaced by 41181 (a + b)3is replaced by a3+ 3a2b + 3ab2+ b3
This feature, combined with copy and paste, allows you to “ ll in the steps” in demonstrating a computation.
Example To replace (x 2y)2in the expression (x 2y)2(7x 13y) x2+ 1 with
its expansion, select (x 2y)2, hold down the CTRLkey, and click or choose
Expand. Your selection, (x 2y)2, is replaced by its expansion. The expansion has no parentheses around it, but since it remains selected, you can click to add the needed parentheses. Following this procedure,
(x 2y)2(7x 13y) x2+ 1 is replaced by
(x2 4xy + 4y2)(7x 13y)(x2+ 1)
You can return the expression to a factored form by selecting x2 4xy + 4y2 , holding
down theCTRLkey, and choosing Factor.
Stopping a Computation
Most computations are done more or less instantaneously, but some may take several minutes to complete, and some may take a (much) longer time. So it is convenient to be able to interrupt the computing and regain control of your document.
I To stop a computation
Click the stop sign on the Stop toolbar. or
PressCTRL+BREAK.
Computational Engine
The computational engine provided with Scienti c WorkPlace and Scienti c Note-book Version 5.5 is MuPAD 3.1. To see if this engine is active in your system, or to deactivate the engine, choose Tools + Computation Setup + Engine Selection.
For a list of menu commands, a partial list of functions and constants available, and a description of these commands and functions in terms of the native commands of MuPAD, see page 130, or go to Help + Search + function and choose a brief description of commands and functions.
Error Handling
From the Tools menu, choose Engine Setup and click the Error Handling tab. On this page you can specify the default settings for Error Noti cation, Engine Command Noti cation, and Transaction Logging.
Under Error Noti cation you can choose None, choose to be noti ed with Beep, or choose Message to Status Bar or Message to Dialog Box. These are responses to various syntax errors in the mathematics being sent to the computing engine. If you choose to have messages shown, you will see some information concerning these errors. Under Engine Command Noti cation, you can choose None, or choose Show Commands on Status Bar or Show Commands in Dialog Box. If you choose to have commands shown in a dialog box, you will see the syntax of commands being sent to the computing engine.
The factory defaults for these choices are those shown in the graphic. Error Noti cation: Beep
Engine Command Noti cation: None. Transaction Logging: None
To return to these defaults, choose Reset Page to Defaults and choose OK.
Under Transaction Logging, you can choose to have some, all, or no records of mathematical messages sent to the computing engine recorded in an ASCII log le. Transaction Logging always resets to the default of not logging. To accumulate entries in the log le, you must take the following action each time you open a session.
I To start logging transactions
1. From the Tools menu, choose Engine Setup, and click the Error Handling tab. 2. Choose Start Logging.
3. Check any or all of the choices for Transaction Logging: Error Messages, Strings to Engine, Strings from Engine.
4. If you want the times recorded in the log le, check Message Times. 5. Choose Start Logging and choose OK.
With Start Logging activated, your system will create a le named engine.log on the root directory of your Scienti c WorkPlace or Scienti c Notebook system, and record all of your transactions in this le for the rest of the session or until you press Stop Logging. The transactions you have logged will be saved in this le until you choose Clear Log File. You can read the le engine.log with any ASCII editor.
Frequently Asked Questions
Here, in question and answer form, are some situations that might arise when you are working in a document.
Q. My screen has gotten cluttered with lines or marks that don't belong there (or I can't see something on the screen that I know is there). What can I do?
A. PressESCor choose View + Refresh to refresh your screen.
Q. What can I do if I type an expression in text mode that I meant to have in mathematics mode?
A. Select the expression with the mouse or select the expression from the keyboard by placing the insertion point to the left of the expression and pressingSHIFT+RIGHT ARROW. Then click the Toggle Text/Math button to change it to . Q. What can I do if I cannot see all of my work on the screen either horizontally or
vertically?
A. If a piece of mathematics extends beyond the width of the screen, you can scroll horizontally using the scroll bars at the bottom of the screen. If the mathematics has possible breaking points, add an Allow Break at appropriate places from the Insert + Spacing + Break menu. To see more of your document on the screen at a time, you can reduce the size of the screen font. Click View and choose Working. Change the percentage in the Working View box and choose OK. The 1x on the View menu gives 100% and the 2x gives 200%. The range for Working View is 50% (very small) to 400% (huge).
A. A setting on the Edit page of Tools + User Setup will allow you to change these behaviors. The default behavior allows you to enter multiple spaces, horizontal or vertical, by pressing SPACEBAR, ENTER, orTAB. Follow directions on the menu
to change spacing behaviors. For a variety of spacing options, choose Insert + Spacing + Horizontal Space or Vertical Space, and choose an appropriate size space. If you check Custom Space, you can specify the width or height of the space or choose stretchy spaces. Mathematics is automatically spaced appropriately for most situations. To keep a mathematical expression meaningful for computation, be sure any added space stays in mathematics mode.
Q. I tried a computation and nothing happened (although my system does carry out other computations). How can I nd out what I did wrong?
A. One common problem is a forgotten de nition. Choose Compute + De nitions + Show De nitions and look for a de nition that is interfering with your computation. Apply Compute + De nitions + Unde ne to the variable or function that is causing the problem. If this does not solve the problem, click Tools, choose Engine Setup, Error Handling page, and change the setting for Error Noti cation. With a setting of None, you get no response to errors. With a setting of Beep, you get a warning sound with an error. With other settings, you get messages with information about the error—usually the error message generated by the computing engine. (See page 15 for more detailed information about error handling.)
Q. I tried to take the absolute value of an expression and nothing happened. What is wrong?
A. The symbols for absolute value are the vertical lines from the dialog box under Brackets . (The keyboard vertical line will also work, but expanding brackets are less vulnerable to misinterpretation.) Perhaps you used the vertical lines from the symbol panel under the Binary Relations button . Although they appear similar, they are not the same symbols and will not be interpreted as absolute-value symbols.
Q. How can I be sure exactly how my mathematical expression is being interpreted? A. Select the expression and pressCTRL+ ? or choose COMPUTE+ INTERPRET. The
expression will be presented in an unambiguous form. For example, sin a= sin b = sin a
sin b sin x=y = sin
x y Z xy = Z xy d? Add parentheses or change the expression some other way to remove an ambiguity. Q. The mathematics I entered is being misinterpreted but it looks okay on the screen.
What should I change?
A. Is your expression in a display? If you place the insertion point in a display and choose Evaluate, the entire contents of the displayed object will be evaluated, even if part of it is text. To avoid this type of behavior, select the expression or equation with click and drag before choosing a command. If you are using braces, square brackets,
or non-expanding parentheses in place of expanding parentheses, try changing all of these to expanding parentheses. It is advisable, as a general rule, to use expanding parentheses whenever parentheses are called for. For a variety of reasons, other choices for brackets are vulnerable to misinterpretation—particularly if the left and right parentheses do not match. Example: (2)(3) is entered with the outer ses “()” expanding brackets and the inner parentheses “)(” non-expanding parenthe-ses. Evaluating this non-matched expression gives (2)(3) = 2, which is probably not what is intended! Although the expanding brackets under the Brackets button
, the expanding brackets and , and non-expanding brackets from
the keyboard are generally interchangeable (when properly matched), there are a few circumstances in which the square brackets or keyboard brackets or even keyboard parentheses do not work properly. In particular, the less-than and greater-than sym-bols on the keyboard should not be used as brackets. These two symsym-bols, as well as the symbols on the panel under , are binary relations and generally will not be interpreted as brackets. Square brackets and braces have some special meanings for the computing engine, and even though the interface is designed to accept as many ordinary mathematics expressions as possible, the use of nonexpanding or unusual brackets can lead to misinterpretations.
Q. My expression will not plot. What can I try?
A. Choose Compute + De nitions + Show De nitions, or click the Show De ni-tions button on the Compute toolbar, and look to see if any of the variables you are using are de ned. If so, select the variable and choose Compute + De ni-tions + Unde ne. If a forgotten de nition is not the problem, hold down theCTRL
key while giving the plot command. This will cause the Plot Properties dialog to come up before the system makes the plot. Choose the Items Plotted page and try changing the settings for Variables and Intervals and/or uncheck the Adjust Plot for Discontinuities option.
Q. My document contains complicated plots, and scrolling through the document is very slow. Can I turn off the plots temporarily to save myself time as I edit the le? A. You can turn off the computing engine temporarily: choose Tools + Computation
Setup, go to the Engine Selection page, and choose None. If you want to keep the computing engine active, you can set the plot either to appear on the screen as an icon or as an empty frame: select the plot, choose Edit + Properties, and on the Layout page, under Screen Display Attributes, check Iconi ed or check Frame Only. If you choose Iconi ed, you can enter a Name for the icon on the Labeling page of the Plot Properties dialog. Or, if your plots are in nal form, you can rename the plot snapshots and import them as pictures that take much less time to load. See page 225 for details on this option.
2
Numbers, Functions, and
Units
Numbers and functions to be used for computing should be entered in mathematics mode and appear red (or gray) on your screen. If that is not the case, select the expression and click to change it to mathematics. Units to be used for computing must be entered as a Unit Name (see page 43).
I To enter a mathematics expression for a computation Begin a new line with the mathematics expression. or
Type the expression immediately to the right of text or a text space.
Note If you enter mathematics immediately to the right of other mathematics, the expressions will be combined in ways you may not intend. A safe way to begin is to pressENTERand start on a new line.
Integers and Fractions
The rst examples are centered around rational numbers—that is, integers and fractions. You will nd examples of many of the same operations later in this chapter, using real numbers and then complex numbers. Similar operations will be illustrated in later chap-ters with a variety of different mathematical objects.
Addition and Subtraction
I To add 3, 6, and 14
1. To put the insertion point in mathematics mode, do one of the following:
Choose Insert + Math. (If you see Text on the Insert menu, you are already in mathematics mode.)
Click the Text/Math button on the Standard toolbar. (If you see on the toolbar, you are already in mathematics mode.)
2. Type 3 + 6 + 14 (This expression should appear red on your screen.)
3. Leaving the insertion point in the expression 3 + 6 + 14, do one of the following: From the Compute menu, choose Evaluate.
Click the Evaluate button on the Compute toolbar. PressCTRL+E.
This sequence prompts the system to insert = 23 to the right of the 3 + 6 + 14, resulting in the equation 3 + 6 + 14 = 23.
By following the same procedure, you can carry out subtraction and perform a vast variety of other mathematical computations. With the insertion point in the sum (or difference), choose Evaluate.
I Evaluate
235 + 813 = 1048 23 87 = 1021 96 27 + 2 = 71
Note Following a command, the mathematical contents of gray boxes (the shaded ar-eas on these pages) display the mathematical expressions you enter, together with the results of the indicated command. In general, throughout this document, the mathemat-ical contents of gray boxes display both the input for an action and the results.
I To obtain the fraction template
Place the insertion point in the position where you want the fraction, and Choose Insert + Fraction.
or
Click the Fraction button on the Math Templates toolbar. or
PressCTRL+ForCTRL+ / orCTRL+ 1.
The template will appear with the insertion point in the upper input box, ready for you to begin entering numbers or expressions. Choose View and check Input Boxes to see input boxes on the screen.
Multiplication and Division
Use any standard linear or fractional notation for multiplication and division, and with the insertion point in the product (or quotient), choose Evaluate
I Evaluate 16 37 = 592 (84) ( 39) = 3276 29 137 = 2663 103 37 = 10337 8:2=3:7 = 2:2162 2 9 13 7 = 11714
Mixed Numbers and Long Division
A number written in the form 145
9 is interpreted as the mixed number 14 + 5 9. Most
commands applied to a mixed number return a fraction. For example, applying Evaluate or Simplify to 145
9gives the result 131
9 . The reverse is accomplished by Expand, which
converts a fraction to a mixed number. These commands are also available directly on the Compute toolbar:
Click for Evaluate, for Simplify, and for Expand.
I Evaluate or Simplify 123 =53 1938794 =1822994 123+ 234 = 5312 I Expand 18229 94 = 193 87 94 53 12 = 4 5 12
The expansion of a fraction to a mixed number uses the familiar long-division algorithm. In the preceding example, 18229 divided by 94 is equal to 193 with remainder 87.
Elementary Number Theory
The arithmetic of positive integers exhibits many interesting properties. Many of these properties are related to integers called primes.
Prime Factorization
An integer greater than 1 is a prime if it is not evenly divisible by any positive integer except 1 and itself. The list of primes begins with 2; 3; 5; 7; 11; 13; 17; : : :. Every posi-tive integer greater than 1 can be factored into a product of powers of primes. You can identify a prime by the fact that it is its own prime factorization.
To factor integers into products of powers of primes, place the insertion point inside the number and choose Factor.
I Factor
12345 = 3 5 823 82723 = 82723
4733 64564 31063 80000 = 25310547311213 17 19 23
Alternately, while in mathematics, type factor (it will automatically turn gray), en-ter the integer (with or without parentheses), and choose Evaluate.
factor (12345) = 3 5 823 factor (82723) = 82723 factor (4733 64564 31063 80000) = 25310547311213 17 19 23
You can use Simplify or Evaluate to return any of the preceding factorizations to integer form.
Greatest Common Divisor and Least Common Multiple
The greatest common divisor of a collection of integers is the largest integer that evenly divides every integer in the collection.
I To nd the greatest common divisor of a collection of integers
1. Type gcd in mathematics. (The name gcd should turn gray when you type the d.) 2. Enclose the list of numbers, separated by red commas, in brackets.
3. Leave the insertion point in the list, and click or choose Evaluate or press
CTRL+E.
I Evaluate
gcd(35; 15; 65) = 5 gcd (910; 2405; 5850; 2665) = 65 gcd (104; 221) = 13
Note If you enter the function gcd from the keyboard while in mathematics mode, the gc appears in red italics until you type the d, then the function name gcd changes to a gray, nonitalic gcd. The function gcd is automatically substituted for the three-letter sequence g, c, and d. You can also choose gcd from the dialog that appears when you
click or when you choose Insert + Math Name.
The least common multiple of a collection of integers is the smallest positive integer that is evenly divisible by every integer in the collection. To nd the least common mul-tiple of a collection of integers, evaluate the function lcm applied to the list of numbers enclosed in brackets and separated by commas. Leave the insertion point in the list and choose Evaluate.
I Evaluate
lcm (24; 36) = 72 lcm (35; 15; 65) = 1365
You can enter the function lcm from the keyboard while in mathematics mode. It changes to gray, nonitalic letters on your screen. (If it does not appear on the function list under Insert + Math Name, you can add it to the list by typing it in the Name box and choosing Add.)
You can also determine both the greatest common divisor and least common multiple by inspection after applying Factor to each of the numbers in the list.
Factorials
Factorial is the function of a nonnegative integer n denoted by n! and de ned for positive integers n as the product of all positive integers up to and including n
n! = 1 2 3 4 n
and for zero by
0! = 1 You can compute factorials with Evaluate. I Evaluate
3! = 6 7! = 5040 10! = 3628800
Binomial Coef cients
An expression of the form a + b is called a binomial. The formula that gives the expan-sion of (a + b)nfor any natural number n is
(a + b)n= n X k=0 n! k! (n k)!a n kbk
This is the same formula that gives the number of combinations of n things taken k at a time. The coef cients n!
k!(n k)!that occur in this formula are called binomial coef cients.
These coef cients are often denoted by the symbols n
k or Cn;kornCk. Use the symbol n
k to compute these coef cients.
I To enter a binomial coef cient n k
1. Click the Binomial button on the Math Objects toolbar, or choose Insert + Binomial.
2. Choose None for line and choose OK. 3. Type numbers in the input boxes. I Evaluate
5
2 = 10
35
7 = 6724 520
You can use the Rewrite command to change a symbolic binomial to a factorial expression.