On Mon, Nov 24, 2008 at 6:03 PM, Tim Lahey <[EMAIL PROTECTED]> wrote: > > On Nov 24, 2008, at 8:45 PM, William Stein wrote: > >> >> On Mon, Nov 24, 2008 at 4:46 PM, Tim Lahey <[EMAIL PROTECTED]> >> wrote: >>> >>> Hi, >>> >>> Is there a specific way to add rules (and apply them) to rewrite >>> expressions in Sage? >>> >>> Such as, log(a)-log(b) = log(a/b) >>> >>> I need this (and others) in order to properly compare the integration >>> results from Sage to the list of integrals I have. I'm trying to put >>> together a suite of integration tests for both correctness and >>> timing. >> >> I don't know if one can do the above (maybe with pynac it is >> possible). >> However, in the meantime could you at least "improperly" compare >> the results for "pseudo"-correctness by evaluating both answers >> at a bunch of randomly chosen points and see if they differ by a >> constant? >> > > I'll check the maxima docs. Unfortunately, at the moment, it doesn't > look like one can use the new symbolics with the standard (maxima) > integration.
True. > > If I do, I get: > > sage: var('x,a,b',ns=1) > (x, a, b) > sage: f16 = x/(a*x+b)^3 > sage: f16.integrate(x) > --------------------------------------------------------------------------- > AttributeError Traceback (most recent call > last) > > /Users/tjlahey/<ipython console> in <module>() > > AttributeError: 'sage.symbolic.expression.Expression' object has no > attribute 'integrate' Yep, that's not implemented. > I can easily run timing comparisons between maxima and FriCAS, but > because > of how sympy does things (with its separate variables), I'll have to run > them separately. Comparing maxima and FriCAS, the timings are pretty > close on > both for most of the ones I've tried. A few were much longer in FriCAS. > > I have a pretty long list of integrals to go through and I've only > done 16. Many thanks for doing this! William --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---