Preface

This book contains an introduction to scientific computing appropriate for all lower-division college students. Its goal is to make students comfortable using computers to do science and to provide them with tools and knowledge they can utilize throughout their college careers. Its approach is to introduce the requisite mathematics and computer science in the course of solving realistic problems. On that account care is given to indicate how each discipline uses its own language to describe the same concept, how their tools are useful to us, and how computations are often concrete examples of abstract ideas.

This is easier said than done. On the one hand, lower-division students are simultaneously learning elementary mathematics and physics, and so this may be the first place they encounter the science and mathematics used in the problems. On the other hand, in order for the tools and techniques to be useful for more than the assigned problem, we give more than an introduction (the original title of this book) to the computational tools. We address the first issue in our teaching by reminding the students that our focus is on having them learn the techniques in the proper context, and that any new science and mathematics they become familiar with will make it easier for them in their other courses. We address the second issue by placing an asterisk * in the title of chapters and sections containing optional materials and by reminding the students of which sections are most appropriate for the problem at hand.

This book covers some of the basics of computation, numerical analysis, and programming from a computational science point of view. We want the reader to acquire some ideas of what is possible with computers, what type of tools there are for it, and how to go about getting all the pieces to work together. After that, it is easy to use on-line help or the references to get more details. As a result, our presentation is more practical and more focused on mathematics and science than an introductory programming or computer science text, with minimal discussion of computer science theory. The book follows our own personal preference for “just enough” computer information in that it avoids going through every option for every command and instead presents realistic examples.

We follow the dictum that science and engineering students learn computing best while sitting down at a computer in a trial-and-error mode. Hence, we adopt

a tutorial approach in which readers work along with us in solving a problem, learn by doing, and then work on their own version of the problem (there are also additional exercises at the end of each chapter). We use the command-line mode for the compiled languages that makes the tutorial as universal as possible, and, we believe, is better pedagogically. It then follows that this book is closer to a workbook than a reference book. Yet because one always comes back to find worked examples of commands, it should be valuable for reference as well.

A problem solving environment such as Maple or Mathematica is probably the easiest way to start scientific computing, is natural to use with trial and error, and is what we do in Part 1. Its graphical interface is friendly, it shows the user a wide spectrum of what can be done with modern computation, such as symbolic manipulations, 2-D, 3-D visualization and linear algebra, and is immediately useful in other courses and for writing technical reports. After the first week with Maple or Mathematica, students with computer fright usually feel better. These environments also demonstrate how computers can give an immediate response in beautiful mathematical notation, or fail at what should be the simplest of tasks.

Part 2 of the text is on Java (or Fortran). We believe that learning to program in a compiled language teaches more of the basics of computation, gets closer to the actual algorithms used, teaches better the importance of logic, and opens up a broader range of technical opportunities (jobs) for the students than the use of a problem solving environment. In addition, compiled languages also tend to be more powerful and flexible for numerically intensive tasks, and students naturally move to them for specialized projects. Likewise, after covering Parts 1 and 2 of the text it may make sense for a student to use environments like Matlab, which combine elements of both compiled languages and problem solving environments.

Many students may find that the logic and the precision of language required in programming is more challenging than anything they have ever faced before. Others find programming satisfying and a natural complement to their study of mathematics and foreign languages. We try to decrease the slope of the learning curve by starting the neophytes with sample programs to run and modify, rather than requiring them to write all their own programs from scratch. This process is more exciting, saves a great deal of time otherwise spent in frustrating debugging, and helps students learn by example.

Even though it might not be evident from all the hype about Java and Web computing, Java is actually a good language for beginning science students. It demands proper syntax, produces useful error messages, is consistent and intelligent in handling precision, goes a long way towards being computer-system independent, has Sun Microsystems providing free program-development environments [SunJ], and runs fast enough for nonindustrial purposes (its speed is increasing, as are the number of scientific subroutine libraries being developed in Java).

Part 3 of the text provides a short image survival guide. A number of colleagues have suggested the need for such materials, and since using image is quite similar to compiling a code, it does make a useful extension of the text. Even though we do not try to reveal the full power and complexity of image, we do give enough of its basic elements for the reader to write beautiful-looking scientific documents.

Depending on how many chapters and modules are used, this book contains enough materials for a one- or two-semester course. Our course has one lecture and two labs every week, with roughly one instructor for every 10 students in lab. Attending lectures and reading the materials before lab are important in acquainting the students with the general concepts behind the exercises and in providing a broad picture of what we are trying to do. The supervised lab is where the real learning occurs.

We believe that a modern student should be acquainted with several approaches to scientific computing. Notwithstanding our avowed claim that there are multiple paths leading to good scientific computing, we have had to make some choices as to what to place in the printed version of this book and what to place on the CD. The basic ideas behind scientific computing are language independent, yet the details are not. For all these reasons we have decided to cover Maple, Java, and image in the printed version of this book, but to place other languages on the CD that comes with the text.

The CD is platform independent and has been tested on Windows, Macs, and Unix. The Java and Fortran programs are pure text. The Maple and Mathematica files, however, require the respective programs to execute them. The pdf files will require Abode Acrobat, which is free. Any difficulties with the CD should be reported to [email protected]. Additions and corrections to the CD are found on our Web pages (http://www.physics.orst.edu/˜rubin/IntroBook) or through Princeton University Press Web pages (http://pup.princeton.edu/titles/7916.html).

Specifically, the CD contains Java programs, image files, data files, and various supplementary materials. As indicated, it also contains Maple worksheets with essentially identical materials as in the Maple section of the text but in an interactive format that we recommend over reading the paper version. Furthermore, the CD contains essentially identical materials to the Maple tutorials as Mathematica notebooks. These can be read with Mathematica or printed out as an alternative version of the text. Likewise, the CD also contains the Java materials of the text converted over to Fortran90, as well as the appropriate Fortran programs. Though we do not recommend trying to learn two languages simultaneously, having alternative versions of the text does present some interesting teaching possibilities. Additions and corrections to the CD are found on our Web pages.

Acknowledgements

This book was developed on seven year’s worth of students in the introductory scientific computing class at Oregon State University. The course was motivated by the pioneering text by Zachary [Zach 96] and encouraged by [UCES]. The course has been taught by Albert Stetz, David McIntyre, and the author; I am proud to acknowledge their friendship and the inclusion of their materials in the text. I have been blessed with some excellent student assistants without whose efforts the course could not be taught and the materials developed; these include Matt Des Voigne, Robyn Wangberg, Kyle Augustson, Connelly Barnes, and Juan Vanegas. Valuable materials and invaluable friendships have also been contributed by Manuel Páez and Cristian Bordeianu, coauthors of our Computational Physics text, and Sally Haerer. They have helped make this book more than the introduction it would have been otherwise. I look forward to their continued collaborations.

Financial support for developing our degree program in computational physics and associated curricular materials comes from the National Science Foundation’s Course, Curriculum, and Laboratory Improvement program directed by Duncan McBride, and the Education, Outreach and Training Thrust area of the National Partnership for Computational Infrastructure, under the leadership of Gregory Moses and Ann Redelfs. The courses and materials have benefited from formative and summative assessments by Julie Foertsch of the LEAD Center of the University of Wisconsin. This work has also benefited from formative comments by various reviewers and colleagues, in particular Jan Tobochnik and David Cook. Thanks also goes to my editor, Vickie Kearn at Princeton University Press, who has been particularly insightful, encouraging, and courageous in helping me develop this multidisciplinary text and having it turn out so well, and to Ellen Foos for her caring production of the book. And Jan Landau, always.

RHL

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.202.61