Interactive mathlets with Sage

Dan Drake, KAIST
Spring KMS meeting, Sookmyung Women's University
2012 April 28

“Mathlets”?

Applets for math.

A “mathlet” is a small, interactive applet used to demonstrate or experiment with mathematical ideas. They are often web-based and written in Java.

You can easily make mathlets with Sage's “@interact” feature. And the embeddable Sage cell server means you can put @interacts anywhere — including right into this presentation!

Example: Taylor polynomials

Taylor polynomials for \(\sin(x^2 + 1)\sqrt{x+2}\):

The sequence

doesn't say much to me.

Making a bunch of drawings is better, but can you make them look good? Make them correct? Convey the idea of a sequence of polynomials converging to the original function? If not...

Taylor polynomials, continued

This is the “canonical” example from the Sage wiki.

Root finding with Newton’s method

Turn colored Dyck paths into Schröder paths

Examining score distribution in a class

Try it yourself

  1. Visit the Sage cell server: aleph.sagemath.org, or log into your account on any Sage server.
  2. Cut and paste some code from wiki.sagemath.org/interact or these slides.
  3. Enjoy!

Thank you

These slides online at goo.gl/Nx9U3

Credits

Creative
Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

/

#