How I Teach Calculus: A Comedy (Programming)

I’m not trying to say that I invented the wheel here, buuuuuut, I sorta started teaching math with programming like 4 years ago. What’s that you say? @CalcDave and @samjshah have been doing it for longer than I’ve had a standard license. Yea, I know, but are they crazy enough to use Javascript?

All jests aside, there’s been some serious chatter about using computers in math class:

Summary? Arithmetic and Mathematics aren’t the same thing.1 One is steeped in procedure and memorization, which creates, for some, the fondness for a red pen that I can’t quite understand. The other is an art, literally.

Choosing to teach programming within a traditional calculus framework does present a few challenges. Especially because the standard calculus curriculum is 100% about quantity and very little about depth.

So, I need to get these kids up to speed as fast as is mentally possible for a group of 17 year-olds. Here are the projects I use–in order!–to get them the basics:

  • Quadratic formula (no UI): Basic math operators, programming function notation and pre-programmed objects [Math.sqrt(), document.write()]
  • Calculator’s Factorial-Button Clone: Loops, overloading, conditions.
  • Babylonian Method for Roots: Loops, if/else (no negative inputs), generally enlightening.
  • Rabbits vs. Wolves Simulators: Take an arbitrary amount of generations, and calculated probabilities and dynamics of a simple predator v. prey situation. This then motivates our study of implicit differentiation.

There’s not much actual calculus in this list, but I’m really just prepping them. We’re going to use computers for calculating areas, working with series, and generally making the processes of math more concrete. It turns out that if you present computers as if you were training a dog the kids get into it. And everyone knows that once you teach/train someone else, you have to understand it way better, which is what I’m after.

I use Javascript, which at first sounds a lot like sending your youngest son to retake Osgiliath from 5,000 orcs, but let me explain. First, my school has a computer shortage. Not that we don’t have them, it’s just that everyone always wants them. Second, with Chrome’s Developer Tools, you can actually troubleshoot JS quite easily. Third, JS is by far the lowest setup cost language for teaching the basics: Make an html file, save it to your desktop, and open it in chrome.2 No terminal, no publicstaticvoidmain(String[]args), and I think they’ll be able to play with it on their own in the future.

1. I’m being too general here for some of you. Cry about it.

2. I also demand the use of the Oxford comma. In fact, you could consider me like the William Wallace of Commas, anachronistic, paradoxical, and slightly blue in the face.

Comments are closed.