First-Year University Physics with Computation
Duncan Carlsmith, Dept. of Physics, University of Wisconsin-MadisonFirst-Year University Physics with Computation
This essay describes a first-year university physics curriculum enhanced with MATLAB tutorials in scientific computing that support simulation and data analysis in hands-on and non-traditional laboratories.
The context is a 2-semester honors course in classical physics (with a taste of modern physics) for about 80 students with a strong interest in Physics, Astronomy-Physics, or Applied Math, Engineering, and Physics, a course with three lecture-demonstration meetings, one recitation section, and one 3-hour lab each week. Single variable calculus is the only prerequisite.
The computational curriculum develops skills in and appreciation of computation in physics, astronomy, mathematics, and engineering. Students are supplied MATLAB Live Scripts to use and modify. They ultimately write their own Live Scripts for data manipulation, analysis, and visualization with increasing sophistication.
Computational tutorials, pre-lab scaffolding exercises, and lab procedures are structured as Canvas quizzes with hyperlinks, embedded images and videos, LaTeX-based mathematics, dropdown previews of executed Live Scripts, Live script download links, and various submission and assessment structures.
Live Scripts contain scaffolding with external hyperlinks, LaTeX-based mathematics, an auto-generated internally-hyperlinked table of contents, commented code and inline execution results, and finally a bibliography of hyperlinked references to journal articles and other resources. Each new MATLAB function or construct is introduced with an explanation and a hyperlink to MathWorks documentation which illustrates the syntax and method with many single-click-download or preinstalled examples.
Live Scripts contain "Try this" suggestions to change physical or control parameter values, add code to plot some variable, or otherwise explore. Associated auto-graded CANVAS quiz multiple-choice questions assess understanding of tutorials and prelabs. Lab quizzes require submission of images, tables, figures, and (sometimes) Live Scripts with human assessment and feedback provided using e-rubrics and CANVAS Speed Grader.
Onboarding includes the MathWorks MATLAB On-ramp interactive cloud-based course, MathWorks Getting Started tutorials, and my own Live Scripts introducing basic syntax, coding constructs, data import and export, data visualization, data fitting, and symbolic methods. Support is provided through an online threaded PIAZZA discussion forum monitored by students and instructors and through instructor office hours. MATLAB in the Cloud provides a means to automatically back up student work and mobile app access.
Scientific communication is a course-wide learning goal. Students learn and use LaTeX in filling out CANVAS quiz laboratory results form-fields, in the PIAZZA online discussion forum, in composing a 2-column format peer-reviewed lab report of their choice at OVERLEAF, and in their own Live Scripts. Complete student lab Live Scripts serve as occasionally assessed electronic lab reports. Exported PDFs of executed scripts, not the scripts and extensive associated data, are submitted.
A few illustrative tutorials may provide an idea of the enrichment enabled by threading computation through the sequence of labs in parallel with the tutorials.
The development of a scientific way of knowing requires training in probability and statistics, a subject traditionally glossed over at the introductory level. An early tutorial illustrates, through simulation and analytic/symbolic methods, probability distribution parameters and statistics, uncertainty propagation, and the central limit theorem, as well as the connection to chaos. Another is a virtual laboratory in parameter estimation and uncertainty.
An early prelab provides a simulation of a free fall experiment, with and without the effect of air drag, as well as gaussian noise and salt and pepper mismeasurement noise, with template methods for combining data from various trials and experimenters and for performing nonlinear data fitting. It serves as a virtual laboratory for students to explore statistical and systematic uncertainties, as well as methods of collaboration, in advance of a hands-on lab.
In the hands-on free-fall lab, students drop a mass that drags a tape through a nominally 60-cycle spark gap and use the marks left on the tape to measure the acceleration of gravity. They use their mobile phones to magnify the marks and to record a 10-second voice memo of the sound of the sparks. A provided Live Script introduces acoustic data import, filters the sound, and finds all the spark signals and times to determine the mean spark rate, digesting some 400,000 pressure samples.
The acoustic signal analysis (a fun and intriguing topic by itself) provides a foundation for a later Live Script tutorial analyzing gravitational wave data downloaded from the LIGO-VIRGO collaboration data repository. The analysis requires the identification of many discrete noise peaks in a periodogram and the construction of a digital filter to extract a black-hole merger chirp signal and is accomplished with just a few lines of MATLAB code.
The gravitational wave tutorial constitutes one of several non-traditional labs using public big data that expose students to contemporary research and teach data access methods such as API calls. These require students to study original publications and reproduce and extend published results. The skills acquired prepare students for productive participation in a modern research environment. Other non-traditional labs study Spitzer exoplanet transit data, bottomonium states in CERN collider physics dilepton data, QuarkNet cosmic ray data, NASA asteroid data, stellar orbits around SAG A*, and more applied topics including mobile phone camera calibration and computer vision, engineering optimization of the world's simplest electric train, and modeling leakage from the Faraday cage of a microwave oven. Other scripts use symbolic methods to explore vectors, calculus, ordinary differential equations, and linear algebra concepts and applications to support and motivate student advancement in mathematics.
End-of-course surveys indicate that students believe that the computational element opens new scientific and career vistas and provides a deep appreciation of the role of computation in science. They feel empowered with many new real skills. But they also find it quite challenging and time-consuming. Providing a few tutorials as flexible extra credit reduces the load and stress. This flexibility encourages self-efficacy and is an outlet when, for example, a student underperforms on a traditional-content-focused exam, or misses a hands-on lab due to illness.
A recent physics major graduate and aspiring patent attorney described the course as the ``foundation for my love for the application of physics principles to new technologies'' that enabled her to ``develop a big picture understanding, fine-tune the details of each concept, and finally solidify the concepts through innovative application and computation."
Exemplary students sign up for independent study with me after just the first semester and achieve remarkable results. Two used their own mobile phone images to develop neural network classification of mosquito and tick species. One was immediately hired by the local center for vector-borne disease as a summer researcher, scaled his code to crunch a national image database using the center for high-throughput computing and to filter local insect images submitted by the public, and replaced to a large degree a human process. This student was transformed into a self-sufficient researcher and his work was published. My most recent 2nd-semester independent study student studied the application of MATLAB classification algorithms to exoplanet transit data analysis. Generally, students emerging from this course jump into physics, astronomy, math, and engineering research groups on campus and elsewhere (e.g. LIGO, Los Alamos, and NSA internships) with skills and scientific perspectives hitherto unavailable.