Home > Store

Mathematica: A Practical Approach, 2nd Edition

Register your product to gain access to bonus material or receive a coupon.

Mathematica: A Practical Approach, 2nd Edition

Book

  • Sorry, this book is no longer in print.
Not for Sale

About

Features

NEW TO THIS EDITION

  • NEW - Current with the latest release of Mathematica, which is a software program that provides users with the means for solving mathematical problems commonly faced by scientists, engineers, and mathematicians.
  • NEW - Features new sections on MathLink (the communications protocol used to link C programs to Mathematica), the user interface (which is the major enhancement in the new release), and several new appendices.
  • Contains an easy-to-use Maple-to-Mathematica lookup table. (Maple is a competing mathematical software package).

Description

  • Copyright 1999
  • Dimensions: 7" x 9-1/4"
  • Pages: 656
  • Edition: 2nd
  • Book
  • ISBN-10: 0-13-259201-0
  • ISBN-13: 978-0-13-259201-7


25920-0

“Nancy Blachman's book opens up the world of Mathematica. She has a down-to-earth lucid style of writing and real experience with the system. This belongs on your bookshelf.” —William R. Hearst III

“Nancy Blachman's book is an indispensable resource for anyone who wants to do serious work with Mathematica.” —Hal R. Varian, Dean, School of Information Management & Systems University of California at Berkeley

“Many people that I know have asked me how to get started using Mathematica. I always point them to Mathematica: A Practical Approach.—Dr. Henry Cejtin, One of the eight original Mathematica developers

“This book offers a systematic introduction to Mathematica for people who want to get up to speed quickly. It provides the best presentation that I have seen. It covers all important features of Mathematica thoroughly, with clear explanations, excellent examples, and challenging and instructive problem sets.” —Dr. Cameron Smith, Author of The Mathematica Graphics Guidebook

“This book is very user-friendly. Not only did I use it to learn Mathematica, but I find myself using it to upgrade my skills.” —Vrinda Kadiyali, Assistant Professor of Economics and Marketing Cornell's Johnson School of Management

There are over 100 books published about Mathematica. One of my personal favorites is Mathematica: A Practical Approach.—Ian Collier, Member of Technical Staff Wolfram Research, Inc.

Mathematica: A Practical Approach is the most popular introductory tutorial book on Mathematica. It has been translated into Japanese, Spanish, Dutch, and Portuguese. The new edition, is loaded with even more examples and exercises to get you up and running with Mathematica version 3!

This book teaches how to:

  • solve differential equations
  • solve partial differential equations
  • solve complicated integrals
  • create graphics, sounds and animations
  • write functional, rule-based & procedural programs
  • define palettes, buttons & hyperlinks
  • make your own packages
  • interact with the user & with files
  • plot functions and data
  • fit curves & doing data analysis
  • …and much much more…

Sample Content

Downloadable Sample Chapter

Click here for a sample chapter for this book: 0132592010.pdf

Table of Contents

(NOTE: Most chapters end with a Summary and Exercises).

I. USING MATHEMATICA INTERACTIVELY.

1. Getting Started with Mathematica.

Starting Mathematica. The In's and Out's of Mathematica. Using On-Line Help. Using Palettes to Enter Formulae. Notation Conventions. Saving Your Work and Quitting. A Quick Tour of Some Commands. Using the Standard Packages.

2. Numerical Capabilities.

Arithmetic Operations. Types of Numbers. Random Numbers. Numerical Precision. Integer Functions. Finding Roots of Equations. Numerical Integration. Numerical Differential Equations.

3. Symbolic Capabilities.

Manipulating and Simplifying Expressions. Trigonometry. Solving Equations. Differential Calculus. Series. Integral Calculus. Symbolic Sums, Products, and Limits. Symbolic Differential Equations.

4. Plotting Functions.

Two-Dimensional Plots. Changing the Appearance of Plots. Combining Plots. Parametric, Implicit and Polar Plots. Frames, Grids, Backgrounds and Ticks. Inserting Annotations to a Plot. Three Dimensional Plots. Contour Plots and Density Plots.

5. Visualizing Data.

Plotting Data in Two Dimensions. Error Plots. Log Plots. Bar Charts and Pie Charts. Two-Dimensional Fields.

6. Data Manipulation and Analysis.

