Programming and Computer Algebra COMP 150
Laura K. Gross
Bridgewater State University (BSU)
Bridgewater, MA

INTRODUCTION. I have taught programming and computer algebra (now COMP 150) at Bridgewater State University frequently since 2010. The class fulfills a computing requirement in the mathematics major. A sample syllabus (.pdf or Word file) identifies policies for the course. A companion document (.pdf or Word file) outlines sample learning outcomes and schedule. The schedule shows about 2/3 of the course covering programming and the remaining third covering computer algebra. The syllabus shows the grade breakdown into ten equally-weighted components that include exercises, student presentations, programming and computer-algebra assignments, a programming application assignment, a computer-algebra application assignment, three quizzes, and two halves of a final exam.

I am discussing the content of this web page at the Society of Industrial and Applied Mathematics (SIAM) Conference on Applied Mathematics Education in Portland, OR in 2018, as an introduction to some course materials and resources. The course itself is housed on Blackboard.

WHY PROGRAMMING AND COMPUTER ALGEBRA? Various documents include recommendations for technology and computing in the mathematics major. See, for example, the overview of the 2015 CUPM Curriculum Guide produced by the Committee on the Undergraduate Programs in Mathematics (CUPM) of the Mathematical Association of America (MAA). In 2018, the undergraduate curriculum committee in mathematics at BSU reviewed proposed computing outcomes (.pdf or Word file) in the mathematics major for possible adoption by the department.

CONTEXT. Current options for meeting the computing requirement in the mathematics major at BSU include COMP 151 Computer Science I and COMP 150 Programming and Computer Algebra. Computer Science I is the introductory course in the computer-science major. Programming and computer algebra was designed for mathematics majors and is taken almost exclusively by mathematics majors. Currently for math majors,

PREREQUISITES. Calculus I serves as a prerequisite for Programming and Computer Algebra COMP 150 and may be taken concurrently. Assignments in COMP 150 connect strongly with calculus. The course is designed as a freshman-level course. Students rarely enter COMP 150 with any programming experience. Many postpone the class for years, sometimes because of anxiety around computer use. Students commonly conclude on course evaluations that "It was not as bad as I thought it would be!" (Note: Computer Science I COMP 151 currently has no prerequisites.)

A 2015 survey by the Computer Science Teachers Association (CSTA) sheds light on high-school computer-science instruction nationally, as does the CSTA's posted information on K-12 computer-science standards.

CHOICE OF LANGUAGE AND COMPUTER-ALGEBRA SYSTEM (CAS). In a course on programming and computer algebra, the choice of programming language and computer algebra system could be placed in a rotation over a couple of years to serve the needs of different students in the mathematics major, including for example those with interests in statistics, pure mathematics, applied mathematics, and education. Recently I have taught COMP 150 using R as a programming language (not for statistical analysis) and Sage as the computer algebra system. A proposal is pending at BSU to alternate such a course annually with a computing class for future mathematics educators. In the latter course students would learn to program in the block-based event-driven language Scratch often taught in elementary schools, followed by units based at the site cocalc.com in which they would learn the computer algebra system Sage and then the programming language Python.

PROGRAMMING APPLICATION ASSIGNMENT.In a programming application assignment (.pdf or Word file), students can program in the context of another subject, perhaps Calculus I or statistics. I may suggest possible topics like Newton’s Method or numerical integration. Those who have studied statistics are encouraged to explore statistical concepts like sampling. I provide links to some relevant resources on our course Blackboard site, drawing for example from Youtube videos and free texts, such as open-source texts approved by the American Institute for Mathematics (AIM). So far in my course, the objective has been to write an introduction to the topic under consideration. It may look very similar to a section in a calculus or statistics textbook, except that the target audience is a student who can program in R. This modest assignment is designed to provide a framework for applying programming and written-communication skills in mathematics and computer science, locating/analyzing/synthesizing information, and pointing a reader to subject-matter sources, such as a calculus text. The assignment is designed to be tractable, low-stakes, rewarding, and enjoyable. Scaffolding helps: A reading guide (.pdf or Word file) can help students recognize where to start, and I require submission of a preliminary working code as a ten-point exercise. The grade on the assignment can be calculated by multiplying weights by scores and adding as indicated on a rubric (.pdf or Word file).

