is there a way of doing what uve done except considering the pair of
polynomials
x^2+a1*x+a0
x^2+b1*x+b0
where a0,a1,b0,b1 lie in QQ but their exact values r not known
and al is a root of the first and be is a root of the second?




On Sun, Oct 24, 2010 at 5:22 PM, Yann <[email protected]> wrote:

> On Oct 23, 9:39 pm, andrew ewart <[email protected]> wrote:
> > if alpha is a root of x^2+a_1*x+a_0 and beta is a root of x^2+b_1*x
> > +b_0 (both polynomials r in QQ), then how do i construct code such
> > that it can tell me the minimum polynomials of the following roots
> > alpha+beta
> > and
> > alpha*beta
>
> Hi, I'm not sure if I understood your question, but this might be what
> you want:
>
> sage: R.<x> = QQbar[]
> sage: p = 1/7*x^2-x+4
> sage: q = x^2+x+1/3
> sage: p.roots()
> [(3.500000000000000? - 3.968626966596886?*I, 1), (3.500000000000000? +
> 3.968626966596886?*I, 1)]
> sage: a = p.roots()[0][0]
> sage: b = q.roots()[0][0]
> sage: (a+b).minpoly()
> x^4 - 12*x^3 + 257/3*x^2 - 298*x + 5503/9
> sage: (a*b).minpoly()
> x^4 + 7*x^3 + 77/3*x^2 + 196/3*x + 784/9
>
> I hope this helps.
>
>      Yann
>
> --
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<sage-support%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/sage-support
> URL: http://www.sagemath.org
>

-- 
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
URL: http://www.sagemath.org

Reply via email to