Ask Your Question
0

roots of third degree polynomial

asked 2019-06-09 16:56:26 +0100

santoshi gravatar image

roots of polynomial x^3+7x+25 over field F(37)

edit retag flag offensive close merge delete

Comments

What have you tried?

John Palmieri gravatar imageJohn Palmieri ( 2019-06-09 20:02:56 +0100 )edit

Homework ?

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2019-06-10 20:05:01 +0100 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-06-13 15:46:30 +0100

dan_fulea gravatar image

It may be well a homework, but maybe one should give the solution, since part of it is knowing the right method to be used in the right context. The following initializes the polynomial ring $\Bbb F_{37}[X]$ in the transcendental variable $X$, an other one as the $x$ set by default, and maybe not the $x$ in the OP. Then having the polynomial over the right field we simply ask for its roots. A second solution would be to use a "polynomial expression" using the variable x, which exists by default (or create any other), then use the method roots also specifying as optional parameter the ring for the roots.

sage: var('x');
sage: R.<X> = PolynomialRing(GF(37))
sage: (x^3 + 7*x + 25).roots(ring=GF(37))
[(5, 1)]
sage: (x^3 + 7*x + 25).roots(ring=GF(37), multiplicities=False)
[5]
sage: (X^3 + 7*X + 25).roots()
[(5, 1)]
sage: (X^3 + 7*X + 25).roots(multiplicities=False)
[5]
edit flag offensive delete link more

Comments

1

With a field of size 37, you can also use brute force: f = X^3 + 7*X + 25 and then [y for y in GF(37) if f(y) == 0].

John Palmieri gravatar imageJohn Palmieri ( 2019-06-13 19:55:37 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-06-09 16:56:26 +0100

Seen: 375 times

Last updated: Jun 13 '19