http://www.dbuke.com/calculus-formulations-and-solutions-with-python/