On Monday, 11 May 2015 06:43:22 UTC+1, Phoenix wrote:
>
>
> Here is an example of a real-rooted polynomial generated by my code:
>
> 1296*x^24 - 20736*x^22 + 129600*x^20 - 393984*x^18 + 584496*x^16 - 
> 362880*x^14 + 62208*x^12
>
>
> This I know to be real-rooted because I tested this in Mathematica.
>
>
well:

sage: p=1296*x^24 - 20736*x^22 + 129600*x^20 - 393984*x^18 + 584496*x^16 - 
362880*x^14 + 62208*x^12

sage: p.roots()

[(-2, 2),

 (2, 2),

 (-sqrt(sqrt(3) + 2), 1),

 (sqrt(sqrt(3) + 2), 1),

 (-sqrt(-sqrt(3) + 2), 1),

 (sqrt(-sqrt(3) + 2), 1),

 (-sqrt(3), 1),

 (sqrt(3), 1),

 (-1, 1),

 (1, 1),
 (0, 12)]
 

if all the monomials have even degree you certainly should replace x^2 by 
y...



> In general my code will generate polynomials of degree ~200-300
>
> Then is there a way to test real-rootedness inside SAGE itseld?
>
> And given some other number (typically as a squareroot of some other integer) 
> can I test if the largest root is below that threshold? 
>
>
>
>
> On Sunday, May 10, 2015 at 3:09:48 PM UTC-5, vdelecroix wrote:
>>
>> On 10/05/15 21:51, Dima Pasechnik wrote: 
>> > On Sunday, 10 May 2015 19:11:27 UTC+1, vdelecroix wrote: 
>> >> On 10/05/15 19:43, Dima Pasechnik wrote: 
>> >>> A random polynomial for sure won't have the properties your 
>> polynomial 
>> >>> probably has (e.g. all roots real). 
>> >> 
>> >> Nope, but the characteristic polynomial of a "random" matrix in 
>> SL(d,R) 
>> >> would ;-) 
>> >> 
>> > 
>> > really? I'd say a random symmetric matrix in M_d(R), yes, surely, but 
>> not 
>> > in SL_d(R)... 
>>
>> Depends on your definition of random. If you pick any non-degenerate 
>> generating set and look at a random product of length > d^2 then yes. 
>>
>> Though, I do not know for the definition of random as "uniform on all 
>> matrices in SL_d(R) with coefficients less than N". 
>>
>> Vincent 
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to