Undergraduate Physics Programs

Department of Physics, Lawrence University, Box 599, Appleton, WI 54911-5626

Voice: 920-832-6721; FAX: 920-832-6962; Email: david.m.cook@lawrence.edu

Text of Talk Delivered at the Summer Meeting of the American Association of Physics Teachers

University of Guelph, Guelph, Ontario

31 July 2000

For more than a decade, the Department of Physics at Lawrence University has been introducing sophomore majors to graphical, symbolic, and numerical computation, orienting them early on in physical contexts to general purpose tools for graphing scalar and vector fields, evaluating integrals, solving ODEs and PDEs, finding roots, processing experimental data, and preparing technical manuscripts. We aim throughout to develop confidence and independence in the use of these tools. With support from NSF CCLI-EMD grant DUE-9952285, the author is embarking on a two-year project whose main objectives are (1) to recast numerous locally written materials into a publication that can be easily customized for use with a variety of hardware and software and (2) to develop an effective mechanism for distribution. The grant also supports faculty workshops to be held at Lawrence University in the summers of 2001 and 2002 and modest beta testing in 2001-02.

Usually, reports at these meetings describe completed projects. I want instead to introduce a project that is just getting underway. Many of you probably know that, for a dozen years or more, we at Lawrence University have been developing the computational dimensions of our upper-level curriculum. We have built a computational laboratory that makes a wide spectrum of hardware and software available to students and, concurrently, we have developed numerous documents introducing computational tools and describing prototypical applications.

The starting point in our nurturing of our students' computational
skills is a sophomore *elective* course called *
Computational Tools in Physics*. This full-credit course is
offered in three 1/3-credit segments, one in each of the three
terms of our academic year. Its topics are coordinated with the
sequence of *required* courses taken by sophomore physics majors.
The first term addresses the topics

- Tutorial Orientation to UNIX [1 week]
- Array Processing and Graphical Display (IDL) [2 weeks]
- Publishing Scientific Manuscripts (LaTeX and
`tgif`) [1 week] - Graphical Visualization (Explorer) [2 weeks]
- Symbolic Manipulations (MACSYMA) [2 weeks]
- Circuit Simulation (SPICE) [2 weeks]

The second term is coordinated with an intermediate course in classical mechanics and focuses on symbolic and numerical approaches to ordinary differential equations. In the first half of the term, it covers

- Symbolic Solution of ODEs and Laplace Transforms (MACSYMA) [2 weeks]
- Numerical Solution of ODEs (IDL) [2 weeks]
- Numerical Solution of ODEs; Introduction to FORTRAN (LSODE) [1 week]

Each student completes this term by carrying out an extended (5 week) project that culminates in a written paper and a 20-minute oral presentation to the class. Topics like the three-body problem, coupled oscillators, the compound pendulum, enharmonic oscillators, and chaos have been addressed.

The third term is coordinated with an intermediate course in electricity and magnetism and focuses on symbolic and numerical integration. In the first six weeks of the term, it covers

- Symbolic/Numerical Integration (MACSYMA/IDL) [2 weeks]
- Numerical Integration (FORTRAN, Numerical Recipes) [2 weeks]
- Root Finding [2 weeks]

The Lawrence approach to nurturing the abilities of students to use computational resources

- focusses on application programs---we use IDL, MACSYMA, IRIS/NAG EXPLORER, SPICE, and LSODE---not on traditional programming languages, thus highlighting physical contexts and applications over the details of numerical techniques.
- introduces a versatile text publishing system (LaTeX) for preparing problem assignments and reports.
- orients students both to uses of computers in theoretical contexts (solution of ODEs and PDEs, root finding, numerical integration, ...) and in laboratory contexts (data analysis, least squares fitting, image processing, ...).
- distributes the introduction of computational resources throughout the curriculum.
- pays close attention to assessing the precision of numerical results.
*most importantly*, alerts students to computational resources early enough so that, subsequently, they are able to use these resources confidently, fluently, effectively, knowledgeably, and independently whenever they deem it appropriate.

