Initial Publication Date: August 23, 2019

Using MATLAB in Mathematics Classes

Rick Downs, Mathematics, South Seattle College

Since most students taking math classes (that are not majoring in computer science) are going into engineering or science, math classes are a good place to introduce students to computational thinking. Besides helping students better understand math, developing computational skills allows students to work on more challenging and realistic problems.

Another motivation for teaching computational skills in math classrooms is to reach the widest possible audience and address longstanding issues of the underrepresentation of women and minorities in computational fields. Embedding computational thinking activities in mathematics classes directly addresses the issue of students self-selecting into (or out of) computer science classes, which has been a challenge plaguing the effort to reach underserved youth.

Since most students do not have any programming or MATLAB experience, I need to make each assignment accessible to all students. To do this, I provide students with examples of code using the commands that are needed for each assignment. After working through these examples, students are given a few problems to solve that require only a small modification of the code they have worked with in the examples. In the future, I would like to give students more challenging problems that would have them write more code on their own, but I don't know how much time should be spent teaching programming instead of math.

In Differential Calculus, I give students one assignment to analyze a set of climate data (atmospheric CO2, atmospheric methane, global temperature, etc.) by fitting a polynomial to the data and then using the polynomial and linear approximation to make predictions on what might happen in the future. The second assignment is to use MATLAB to find the derivative of different functions, find critical points, and search for maximum and minimum values of a function. After working through several example problems, students use MATLAB to solve an optimization word problem.

In Integral Calculus, there is one assignment to introduce students to numerical and analytical integration. The other assignment is to find the volume of a wine glass by digitizing the profile of a wine glass, fitting the data to a curve, and calculating the volume of the glass.

In Multi-Variable Calculus students learn how to find the equation of a plane given three points, find the local maximum and minimum values of a function, graph quadric surfaces, explore graphically the effect constants have on the graph of a helix, and graphically see the effect of adding more terms to a Taylor polynomial. Students also learn how to integrate non-elementary functions using numerical methods and by approximating a function with a Taylor series.

In Differential Equations, students learn how to solve first and second order differential equations using dsolve, ode45, and Laplace transforms. There are two projects during the quarter where students use MATLAB to solve equations and produce graphs for a report. The first project models an antihistamine that enters the GI tract and then passes into the bloodstream. The second project is modeling a shock absorber on a car.

In Linear Algebra, students learn how to solve a system of equations using rref, to find the eigenvalues and eigenvectors of a system, and to use the normal equations to find a least squares solution to a system of equations. The first project is to analyze the traffic flow on streets in a downtown area. The second project is to model the population of spotted owls.

Downloadable version of this essay

Using MATLAB in Mathematics Classes (Acrobat (PDF) 109kB Aug23 19)