Department of

Chemical Engineering

Designing molecular technology for the 21st century with biology and chemistry


Joyce Chair Professor Scott T. Milner | Teaching

Mathematica lectures

These two one-hour lectures introduce the capabilities of Mathematica relevant to advanced undergraduate or graduate students in science and engineering. The lectures present the main analytical, numerical, graphical, and programming features of Mathematica, in the form of two Mathematica documents or "notebooks".

The notebooks corresponding to the lectures can be downloaded, so that a student can follow along with the examples in the lectures, and experiment on her own.

Mathematica Examples

The following are examples of problem-solving in Mathematica, which demonstrate various techniques that are generally useful for advanced undergraduates and graduate students in science and engineering. Each consists of a video and a corresponding Mathematica notebook.

  • View the Cloud tutorial video
    Generate a "cloud" of fake data points; rotate randomly in space; then analyze, to find the principal axes of the cloud, and characteristic widths in each direction. Draw in 3D and in projection; construct histograms.
  • View the Newton tutorial video
    Code Newton's method for rootfinding, using traditional "procedural" programming style, and then more compact "functional" programming style of Mathematica using NestList[ ] and FixedPoint[ ].
  • View the Lorenz tutorial video
    Solve the Lorenz equations, three coupled nonlinear ODEs that give rise to chaotic motion and sensitive dependence on initial conditions; an example of how to solve ODEs using NDSolve[ ].
  • View the Soliton tutorial video
    Find the optimum shape of an extended object (here, a chain of beads connected by springs, crossing over a potential "hill"), using FindMinimum[ ] to minimize the potential energy. Show how to create a set of variables that act like "phi sub i".
  • View the Coexistence tutorial video
    Compute the coexistence curve for the van der Waals equation of state by numerically solving the Maxwell construction using FindRoot[ ]. Show how to "walk along" a system of equations as a parameter changes, with the previous solution as the next initial guess, using FoldList[ ].
  • View the Pivot tutorial video
    Simulate the motion of a freely jointed polymer chain in solution using the local pivot algorithm. Demonstrates generation of random unit vectors, multi-way if statements using Which[ ], and animation of images using ListAnimate[ ].
  • view the Percolation tutorial video
    Find the connected clusters of sites in a randomly filled square lattice, with an algorithm that "spreads out" over a cluster by adding neighboring sites to a list for processing, and marking the sites visited. Demonstrates procedural programming using lists.

ChE 524, (Chemical Engieering, Application of Thermodynamics) Fall 2012

Additional Links and Resources

Top of page