[sage-support] Re: Can I factor x^2 - 2 and get (x-sqrt(2))*(x+sqrt(2)) ?

2010-03-10 Thread John H Palmieri
On Mar 10, 3:23 am, slabbe wrote: > Hi, > > A friend of mine wants to factorize symbolicly x^2 - 2 : > > sage: p = x^2 - 2 > sage: p.factor() > x^2 - 2 > > Apparently p.roots() gives almost what he wants : > > sage: p.roots() > [(-sqrt(2), 1), (sqrt(2), 1)] Or sage: p.roots(multiplicities=False)

Re: [sage-support] Re: Can I factor x^2 - 2 and get (x-sqrt(2))*(x+sqrt(2)) ?

2010-03-10 Thread Robert Bradshaw
On Mar 10, 2010, at 10:15 AM, John H Palmieri wrote: On Mar 10, 3:23 am, slabbe wrote: Hi, A friend of mine wants to factorize symbolicly x^2 - 2 : sage: p = x^2 - 2 sage: p.factor() x^2 - 2 Apparently p.roots() gives almost what he wants : sage: p.roots() [(-sqrt(2), 1), (sqrt(2), 1)] O