Re: [Edu-sig] Edu-sig Digest, Vol 167, Issue 1
Jorge and Kirby, Great ideas! You're preaching to the choir here. Especially the line "Why don't we toss out the Graphing Calculators and just learn a little bit of coding?" I spoke with the math department head at a rich private High School nearby who finished proving her school didn't need my techy, codey nonsense by saying, "We already use technology in our math classes: the TI-84." And once you have some practice creating functions to calculate derivatives and integrals, you can get fancy and personalize the notation like Kirby showed. The programmer can do anything, with a toolbox like Python! Peter On Sat, Jun 10, 2017 at 3:17 PM, <edu-sig-request@python.org> wrote:
Send Edu-sig mailing list submissions to edu-sig@python.org
To subscribe or unsubscribe via the World Wide Web, visit https://mail.python.org/mailman/listinfo/edu-sig or, via email, send a message with subject or body 'help' to edu-sig-request@python.org
You can reach the person managing the list at edu-sig-owner@python.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of Edu-sig digest..."
Today's Topics:
1. How does Python help with Calculus? (kirby urner) 2. Re: How does Python help with Calculus? (A Jorge Garcia) 3. Re: How does Python help with Calculus? (A. Jorge Garcia) 4. Re: How does Python help with Calculus? (A. Jorge Garcia)
----------------------------------------------------------------------
Message: 1 Date: Sat, 10 Jun 2017 12:19:51 -0700 From: kirby urner <kirby.urner@gmail.com> To: "edu-sig@python.org" <edu-sig@python.org> Subject: [Edu-sig] How does Python help with Calculus? Message-ID: <CAPJgG3QwdBNs8vjukn02oSxqfg4DgrmgooCYm8rYHqGy_o7EAA@mail. gmail.com> Content-Type: text/plain; charset="utf-8"
The obvious answer is via Sage and SymPy, which will do differentiation and integration symbolically to some degree.
http://www.scipy-lectures.org/advanced/sympy.html#differentiation
However even plain old core Python helps in that students get a sense of functions as top-level citizens. I'm not saying Python is alone in providing this.
If the C language could be written:
function func(function f1, function f2):{ }
with type function both eaten and returned, then we could use C for this kind of thing also.
http://mathforum.org/kb/message.jspa?messageID=10168568 (more on this general topic)
The repl below (you may skip modal window) shows my latest slimmed down version of Compose, something I introduce to the O'Reilly course as well.
Function type objects don't ordinarily multiply but what if we want to write h = f * g instead of h(x) = f(g(x)).
For one thing, why mention x at this point (the argument object) as we're simply defining a function, not calling it with an input right?
The Compose class is just the ticket, swallowing and wrapping a function with a __mul__ API. Now * is your compose operator. Or use __matmul__ for @ symbol.
Note then, the use of Compose as a class decorator to the same end.
Feel free to recycle this animal in your own lesson plans. MIT license or whatever.
Kirby
PS: one of the Pycon keynotes was about the affordability of nuke energy, with the claim / calculation that it's less risky to workers than coal. I didn't have time to go up to the podium after and listen in on the conversation. We should have started a BOF. Simulating / modeling risk is something I'm into through CERM Academy. We could start a thread on Facebook.
participants (1)
-
Peter Farrell