The grant referenced in the abstract and received last
February from the Educational Materials
Development track of the Course, Curriculum, and Laboratory Improvement
program (CCLI-EMD) of the NSF provides support for converting the
experience acquired and the extensive library of instructional materials
developed at Lawrence into a flexible publication as a
resource for other institutions.
That we don't all have the same spectrum of hardware and
software, however, poses a major challenge. I believe that meeting that
challenge begins by recognizing that our materials can be
divided into two groups. Modules that identify physical
contexts in which computational tools are useful or
discuss general computational approaches are
generic; modules that introduce
features of an operating system or describe the commands
needed to use a particular software package
are hardware or software dependent. Beyond creating the modules
themselves, I will over the next couple of years be working
with Brooks-Cole to develop a mode of publication that
will allow each individual instructor to assemble selected
modules into a text that is microscopically tailored to that instructor's
specific circumstances. Week-long faculty
workshops and site testing beyond Lawrence will help to refine the end
product and contribute to its dissemination. While not included
in the basic plan, the option for individual instructors to add their
own modules to the available spectrum is likely to emerge in due time.
In the next few transparencies, I hope to convey some of my
*present* conception of what the final product will look like.
Here, with the broadest brush, is my present tentative table of
contents:

- Overview of Materials
- Introduction to IDL
*or*MATLAB*or*... - Introduction to MACSYMA
*or*MAPLE*or*Mathematica*or*... - Introduction to Programming in FORTRAN
*or*C - Introduction to Numerical Recipes
- Solving ODEs
- Evaluating Integrals
- Finding Roots
- Solving PDEs
- Data Analysis/Curve Fitting
- Fourier Analysis and Image Processing
- Publishing with LaTeX
*or*HTML*or*...

- Chapter 1 stands alone; chapters 2--5 introduce the general features of an array processor, a computer algebra system, a programming language, and the numerical recipes library; Chapters 6--11 address several important categories of computational processing; and Chapter 12---really more an appendix---introduces the use of a publishing system.
- The order of presentation does not compel any particular order of treatment. While some later sections depend on some earlier sections, the linkages are not particularly tight. In my own use, for example, I might start with the IDL version of Chapter 2 and the MACSYMA version of Chapter 3, then move to Chapter 12, return to the IDL and MACSYMA portions of Chapter 7 on integration, then address the IDL and MACSYMA portions of Chapter 6 on ODEs, move to the FORTRAN portions of Chapters 4 and 5, and then return to the FORTRAN portions of Chapters 6 and 7.

Let us look now in a bit more detail at Chapters 2 and 7, which are representative of the two basic types of chapter. Chapter 2 represents chapters that introduce basic features of an application program, specifically a program for processing arrays of numbers and creating graphical visualizations of one-, two-, and three-dimensional data sets. Whether the chapter deals with IDL or MATLAB or some other similar computational tool, its sections are tentatively titled

- Tutorial on Basic Capabilities
- Reading/Writing Data Files
- Using Command Files
- Defining Functions and Procedures
- Graphs of Functions of One Variable (Cartesian, Polar, Log, Semilog)
- Surface and Contour Plots of Functions of Two Variables
- Displaying Functions of Three Variables
- Making Hard Copy of Graphs
- Animation
- Advanced features (Labeling Graphs, Drawing Space Curves, Making Circles Circles, Using Color, ...)
- Exercises

The bulk of the chapters in this category will be structured as tutorials and will lean in some measure on vendor's documentation and on-line help to encourage and guide self-study.

The structure of Chapter 7 on evaluating integrals exemplifies the structure of all of the chapters on various computational techniques. Presumably, before approaching any particular section in this chapter, the student would have studied the relevant sections in earlier chapters. Tentatively, the sections in Chapter 7 are titled

- Sample Problems
- Evaluating Integrals Symbolically with MACSYMA
*or*MAPLE*or*Mathematica or ... - Algorithms for Numerical Integration
- Evaluating Integrals Numerically with IDL
*or*MATLAB*or*... - Evaluating Integrals Numerically with MACSYMA
*or*MAPLE*or*Mathematica*or*... - Evaluating Integrals Numerically with FORTRAN
*or*C (including Numerical Recipes) - Exercises

