The Lawrence Workshop on Computation

in Upper-Level Undergraduate Physics

David M. Cook

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

Rochester, NY

23 July 2001

ABSTRACT

For more than a decade, use of graphical, symbolic, and numeric computational tools throughout the Lawrence undergraduate physics curriculum has steadily increased. As a component of a project supported by NSF CCLI-EMD grant DUE-9952285 and aimed at generating a flexible publication to help others follow Lawrence's lead, a dozen faculty members from around the country will meet at Lawrence for a week in early July, 2001, to experience the Lawrence approach hands-on, assess its exportability, and brainstorm about ways in which that publication might be further improved as a resource for supporting current and anticipated efforts of many departments to embed computation in their programs. This paper will describe the Lawrence approach and summarize discussions held in the workshop. Details will also be posted on the project web site, www.lawrence.edu/dept/physics/ccli.

TEXT

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. We have also developed an approach to introducing students to these resources and drafted several hundred pages of instructional materials to support that approach. Many of you also know that the NSF-CCLI grant referenced in the abstract supports a substantial writing project whose main objective is the creation of an adaptable publication that I, the NSF, and Brooks-Cole (the publisher) all hope will be useful at other places seeking to increase the computational components of their curricula. In addition, to address both dissemination and assessment, the grant supports the holding at Lawrence of several faculty workshops, the first of which was held just two weeks ago. In this talk, I want primarily to describe that workshop. In the course of doing so, however, I will at the same time be telling you about the nature of the broader project and particularly about the structure of the publication that provided the text for the workshop.

Underlying Convictions

Within the computational arena, the Lawrence curriculum, the text I am assembling, and the workshop just ended are all based on the conviction that our curricula must familiarize students

and that, at the same time, we must familiarize students with several types of symbolic and numerical analyses, including solving ordinary and partial differential equations, evaluating integrals, finding roots, performing data analyses, fitting curves to experimental data, preparing technical reports, ....

To these ends, I believe that students must be introduced early to each tool in a way that helps them learn how to control the tool itself, and that use of computational resources must permeate the curriculum. In the broadest of terms, we should---I argue---be structuring our curricula so that, ultimately, students will recognize when a computational approach may have merit and will have the personal confidence to pursue that approach on their own initiative.

The Workshop

The philosophy that I have just expressed is implemented in the Lawrence physics curriculum (which I have described elsewhere), in the text I am developing, and, in particular, in the week-long workshop that is the primary topic of this talk. In this workshop, participants experienced the approach that we use at Lawrence to introduce students first to the manipulation of our SGI-UNIX network, then to the basic features of a couple of tools, and finally to the use of those tools for a few common computational tasks. Participants worked in pairs, formed by me ahead of time to take into account preferences for MATLAB or IDL, C or FORTRAN. The schedule for the workshop was

Su Eve Orientation to UNIX, LaTeX, Compile C/FORTRAN Programs, Print Files, ...
Mo AM Continue Sunday Eve
Mo PM Orientation to IDL or MATLAB
Tu AM Orientation to MAPLE
Tu PM Catch-up
We AM ODEs with MAPLE
We PM ODEs with IDL or MATLAB
Th AM Integration with MAPLE
Th PM Integration with IDL or MATLAB
Fr AM Root Finding
Fr PM Use of Numerical Recipes
Sa AM General Discussion

We began on Sunday evening with an hour and a half session in which participants worked through portions of the tutorial that I use to introduce our students to the features of the operating system, including setting passwords, migrating in tree-structured directories, copying and renaming files, using the text editor, directing output to the printer, and compiling and running FORTRAN and C programs. At the beginning of the day on Monday, I took about an hour to describe the general character of programs like IDL and MATLAB for processing arrays and generating graphical displays. Then, for the rest of Monday, the participants finished off what of the Sunday evening exercise hadn't been completed and worked their way through much of the current draft of either the IDL chapter or the MATLAB chapter in the evolving manuscript. Tuesday was structured similarly, though it began with my describing the structure of a computer algebra system, specifically MAPLE, and continued for the rest of the day with participants working through much of the MAPLE chapter and---for at least a portion of the afternoon---catching their collective breaths. Once this background had been developed, we turned to computational strategies. On each of the following days, I spent an hour at the beginning talking about the focus of the day, both from a symbolic and from a numerical perspective. Then, using MAPLE and either IDL or MATLAB, participants worked through the pseudotutorial portions of chapters on ODEs on Wednesday, integration on Thursday, root finding on Friday morning, and uses of numerical recipes on Friday afternoon. In each case, after working through the introductory tutorial, participants addressed one or more exercises of the sort that might be assigned as homework problems for students.

To make sure participants could work in the CPL as much as they wanted, we issued to each a temporary Lawrence ID card giving them 24/7 access to the facility while they were on campus. While I wasn't personally there many evenings, I understand that the laboratory was busy during those times as participants explored topics or exercises more fully than they had time for in the more formal sessions.

On Saturday morning at the conclusion of the workshop, we spent an hour reviewing the week and talking about what happens next. Several of the participants are planning to test portions of the evolving text in their local environments during the coming year. Here are some of the comments made on the workshop itself:

An Overview of the Emerging Product