Lists and Nested Lists As Data Structures. Re-ordering and Partitioning Data. Inserting, Replacing, and Deleting Elements. Selecting Subsets of the Data. Counting and Binning Elements. Mapping Functions over Data. Statistical Analyses. Curve Fitting. Data Interpolation.

7. Getting Around with Notebooks.

Initialization Cells. Default Output Form for Formulae. Interacting with Outputs. Cell Brackets. Menus in Notebooks.

II. PROGRAMMING.

8. Writing Your Own Programs.

A Simple Program. Multi-Line Programs. Localizing Variables. Programs with Multiple Calling Patterns. Logical Operators and Tests. Conditional Execution. Adding Usage Messages. Adding Error Messages.

9. Rule-Based Programming.

Local Rewrite Rules. Rules Don't Always Work As Expected. Controlling How Rules Are Applied. Types of Patterns. Uses of Patterns.

10. Functional Programming.

Nesting Function Calls. Recursive Functions. Anonymous (Pure) Functions. Variants of Map. Apply. Select. Functional Alternatives to Loops.

11. Procedural Programming.

Arrays. Counter Variables. Loops and Iteration. Conditionals.

12. Graphics, Animation and Sound.

Two-Dimensional Graphics Primitives. Setting Styles for Graphics Primitives. Three-Dimensional Graphics Primitives. Creating Animations. Creating Sounds.

13. Writing Interactive Programs.

Asking Questions and Getting Replies. Strings. Checking a User's Answer. Managing User Interaction.

14. Notation, Buttons, and Palettes.

Special Notation. Defining Buttons. Creating Palettes.

III. Building Larger Applications.

15. Speeding Up Your Programs.

Timing Your Programs. Avoid Exact Arithmetic. Avoid Evaluating Data Structures. Avoid the Procedural Style. Compile Numerical Functions.

16. Writing Your Own Packages.

Why Write a Package? Contexts. Package Style. Loading Packages. Accidental Shadowing.

17. Working with Files.

Telling Mathematica where to Look. Importing Data from Files. Exporting Data. Low-Level File Interaction. Exporting Special Formats. Exporting Graphics. Exporting HTML Files. Exporting Function Definitions. Searching the Contents of a File.

18. Example Applications.

Monte Carlo Simulations. Cryptography.

Appendix A: Answers to Odd-Numbered Exercises.
Appendix B: Suggestions for Further Reading.
Appendix C: Index.

Preface

Preface
As scientists, engineers, and mathematicians, you spend a great deal of time performing mathematical calculations and manipulations by hand. Many of these calculations can be handled by a software program called Mathematica. This book offers a tutorial introduction to Mathematica.

Mathematica performs three basic types of computation: numerical, symbolic, and graphical. It works with numbers of arbitrary magnitude and precision, as well as with polynomials, power series expansions, matrices, and graphs. Mathematica provides the standard symbolic operations of algebra and calculus, including integration and differentiation. It can also plot functions and data in two or three dimensions.

Even though they included hundreds of functions, the developers of Mathematica were aware that they could not anticipate the needs of all users. Therefore, Mathematica was designed to be extensible by including its own programming language. It is flexible and extremely useful software for anyone who regularly performs complicated mathematical computations.

Although we wrote this book for people new to Mathematica, it also contains information of interest to those who already have experience with the program. For those who do not have Mathematica, this text describes the capabilities of the software in sufficient detail to enable you to decide whether it suits your needs.

Our book does not teach mathematics. It assumes you understand the theory behind what you want to do and just need to be told what Mathematica commands to use to make it happen. It teaches Mathematica by showing some common patterns of usage. It also shows you how to find the commands you need to solve your problems, how to use Mathematica interactively, how to manipulate expressions, how to visualize functions and data, how to write functions and packages, and how to import and export data. Each chapter ends with a set of exercises designed to give you practice with the material presented.

Why did we write this book? Because there wasn't such a book when we were learning Mathematica. Can't you learn Mathematica from Stephen Wolfram's book Mathematica: A System for Doing Mathematics by Computer? Yes, but it's a bit like learning English from a dictionary. As the definitive reference for Mathematica, Wolfram's book describes all the functions built into the program. On the other hand, our book focuses on how to use Mathematica. It provides examples of useful constructs and functions, illustrative problem sets and complete solutions to half the exercises. In our book, we strive to show the versatility of the program as well as its limitations. This book is intended to get you up to speed quickly.