The first section, whose detail we will look at in a moment, sets several physical problems, the successful addressing of which benefits from exploitation of a computational tool. The second section describes how one might use a symbolic tool in application to some of the problems set in the first section. Save for the last, the remaining sections describe suitable numerical algorithms generically and then illustrate how those algorithms can be invoked in a variety of ways. The final section lays out several exercises that students can use to hone their skills. Sections 7.1 (sample problems), 7.3 (numerical algorithms), and 7.7 (exercises) would be included in all versions of the chapter; each individual instructor would select only those other sections that are appropriate to that instructor's site.

Let us step down one further level in the envisioned structure. Here is the present list of sample problems to be laid out in the first section of Chapter 7:

- One-Dimensional Trajectories
- Center of Mass
- Moment of Inertia
- Large-Amplitude Pendulum (Elliptic Integrals)
- Statistical Data Analysis (Error Function)
- The Cornu Spiral
- Electric/Magnetic Fields and Potentials
- Quantum Probabilities

They range over several subareas of physics and reveal that evaluation of integrals, perhaps as functions of one or more parameters, plays an important role in many areas of physics.

Because several aspects of computer use at a specific
site are unique to that site, use of the
materials I seek to create will require that, at each site, someone take
responsibility for creating a *local guide*, to which the materials
will refer. This local guide
will provide information about a variety of local conventions, including

- Rules of Citizenship; User Responsibilities
- Note on Proprietary Software/Licenses
- Passwords, Logging In/Out
- Home/Public Directories
- Tutorial Orientation to Operating System:
- Basic Commands/Mouse Operations
- Working with a Text Editor
- Programs for Screen Copy
- Making Hard Copy
- Compiling FORTRAN/C Programs
- Accessing the World Wide Web

- Backup Schedules
- Available Software

Among the supplementary materials I must create will be a template for this local guide.

Finally, let me speak briefly about how I think the necessary
flexibility in publishing can be achieved. Beyond doing a superb job of
formatting complex equations, tables, arrays, and text, the package
LaTeX
is able to create tables of contents and indices automatically.
One of the available packages (the `ifthen` package), when
invoked, adds a capability to include or exclude different files
depending on whether a controlling Boolean variable has the value `true'
or `false'. Thus, one

- places each module in its own file (each of which contains also the commands for the associated entries to the table of contents and to the index),
- creates a driving source file that contains little more than commands to set an assortment of Boolean flags, to create the table of contents and index, and to input the files selected by the states of the Boolean flags,
- processes that source file a
suitable number of times through LaTeX, invoking
`makeindex`just before the last processing through LaTeX, - submits the resulting
`dvi`file to`dvips`, and - prints the resulting PostScript file.

Brooks-Cole is committed to participating in the process of refining this essential procedure so as to be able to make a commercially feasible product. Their editors claim that they will be able to produce the desired customization economically for orders as few as ten copies.

I began by declaring that I was going to depart from tradition and announce a project that is only now getting underway. With the exception of one three-month period, I will be devoting essentially full time to this project from now until December, 2001. The finished manuscript will be delivered to the publisher by September, 2002. I have elected to announce the project now at its inception and I intend to deliver progress reports in San Diego and Rochester, because I need your help. I welcome

- Suggestions and comments for ways in which the broad usefulness of this product could be enhanced.
- Expression of tentative interest in participation in a week-long workshop, one of which---for a dozen participants---will be held at Lawrence in the early summer of 2001 and two of which will be held, again at Lawrence, in the summer of 2002.
- Expression of tentative interest in being a beta test site in 2001--02

Finally, let me mention that I have with me a couple of copies of the
current draft---please understand **DRAFT**---of a couple of chapters.
Though the text is not at all ready for any kind of preliminary distribution,
I would be happy to let anyone interested in seeing greater detail
take a look at these drafts, either after this session or at any time
before these meetings end.