Skip to main content

Teaching Programming for Mathematical Scientists

  • Chapter
  • First Online:
Mathematics Education in the Age of Artificial Intelligence

Abstract

Over the past 30 years or so, the authors have been teaching various programming for mathematics courses at our respective universities, as well as incorporating computer algebra and numerical computation into traditional mathematics courses. These activities are, in some important ways, natural precursors to the use of Artificial Intelligence in Mathematics Education. This chapter reflects on some of our course designs and experiences and is therefore a mix of theory and practice. Underlying both is a clear recognition of the value of computer programming for mathematics education. We use this theory and practice to suggest good techniques for and raise questions about the use of AI in Mathematics Education.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 129.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 169.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 169.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    For example, (Slagle, 1963), which took a “Good Old-Fashioned Artificial Intelligence (GOFAI)” approach, and concluded “The solution of a symbolic integration problem by a commercially available computer is far cheaper and faster than by man”. Of course, this was from the era when people still believed in GOFAI. We are grappling with different problems today, using much more powerful tools. Yet some important things can be learned by looking at the effects of the simpler and older tools. The riposte to Slagle (1963) was the development of Computer Algebra (Davenport, 2018) as a separate discipline.

  2. 2.

    Much interest in computation and proof for pure mathematics was generated by the very successful polymath project. Because computation has always been perceived as instrumentally important, a corresponding but much larger scale project on the Applied Mathematics side might be the Intergovernmental Panel on Climate Change.

  3. 3.

    We had intended to give the reference (Rosati et al., 1992) for this; however, that journal seems to have disappeared and we can find no trace of it on the Web, which is a kind of testimony to ephemerality. Some of the lessons of that article were specific to the calculator, which was too advanced for its era and would be disallowed in schools today. We shall not much discuss the current discouragingly restricted state of the use of calculators in schools hereafter.

  4. 4.

    Students were enrolled in one of three tutorial hours, but often went to all three hours.

  5. 5.

    Often, these lists rely on fairly baseless claims or are derived from the number of Internet searches for a language; here, we base this claim on proportion of code on GitHub as measured by https://madnight.github.io/githut/ visited on 2021-02-09.

  6. 6.

    Active learning is defined, for instance, in a well-known teaching and learning website at Queen’s University, Kingston, Ontario: “Active learning is an approach to instruction that involves actively engaging students with the course material through discussions, problem solving, case studies, role plays and other methods. Active learning approaches place a greater degree of responsibility on the learner than passive approaches such as lectures, but instructor guidance is still crucial in the active learning classroom. Active learning activities may range in length from a couple of minutes to whole class sessions or may take place over multiple class sessions.”.

  7. 7.

    The elementary functions of the calculus are not “elementary” in the sense of being simple, but instead they are “elementary” in a similar sense to the elementary particles of physics.

  8. 8.

    Aphra Behn 1640–1689 has one of the most interesting, if only dubiously accurate, biographies that we have read.

  9. 9.

    Ambrose Bierce 1844–1914(?) was an American satirist, critic, and journalist, perhaps most famous for his collection of definitions published as “The Devil’s Dictionary”.

  10. 10.

    https://stackexchange.com/ Stack Exchange is a network of websites for communities where contributors ask and answer questions and then vote on responses. Stack Overflow is for general programming but specialist communities exist, e.g., for Maths, AI, and Data Science. While generally good, the quality does vary, and is poor for computer security (Fischer et al., 2017).

  11. 11.

    https://www.chegg.com/ Chegg is a homework help website.

  12. 12.

    https://en.wikibooks.org/wiki/LaTeX.

  13. 13.

    Given the economic constraints of the large class model, we mean. Even then, there may be alternatives, such as so-called “mastery grading” (Armacost & Pet-Armacost, 2003). We look forward to trying that out. Exam stress is often counterproductive, and the current university assessment structures do encourage and reward successful cheating. We would like a way out of this, especially now in COVID times.

  14. 14.

    One British citizen in 25,000 is a graduate of XX10190.

  15. 15.

    Although it’s true that, sometimes, simply reading a question aloud can be surprisingly useful, of course tone matters, here. Reading the question aloud as if it were a reminder to the instructor can be less painful for the student.

  16. 16.

    Strubell et al. (2019) report that training a big model with neural architecture search can generate as much CO\(_2\) as five cars during their lifetime, including fuel.

  17. 17.

    Except as an important stepping stone to the real truth—see the entry “Lies to Children” in Wikipedia. Sometimes a simplistic story is the right first step.

  18. 18.

    Aristotle may have done us a disservice by looking down on crafts and craftspeople; the term Software Carpentry is not likely to induce respect for the discipline in academia, for instance. We lament this prejudice.

  19. 19.

    See also Bradford et al. (2009), which shows that computational tools can affect the basic meaning of equality: pedagogical equality is not the same as mathematical equality. It is perfectly possible for two expressions to be mathematically equal, but only one expression to be the desired student response.