Mathematica: A Practical Approach grew out of an undergraduate course we have been teaching at Stanford University since 1990. Although it was originally designed to be used for teaching courses and giving workshops in Mathematica, the book can also be used for independent study. All readers are encouraged to work through the exercises and to practice their programming skills.

Organization of this Book
This book is divided into three parts. The first discusses how to use Mathematica interactively, the second focuses on programming, and the third describes how to build more complicated applications.

Part I: Introduction to Mathematica explains how to use Mathematica interactively, and is intended for those who have little or no experience with the program. It starts by describing how to start Mathematica, how to create a new Notebook, how to make Mathematica perform a calculation, how to access the on-line help. It then details Mathematica's the numerical, symbolic, graphical, data manipulation and data analysis capabilities.

Part II: Programming is intended for those who have used Mathematica interactively and who are interested in learning how to write their own functions and packages. It discusses rule-based, functional and procedural techniques for programming and describes several tips for speeding up your code. It describes how to write your own packages and how to import, export, and format data and expressions. The final chapter focuses on programming the user interface, i.e., creating buttons, palettes, and special notation.

Part III: Building Larger Applications describes how to write complicated Mathematica programs that integrate symbolic, numeric, graphical, data manipulation, and data analysis capabilities. We emphasize principles of good Mathematica programming that lead to reliable, robust, efficient and elegant code. We also discuss how to interface Mathematica with other programs, e.g., by creating HTML pages suitable for display on any World Wide Web browser.

The Appendix offers additional information on Mathematica. It contains answers to all the odd-numbered exercises and gives an extensive list of Mathematica books that cover more specialized areas.

At the end of each chapter is a problem set to give you practice with the material presented. We strongly urge you to work through the examples in the chapter and the exercises at the end of each chapter. Only through practice will you become proficient at Mathematica.

Although this book was developed using Version 3 of Mathematica (on a Macintosh G3 and a Pentium-based Micron) it illustrates general techniques that can be used with other versions of the software. Be aware, however, that earlier versions of Mathematica do not have some of the capabilities described, and later versions have capabilities that are not addressed. This book focuses on general techniques and thus should be of interest to most Mathematica users regardless of the version of the software they are using. We welcome feedback from our readers. Please feel free to email us at colin@solstice.jpl.nasa.gov, cpw@cs.stanford.edu, and nancy@variablesymbols.com.

Nancy's Background
Nancy Blachman heard about Mathematica in the summer of 1988 when numerous articles started appearing in the press. She first saw Mathematica in action in August of 1988 at SIGGRAPH, a computer graphics conference. She was pleased to see that the program lived up to much of the hype that it had received.

In the fall of 1988, Nancy joined Wolfram Research, where she gave talks, seminars, and workshops on Mathematica. Realizing that corporations, colleges, and universities want training in the use of Mathematica, in 1989, she founded Variable Symbols, Inc. to serve their needs. She has traveled around the world giving hands-on workshops on Mathematica at industrial institutions including: Boeing, Chevron, Hewlett Packard, IBM, MITRE, Naval Research Laboratory, Shell, Xerox, and Wolfram Research, Inc., the developer of Mathematica. She has also given workshops at academic institutions including: Boston University, Massachusetts Institute of Technology, the University of California Berkeley Extension, and the University of California Santa Cruz Extension.

In Winter quarter of 1990, Nancy gave a course at Stanford University entitled "Problem Solving with Mathematica". Stanford has invited her back to teach it again every year since then. Nancy has also given workshops at Mathematica Conferences sponsored by Wolfram Research.

Nancy has written or co-authored several books on Mathematica including "The Mathematica Quick Reference", "The Mathematica Graphics Guidebook", and "CalcLabs with Mathematica" for Stewart's "Calculus Concepts and Contexts".

Before getting involved with Mathematica Nancy was at Stanford University, where she was the instructor for a course on computer graphics and a teaching assistant for Donald Knuth's course in discrete mathematics. In addition to teaching, she has developed software at Bell Laboratories, Resonex, and the Research Institute for Advanced Computer Science at NASA Ames. Nancy holds a B.S. in mathematics from the University of Birmingham in the United Kingdom, an M.S. in operations research from the University of California at Berkeley, and an M.S. in computer science from Stanford University.

Colin's Background
Colin is research computer scientist who works at the Jet Propulsion Laboratory in the areas of quantum computing and quantum communications. He also teaches courses in quantum computing and Mathematica at Stanford University.

