Re: square roots in Q[r]

• To: mathgroup at smc.vnet.net
• Subject: [mg107790] Re: [mg107764] square roots in Q[r]
• From: Daniel Lichtblau <danl at wolfram.com>
• Date: Fri, 26 Feb 2010 04:05:50 -0500 (EST)
• References: <201002252235.RAA16943@smc.vnet.net>

```Kent Holing wrote:
> Assume that we have f(x) an irreducible polynomial of degree
> n with rational coefficients and f(r) = 0 for r real. Given an
> element u in Q[r], is it an easy way, using mathematica, to check
> if u is a square in Q[r]?
> Kent Holing

One approach, that only answer "if" and not "how", is to use
AlgebraicNumber[] to represent u as a polynomial in r. If the square
root, when hit with RootReduce, has a defining equation of larger degree
than f, then the original algebraic was not a square in that field, else
it is.

Here are examples. I use the same f to produce r. The first is obviously
a square; it is r^2+2*r+1. The second, r^4+r^2+2*r+1, is most likely not
a square. We verify both claims using RootReduce.

In[24]:= i1 =
AlgebraicNumber[
Root[#^5 - 2*#^3 + 11*#^2 - 7*# + 1 &, 3], {1, 2, 1, 0, 0}];
i2 = AlgebraicNumber[
Root[#^5 - 2*#^3 + 11*#^2 - 7*# + 1 &, 3], {1, 2, 1, 0, 3}];

In[27]:= RootReduce[Sqrt[{i1, i2}]]

Out[27]= {Root[20 - 30 #1 + 7 #1^2 + 8 #1^3 - 5 #1^4 + #1^5 &, 3],
Root[-643837 + 689384 #1^2 - 163076 #1^4 - 5071 #1^6 -
117 #1^8 + #1^10 &, 5]}

There is probably a better way to do this but I have yet to figure it
out this evening.

Daniel Lichtblau
Wolfram Research

```

• Prev by Date: Re: Applying Apply
• Next by Date: Re: Functions
• Previous by thread: square roots in Q[r]
• Next by thread: Re: square roots in Q[r]