Mathematica Material for Differential Equations
In summer 2009, I attended the Advanced Mathematica Summer School at Wolfram Research. While there, I began to develop some course materials, demonstrations, and labs for our Math 2420 Differential Equations course. I am still working on much of this material, but will start posting it here as I begin to get it whipped into shape. Where possible, I have tried to program most of this material in such a way that it can be either used with a full (or student) version of Mathematica or, with somewhat diminished functionality, with the free, downloadable Mathematica Player software. I will be uploading more of these (and tweaking the ones here) over the course of the summer and this coming fall. If you have any comments, thoughts, or suggestions about these, please feel free to contact me. I hope you find these useful.
Demos
These are widgets (demonstrations, manipulates?) that teachers can use in class to demonstrate various topics or that students can use to learn more about those topics (can be useful for some homework assignments...).
If you open these files in the full version of Mathematica, it will allow you to enter your own system of equations to try and to make changes (it will warn you that you need to "convert this into a notebook" first, but just answer "Yes" and remember to save as some new filename). If you open the file in the free, downloadable Mathematica Player software, you will be restricted to the equations I have already entered for you and cannot make any changes to the widget, but will otherwise be able to make use of it normally (hey, it's free...).
- Slope fields - This lets you enter a differential equation with some optional parameters and allows you to examine what effect this has on its slope field and solution curves (you can set the initial conditions by clicking on the graph with the mouse). Mathematica notebook (This is older, so it doesn't have the newer features that the other materials have; I hope to get around to updating it at some point.) Not available in free Mathematica Player version yet.
- Eigenvalue explorer - Use this to view how the phase field of a system changes as you modify its eigenvalues and eigenvectors. In this widget, you start with the eigenvalues and eigenvectors rather than the equations (it will even give you the equations for a system with your selected eigenstuff...), so it makes it easy to quickly see how the phase field depends on these. (I wrote this after getting annoyed in class when trying to use the Phase Portraits widget below in class to quickly show the dependence of the field on eigenvalues; the other widget does far more than this one, but isn't as convenient when you don't really care about the specific equations.)
- Phase portraits - This lets you graph systems of autonomous differential equations (linear and non-linear) to see their slope field, equilibrium (critical) points, eigenvalues/eigenvectors at the equilibrium points (well, the eigenvalues/eigenvectors of the "local linearization" at the equilibrium points), and plot solution curves just by clicking on the graph with the mouse; you can also zoom in/zoom out/move the graph around with the mouse (see instructions under graph). You can also enter parameters in your equations and see what effect varying these has on everything in real time. (I think this is a pretty cool demo, actually.) This will not work if your system gets too nonlinear, but powers of x and y should be fine (trig functions, nope).
- Systems in 3 dimensions - This allows you to plot solution curves in the phase portrait to 3-dimentional systems, view the equilibrium points, eigenvalues and eigenvectors of the local linearizations, and show the null-clines. It's fun to play with, but I was really a bit disappointed that it wasn't as useful as I had hoped in visualizing 3-D phase portraits. Suggestions on how to make it more useful are solicited...
- Spirals of curvature - This draws a parametric curve by specifying a function for its curvature (this involves solving a system of differential equations). This yields some surprisingly artistic and decorative curves; I'm not really sure if there are lots of applications for this, but it is definitely very cool (well worth a look).
- Lorenz Attractor - This is my favorite widget so far. It is actually several related widgets in one that allow you to really explore the famous Lorenz Attractor (literally the "textbook case" of chaos). If you want to actually understand a bit more about what you are looking at, take a look at the Lorenz lab below.
- Spring simulation - This simulates the motion of an oscillating spring. You can see the spring moving, as well as the graphs of y(t), y'(t), and the phase plane (y vs. y'), simultaneously. You can model simple harmonic oscillation, damped springs, driven springs, and damped/driven springs. Using the free Mathematica Player, you can choose from some different driving and spring forces (including a nonlinear spring and an "aging" spring), while with a full version of Mathematica, you can experiment with your own functions for these. Check out the lab on springs below.
Labs
These can be assigned by teachers or just worked through by anyone interested in the topic. My plan is to eventually have two versions of each lab: one version can be worked entirely with the included widgets in the free Mathematica Player software and will require little or no knowledge of Mathematica to use. The second version will require you to use a full version of Mathematica and to have some knowledge of actually working with Mathematica to solve them.
- The Lorenz Attractor Or Chaos for beginners - This lab explains and explores the Lorenz equations, a good introduction to the ideas of "chaos theory". I try to give some background on these equations, including what he was trying to model (the weather) and what the variables and parameters represent. This include the Lorenz Attractor widget from above in it. (This is the version that does not require you to know anything about Mathematica to use.) Warning - BIG file (over 6 meg - you were warned). If there is a need for it, I could post an Acrobat pdf file with just the text of the lab in it...
- The Montagues, the Capulets, and the Zombies: A socio-historical study in population dynamics (or not) - This lab examines systems of equations for modeling competing species and predator-prey systems. This includes a modified version of the Phase Field widget from above.
- The Fourth Season: Spring in Four Acts - Everything you didn't realize you wanted to know about springs but never got around to asking. This lab investigates the oscillation of a mass on a spring in all of its glory: simple harmonic oscillation, damped oscillation, driven/forced oscillation, and damped/forced oscillation. There is even a section at the end that considers nonlinear springs or springs that change over time. What more could you ask for? (That, by the way, is what is known as a "rhetorical question"...)
Acknowledgements
I would particularly like to express my thanks to the following people and institutions for helping me develop this material in various ways:
- Austin Community College - For providing funding and encouragement to pursue this project
- Wolfram Research - For providing support and resources through the Advanced Mathematica Summer School
- Devendra Kapadia of Wolfram Research - For help and advice in the development of this project and a generous time commitment
- Faisal Whelpley of Wolfram Research - For some great Mathematica coding advice and tricks
- John Fultz of Wolfram Research
- Other staff at Wolfram Research, including (but certainly not limited to): Rob Knapp, Theodore Gray, Onkar Singh, Stephanie Funkhouser, Igor Antonio, Harry Calkins