Thanks for the help! The expression that I had was a result of a previous computation and I did not realize that I had to expand the expression and the simplify command would not multiply then cancel common terms.
On Apr 23, 9:38 pm, Minh Nguyen <[email protected]> wrote: > On Fri, Apr 24, 2009 at 4:37 AM, Minh Nguyen <[email protected]> wrote: > > Hi Dylan, > > > On Fri, Apr 24, 2009 at 4:32 AM, drupel <[email protected]> wrote: > > >> Hi all: > >> I am using Sage Version 3.4, Release Date: 2009-03-11. I asked Sage > >> to simplify the following expression: > >> -q^(5/2)*(q^2*x2^4 + q*x2^2) + q^(9/2)*x2^4 + q^(3/2)*(q^2 + 1) > >> *x2^2 + sqrt(q) > >> by calling the simplify command: > >> simplify(-q^(5/2)*(q^2*x2^4 + q*x2^2) + q^(9/2)*x2^4 + q^(3/2)* > >> (q^2 + 1)*x2^2 + sqrt(q)) > >> but the output was exactly the same as what I put in. In my code > >> ahead of this I have > >> R=PolynomialRing(ZZ,'q') > >> var('q') > >> Any suggestions would be much appreciated. > > > Try this: > > Should be this > > [mv...@sage ~]$ sage > ---------------------------------------------------------------------- > | Sage Version 3.4.1, Release Date: 2009-04-21 | > | Type notebook() for the GUI, and license() for information. | > ---------------------------------------------------------------------- > sage: q, x2 = var("q, x2") > sage: simplify(expand(-q^(5/2)*(q^2*x2^4 + q*x2^2) + q^(9/2)*x2^4 + > q^(3/2)*(q^2 + 1)*x2^2 + sqrt(q))) > q^(3/2)*x2^2 + sqrt(q) > > Sorry about the noise. > > -- > Regards > Minh Van Nguyen --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] 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 -~----------~----~----~----~------~----~------~--~---
