GMU Computing Workshops
Instructed by Anthony E. Pizzimenti
Fridays 11am–12:30pm, EXPL 4107
No workshop today.
October 24

No workshop today, as I’m speaking at the 2025 Southeastern Section of the American Physical Society (SESAPS) conference at James Madison University. (No, I am not a physicist.)

\(\LaTeX\), Beamer, and writing mathematics
October 17

\(\LaTeX\) (pronounced “ley-tek”) is the tool for writing math. It is, however, remarkably finicky — especially when you’re trying to create slides or a poster (for, say, the upcoming MEGL mid-semester meeting). This week, we’ll cover the basics — and some neat tricks — to smooth out your writing experience, including

  1. Online and offline editors — which should you use?
  2. How to properly organize a document
    • preambles, document types, and fonts
    • margins, frames, and layout parameters
    • scaffolding with the \input command
    • creating, \labeling, and \referencing (sub/subsub)sections
    • mathematics typesetting, the \begin{theorem} environment
  3. Making slides with Beamer
    • layouts, build-ins, and transitions
    • tailoring slides to your audience, and to the venue’s equipment
    • differences between Beamer and regular TeX

Linear Algebra I
October 10

This week’s session runs 10:45–12:15 to accommodate my GMU Combinatorics, Algebra, and Geometry seminar (CAGS) talk in EXPL 4106 (the room right next to ours). Stop by if you can!

This week, we’ll be reviewing some basic MATLAB and Python linear algebra tools by computing the normal equations for a linear system \(Ax = b\).

  1. Download this dataset. The first column of the dataset is a set of input points, and the second is a corresponding set of outputs for an unknown function.
  2. Load the dataset into a matrix. Put the first column of the matrix into a variable \(t\) and the second column into a variable \(b\).
  3. Find the first-order (linear) approximation.
    1. Construct a matrix \(A = \begin{bmatrix} \mathbf 1 & t \end{bmatrix}\) (i.e. a matrix whose first column is all ones and second column is \(t\)). Why do we build \(A\) this way?
    2. Solve for \(x = (A^\top A)^{-1}(A^\top b)\). What does each term in this expression do?
  4. Find the second-order (quadratic) approximation, answering the same questions as above.
    1. Construct a matrix \(B = \begin{bmatrix} \mathbf 1 & t & t^2 \end{bmatrix}\).
    2. Solve for \(z = (B^\top B)^{-1}(B^\top b)\).
  5. Plot the results.
    1. Plot the points \((t,b)\) from the dataset.
    2. Create an evely-spaced set of \(100\) points on the interval \([0,2]\).
    3. Based on your answers to 3(b) and 4(b), how should you plot \(x\) and \(z\)? (Really, what are \(x\) and \(z\)?)

Solutions are here.

Numerical Analysis I
October 3

This week’s session runs from 10:30–11:30 to accommodate this week’s Graduate Student Town Hall in EXPL 4106 (the room right next to ours).

This week, we’ll cover basic numerical analysis from a mathematical perspective. Using your programming language of choice, take a crack at these questions.

  1. Create a function to compute \(f(x) = (1-\cos(x))/x^2\).
    1. Create an array of evenly-spaced numbers in the interval \([-1,1]\).
    2. Apply \(f\) to the array of numbers and plot the result.
    3. What happens when \(x \approx 0\)?
  2. Create a function to compute \(g(x) = x^3-x^2\).
    1. Write down and create functions for the first-order approximation of \(g\) at the points \(a=0, a=1/2\), and \(a=1\).
    2. Do the same for the second-order approximation of \(g\).
    3. Find the Taylor series for \(g\).

Solutions are here.

Installing things, on-campus resources, digital hygiene
September 26

To start the semseter gently, we’ll install programming tools of your choice (Python, MATLAB, Mathematica, etc.), some version control and file management systems (Git, Dropbox/Box), and practice good organization habits. Below are some package and software manageers, by OS.

  • Homebrew (macOS)
  • WinGet (Windows >10)
  • apt-get (Linux, comes preinstalled)

If we get through everything, we can start writing basic programs, and treat the rest as office hours.