[Edu-sig] More calculus in Python

Arthur ajsiegel at optonline.net
Thu Dec 30 02:31:24 CET 2004


Kirby writes - 
> 
> #--- calc.py

snip

> 
> p1 = Pair(ident, one)
> 
> newp = p1 * p1 * p1
> 
> print [newp.u(i)  for i in range(-5,6)]
> print [newp.du(i) for i in range(-5,6)]
> 
> #---
> 
> Testing:
> 
>  >>> import calc
>  [-125, -64, -27, -8, -1, 0, 1, 8, 27, 64, 125]
>  [75, 48, 27, 12, 3, 0, 3, 12, 27, 48, 75]
> 
> i.e. I get back the functions u(x) = x**3 and du(x) = 3*x**2, per
> differential calculus.

Finally had a chance to focus on this.

Kinda nice.  

Just set it to music - i.e. graph it - and there lot's to see as well, for
those of us who find that added visual element essential for grasping what
is happening, and preventing glazing ove.

Are you going to take it that far, or shall I.

Art




More information about the Edu-sig mailing list