# Should a math teacher know some computer algebra system “by heart”?

What kind of computer software do you recommend for math teacher? Like if student asks for some difficult integral or asks some probability that requires computer software. Do teachers know some software by heart (like Sagemath, Maple, Matlab) that he or she can answer it by short code and its output or is it enough to answer something like "Well, a suitable computer program solves that in seconds. I don't know yet how to do that but I can write a short tutorial and demo to the next lesson."

• I've taught integrals plenty of times, and students tossing out random difficult integrals at me has never come up, so I think this is somewhat dependent on the context and what the pedagogical goal is. What is the goal of having the student produce an integral which the teacher than has a computer program demonstrate a solution of, either on the spot or at the next lesson? – Henry Towsner Jul 25 '19 at 16:19
• I see no reason why this shouldn't be treated like any other question a student might ask concerning some tangential topic --- if you can say something relevant that's appropriate given class time available and what's being taught, then briefly say something, and if not but you think it's worth discussing with this particular student (maybe this is one of those rare students who intends to major in mathematics and possibly even go to graduate school), then ask the student to come by during your office hours. To me this is similar to a student in a trigonometry class asking (continued) – Dave L Renfro Jul 25 '19 at 16:47
• whether there is an analogue to the Law of Sines and the Law of Cosines in spherical trigonometry. If you know, then briefly mention what you know (in 20-30 seconds at most) and tell the student to see you later for more details, and if you don't know then say so and either encourage the student to look it up and report briefly to the class later or tell the student you'll look into it and report back at the next class meeting. However, I certainly would not suggest that a trigonometry teacher should learn spherical trigonometry on the off-chance that a student might ask a question about it! – Dave L Renfro Jul 25 '19 at 16:52
• I sure hope not, because I certainly don't. My heart is full of other things. – James S. Cook Jul 25 '19 at 23:19
• I've never needed anything fancier than Excel for teaching math, and I've only rarely needed Excel. (I have used Magma, Maple, and Mathematica for research purposes, but only rarely --- rarely enough so that I've learned nothing by heart.) – Andreas Blass Jul 26 '19 at 1:38

I think you only need to have this knowledge if you are teaching a unit or significant part of the course, using a CAS. This is probably a small minority of courses.* In that case, what makes sense is whatever CAS you will be expecting the kids to use (I recommend picking one specific one).

The one I know is Maple, but I'm sure the others are fine too. Probably whatever is easiest, cheapest for the class. I remember Maple having a lot of academic business and free/cheap license in the day.

*In order to have a course like this, you need kids who are relatively advanced (so they have time to learn to code Maple), but didn't quite validate the frosh calc course either. Even then, most kids end up hating the "with computers" courses (or other "enriched" courses) as being harder and prefer to just get through the standard track and advance with that. I regularly advise kids in college to take the standard basic courses (first year physics, chem, calculus, diffyQs) or to validate them. But avoid enriched stuff like the plague. This is different from high school where enriched courses "GT track" are usually a good option.

P.s. FWIW, I do NOT recommend telling the kids "don't worry about harder (standard) problems because the computer does it for you". There is a strong benefit to learning the classical calculus course and the manipulations required. Need to build those muscles for physics and engineering derivations and homeworks. As someone who uses tables occasionally, or just a basic textbook to look up an equation, I think it is easier to do so having mastered the stuff once versus never learning it and always having been reliant on an aid.

P.p.s. I would also not emphasize problems that are so complex they require a CAS (for mortals). Most of the standard books are fine. You don't need a CAS for them. Stick to getting them up to speed on normal stuff first. Walk before run...

Just one small thing to consider for you:

If you like to do non-standardized exercises (i.e. the ones where the solution isn't available in a textbook), then a software can help a lot with that.

The example I like the most is the calculation of Eigenvalues. For an exercise, you usually want nice Eigenvalues (e.g. $$1,2,3,4$$), but how do you get an interesting matrix having these Eigenvalues?

1) Take the matrix $$A = \begin{pmatrix}1 & 0 & 0 & 0 \\ 0 & 2 & 0 & 0 \\ 0 & 0 & 3 & 0 \\ 0 & 0 & 0 & 4\end{pmatrix}$$

2) Create a random $$4 \times 4$$ matrix over $$\mathbb{F}_2$$ and check that its determinant over the integers (taking $$0$$ and $$1$$ to be the elements of $$\mathbb{F}_2$$) is $$1$$ or $$-1$$. I just did that, and found the random matrix $$M = \begin{pmatrix} 0 & 1 & 1 & 1 \\ 1 & 0 & 0 & 0 \\ 1 & 0 & 0 & 1 \\ 0 & 1 & 0 & 0\end{pmatrix}.$$

3) Compute $$B := MAM^{-1}$$. In this case, $$B = \begin{pmatrix}3 & -1 & 1 & -1 \\ 0 & 1 & 0 & 0 \\ 0 & -3 & 4 & 0 \\ 0 & 0 & 0 & 2\end{pmatrix}.$$

Now $$B$$ has the same Eigenvalues as $$A$$, so we have a nice exercise. One could argue that $$B$$ is too easy, you can directly see two Eigenvalues. To make it more complicated, replace $$A$$ by the companion matrix of the polynomial $$(x-1)(x-2)(x-3)(x-4)$$, or look for a different $$M$$. You can also play around with the lift from $$\mathbb{F}_2$$ to $$\mathbb{Z}$$, e.g. take some entries as $$+1$$ and some as $$-1$$, or replace some $$0$$ with $$2$$, take a different finite field to start, etc; but make sure that the determinant stays $$\pm 1$$. The reason for that is that doing the conjugation in step 3 will usually introduce a factor of $$\det(M)^{-1}$$ into the result, and we don't want fractions in the matrix.

This example is based on the fact that I already know some computer algebra systems. If it is worth to learn it just to be able to create nice, custom made exercises is up to you; of course also taking into account the quality of exercises your textbook provides.

I don't think that learning a CAS is in the category of "must-do", but it certainly is useful. Personally I use Sage but Mathematica is also a good choice. Mathematica is highly polished and widely used while sage is open source, based on a general purpose programming language, and free of charge.

I don't find myself fielding random integral questions very often and, honestly, no program is all that great at giving simple closed forms. Nor is it really possible. Expect the answers to involve things a Calc student does not know about like the gamma or hypergeometric functions.

For my Calc students, the main thing that I use Sage for is generating graphs and animations. (Sagetex allows you to put sage code in latex.) I point them to Desmos when they want to do the same, unless I know they can program. Another use is for numerical results which are a bit tedious when done to high accuracy such as Newton's method or numerical integration.