Contents
Introduction To Mathematica
The following 30-minute lecture (developed for ChE 230, Computational Tools for Chemical Engineering) introduces Mathematica at the level of beginning undergraduates:
Short introduction to Mathematica
These two one-hour lectures introduce the main analytical, numerical, graphical, and programming capabilities of Mathematica relevant to advanced undergraduate or graduate students in science and engineering:
The Mathematica documents or “notebooks” corresponding to these three lectures can be downloaded, so that a student can follow along with the examples in the lectures, and experiment on her own:
a short intro to Mathematica.nb.zip
one-hour intro notebook.nb.zip second hour intro notebook.nb.zip
Advanced Mathematica tutorial
This notebook presents the capabilities of Mathematica at a higher level, suitable for graduate students and postdocs, with an emphasis on list manipulation, defining functions, and programming techniques.
advanced Mathematica tutorial.nb.zip
Mathematica Tutorial for Instructors
This set of four lectures presents the elements of Mathematica most useful to instructors in Chemical Engineering:
1 — Mathematica GUI. Essential elements of the user interface.
2 — Mathematica Functions. Most commonly used functions in science and engineering.
3 — ChE 230 Contents. Mathematica features covered in our math methods course.
4 — Upper-level ChE Examples. Illustrates use of Mathematica to solve ChE problems.
Example Problems
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.
Cloud
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.
Newton
Code Newton’s method for rootfinding, using traditional “procedural” programming style, and then more compact “functional” programming style of Mathematica using NestList[ ] and FixedPoint[ ].
Permutation
Generate a random permutation of n integers, using the technique of sorting a list of random numbers.
Lorenz
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[ ].
Soliton
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”.
Coexistence
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[ ].
Ising
Simulate the 2d Ising model using the Metropolis method for Monte Carlo simulations. A simple programming example with If[ ] statements.
Pivot
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[ ].
Percolation
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.

