# how to check if a polynom is a square

I'ld like to put a condition in a programm that looks like:

"if Q is a square, then ..."

Q being a polynom (in GF(p)).

How can I do that ?

how to check if a polynom is a square

I'ld like to put a condition in a programm that looks like:

"if Q is a square, then ..."

Q being a polynom (in GF(p)).

How can I do that ?

add a comment

0

First of all, there is a function to check if a polynomial is a square

```
sage: x = polygen(GF(7))
sage: p = 2*x^2 + 6*x + 1
sage: p.is_square()
True
```

Then you need to learn about conditional statements in Python (`if`

/`elif`

/`else`

): https://docs.python.org/3/tutorial/co...

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

Asked: ** 2020-04-17 23:32:38 +0100 **

Seen: **247 times**

Last updated: **Apr 18 '20**

obtaining all numerical roots of a function in an interval

Numerically find all roots in an interval

Inaccurate numerical result for roots of square equation

Finding roots of complex functions

sage server in other than apache document root

Need correct root finding over the p-adics

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.