References

  • Abelson, H. (1976). Computation in the undergraduate curriculum. International Journal of Mathematical Education in Science and Technology, 7(2), 127–131.

    Article  Google Scholar 

  • Aiken, R. M., & Epstein, R. G. (2000). Ethical guidelines for AI in education: Starting a conversation. International Journal of Artificial Intelligence in Education, 11, 163–176.

    Google Scholar 

  • Armacost, R. L., & Pet-Armacost, J. (2003). Using mastery-based grading to facilitate learning. In 33rd Annual Frontiers in Education, 2003. FIE 2003 (Vol. 1, pp. T3A–20). IEEE.

    Google Scholar 

  • Betteridge, J., Davenport, J. H., Freitag, M., Heijltjes, W., Kynaston, S., Sankaran, G., & Traustason, G. (2019). Teaching of computing to mathematics students: Programming and discrete mathematics. In Proceedings of the 3rd Conference on Computing Education Practice (pp. 1–4).

    Google Scholar 

  • Bond, P. (2018). The era of mathematics–review findings on knowledge exchange in the mathematical sciences. Engineering and physical sciences research council and the knowledge transfer network. https://epsrc.ukri.org/newsevents/news/mathsciencereview/.

  • Borwein, J., & Devlin, K. (2009). The computer as crucible: An introduction to experimental mathematics. The Australian Mathematical Society (p. 208).

    Google Scholar 

  • Borwein, J. M., & Borwein, P. B. (1992). Strange series and high precision fraud. The American Mathematical Monthly, 99(7), 622–640.

    Article  Google Scholar 

  • Boynton, P. L. (1950). What constitutes good teaching? Peabody Journal of Education, 28(2), 67–73.

    Article  Google Scholar 

  • Bradford, R., Davenport, J., & Sangwin, C. (2009). A comparison of equality in computer algebra and correctness in mathematical pedagogy. In J. Carette et al. (Eds.), Proceedings intelligent computer mathematics (pp. 75–89).

    Google Scholar 

  • Broussard, M. (2018). Artificial unintelligence: How computers misunderstand the world. MIT Press.

    Google Scholar 

  • Camargos Couto, A., Moreno Maza, M., Linder, D., Jeffrey, D., & Corless, R.M. (2020). Comprehensive LU factors of polynomial matrices. Mathematical Aspects of Computer and Information Sciences MACIS (pp. 80–88).

    Google Scholar 

  • Chan, E. Y. S., & Corless, R. M. (2017a). A new kind of companion matrix. The Electronic Journal of Linear Algebra, 32, 335–342.

    Google Scholar 

  • Chan, E. Y. S., & Corless, R. M. (2017b). A random walk through experimental mathematics. In J. M. Borwein (Ed.), Commemorative Conference (pp. 203–226). Springer.

    Google Scholar 

  • Chan, E. Y. S., & Corless, R. M. (2021). Computational discovery on Jupyter (In preparation).

    Google Scholar 

  • Chapman, R., & Schanda, F. (2014). Are we there yet? 20 years of industrial theorem proving with SPARK. In Proceedings of Interactive Theorem Proving (pp. 17–26).

    Google Scholar 

  • Corless, R. M. (2004a). Computer-mediated thinking. Proceedings of Technology in Mathematics Education. https://github.com/rcorless/rcorless.github.io/blob/main/CMTpaper.pdf.

  • Corless, R. M. (2004b). Essential Maple: An introduction for scientific programmers, 2nd ed. Springer Science & Business Media.

    Google Scholar 

  • Corless, R. M., & Jeffrey, D. J. (1997). Scientific computing: One part of the revolution. Journal of Symbolic Computation, 23(5), 485–495.

    Article  Google Scholar 

  • Croucher, M. (2020). No Fortran? No data science in R and Python! https://walkingrandomly.com/?p=6696.

  • Davenport, J. (1986). On the Risch differential equation problem. SIAM Journal on Computing, 15, 903–918.

    Article  Google Scholar 

  • Davenport, J. (2018). Methodologies of symbolic computation. In: Proceedings AISC (pp. 19–33).

    Google Scholar 

  • Davenport, J. H., Hayes, A., Hourizi, R., & Crick, T. (2016). Innovative pedagogical practices in the craft of computing. In 2016 International Conference on Learning and Teaching in Computing and Engineering (LaTICE) (pp. 115–119). IEEE.

    Google Scholar 

  • Edelman, A. (1988). Eigenvalues and condition numbers of random matrices. SIAM Journal on Matrix Analysis and Applications, 9(4), 543–560.

    Article  Google Scholar 

  • Eilers, S., & Johansen, R. (2017). Introduction to experimental mathematics. Cambridge University Press.

    Google Scholar 

  • Fischer, F., Böttinger, K., Xiao, H., Stransky, C., Acar, Y., Backes, M., & Fahl, S. (2017). Stack overflow considered harmful? The impact of copy & paste on android application security. In 38th IEEE Symposium on Security and Privacy (SP) (pp. 121–136).

    Google Scholar 

  • Flanagan, O. (2009). The really hard problem: Meaning in a material world. MIT Press.

    Google Scholar 

  • Freeman, S., Eddy, S. L., McDonough, M., Smith, M. K., Okoroafor, N., Jordt, H., & Wenderoth, M. P. (2014). Active learning increases student performance in science, engineering, and mathematics. Proceedings of the National Academy of Sciences, 111(23), 8410–8415.

    Article  Google Scholar 

  • Handelsman, J., Ebert-May, D., Beichner, R., Bruns, P., Chang, A., DeHaan, R., et al. (2004). Scientific teaching. Science, 304(5670), 521–522.

    Article  Google Scholar 

  • Hegedus, S., Laborde, C., Brady, C., Dalton, S., Siller, H.-S., Tabach, M., Trgalova, J., & Moreno-Armella, L. (2017). Uses of technology in upper secondary mathematics education. Springer Nature.

    Google Scholar 

  • Higham, N. J. (2002). Accuracy and stability of numerical algorithms, 2nd ed. SIAM, Philadelphia.

    Google Scholar 

  • Kahan, W. M. (1980a). Handheld calculator evaluates integrals. Hewlett-Packard Journal, 31(8), 23–32.

    Google Scholar 

  • Kahan, W. M. (1980b). Interval arithmetic options in the proposed IEEE floating point arithmetic standard. In Interval Mathematics 1980 (pp. 99–128). Elsevier.

    Google Scholar 

  • Kahan, W. M. (1983). Mathematics written in sand. In Proceeding of the Joint Statistical Meetings of the American Statistical Association (pp. 12–26). http://people.eecs.berkeley.edu/~wkahan/MathSand.pdf.

  • Kovács, Z., Recio, T., Richard, P. R., & Vélez, M. P. (2017). GeoGebra automated reasoning tools: A tutorial with examples. In Proceedings of the 13th International Conference on Technology in Mathematics Teaching (pp. 400–404).

    Google Scholar 

  • Kühlwein, D., Blanchette, J., Kaliszyk, C., & Urban, J. (2013). MaSh: Machine learning for Sledgehammer. In International Conference on Interactive Theorem Proving (pp. 35–50).

    Google Scholar 

  • Li, A., & Corless, R. M. (2019). Revisiting Gilbert Strang’s “A chaotic search for \(i\).” ACM Communications in Computer Algebra,53(1), 1–22.

    Google Scholar 

  • Luckin, R., Holmes, W., Griffiths, M., & Forcier, L. B. (2016). Intelligence unleashed: An argument for AI in education. Pearson Education.

    Google Scholar 

  • Mandelbrot, B. B., & Frame, M. (2002). Some reasons for the effectiveness of fractals in mathematics education. In Fractals, graphics, & mathematics education (pp. 3–9).

    Google Scholar 

  • Monaghan, J., Trouche, L., & Borwein, J. M. (2016). Tools and mathematics. Springer.

    Google Scholar 

  • Papert, S. (1993). Mindstorms, 2nd ed. Basic Books.

    Google Scholar 

  • Paxton, J. (2002). Live programming as a lecture technique. Journal of Computing Sciences in Colleges, 18(2), 51–56.

    Google Scholar 

  • Richard, P. R., Venant, F., & Gagnon, M. (2019). Issues and challenges in instrumental proof. In Proof Technology in Mathematics Research and Teaching (pp. 139–172). Springer.

    Google Scholar 

  • Rosati, P. A., Corless, R. M., Essex, G. C., & Sullivan, P. J. (1992). An evaluation of the HP28S calculator in calculus. Australian Journal of Engineering Education, 3(1), 79–88.

    Google Scholar 

  • Rubin, M. J. (2013). The effectiveness of live-coding to teach introductory programming. In Proceeding of the 44th ACM Technical Symposium on Computer Science Education (pp. 651–656).

    Google Scholar 

  • Seymour, E., & Hewitt, N. M. (1997). Talking about leaving. Boulder, CO: Westview Press.

    Google Scholar 

  • Sijing, L., & Lan, W. (2018). Artificial intelligence education ethical problems and solutions. In 2018 13th International Conference on Computer Science & Education (ICCSE) (pp. 1–5). IEEE.

    Google Scholar 

  • Slagle, J. (1963). A heuristic program that solves symbolic integration problems in freshman calculus. Journal of the ACM, 10, 507–520.

    Article  Google Scholar 

  • Smith, R. C., & Taylor, E. F. (1995). Teaching physics on line. American Journal of Physics, 63(12), 1090–1096.

    Article  Google Scholar 

  • Strang, G. (2001). Too much calculus. http://www-math.mit.edu/~gs/papers/essay.pdf.

  • Strubell, E., Ganesh, A., & McCallum, A. (2019). Energy and policy considerations for deep learning in NLP. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics (pp. 3645–3650).

    Google Scholar 

  • Tepylo, D. H., & Floyd, L. (2016). Learning math through coding. https://researchideas.ca/mc/learning-math-through-coding/.

  • Von Ahn, L. (2013). Duolingo: Learn a language for free while helping to translate the web. In Proceedings of the 2013 International Conference on Intelligent User Interfaces (pp. 1–2).

    Google Scholar 

  • Wilson, G. (2006). Software carpentry: Getting scientists to write better code by making them more productive. Computing in Science & Engineering, 8(6), 66–69.

    Article  Google Scholar 

  • Wilson, G., Aruliah, D. A., Brown, C. T., Hong, N. P. C., Davis, M., Guy, R. T., et al. (2014). Best practices for scientific computing. PLoS Biology, 12(1), e1001745.

    Google Scholar 

Download references

Acknowledgements

RMC thanks the Isaac Newton Institute for Mathematical Sciences and the staff of both the University Library and the Betty and Gordon Moore Library at Cambridge for support and hospitality during the programme Complex Analysis: Tools, techniques, and applications, by EPSRC Grant # EP/R014604/1 when some of the work on this project was undertaken. RMC likewise thanks the University of Bath for an invitation to visit Bath, at which this project was started. EYSC and RMC also thank Western University for a grant to work on the project Computational Discovery on Jupyter, some of whose results are discussed here.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Robert M. Corless .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Betteridge, J., Chan, E.Y., Corless, R.M., Davenport, J., Grant, J. (2022). Teaching Programming for Mathematical Scientists. In: Richard, P.R., Vélez, M.P., Van Vaerenbergh, S. (eds) Mathematics Education in the Age of Artificial Intelligence. Mathematics Education in the Digital Era, vol 17. Springer, Cham. https://doi.org/10.1007/978-3-030-86909-0_12

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-86909-0_12

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-86908-3

  • Online ISBN: 978-3-030-86909-0

  • eBook Packages: EducationEducation (R0)

Publish with us

Policies and ethics