New Fortran and Mathematica Course for Sophomores

Steven White

A new required course has been added to the undergraduate curriculum. Intended for sophomore physics majors, "Introduction to Computers in Physics", or Physics 9, was taught for the first time in the Spring quarter, 1996. The development of this course is a first step in an effort to integrate computational work into the undergraduate and graduate curricula. Physics 9 is now a requirement for most of the upper division courses. This will allow the instructors of those courses to assign computer projects as homework, knowing that all the students will have the necessary background.

The course is divided into two separate parts. In the first six weeks of the quarter, the students learn Fortran programming and numerical programming techniques. They are introduced to the PC's in the Instructional Computing Lab, and become acquainted with Windows 95, the PC's operating system. In the last four weeks of the quarter, they study Mathematica. Last Spring, Physics 9 was taught by two different instructors: Prof. Steven White taught the Fortran part, while Prof. Herbert Hamber taught the Mathematica part. In the future, now that the course has been laid out, it will be taught by one instructor.

Why teach Fortran and Mathematica? The Department's Instructional Computing Committee, which proposed the course, felt that knowledge of a general purpose programming language, like Fortran, is invaluable for solving a wide variety of real-world problems. Fortran was chosen over other languages, such as Basic, C, and C++, for several reasons: Fortran is widely used in basic research; Fortran is designed for scientific computation; and most importantly, Fortran is simple enough that one can learn the basics in six weeks. Mathematica, on the other hand, is a very high level tool which can give answers almost instantly to a wide variety of analytical and numerical problems. The graphical capabilities built into Mathematica are also excellent. Fortran and Mathematica complement each other nicely, and physicists often use one or the other to solve different types of problems.

The examples and assignments in Physics 9 are geared towards physics problems. In fact, as much time is spent on numerical methods, such as numerical integration and the solution of differential equations, as on Fortran itself. Sources of numerical error, such as "roundoff" and "truncation" errors, are emphasized. One of the Fortran homework assignments last Spring involved calculating the trajectory of a baseball, including both air drag and wind, by numerically solving a differential equation. In contrast, courses taught in computer science departments typically have examples and assignments geared towards non-numerical subjects, such as sorting, searching, and parsing.


Prof. Steven White, srwhite@uci.edu