Is this what you mean? sage: R.<x> = PolynomialRing(ZZ,"x") sage: f = 2*x**2-x sage: f.factor() x * (2*x - 1)
On Tue, Jun 16, 2009 at 11:12 AM, Mikie<thephantom6...@hotmail.com> wrote: > > When I use Sage to factor lets say 2*x**2-x it factors the 2 out and > leaves a fraction in the expression. I would like to have it not > factor the polynomial unless their is an integer factor. By the way I > have created a Twisted API that works. > > On Jun 15, 4:51 pm, William Stein <wst...@gmail.com> wrote: >> On Mon, Jun 15, 2009 at 10:54 PM, Mikie<thephantom6...@hotmail.com> wrote: >> >> > Is there anyway to get the factor function to factor an expression >> > without using QQ['x'].0? I want just integer factors. >> >> I don't understand what you mean by "integer factors"? Can you give an >> example? >> >> > I have created a Twisted server using Sage to do calculations from a >> > form. >> > When I put QQ['x'].0 into the sage script I get a systax on the >> > period. It does work from the command line. >> > Thanx >> >> -- >> William Stein >> Associate Professor of Mathematics >> University of Washingtonhttp://wstein.org > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---