David Joyner wrote:
> See
> http://www.sagemath.org/doc/reference/sage/functions/piecewise.html
> For example:
> 
> 
> sage: f1(x) = x^2
> sage: f = Piecewise([[(0,3),f1]])
> sage: f.riemann_sum(6,mode="midpoint")
> Piecewise defined function with 6 parts, [[(0, 1/2), 1/16], [(1/2, 1),
> 9/16], [(1, 3/2), 25/16], [(3/2, 2), 49/16], [(2, 5/2), 81/16], [(5/2,
> 3), 121/16]]
> 


Interesting; I didn't know about this function.  Is there a reason it's 
not defined for general single-variable expressions (if we give an 
interval, of course)?

Thanks,

Jason


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to