Colin first saw Mathematica in January 1990. He had previously written several algebraic manipulation systems in Prolog and LISP and was immediately impressed by the power and expressiveness of the Mathematica system. His first programming project was to simulate how coordination can arise from purely local adaptation rules in a society of mini-robots. The simulation was up and running in just two hours of programming effort! Overnight, Mathematica became Colin's programming language of choice for all mathematical, data analysis and graphical needs. Since that time, Colin has used Mathematica daily and has given numerous workshops and tutorials on Mathematica to engineering research laboratories, banks and government agencies. He has recently published the first book on quantum computing, entitled "Explorations in Quantum Computing", with Scott Clearwater, that comes equipped with a multi-platform CD-ROM packed full of Mathematica simulations that illustrate the ideas of quantum computing in visually appealing ways.

Colin earned a Ph.D. in artificial intelligence from the University of Edinburgh, Scotland, in 1989. He was also awarded a M.Sc. degree in Atmospheric Physics and Dynamics, from Imperial College of Science and Technology, University of London, and a B.Sc. in Mathematical Physics, from the University of Nottingham. Prior to going to Edinburgh, Colin was a research assistant to Prof. Stephen Hawking of Cambridge University. After completing his Ph.D., Colin joined the Dynamics of Computation Group at the Xerox Palo Alto Research Center, where he worked as a research scientist, linking ideas from physics, economics and computer science.

In early 1995 Colin joined Variable Symbols, Inc. and developed new workshops on financial and engineering applications of Mathematica. He has taught the Stanford Mathematica class "CS50: Problem Solving with Mathematica" since 1995.

Colin now leads a research group in quantum computing and quantum communications at the Jet Propulsion Laboratory, California Institute of Technology. He recently finished another book with Scott Clearwater entitled "Ultimate Zero and One: Computing at the Quantum Frontier".

Acknowledgments
Nancy thanks her mother and father, Nelson and Anne Blachman, and Colin thanks his beautiful, talented, supportive, and most importantly, patient wife, Patricia, for their encouragement, and invaluable suggestions.

This book enlarges greatly (!) upon the first edition of "Mathematica: A Practical Approach". It covers even more practical problem solving tips, ideas and suggestions in the light of the excellent feedback we received from several scientists, engineers, mathematicians and analysts. In particular, we would like to thank Paul Abbott, Arnold O. Allen, Helmer Aslaksen, Peter Altenberg, Eric Apgar, Sheldon Axler, Rick Beldin, Susan Blachman, Robert Campbell, John Carroll, Rolan Christofferson, Anne Coleman, Shawn Ewing, Richard Fateman, Harold Falk, Yossi Friedman, Richard Gaylord, Bruce Herman, Thomas Highes, David Jacobson, Pat Lampert, Matthew Lutzker, Rafael O. Marrero, Wanda Martinez, Eddie Mizzi, Julia Olkin, Larry Seiford, Sha Xin Wei, Malcolm Slaney, Cameron Smith, Anton Tran, Ilan Vardi, Roger W. Vidal, Jim Wendel, Stephen Wolfram, and Eran Yehudai.

We used a draft of this book to teach our Mathematica class at Stanford University. Several students gave us great feedback. We are especially grateful to Lyndell L.Asbenson, Greg Baker, Ed DeGrange, Derek Fong, Bonnie Gorsic, Steve Greidinger, Jeff Gruda, Jim Hwang, Blair Ireland, Stan Isaacs, Phil Isubaki, Richard O. Kahn, Karen Kraemer, Bing Kongmebhol, Eric Lim, David G. Lowell, Paul R. McGill, Motegi Tsuyoshi, Wentao Pan, Chris Phoenix, Dave Raisin, Kevin W. Rudd, Haydee Saffari, Valter Sorana, Phil Tsubaki, and Qinping Yang.

We also wish to thank Peter Altenberg for designing the cover for the first edition of the book, Kimberly for adapting the illustration for the second edition, and Kerry Reardon of KR Publishing for helping with production.

Nancy Blachman
Colin P. Williams
Princeton, NJ
San Francisco, CA
November, 1998
November, 1998

Updates

New To This Edition

  • NEW—Current with the latest release of Mathematica, which is a software program that provides users with the means for solving mathematical problems commonly faced by scientists, engineers, and mathematicians.
  • NEW—Features new sections on MathLink (the communications protocol used to link C programs to Mathematica), the user interface (which is the major enhancement in the new release), and several new appendices.

Submit Errata

More Information

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020