[sage-support] Re: question about solve() function

2009-01-10 Thread Sand Wraith

thank you!

On Jan 9, 7:27 pm, William Stein wst...@gmail.com wrote:
 On Fri, Jan 9, 2009 at 3:49 AM, Sand Wraith omegat...@gmail.com wrote:

  Hi!

  Is it possible to get order of root of equation? For example equation:

  f(x)=(x+1)^2
  and it's solution solve(f,x) will be [x == -1], but this is not
  perfect clear, because x==-1 have second order. This equation actually
  must have two same roots: [x == -1,x == -1].

 Use the roots command:

 sage: f = (x + 1)^2
 sage: f.roots()
 [(-1, 2)]

 The 2 is the multiplicity.

 William
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[sage-support] Re: question about solve() function

2009-01-09 Thread William Stein

On Fri, Jan 9, 2009 at 3:49 AM, Sand Wraith omegat...@gmail.com wrote:

 Hi!

 Is it possible to get order of root of equation? For example equation:

 f(x)=(x+1)^2
 and it's solution solve(f,x) will be [x == -1], but this is not
 perfect clear, because x==-1 have second order. This equation actually
 must have two same roots: [x == -1,x == -1].

Use the roots command:

sage: f = (x + 1)^2
sage: f.roots()
[(-1, 2)]

The 2 is the multiplicity.

William

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---