COMPUTER-ALGEBRA APPLICATION PRESENTATION. In a computer-algebra presentation, students can create and present a Sage worksheet of about five questions that they have formulated themselves, pertaining to a topic of interest to them, perhaps material from another class, such as Calculus I, II, and III, linear algebra, or differential equations. This modest assignment is designed to provide a framework for applying computer-algebra and written- and spoken communication skills in mathematics and computer science. Students enjoy fielding questions from their colleagues in the class; they are the local experts on the application at hand. The assignment is designed to be tractable, low-stakes, rewarding, and enjoyable. The grade on the presentation can be calculated with a simple rubric.

INTRA-DEPARTMENT COMMUNICATION. When students present their work in programming and computer algebra at departmental Math Chats each semester, other students and faculty in our mathematics community get exposure to computer languages and software that they might not otherwise encounter. The practice can promote the integration of computing and particularly computer algebra into the mathematics major. In addition, a colleague in mathematics and I are exploring idea of having students dig deeper into computer algebra by developing (1) a "show-my-steps" feature for differentiation in Sage and (2) a feature for displaying proofs by induction.

INTER-DISCIPLINARY COLLABORATION. A campus colleague wanted a software tool to let her students explore concepts from physical chemistry with graphs and automated calculation. A student in programming and computer algebra created Maple worksheets that form the core of Maple labs now incorported into both the chemistry course and a research project in the science of teaching and learning in chemistry. Consider seeking such projects from the sciences and other mathematics courses.

PROGRAMMING PROCESS. Throughout the programming unit, the class commuity works to emphasize exploration of and communication about the programming process more than presentation of ready-made polished programs. This orientation is analogous to teaching the crucial creativity of proof rather than presenting only polished proofs.

R. Download R, and download the integrated development environment (IDE) RStudio. This text file illustrates how R can be used as a programming language. Cut and paste into RStudio's R console. Alternatively, cut and paste into RStudio's editor or upload the same text file with a .R extension, and source the file to run. This R reference card is also handy.

SAGE. Sage originally stood for System for Algebra and Geometry Experimentation, but now it is just the name of the CAS. You can familiarize yourself with Sage at the Sage Cell Server, which is somewhat like a calculator screen that lets you view output and type instructions. Try this exercise (.pdf or Word file) and/or this exploration if you wish. The open-source textbook Sage for Undergraduates by Gregory V. Bard (2010) is a helpful resource. You can create Sage worksheets at cocalc.com. Instructors can set up a course at the cocalc website. Each student in the course receives an email message accordingly with easy instructions for setting up an account that gives access to the course on the CoCalc site. From the course at the CoCalc site, instructors can distribute, collect, grade, and return assignments. If you don't want to put up with slow calculation or hanging at cocalc.com, then students should pay $9 each or the department should pay for a "small-course plan" to improve performance during class and homework time. See "upgrading students" here.

OPEN-SOURCE TOOLS. My course in programming and computer algebra uses only open-source tools. Students can continue to use them productively after graduation, as well throughout college. R is prevalent in industry and academia. Sage is a robust and growing product, increasingly powerful, that has been embraced by a significant fraction of the mathematics academic community, especially those who are passionate about open-source resources and the collaboration opportunities and equal access they provide. Another advantage of using Sage is that the platform at the CoCalc website is versatile. Users can not only open Sage worksheets, but also program in R and Python, as well as typset mathematical documents in LaTeX, all at the CoCalc site.


profgross at gmail dot com
last updated July 10, 2018