Mathematica ® Navigator
This page intentionally left blank
Mathematica ® Navigator Mathematics, Statistics, and Graphics
THIRD EDITION
Heikki Ruskeepää Department of Mathematics University of Turku, Finland
AMSTERDAM • BOSTON • HEIDELBERG • LONDON NEW YORK • OXFORD • PARIS • SAN DIEGO SAN FRANCISCO • SINGAPORE • SYDNEY • TOKYO Academic Press is an imprint of Elsevier
The book is produced from PDF files prepared by the author with Mathematica®. Academic Press is an imprint of Elsevier 30 Corporate Drive, Suite 400, Burlington, MA 01803, USA 525 B Street, Suite 1900, San Diego, California 92101-4495, USA 84 Theobald’s Road, London WC1X 8RR, UK Copyright © 2009, Elsevier Inc. All rights reserved. No part of this publication may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopy, recording, or any information storage and retrieval system, without permission in writing from the publisher. Permissions may be sought directly from Elsevier’s Science & Technology Rights Department in Oxford, UK: phone: (+44) 1865 843830, fax: (+44) 1865 853333, E-mail:
[email protected]. You may also complete your request online via the Elsevier homepage (http://elsevier.com), by selecting “Support & Contact” then “Copyright and Permission” and then “Obtaining Permissions.” Library of Congress Cataloging-in-Publication Data Ruskeepää, Heikki. Mathematic navigator : mathematics, statistics, and graphics / Heikki Ruskeepää. – 3rd ed. p. cm. Includes bibliographical references and index. ISBN 978-0-12-374164-6 (pbk. : alk. paper) 1. Mathematics–Data processing. 2. Mathematica (Computer file) I. Title. QA76.95.R87 2009 510.285'5–dc22 2008044637 British Library Cataloguing-in-Publication Data A catalogue record for this book is available from the British Library. ISBN: 978-0-12-374164-6 For information on all Academic Press publications visit our Web site at www.elsevierdirect.com
Printed in the United States of America 09 10 11 9 8 7 6 5 4 3 2
1
To Marjatta
This page intentionally left blank
Contents Preface xi 1 Starting 1 1.1 What Is Mathematica 2 1.2 First Calculations 6 1.3 Important Conventions 12 1.4 Getting Help 15 1.5 Editing 22 2 Sightseeing 25 2.1 Graphics 26 2.2 Expressions 31 2.3 Mathematics 40 3 Notebooks 51 3.1 Working with Notebooks 52 3.2 Editing Notebooks 59 3.3 Inputs and Outputs 70 3.4 Writing Mathematical Documents 78 4 Files 93 4.1 Loading Packages 94 4.2 Exporting and Importing 100 4.3 Saving for Other Purposes 109 4.4 Managing Time and Memory 112 5 Graphics for Functions 115 5.1 Basic Plots for 2D Functions 116 5.2 Other Plots for 2D Functions 132 5.3 Plots for 3D Functions 139 5.4 Plots for 4D Functions 147 6 Graphics Primitives 151 6.1 Introduction to Graphics Primitives 152 6.2 Primitives and Directives 155
viii
Mathematica Navigator
7 Graphics Options 179 7.1 Introduction to Options 180 7.2 Options for Form, Ranges, and Fonts 189 7.3 Options for Axes, Frames, and Primitives 195 7.4 Options for the Curve 203 7.5 Options for Surface Plots 210 7.6 Options for Contour and Density Plots 226 8 Graphics for Data 231 8.1 Basic Plots 232 8.2 Scatter Plots 249 8.3 Bar Charts 253 8.4 Other Plots 260 8.5 Graph Plots 267 8.6 Plots for 3D Data 275 9 Data 283 9.1 Chemical and Physical Data 284 9.2 Geographical and Financial Data 293 9.3 Mathematical and Other Data 300 10 Manipulations 315 10.1 Basic Manipulation 316 10.2 Advanced Manipulation 338 11 Dynamics 357 11.1 Views and Animations 357 11.2 Advanced Dynamics 369 12 Numbers 395 12.1 Introduction to Numbers 396 12.2 Real Numbers 403 12.3 Options of Numerical Routines 409 13 Expressions 413 13.1 Basic Techniques 414 13.2 Manipulating Expressions 419 13.3 Manipulating Special Expressions 427 13.4 Mathematical Functions 435 14 Lists 443 14.1 Basic List Manipulation 444 14.2 Advanced List Manipulation 459
Contents 15 Tables 4670 15.1 Basic Tabulating 467 15.2 Advanced Tabulating 470 16 Patterns 4910 16.1 Patterns 491 16.2 String Patterns 505 17 Functions 5110 17.1 User-Defined Functions 512 17.2 More about Functions 523 17.3 Contexts and Packages 531 18 Programs 5410 18.1 Simple Programming 542 18.2 Procedural Programming 553 18.3 Functional Programming 568 18.4 Rule-Based Programming 584 18.5 Recursive Programming 596 19 Differential Calculus 6150 19.1 Derivatives 615 19.2 Taylor Series 624 19.3 Limits 630 20 Integral Calculus 6330 20.1 Integration 634 20.2 Numerical Quadrature 644 20.3 Sums and Products 666 20.4 Transforms 670 21 Matrices 6770 21.1 Vectors 677 21.2 Matrices 686 22 Equations 709 22.1 Linear Equations 710 22.2 Polynomial and Radical Equations 716 22.3 Transcendental Equations 730 23 Optimization 7410 23.1 Global Optimization 743 23.2 Linear Optimization 753 23.3 Local Optimization 759 23.4 Classical Optimization 768 23.5 Special Topics 777
ix
x
Mathematica Navigator
24 Interpolation 791 24.1 Usual Interpolation 792 24.2 Piecewise Interpolation 797 24.3 Splines 803 24.4 Interpolation of Functions 806 25 Approximation 811 25.1 Approximation of Data 812 25.2 Approximation of Functions 824 26 Differential Equations 829 26.1 Symbolic Solutions 830 26.2 More about Symbolic Solutions 841 26.3 Numerical Solutions 849 26.4 More about Numerical Solutions 865 27 Partial Differential Equations 885 27.1 Symbolic Solutions 886 27.2 Series Solutions 893 27.3 Numerical Solutions 909 28 Difference Equations 923 28.1 Solving Difference Equations 924 28.2 The Logistic Equation 935 28.3 More about Discrete Systems 950 29 Probability 961 29.1 Random Numbers and Sampling 962 29.2 Discrete Probability Distributions 966 29.3 Continuous Probability Distributions 976 29.4 Stochastic Processes 987 30 Statistics 1003 30.1 Descriptive Statistics 1004 30.2 Frequencies 1011 30.3 Confidence Intervals 1020 30.4 Hypothesis Testing 1024 30.5 Regression 1030 30.6 Smoothing 1041 30.7 Bayesian Statistics 1046 References 1063 Index 1067
Preface What is the difference between an applied mathematician and a pure mathematician? An applied mathematician has a solution for every problem, while a pure mathematician has a problem for every solution.
Welcome The goals of this book, the third edition of Mathematica Navigator: Mathematics, Statistics, Graphics, and Programming, are as follows: •to introduce the reader to Mathematica; and •to emphasize mathematics (especially methods of applied mathematics), statistics, graphics, programming, and writing mathematical documents. Accordingly, we navigate the reader through Mathematica and give an overall introduction. Often we slow down somewhat when an important or interesting topic of mathematics or statistics is encountered to investigate it in more detail. We then often use both graphics and symbolic and numerical methods. Here and there we write small programs to make the use of some procedures easier. One chapter is devoted to Mathematica as an advanced environment of writing mathematical documents. The online version of the book, which can be installed from the enclosed CD-ROM, makes the material easily available when working with Mathematica. Changes in this third edition are numerous and are explained later in the Preface. The current edition is based on Mathematica 6. On the CD-ROM, there is material that describes the new properties of Mathematica 7. ‡ Readership
The book may be useful in the following situations: •for courses teaching Mathematica; •for several mathematical and statistical courses (given in, for example, mathematics, engineering, physics, and statistics); and •for self-study. Indeed, the book may serve as a tutorial and as a reference or handbook of Mathematica, and it may also be useful as a companion in many mathematical and statistical courses, including the following: differential and integral calculus • linear algebra • optimization • differential, partial differential, and difference equations • engineering mathematics • mathematical methods of physics • mathematical modeling • numerical methods • probability • stochastic processes • statistics • regression analysis • Bayesian statistics
xii
Mathematica Navigator
‡ Previous Knowledge
No previous knowledge of Mathematica is assumed. On the other hand, we assume some knowledge of various topics in pure and applied mathematics. We study, for example, partial differential equations and statistics without giving detailed introductions to these topics. If you are not acquainted with a topic, you can simply skip the chapter or section of the book considering that topic. Also, to understand the numerical algorithms, it is useful if the reader has some knowledge about the simplest numerical methods. Often we introduce briefly the basic ideas of a method (or they may become clear from the examples or other material presented), but usually we do not derive the methods. If a topic is unfamiliar to you, consult a textbook about numerical analysis, such as Skeel and Keiper (2001). ‡ Recommendations
If you are a newcomer to Mathematica, then Chapter 1, Starting, is mandatory, and Chapter 2, Sightseeing, is strongly recommended. You can also browse Chapter 3, Notebooks, and perhaps also Chapter 4, Files, so that you know where to go when you encounter the topics of these chapters. After that you can proceed more freely. However, read Section 13.1, “Basic Techniques,” because it contains some very common concepts used constantly for expressions. If you have some previous knowledge of Mathematica, you can probably go directly to the chapter or section you are interested in, with the risk, however, of having to go back to study some background material. Again, be sure to read Section 13.1.
Contents The 30 chapters of the book can be divided into nine main parts: Introduction
Dynamics
Mathematics
1. Starting
10. Manipulations
2. Sightseeing
11. Dynamics
19. Differential Calculus 20. Integral Calculus
Files
Expressions
3. Notebooks 4. Files
12. Numbers 13. Expressions
Graphics
24. Interpolation
5. Grahics for Functions 6. Graphics Primitives
14. Lists 15. Tables 16. Patterns
7. Graphics Options
Programs
8. Graphics for Data
17. Functions 18. Programs
27. Partial Differential Equations
Data
9. Data
21. Matrices 22. Equations 23. Optimization 25. Approximation 26. Differential Equations 28. Difference Equations Statistics
29. Probability 30. Statistics
Dependencies between the chapters are generally quite low. If you read Chapter 2, Sightseeing, you will get a background that may serve you well when reading most other chapters; in some chapters, you will also find references to previous chapters, where you will find the needed background. The following bar chart shows the numbers of pages of the 30 chapters:
Preface
xiii
The six longest chapters are 7, Graphics Options; 8, Graphics for Data; 18, Programs; 23, Optimization; 26, Differential Equations; and 30, Statistics. Next we describe the main parts of the book. ‡ Introduction, Files, Graphics, Data, Dynamics, Expressions, and Programs
The first two chapters introduce Mathematica and give a short overview. The next two chapters consider files, particularly files created by Mathematica, which are called notebooks. We show how Mathematica can be used to write mathematical documents. We also explain how to load packages, how to export and import data and graphics into and from Mathematica, and how to manage memory and computing time. You may skip these two chapters until you need them. Then we go on to graphics. One of the finest aspects of Mathematica is its high-quality graphics, and one of the strongest motivations for studying Mathematica is to learn to illustrate mathematics with figures. We consider separately graphics for functions and graphics for data. In addition, we have chapters about graphics primitives and graphics options. New in Mathematica 6 are the built-in data sources, covering topics such as chemistry, astronomy, particles, countries, cities, finance, polyhedrons, graphs, words, and colors. The main new topic in Mathematica 6 is dynamics. This allows us to easily build interactive interfaces. The user of such an interface can choose some parameters or other options and the output will be changed dynamically, in real time. This helps in studying various models and phenomena.
xiv
Mathematica Navigator
Then we study various types of expressions, from numbers to strings, mathematical expressions, lists, tables, and patterns. We have two chapters relating to programming. The first studies functions and the next various styles of programming. Four styles are considered: procedural, functional, rule-based, and recursive. ‡ Mathematics and Statistics
In the remaining 12 chapters, we study different areas of pure and applied mathematics and statistics. The mathematical chapters can be divided into four classes, with each class containing chapters of more or less related topics. Descriptions of these classes follow. Topics of traditional differential and integral calculus include derivatives, Taylor series, limits, integrals, sums, and transforms. Then we consider vectors and matrices; linear, polynomial, and transcendental equations; and global, local, and classical optimization. In interpolation we have the usual interpolating polynomial, a piecewise-calculated interpolating polynomial, and splines. In approximation we distinguish the approximation of data and functions. For the former, we can use the linear or nonlinear least-squares method, whereas for the latter we have, for example, minimax approximation. Mathematica solves differential equations both symbolically and numerically. We can solve first- and higher-order equations, systems of equations, and initial and boundary value problems. For partial differential equations, we show how some equations can be solved symbolically, how to handle series solutions, and how to numerically solve problems with the method of lines or with the finite difference method. Then we consider difference equations. For linear difference equations, we can possibly find a solution in a closed form, but most nonlinear difference equations have to be investigated in other ways, such as studying trajectories and forming bifurcation diagrams. Lastly, we study probability and statistics. Mathematica contains information about most of the well-known probability distributions. Simulation of various random phenomena (e.g., stochastic processes) is done well with random numbers. Statistical topics include descriptive statistics, frequencies, confidence intervals, hypothesis testing, regression, smoothing, and Bayesian statistics.
Special Aspects The book explains a substantial portion of the topics of Mathematica. However, some topics are emphasized, some are given less emphasis, and some are even excluded. We describe these special aspects of the book here. ‡ Breadth
We have had the goal of studying important topics in some breadth and depth. This may mean detailed explanations, clarifying examples, programs, and applications. It may also mean introducing topics for which there is little or no built-in material. The headings of the chapters give a list of topics that are emphasized in this book and that are explained in some breadth. However, some emphasized topics cannot be identified from the chapter headings. One of them is numerical methods; they are used in every mathematical chapter. Another is methods relating to data. Indeed, we use several real-life and artificial data sets in chapters about data, graphics for data, approximation, differential and difference equations, probability, and statistics.
Preface
xv
‡ Depth
To give an impression of the depth of various topics, we next describe some special topics in various chapters of the book. •Chapter 3,Notebooks: An introduction to Mathematica as an environment for preparing technical documents; writing mathematical formulas •Chapter 5,Graphics for Functions: Stereographic figures; graphics for four-dimensional functions •Chapter 8,Graphics for Data: Visualizations of several real-life data; dot plots; statistical plots •Chapter 18,Programs: Four styles of programming (procedural, functional, rule-based, and recursive); emphasis on functional programming; many examples of programs •Chapter 22,Equations: Iterative methods of solving linear equations; programs for nonlinear equations •Chapter 23,Optimization: A program for numerical minimization; a program for classical optimization with equality and inequality constraints; dynamic programming •Chapter 25,Approximation: Graphical diagnostics of least-squares fits •Chapter 26,Differential Equations: Analyzing and visualizing solutions of systems of nonlinear differential equations; study of a predator-prey model, a competing species model, and the Lorenz model; numerical solution of linear and nonlinear boundary value problems; estimation of nonlinear differential equations from data; solving integral equations •Chapter 27,Partial Differential Equations: Series solutions for partial differential equations; solving parabolic and hyperbolic problems by the method of lines;solving elliptic problems by the finite difference method •Chapter 28,Difference Equations: The logistic model as an example of nonlinear difference equations; bifurcation diagrams, periodic points, Lyapunov exponents; a discrete-time predator-prey model as an example of a system of nonlinear difference equations; estimation of nonlinear difference equations from data; fractal images; Lindenmayer systems •Chapter 29,Probability: Simulation of several stochastic processes •Chapter 30,Statistics: Visualizing confidence intervals and types of errors in statistical tests; confidence intervals and tests for probabilities; local regression; Bayesian statistics; Gibbs sampling; Markov chain Monte Carlo ‡ Programs
Mathematica has a large number of ready-to-use commands for symbolic and numerical calculations and for graphics. Nevertheless, in this book we also present approximately 130 of our own programs. Indeed, programming is one of the strongest points of Mathematica. It is often amazing how concisely and efficiently we can write a program even for a somewhat complex problem. We think that our own programs can be of some value, despite the fact that they are not so fine and powerful as Mathematica’s built-in commands. We have included our own programs for the following reasons: 1.A self-made implementation shows clearly how the algorithm works. You know (or should know) exactly what you are doing when you use your own implementation. The ready-made commands are often like black (or gray) boxes because we do not know much about the methods. 2.Writing our own implementations teaches us programming. We present short programs throughout the book (especially in the mathematical chapters). In this way, we hope that you will become steadily more familiar with programming and that you are encouraged to practice program writing.
xvi
Mathematica Navigator
3.A self-made implementation can be pedagogically worthwhile. For example, we implement Euler’s method for differential equations. It has almost no practical value, but as the simplest numerical method for initial value problems, it has a certain pedagogical value. Also, programming a simple method first may help us to tackle a more demanding method later. ‡ Other Special Aspects
We have integrated the so-called packages tightly into the material covered in this book. Instead of presenting a separate chapter about packages, each package is explained in its proper context. We have tried to make the structure of the book such that finding a topic is easy. Usually a topic is considered in one and only one chapter or section so that you need not search in several places to find the whole story. Each numerical routine is also presented in the proper context after the corresponding symbolic methods. This helps you to find material for solving a given problem: It is usually best to try a symbolic method first and, if this fails, to then resort to a numerical method. Some topics of a “pure” nature, such as finite fields, quaternions, combinatorics, computational geometry, and graph theory, are not considered in this book; Mathematica has packages for these topics. Commands for box and notebook manipulation are treated only briefly. We do not consider MathLink (a part of Mathematica that enables interaction between Mathematica and external programs), J/Link (a product that integrates Mathematica and Java), XML (a metamarkup language for the World Wide Web), or MathML (an XML-based markup language for representing mathematics). Also, we do not consider any of the many other Mathematica-related products, such as webMathematica, gridMathematica, CalculationCenter, or the Applications Library packages.
Mathematica 6 ‡ Introduction
Mathematica 6 contains a huge amount of new functionality. The following is a part of an on-line document: Mathematica 6.0 fundamentally redefines Mathematica and introduces a major new paradigm for computation. Building on Mathematica’s time-tested core symbolic architecture, version 6.0 adds nearly a thousand new functions~almost doubling the total number of functions in the system~ dramatically increasing both the breadth and depth of Mathematica’s capabilities, as well as introducing hundreds of major original algorithms, and perhaps a thousand new ideas, large and small. To study the new features, see the following on-line documentation (the use of the Documentation Center is explained in Section 1.4.2, p. 17): • Help @ Startup Palette, the What’s New in 6 link to Wolfram’s website • Help @ Documentation Center, the New in 6 links in the home page • Help @ Documentation Center, the guideêSummaryOfNewFeaturesIn60 document • Help @ Documentation Center, the guideêNewIn60AlphabeticalListing document • Help @ Function Navigator, the New In 6 item If you are a new user of Mathematica and would like to study the basics of Mathematica 6, see the following documents: • Help @ Startup Palette: the First Five Minutes with Mathematica button • Help @ Virtual Book: the Introduction item
Preface
xvii
‡ New Properties of Version 6
Because the new features are numerous, we do not list them all here. However, we mention some of the most remarkable new commands and features, classified according to the chapters of the book: •Chapter 1, Starting: documentation is on-line in the form of Documentation Center, Function Navigator and Virtual Book (we do not have a printed manual); documentation is automatically updated via the Internet; writing Mathematica inputs is helped by syntax coloring •Chapter 3, Notebooks: Style, Text, Hyperlink •Chapter 4, Files: commands of many packages are now built-in; the remaining packages are rebuilt; look at Compatibility/guide/StandardPackageCompatibilityGuide in the Documentation Center to obtain information about how to replace the functionality of the old packages •Chapter 5, Graphics for Functions: GraphicsRow, GraphicsGrid, Tooltip; graphics is handled like other expressions; the default font in graphics is Times instead of Courier; 3D graphics is adaptive; contours in contour plots have tooltips; density plots, by default, do not have meshes; 2D graphics can be interactively drawn and edited; 3D graphics can be interactively manipulated (e.g., rotated); for animation, use Manipulate or Animate •Chapter 6, Graphics Primitives: Arrow, Opacity, Inset •Chapter 7, Graphics Options: Directive, BaseStyle, Filling; the default value of AspectRatio in Graphics and ParametricPlot is Automatic instead of 1/GoldenRatio •Chapter 8, Graphics for Data: ListLinePlot, GraphPlot; plotting of several data sets •Chapter 9, Data: ElementData, CountryData, PolyhedronData, etc. •Chapter 10, Manipulations: Manipulate (for creating interactive dynamic interfaces) •Chapter 11, Dynamics: Dynamic (for advanced dynamic interfaces), MenuView, TabView, etc. •Chapter 15, Tables: Grid, Row, Column •Chapter 16, Patterns: DictionaryLookup •Chapter 21, Matrices: Accumulate, PositiveDefiniteMatrixQ •Chapter 23, Optimization: FindShortestTour •Chapter 29, Probability: RandomReal, RandomInteger, RandomChoice, RandomSample •Chapter 30, Statistics: Tally, BinCounts, FindClusters In my opinion, the most impressive new commands in version 6 are Manipulate, Dynamic, GraphPlot, and Grid.
Note that many familiar commands, such as NIntegrate or NDSolve, have also been enhanced in version 6. In the forthcoming chapters, we mark with (Ÿ6) the properties and commands of Mathematica available for the first time in version 6. ‡ Obsolete Properties in Version 6
Version 6 makes obsolete some old commands and features, especially in graphics. First, here are some changes that relate to the display and arrangement of graphics: •To prevent the display of graphics, end the plotting command with ; instead of using the DisplayFunction option. •In programs, enclose a plotting command with Print if that command is not the last command of the program and you would like the program to show that plot. •GraphicsArray is obsolete. To show, for example, two plots p1 and p2 side by side, use one of the following ways: {p1, p2}, Row[{p1, p2}], or GraphicsRow[{p1, p2}]. Use GraphicsGrid for arrays of plots.
xviii
Mathematica Navigator
•To show two plots side by side, you can also simply give a list of plotting commands {Plot[…], Plot[…]}. •To show two plots on top of each other, simply write Show[Plot[…], Plot[…]]; the DisplayFunction option is no longer needed. •Graphics and Graphics3D no longer need Show to display the graphics. Thus, write Graphics[{…}] instead of Show[Graphics[{…}]. •Use Inset[gr, pos] instead of Rectangle[{x1, y1}, {x2, y2}, gr]. Some changes that relate to plotting of data are as follows: •To plot data by connecting the points with lines, use ListLinePlot[data] instead of ListPlot[data, PlotJoined Ø True]. •To plot data by points and connecting lines, use ListLinePlot[data, Mesh Ø All] instead of ListPlot[data, PlotJoined Ø True, Epilog Ø {PointSize[s], Map[point, data]}]. •To plot data by points and vertical lines, use ListPlot[data, Filling Ø Axis] instead of resorting to Prolog or Epilog. •To plot several data sets, use ListPlot[{data1, data2, … }] or ListLinePlot[{data1, data2, … }] instead of resorting to MultipleListPlot in a package. •To plot several points, simply write Point[points] instead of Map[Point, points]. Here are some changes that relate to styles and options of graphics: •Use Style instead of StyleForm. •Use the BaseStyle option instead of the TextStyle option or the $TextStyle global constant. •Use the MaxRecursion option instead of the PlotDivision option. •Use the DataRange option instead of the MeshRange option. •Use the Filling option instead of the FilledPlot command. Some other changes are as follows: •Use RandomReal[…], RandomInteger[…], and RandomComplex[…] instead of Random[Real, …], etc. •For random numbers from probability distributions, use RandomReal[contDist, n] or RandomInteger[discrDist, n] instead of resorting to Random or RandomArray. •Use Tally instead of Frequencies in a package.
The Third Edition ‡ Main Changes
The text has been revised throughout. Indeed, Mathematica 6 brings up so much new and changed features that almost every topic has undergone a revision and new topics are included. Recall that the second edition of this book was based on Mathematica 5. The main change in the structure of the book is that we have six new chapters: Chapter 6, Graphics Primitives; Chapter 9, Data; Chapter 10, Manipulations; Chapter 11, Dynamics; Chapter 15, Tables; and Chapter 16, Patterns. On the other hand, some chapters have been merged and the result is that the current edition has but one chapter about the following topics: graphics for functions, graphics for data, and graphics options (the second edition had two chapters for each of these topics, one for twodimensional and one for three-dimensional graphics).
Preface
xix
The main change in the contents of the book is the transition from version 5 to version 6. In addition, we have some other enhancements. The chapter on programming is much enhanced and enlarged and contains much more examples. The chapter about matrix calculus is also enhanced. The chapter about optimization now includes the method of dynamic programming. Chapters about graphics for data and optimization have undergone a restructuring. Note that this book fully utilizes the new features of Mathematica 6. Because version 6 differs so much from earlier versions, this book cannot practically be used with older versions of Mathematica. If you have Mathematica 5.2 or an earlier version, please use the second edition of Mathematica Navigator. The CD-ROM contains Help Browser material that describes the new properties of Mathematica 7. ‡ Some Notes
New Features Some of the new features of version 6 would have warranted a broader and deeper treatment and more examples of use throughout the book. These features include the creation of dynamic interfaces and the use of the built-in data sources. However, to keep the book at a reasonable size, we had to limit the treatment and the number of examples. We suggest that the reader consults the built-in documentation. The website http://demonstrations.wolfram.com contains thousands of examples of dynamic interfaces. Environment During the writing of this book, I used a Macintosh with MacOS X. Mathematica works in much the same way in various environments, but the keyboard shortcuts of menu commands vary among different environments. To some extent, we mention the shortcuts for the Microsoft Windows and Macintosh environments. Options Many commands of Mathematica have options for modifying them. All options have a default value, but we can input other values. When listing the options, we give either all possible values of them or some examples of possible values, but we do not explicitly mention the default values, to save space. In the context of this book, the default value of an option is always the first value mentioned. After that are other possible values or examples of other values. Simulations In several places in the book, we simulate various random phenomena. Usually, each time a simulation is run, a slightly different result is obtained. However, in experimenting with the examples of the book, the reader may want to get exactly the same result as printed in the book. This can be achieved by using a seed to the random number generator with SeedRandom[n] for a given integer n. With the same seed, the result of a simulation remains the same in repeated executions. We use SeedRandom quite often in this book. If you want to get other results of simulation than those of this book, give different seeds or do not execute SeedRandom[n] at all (in the latter case, the default seed is used). CD-ROM The entire book is contained on the CD-ROM that comes with it. With a few easy steps you can install the book into the Help Browser of Mathematica (the CD-ROM contains installation instructions). With the Help Browser you can easily find and read sections of the book, experiment with the commands, and copy material from the book to your document. You can see all of the figures of the book in color and interactively study the manipulations and animations. The material about the new properties of Mathematica 7 can also be installed into the Help Browser. In addition, the CD-ROM contains some data files that are used in the book.
xx
Mathematica Navigator
Notation Throughout the book, the adjectives one-, two-, three-, and four-dimensional are abbreviated 1D, 2D, 3D, and 4D, respectively. The symbol Ö is used as a hyphen for Mathematica commands. In addition, we use extensively the following handy short notation: p Means the same as Pi. The symbol p can be written as ÂpÂ. ¶ Means the same as Infinity. The symbol ¶ can be written as ÂinfÂ.
P…T Means the same as [[…]]. For example, x[[3]] can also be written as xP3T. The symbols P and T can be written as Â[[Â and Â]]Â.
¨ Means the same as Transpose. For example, Transpose[x] can also be written as x¨. The symbol ¨
can be written as ÂtrÂ.
/@ Means the same as Map. For example, Map[f[#]&, {a, b, c}] can also be written as f[#]& /@ {a, b, c}. A third way is to write Table[f[x], {x, {a, b, c}}].
The symbols p and ¶ can also be found from the BasicMathInput palette. For example, instead of Map@Ò ^ 2 &, Transpose@88Pi, Infinity
2
with a series expansion Series@y@xD ê. %P1T, 8x, 0, 4 0 Analytic Whether unknown functions are treated as analytic; possible values: False, True
Write the arrow as -> (Mathematica then replaces it with a true arrow Ø). The default value Automatic for Direction means DirectionØ-1 (i.e., from above or from larger values) except for
limits at infinity, where it means DirectionØ1. For example, Limit@HCos@xD - 1L ê x ^ 2, x Ø 0D Limit@H1 + c ê xL ^ x, x Ø ¶D
-
1 2
‰c
Limit@x ^ y, x Ø ¶, Assumptions Ø y < 0D
0
The following limit is not unique, and we get a whole interval: Limit@Sin@1 ê xD, x Ø 0D
Interval@8-1, 1L, 110 time, 112 Scalar product, Dot H.L, 683, 699 ScalarTripleProduct•, 620 Scale, 160 Scale•, 621, 632 Scaled, 165 ScaleFactor•, 144 ScaleFunction•, 144 ScalingFactor, 752 ScalingTransform, 160, 686 Scan, 462 Scatter plot matrix, PairwiseScatterPlot•, 251 SchurDecomposition, 707 Schwalbe and Wagon H1997L, 830 ScientificForm, 399 Scoping constructs, 520 with Block, 522 with Function, 520 with Module, 521 with With, 522 Screen environments, 55 ScriptMinSize, 67 ScriptSizeMultipliers, 67 Search path for contexts, $ContextPath, 532 for files, $Path, 107 Searching elements, Select, etc., 457 positions, Position, 458 with patterns, 493 SearchPoints, 751 Sec, 11, 435 Secant, 735
Index Secant method, 733, 739 secantSolve, 739 secantSolve2, 740 Sech, 435 Sections, automatic numbering of, 91 SeedRandom, 963 Select, 3, 401, 457, 493, 520, 609, 680, 774, 1047 SelfLoopStyle, 268 SemialgebraicComponentInstances, 727 Sensitivity to initial conditions, 862, 937 to numerical inaccuracies, 861, 936 Separation of variables, 893, 906 Sequence, 180, 463 SequenceLimit•, 632 Sequences, 463 SequentialSumOfSquares•, 1031 Series, 40, 624, 825 Series expansions, Series, 40, 624 Series solutions to differential equations, 630, 843 to partial differential equations, 893 SeriesCoefficient, 627, 928, 931 SessionTime, 112 Set H=L, 9, 414, 584 Set operations, 459 SetAttributes, 531, 624 SetCoordinates•, 620 SetDelayed H:=L, 512, 584 SetDirectory, 108 SetOptions, 180, 193 SetPrecision, 406, 544 SetSystemOptions•, 881 SetterBar, 332, 380 ShadowBackground•, 210 Shadowing of names, 96, 534 Shallow, 425 Shape statistics, 1005 Share, 114 Shaw and Tigg H1994L, 13, 822 ShearingTransform, 160, 686 Shooting, 866, 876 Shooting method, 875 Short, 34, 425 Shortest, 504 Shortest path problem, 781 ShortestPath•, 742 Show in changing options, 180 in superimposing plots, 26, 121, 221 options for, 181 Show Cell Tags Hmenu commandL, 90 Show Expression Hmenu commandL, 60 Show Page Breaks Hmenu commandL, 54
1105 Show Toolbar Hmenu commandL, 54 ShowCellLabel, 67 showConfidenceIntervals, 1022 showError, 824 showFit, 814 showIterations, 767 ShowLegend•, 210 showLocalResiduals, 1041 showPValues, 1026 showResiduals, 815 ShrinkingDelay, 353, 373 ShrinkRatio, 752 SI•, 402 Sieve of Eratosthenes, 555 Sign, 430, 438 SignificanceLevel•, 1024 Significant digits, 403-404 Simplex, 757 Simplify, 32, 419 options for, 423 Simplifying expressions, Simplify, 32, 419 special functions, FullSimplify, 32, 419 SimulatedAnnealing, 749, 777 Simulating stochastic processes, 987 Simultaneous difference equations, RSolve, 929 differential equations, DSolve, NDSolve, 836, 852, 860 linear equations, Solve, LinearSolve, 710 partial differential equations, NDSolve, 909 polynomial equations, Solve, NSolve, 718 transcendental equations, FindRoot, 734 Sin, 11, 435 Sinc, 435 Single|image stereograms, SIS•, 146 SinglePredictionCITable•, 1031, 1034, 1036 Singular values, 701 Singularities with NDSolve, 869 with NIntegrate, 644, 655 with Series, 626 SingularityHandler, 656 SingularValueDecomposition, 701, 706 SingularValueList, 701-702 Sinh, 435 SinhIntegral, 440 SinIntegral, 440 SIS•, 146 Size of Mathematica, 4-5 of expressions, ByteCount, 114 of fonts, FontSize, 193
1106 of graphics, 120 of graphics, ImageSize, 105, 120, 189 of points, PointSize, 155 Skeel and Keiper H2001L, xii Skewness, 967, 973, 1005 Skip, 104 Slide shows, 58 Slider, 319, 377 Slider2D, 324, 378 Sliders, 318, 375 SlideView, 362 Slot HÒL, 520 SlotSequence HÒÒL, 520 Small, 155, 165, 192 Smaller, 165, 192 Smith and Blachman H1995L, 116 Smoothing, 1041 with a kernel, ListCorrelate, 1041 with discrete Fourier transform, Fourier, 1045 with exponential smoothing, ExponentialMovingAverage, 1044 with local regression, 1044 with moving averages, MovingAverage, 1044 with moving medians, MovingMedian, 1044 Social network, 273 Solve, 712 for linear equations, 43, 710 for polynomial equations, 43, 716, 718 for radical equations, 723 for transcendental equations, 730 SolveAlways, 719, 848, 956 SolveDelayed, 866, 917 Solving difference equations, RSolve, 924 differential equations, DSolve, NDSolve, 830 integral equations, 847 linear equations, Solve, LinearSolve, 710 partial differential equations, DSolve, NDSolve, 886 polynomial equations, Solve, NSolve, Reduce, 716 poynomial inequalities, Reduce, 725 radical equations, Solve, NSolve, Reduce, 723 transcendental equations, Solve, FindRoot, 730, 732 sort, 613 Sort, 34, 434, 452, 681, 1022 SortBy, 452, 681 Sorting, 613 according to a given criterion, 452, 1022 with Sort, 34, 452, 681 with SortBy, 452, 681 with Union, 452 Sound, 310
Mathematica Navigator Sound, Play, 121 Sow, 412, 564, 649 Spacings above headers, PageHeaderMargins, 69 around boxes, FrameMargins, 67 around cells, CellMargins, 67 between a cell frame and the labels, CellFrameLabelMargins, 68 between lines, LineSpacing, 66 between paragraphs, ParagraphSpacing, 66 between tabs, TabSpacings, 66 in grid boxes, Spacings, 471 inside cell frames, CellFrameMargins, 68 Spacings, 124, 471, 479 Span, ;;, 448, 679, 692 SpanFromAbove, 488 SpanFromBoth, 488 SpanFromLeft, 488 Sparse arrays, 689 Sparse linear systems, Solve, 711 SparseArray, 678, 687, 689, 705, 714 SpatialDiscretization, 918 Special characters, 74 Special functions, 439 expansion of, FunctionExpand, 424 simplification of, FullSimplify, 419 SpecialCharacters palette, 16 Spectrums, 675 Specularity, 178 Speeding up calculations, 112, 569-570 functions, Compile, 528 Spelling checking, 24, 53 errors, 53 Spelling Language Hmenu commandL, 53 SpellingOptions, 53, 69 Sphere, 177 Spherical•, 620 SphericalPlot3D, 143 SphericalRegion, 212, 217 Spiegel H1971L, 923, 928 Spiegel H1999L, 639, 671, 893, 964 Splice, 111 Spline•, 154, 163 SplineDivision•, 163 SplineDots•, 163 SplineFit•, 803 SplineFunction•, 804 SplinePoints•, 163 Splines in graphics, Spline•, 163 in interpolation, SplineFit•, 803 Splines` package, 163, 803
Index Split, 450, 567, 574, 681, 993 Sqrt, 11, 421, 435 Square brackets, 14 Square roots, Sqrt, 11, 421 SquaredEuclideanDistance, 684 StackedBarChart•, 256 Standard error of sample mean, 1005 StandardDeviation, 36, 967, 973, 1005 StandardForm, 70 StandardizedResiduals•, 1031, 1036 Start Kernel Hmenu commandL, 7 StartingParameters•, 1036 StartingStepSize, 866, 917 StartOfLine, 510 StartOfString, 510 stationaryDistribution, 995 Statistical distributions, 979 StatisticalPlots` package, 251-252, 259 Statistics descriptive multivariate, 1008 descriptive univariate, 36, 1004 dispersion, multivariate, 1008 dispersion, univariate, 1005 location, univariate, 1004 shape, univariate, 1005 StausArea, 363 steadyStateAverages, 1001 stehfestILT, 672 StemLeafPlot•, 259 Step function, UnitStep, 438 StepDataPlot•, 868 StepMonitor, 411, 735, 749, 763, 822, 866, 868, 917-918 Stereograms single|image, SIS•, 146 two|image, 145, 149, 863 Stiff differential equations, 866 Stirling numbers, 464 StirlingS1, 437 stirlingS2, 465 StirlingS2, 437 Stochastic processes, 987 birth-death process, 272, 888, 999 Brownian motion, brownianMotion, 991 coin tossing, coinTossing, 988 continuous|time Markov chain, ctMarkovChain, 998 discrete|time Markov chain, dtMarkovChain, 992 gambler‘s ruin, gamblersRuin, 988 MêMê1 queue, 1000 Poisson process, poissonProcess, 997, 999 random walk, 1D, randomWalk, 987 random walk, 2D, 989
1107 random walk, 3D, 990 Wiener process, 991 Stopping criteria, for numerical methods, 411 Stopping criteria, SameTest, 578 Stratified Monte Carlo method, 663 String expressions, 506 StringCases, 507 StringCount, 507 StringDrop, 434 StringExpression, 507 StringFreeQ, 507 StringInsert, 434 StringJoin HL, 434 StringLength, 434 StringMatchQ, 507 StringPosition, 507 StringQ, 431, 434 StringReplace, 509 StringReplaceList, 509 StringReplacePart, 434 StringReverse, 434 Strings manipulating of, 433, 550 patterns in, 505 reading and writing, 103 replacing in, 509 searching in, 507 StringSplit, 509 StringTake, 434 StudentizedResiduals•, 1031 StudentNewmanKeuls•, 1029 StudentTCI•, 1020 StudentTDistribution, 979 StudentTPValue•, 1024 Style Hmenu commandL, 54 Style, 71, 164, 183, 193, 339 Style sheets, 55, 78 creating new, 64 editing, 63 nonstandard, 99 Styles for cells, 54 for curves in graphics, PlotStyle, 203 for graphics, 200 for notebooks, 55 for outputs, 70 for outputs, Style, 71 for text in graphics, Style, 164 Stylesheet Hmenu commandL, 55, 63 Subfactorial, 437 Sublists generation of, Partition, 450 removal of, Flatten, 450 Subscript, 447
1108 subsequence, 549 Subsessions, 113 Subsets, 454 Substitution, ReplaceAll Hê.L, 416 Subtract H-L, 10 Sufficient conditions for optimum points, 760 Sum, 41, 544, 666, 672, 795 SummaryReport•, 1031, 1036 Sums numerical, NSum, 667 of elements of lists, Apply, 462 of elements of lists, Total, 682, 697 of elements of matrices, Total, 697 of random variables, 602-603 symbolic, Sum, 41, 666 Superimposing graphics, Show, 121 Suppressing display of expressions, ;, 33 of graphics, ;, 28, 121 Surface plots, 139 Surfaces of constant value, ContourPlot3D, 149 Switch, 556, 592, 684, 688, 702 SWOR, 555 SWOR2, 577 Symbolic, 735, 763 Symbolic methods for derivatives, D, 40 for difference equations, RSolve, 924 for differential equations, DSolve, 48, 830 for equations, Solve, 43, 710, 716, 730 for global optimization, Minimize, 45 for integrals, Integrate, 41, 634 for limits, Limit, 40, 630 for partial differential equations, DSolve, 886 for sums, Sum, 41, 666 for Taylor series, Series, 40, 624 Symbolic preprocessing, 660 SymbolicPiecewiseSubdivision, 647, 660 Symbols, 74 SymplecticPartitionedRungeKutta, 866, 917 SynchronousInitialization, 353 SynchronousUpdating, 353 Syntax coloring, 22 Syntax errors, 7, 13 SyntaxInformation, 515 System` context, 531 SystemInformation, 22 Szabo H2000L, 677 Szabo H2001L, 677 t distribution, 979 TabFilling, 66
Mathematica Navigator Table, 36-38, 101, 445, 546, 678, 687, 942 Table of contents, automatic creation of, 79 TableAlignments, 468 TableDepth, 468 TableDirections, 468 TableForm, 35, 288, 468 TableHeadings, 468 TableêMatrix Hmenu commandL, 76, 78, 686 Tables creation of, Table, 445 formatting of, Column, 469 formatting of, Grid, 35, 470 formatting of, Row, 469 formatting of, TableForm, 35, 467-468 TableSpacing, 468 Tabs H\tL, 433 TabSpacings, 66 tabulateDistributions, 968 TabView, 332, 360, 380 TagSet Hê:L, 588 TagSetDelayed, 588 Take, 449, 679, 693-694 TakeWhile, 449, 679 Tally, 36, 561, 1013 Tan, 11, 435 Tangent lines, 616, 623 Tanh, 435 TargetFunctions, 430 Taylor polynomials, Normal, 625 Taylor series coefficients of, SeriesCoefficient, 627 equations of, 629 expansion in, Series, 40, 624 inversion of, InverseSeries, 626 truncation of, Normal, 625 Templates, 22 TensorProductGrid, 918 TensorQ, 431 Tensors, 529, 692 Terms•, 621, 632 Testing for convergence, SameTest, 578 for equality, ==, ===, 432, 964 for primality, PrimeQ, 396 hypotheses, 1024 in pattern matching, 497 in programming, If, Switch, Which, 556 properties of expressions, 431 TeX, 78, 107, 111 TeXForm, 111 Text as a string, 433 in graphics, 192
Index options for, 193 primitives in graphics, Text, 163 rotated, 164 Text, 71, 101, 154, 163, 167, 177, 183, 201 Text Alignment Hmenu commandL, 83 Text|based interface, 5 TextAlignment, 66 TextJustification, 66 Texts, examples of, ExampleData, 312 Thick, 157 Thickness, 154, 157, 178 Thin, 157 Thread, 417, 465, 712, 725, 738, 774, 872, 995 Throw, 580 Ticks for axes, Ticks, 197 for frames, FrameTicks, 198 Ticks, 186, 213 in 2D graphics, 197 in 3D graphics, 220 in contour and density graphics, 227 TicksStyle, 186, 197, 213, 220 TIFF, 105 Time consumption, 112 Time series, 949, 1007 TimeConstrained, 112 TimeConstraint, 423 Times H*L, 10 TimeUsed, 112 Timing, 112 Tiny, 155, 165, 192 ToCharacterCode, 434 ToExpression, 415, 434 Together, 428 Toggler, 333, 383 TogglerBar, 334, 383 Tolerance, 701, 751, 1031, 1036 ToLowerCase, 434 Tooltip, 122, 208, 236, 287, 293, 295, 298, 363 ToRadicals, 636, 720 ToRules, 638 ToString, 434, 968 Total derivatives, Dt, 622 differentials, Dt, 624 Total, 36, 682, 684, 697, 702 ToUpperCase, 434 Tr, 697 Trace, 523 Trace of matrix, Tr, 697 TraceDepth, 523 TrackedSymbols, 353, 373-374 TraditionalForm, 70, 686
1109 Trajectories, 832 TrangularSurfacePlot•, 281 Transcendental equations, Solve, FindRoot, 730 Transcendental functions, 435 Transformation rules, Rule H->L, 416 applying, ReplaceAll Hê.L, 416 TransformationFunctions, 423 Transformations, 160 Transforms discrete Fourier, Fourier, 675, 1045 Fourier, FourierTransform, 672 Laplace, LaplaceTransform, 670 logarithmic, 817, 933 of vectors, 686 Z|, ZTransform, 672 Transition probabilities, 994 transitions, 994 Translate, 160 TranslationTransform, 160, 686 Transport equation, 888 Transportation problem, 754, 758 Transpose, 42, 444, 452, 696-697 trapez, 544 Trapezoidal, 647 Trapezoidal rule, 544, 665 TrapezoidalRule, 648, 653 Traveling salesman problem, 777 solving with dynamic programming, 787 solving with heuristic methods, FindShortestTour, 777 TreePlot, 274 TrekGenerator•, 882 TrekParameters•, 882 Triangular matrices, 688, 704 TriangularDistribution, 976 TriangularSurfacePlot•, 802-803 Tridiagonal, equations, 713 Trig, 423 TrigExpand, 429 TrigFactor, 429 Trigger, 321, 376 Trigonometric expressions, 421, 429 functions, 11, 435 trigPlot, 436 TrigReduce, 429 TrigToExp, 429 TrimmedMean, 1004 Trott H2004aL, 116, 959 Trott H2004bL, 542, 611, 613 Trott H2006aL, 551-552, 559 Trott H2006bL, 441 True, 182 Truncated normal distribution, 983
1110 Truncation of numbers to integers, IntegerPart, 399 of series expansions, Normal, 625 of small numbers to zero, Chop, 399 Truncation errors, 409 Tukey•, 1029 Tuples, 454 TuringMachine, 960 Two|dimensional graphics for functions, Plot, etc., 116 options for, 180 primitives, 152 Two|dimensional inputs and outputs, 70 Two|image stereograms, 145, 149, 863 TwoOpt, 777 TwoSided•, 1024 Type I and II errors in statistical tests, 1026 Types of arguments, 496, 500 of arguments in compiling, 529 of expressions in compiling, 530 of numbers, 396 Typesetting Hmenu commandL, 76 Uncompress, 114 Underdetermined linear systems, 714 Underlined, 165, 192 Underscore, Blank H_L, 512 Undetermined coefficients, 719 Unequal H!=L, 431 Unevaluated arguments, HoldAll, 531 Uniform random numbers, 962 UniformDistribution, 976 Union, 452, 459, 681 UnitCubeRescaling, 647, 660 Units, 402 Units` package, 402 UnitStep, 438, 834, 851 UnitVector, 678 Univariate continuous distributions, 976 descriptive statistics, 1004 discrete distributions, 966 UnsameQ H=!=L, 431 Unset H=.L, 9, 415 UpdateInterval, 373-374 UpSet H^=L, 588 UpSetDelayed H^:=L, 588 Upvalues, 588 Usage messages, 536 User|defined functions, 512 Values of variables asking for, 415 assigning, =, 414
Mathematica Navigator clearing, =., Clear, 415 Vandermonde matrices, 688 Variable|precision arithmetic, 404 Variables asking values of, 9, 415 assigning values for, Set H=L, 9, 414 clearing values of, Unset H=.L, 9, 415 in compiled functions, 528 in functions, 512 in pure functions, 520 in rational expressions, Variables, 428 indexed, 447 local, Module, 39, 521 removing, Remove, 415 tracing, Trace, 523 Variables, 428-429 Variance, 36, 967, 973, 1005 VarianceCI•, 1023 VarianceInflation•, 1031 VarianceRatioCI•, 1023 VarianceRatioTest•, 1027 VarianceTest•, 1027 VariationalMethods` package, 789 Vector analysis, 619 Vector fields for 3D functions, VectorFieldPlot•, 144 for 4D functions, VectorFieldPlot3D•, 148 VectorAnalysis` package, 620 VectorAngle, 685 VectorFieldPlot•, 144, 832, 839, 854, 857, 926, 930 VectorFieldPlot3D•, 148 VectorFieldPlots` package, 144, 148, 266, 832 vectorNorm, 684 VectorQ, 431, 681 Vectors, 42, 677 calculating with, 681 distances between, 684 manipulation of, 679 norms of, Norm, 684 orthogonalization of, Orthogonalize, 685 products of, 683 properties of, 681 tests for, VectorQ, 681 transforms of, 686 VerifyConvergence, 668 VerifySolutions, 720, 724 VertexCoordinateRules, 269 VertexLabeling, 267, 269 VertexRenderingFunction, 269 VerticalSlider, 319, 378 ViewAngle, 212, 217 ViewCenter, 212, 217 ViewMatrix, 212, 217
Index ViewPoint, 212, 217 ViewRange, 212, 217 Views, 357 Annotation, 363 FlipView, 362 MenuView, 358 Mouseover, 363 OpenerView, 361 PopupView, 362 PopupWindow, 363 SlideView, 362 StausArea, 363 TabView, 360 Tooltip, 363 ViewVector, 212, 217 ViewVertical, 212, 217 Virtual Book, 18 visdata data, 249, 251 Volterra integral equation, 847 volume, 558
Wagner H1995L, 742 Wagner H1996L, 113 Wagon H2000L, 868, 959 Wave equation, 890-891, 896, 898, 901, 910, 913 webMathematica, 16 WebServices` context, 531 WeibullDistribution, 977 Weights•, 1031, 1036 Wellin, Gaylord, and Kamin H2005L, 542, 547, 555, 577, 612 Which, 556, 688, 1028 While, 553, 564, 958 White, 169 Whitespace, 509 WhitespaceCharacter, 509 Wickham|Jones H1994L, 116 Wiener process, 991 Winston H1994L, 781 WishartDistribution•, 984 With, 522, 544 WMF, 105 Wolfram H2002L, 960 Wolfram Research, 22 WordBoundary, 510 WordCharacter, 509 WordData, 303 Words, 101
1111 WorkingPrecision, 113, 187, 207, 214, 226, 409, 621, 632, 645, 668, 735, 749, 763, 822, 828, 866, 917, 1036 Wrede and Spiegel H2002L, 637-638, 641 Write, 104 Writing data to files, Export, 100 graphics to files, Export, 105 mathematical documents, 78 results to files, Put H>>L, 110 results to notebooks, Print, 562 WWW, 111 WynnDegree•, 632 WynnEpsilon, 668 x|height, 65 XML, 16 Xor, 433 yeast data, 820, 878, 956 Yellow, 169 Zeta, 440 ZipfDistribution, 970 ZTransform, 672, 932 $ symbols, 521 $Assumptions, 422 $BaseDirectory, 99 $Context, 532 $ContextPath, 532 $ExportFormats, 101, 105 $ImportFormats, 101, 105 $InstallationDirectory, 94 $IterationLimit, 613 $Line, 414 $MachineEpsilon, 408 $MachinePrecision, 405 $MaxExtraPrecision, 399 $MaxMachineNumber, 408 $MinMachineNumber, 408 $Path, 107, 109 $PrePrint, 687 $RecursionLimit, 605 $TimeUnit, 112 $UserBaseDirectory, 99 $Version, 22
About the CD-ROM The CD-ROM of Mathematica Navigator contains • the entire book, easily installable into the Help Browser; • material that describes the new properties of Mathematica 7, also easily installable into the Help Browser; and • all the data sets discussed in the book and several other data sets.
The CD-ROM also contains instructions for installation and usage. When you have installed the book into the Help Browser of Mathematica, • the entire book is accessible from within Mathematica so that you can easily read sections of the book, experiment with the examples, interact with manipulations and animations, see the figures in color, and copy material from the book; • the index entries contain hyperlinks to the correct positions in the book so that you can easily find information about various topics; and • references in the text to other parts of the book are also hyperlinks that directly lead you to the appropriate points of the book.
The CD-ROM can be read using Windows, Macintosh, and Linux computers. Here is a short installation instruction for the book: • Drag the MathematicaNavigator3 and MathematicaNavigator3NewIn7 folders from the CD-ROM into the Applications folder found in $UserBaseDirectory.