Beyond the workshop, I would like to comment for a moment or two about the broader structure of the book in preparation. To accommodate the fact that we don't all use the same spectrum of hardware and software, I have envisioned a process that assembles a version of the text appropriate to each particular site by combining generic discussions of symbolic and numerical approaches to various types of problem with platform and program specific components that offer guidance in the use of the specific tools that happen to be available at the site. In short, I intend that the specific software and hardware treated in any particular incarnation of the book will be microscopically "tailor-able" to the spectrum of resources available at the instructor's site. Indeed, it is that feature that made it relatively easy for me to give workshop participants the option of using IDL or MATLAB, C or FORTRAN. Ultimately, {\em Mathematica\/} will join MAPLE and MACSYMA as possible choices. Guidance on the use of LSODE, Numerical Recipes (in FORTRAN or C), and LaTeX are already options.

The next few transparencies, which are similar to those that some of you may have seen in San Diego, show the structure of the book at various levels of magnification. Here, with the broadest brush, is my present list of planned chapters:

  1. Overview of Materials
  2. Introduction to IDL or MATLAB or ...
  3. Introduction to MACSYMA or MAPLE or Mathematica or ...
  4. Introduction to Programming in FORTRAN or C
  5. Introduction to Numerical Recipes
  6. Solving ODEs
  7. Introduction to LSODE
  8. Evaluating Integrals
  9. Finding Roots
  10. Solving PDEs
  11. Data Analysis/Curve Fitting
  12. Fourier Analysis and Image Processing
  13. Introduction to UNIX or Windows or ...
  14. Introduction to LaTeX or Word or ...
  15. Introduction to TGIF or ...
Let us now look at the structure of Chapters 2 and 8, which together represent 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. The sections of the chapter that introduces MATLAB are tentatively titled

  1. Beginning a MATLAB Session
  2. Basic Entities in MATLAB
  3. A Sampling of MATLAB Capabilities
  4. Properties, Objects, and Handles
  5. Saving/Retrieving a MATLAB Session
  6. Loops/Logical Expressions/Conditionals
  7. Reading Data from a File
  8. ON-line Help
  9. m-Files
  10. Eigenvalues and Eigenvectors
  11. Graphing Functions of One Variable
  12. Making Hard Copy
  13. Graphing Functions of Two Variables
  14. Graphing Functions of Three Variables
  15. Graphing Vector Fields
  16. Animation
  17. Advanced Graphing Features (Fonts, Drawing Space Curves, Using Multiple Windows, Customizing Axes, Working with Color, ...)
  18. Miscellaneous Occasionally Useful Tidbits
  19. References
  20. Exercises
The bulk of the chapters in this category (chapters on MAPLE, Mathematica, MACSYMA, MATLAB, and IDL) are structured as tutorials and lean in some measure on vendor's documentation and on-line help to encourage and guide self-study.

The structure of Chapter 8 on evaluating integrals exemplifies the structure of all of the chapters on various computational techniques (specifically, solving ODEs, evaluating integrals, finding roots). 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 8 are titled

  1. Sample Problems
  2. Evaluating Integrals Symbolically with MAPLE or Mathematica or MACSYMA or ...
  3. Algorithms for Numerical Integration
  4. Evaluating Integrals Numerically with IDL or MATLAB or ...
  5. Evaluating Integrals Numerically with MAPLE or Mathematica or MACSYMA or...
  6. Evaluating Integrals Numerically with FORTRAN or C (including Numerical Recipes)
  7. 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 8.1 (sample problems), 8.3 (numerical algorithms), and 8.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.

Finally, we take one step further down in the overall structure to show the present list of sample problems for Chapter 8, specifically

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.

Even among sites that use the same spectrum of hardware and software, however, some aspects of local environments are still unique to individual sites. Rules of citizenship, practices and policies regarding accounts and passwords, the features and elementary resources of the operating system, the structuring of public directories, backup schedules, after-hours access, licensing restrictions in force on proprietary software, and numerous other aspects are subject to considerable local variation. This book makes no attempt to constrain local options in these matters. Throughout the book, individual users are directed to a publication called the Local Guide for site-specific particulars. A suggested template for that guide, specifically the one used at Lawrence, will be included in the supplementary materials available to each user, but it will require editing to reflect local practices.

The publisher---Brooks-Cole---was identified a year or more ago, and I have been working with their editorial and production departments to develop and test the method by which the desired flexibility can be achieved. The approach has already passed its feasibility test, and Brooks-Cole's editors claim that they will be able to produce the desired customization economically for orders of as few as ten copies. Further, once the structure has been fully worked out and debugged, there is no reason at all why other authors might not contribute components, so---over time---the product will expand to accommodate a wider and wider spectrum of hardware and software and maybe even to include broad topics not originally in the plan.

Three More Points

I want to make three more quick observations:

  1. A copy of the current draft, including all existing components, is available for examination at the Brooks-Cole booth in the exhibit hall. You will also find there a half-page form that you can fill out and leave with the Brooks-Cole representative to convey your interest in being kept informed of the project.

  2. There will be two workshops next summer, to which I call the attention of anyone interested. The dates are not yet finalized, but I am maintaining a project website at the URL

    http://www.lawrence.edu/dept/physics/ccli

    I will post the dates on that site as soon as they have been determined. Further, application for participation will be via a web-based form that will also be available at that site.

  3. I would be happy to talk further with anyone who wishes to make suggestions or obtain more detail. I will be here for the entire meeting.