Show HN: Exploring Mathematics with Python

(coe.psu.ac.th)

266 points | by Andrew2565 8 days ago ago

29 comments

  • Andrew2565 2 days ago ago

    Joint author here.

    I plan to upload the entire book as a single PDF when I finish the next chapter (on the cycloid). That will probably be early next week.

    I used the original book by Arthur Engel for many years. He was an inspirational teacher.

    The MAA tried very hard to publish the book, but I kept adding new material, and a text consisting of math 'selections' rather than a single theme is a hard sell in today's publishing environment.

    • rramadass 2 days ago ago

      > I kept adding new material, and a text consisting of math 'selections'

      That is what makes it so interesting to a "mathematically inclined" layman; a smorgasbord of Mathematics! More value for the time/money ;-)

      If MAA does not understand that there is huge market for Mathematics targeted towards Computer Programmers, they are just dumb. Programmers are the ones with the money and the interest in learning Mathematics presented in a manner more to their understanding.

      Please do find some other low-cost publisher to publish this; "Dover Publications" might be a good one since they publish a lot of classics particularly if you position this as a modern update to the Engel book.

      For example; John Stillwell positioned his Elements of Mathematics: From Euclid to Gödel as a sort of modern update to Felix Klein's Elementary Mathematics from an Advanced Standpoint. From the preface;

      This book grew from an article I wrote in 2008 for the centenary of Felix Klein’s Elementary Mathematics from an Advanced Standpoint. The article reflected on Klein’s view of elementary mathematics, which I found to be surprisingly modern, and made some comments on how his view might change in the light of today’s mathematics. With further reflection I realized that a discussion of elementary mathematics today should include not only some topics that are elementary from the twenty-first-century viewpoint, but also a more precise explanation of the term “elementary” than was possible in Klein’s day.

      So, the first goal of the book is to give a bird’s eye view of elementary mathematics and its treasures. This view will sometimes be “from an advanced standpoint,” but nevertheless as elementary as possible. Readers with a good high school training in mathematics should be able to understand most of the book, though no doubt everyone will experience some difficulties, due to the wide range of topics...

      The second goal of the book is to explain what “elementary” means, or at least to explain why certain pieces of mathematics seem to be “more elementary” than others. It might be thought that the concept of “elementary” changes continually as mathematics advances. Indeed, some topics now considered part of elementary mathematics are there because some great advance made them elementary...

      • elcritch 2 days ago ago

        Perhaps a Patreon account/following would be better? Smaller more digestible chunks of math + code might gain a decent following.

        Lots of LitRPG series I listen to and spend lots on Audible started on Patreon and released as serials.

        Pretty cool what sort of things that Patreon/Youtube/etc enable people to make a living doing nowadays.

      • efavdb 2 days ago ago

        I would certainly buy a copy were it printed!

      • vector_spaces 2 days ago ago

        > If MAA does not understand that there is huge market for Mathematics targeted towards Computer Programmers, they are just dumb.

        Presumably a large math textbook publisher that has been publishing math books for literally one hundred years is very tapped into what books likely will and won't sell. I find it unlikely that a layperson where it concerns math book publishing would have some unique insight that MAA does not have. Even if there is a substantial enough market, there are likely unique considerations that MAA is beholden to which we aren't privy to

        I don't know what the calculus is like to get an extended version of an existing book published by another publisher, but Dover's Aurora series consists of modern original texts as opposed to their usual republications of classic out of print texts -- this is how Emily Riehl had her "Category Theory in Context" published

    • crackedMonk a day ago ago

      thank you so much for your work here, im reading through it now and its really wonderful content

    • gostsamo 2 days ago ago

      For accessibility reasons, is it possible to have the chapters in html form as well? I don't know if it is possible to have the source code of the book, but it is also an option.

      • AnotherGoodName 2 days ago ago

        On this note I’d be willing to support a html port with inline python code running via pyodide if the helps wanted too.

        See https://rubberduckmaths.com/eulers_theorem for an example where i wrote a blog post with lots of inline runnable Python code samples.

        I think this is the best format for python code samples and tutorials. It’s even better than notebooks. No IDE to setup, a completely static and saveable html page, easily runnable and changeable python.

    • hackermailman 2 days ago ago

      You could always have a theme then publish the rest as "online extras" many books do that recently

      • rramadass 2 days ago ago

        These sort of books are meant to be discursive in nature giving one an exposure to various facets in a domain. That is their "theme". For a layman/common reader this is actually quite welcome since it does not drown-him-in-depth/demotivate-him but gives an overview (possibly interconnecting) of the subjects involved.

        For example the Stillwell book i mentioned above has chapters on Arithmetic, Computation, Algebra, Geometry, Calculus, Combinatorics, Probability and Logic thus making it an excellent book to peruse.

    • __mharrison__ 2 days ago ago

      Impossible to self publish?

  • efavdb 3 days ago ago

    Looks like a treasure trove of knowledge.

    I just recently went to the exploratorium in SF and saw an exhibit there suggesting that the catenary made a good arch, so browsed that chapter and saw a bit of explanation here which helped. Was also interested to see that Jefferson played some part in the history here.

  • urutom 3 days ago ago

    I own the original Exploring Mathematics with Your Computer(Turbo Pascal version). It’s an excellent introduction to algorithms for people coming from a mathematics background. Really happy to see it revived in Python.

  • zkmon 2 days ago ago

    It is painful to imagine how these fantastic works will be not be read by humans in future, as AI would digest all this and provide just-in-time code for humans.

    • T-A 2 days ago ago

      The kind of people who read books like this will keep reading them no matter what AI does. The kind of people who won't are already using code written and packaged as convenient libraries by others.

    • rramadass 2 days ago ago

      You are mistaken if you think the code is the point (it is not); It is the Mathematics which is important. AI tools can help me in my studies/work but the understanding still has to happen in my own head.

      • mettamage 2 days ago ago

        Hannah Fry said that learning math feels like gaining a 6th sense. That’s why I continue to study it. I feel it. It’s fun to experience the world in more ways.

        The same goes for Vipassana meditation.

    • robrain 2 days ago ago

      Since the dawn of the current "AI" I've continued to buy and read books at the same pace. Likewise downloading interesting human-created PDFs. I know I'm not the only human who takes zero interest in the output of word-sausage extruders.

    • LenaRyouna 2 days ago ago

      People will always read things, not just because it's a necessity for something else, but just for fun, for curiosity, as a game etc.

      People do plenty of recreational things which don't make sense from an efficiency perspective; they do it because it's fun.

    • 0xpgm 2 days ago ago

      I believe just as human experts do peer review, someone will need to review the AI's work.

      The people who do this review will have to know enough to follow along.

  • fnord77 3 days ago ago

    Very nice. I was looking for something fun to work on over the break. Thank you for this.

    > Unfortunately, after lengthy discussions with the MAA, my hopes of publishing this (rather large) expansion have proved impossible, and so I've decided to put it online, hopefully to be of use to others.

    Too bad

  • net_rando 2 days ago ago

    Random thoughts:

    - Seems great. Added to the backlog :)

    - No colors in PDF illustrations. Is it a deliberate choice?

    - > The first six chapters (and Appendix A) are essentially that book, but with the programming language changed to Python, some rewording, reformatting in Latex, and a few additions.

      Try [typst](https://typst.app/) as an alternative to Latex.
  • rramadass 3 days ago ago

    Very Nice!

    However, I don't see the entire book as a single pdf?

    • fnord77 3 days ago ago

      I downloaded each chapter and combined them so I could read it in apple books on my ipad

          pdfunite $(ls -tr) "Exploring Mathematics with Python".pdf
    • WillAdams 2 days ago ago

      As noted above at: https://news.ycombinator.com/item?id=46382915

      a single PDF will be provided once one more chapter is compleated.

  • aanet a day ago ago

    Thank you!

    Leaving a comment here so I can come back to this

    <3

  • hackermailman 2 days ago ago

    Math was always the stumbling block for me then I realized through work how easy it is with pure rational or reals except when you need to translate it to an algorithm now you are throwing out all the elegant linear algebra for a numerical representation and using obscure characteristic polynomial constructs just to run a program and now math sucks again I went back to the beginning.

    A nice course for this is of course TAOCP volume 2 old testament or MITs math github https://github.com/mitmath/18335/tree/spring22 (change the yr to suit) like we can't even have nice things like gradient descent anymore because it zigzags and is too inefficient

  • somesun 2 days ago ago

    very good resource

    I will read it when it's available

  • magmostafa 2 days ago ago

    This is an excellent resource for building mathematical intuition through code. Python's combination of readable syntax and powerful libraries (NumPy, SymPy, Matplotlib) makes it ideal for exploring concepts like linear algebra, calculus, and discrete math interactively.

    One approach I've found effective: start with a conjecture, visualize it with matplotlib, then prove it formally. The instant feedback loop helps develop both computational thinking and mathematical rigor. Tools like Jupyter notebooks make this workflow seamless.

    For anyone interested in similar resources, "Mathematics for Machine Learning" by Deisenroth et al. and 3Blue1Brown's linear algebra series complement this beautifully by bridging theory and computation.