# roots of polynomial

f= z^3 + (3*a + 4)*z^2 + 3*z + 3*a + 2 # z is variable
f1=f.roots()
[(3*a + 1, 1), (2*a, 2)]# what is 1 and 2 represent in the bracket

roots of polynomial

*a + 4)*z^2 + 3*z + 3*a + 2 # z is variable
f1=f.roots()
[(3*a + 1, 1), (2*a, 2)]# what is 1 and 2 represent in the bracket

1

`f.factor()`

and you will see.

0

Whenever in doubt about the output of a function, use `help`

or `?``
to check its documentation.

Here, you can do:

```
sage: help(f.roots)
sage: f.roots?
```

and this will display the documentation for `f.roots`

,
which documents that it returns pairs (root, multiplicity),
and explains how to use an optional argument to not
display the mutiplicities.

To skip the multiplicities:

```
f.roots(multiplicities=False)
```

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

Asked: ** 2019-06-09 07:17:00 +0200 **

Seen: **139 times**

Last updated: **Jun 10 '19**

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.

To display inline code, like

`expr = x*y*z`

, use backticks.For instance, compare the input and output without backticks:

to the ones with backticks:

Notice how in one case the

`*`

are preserved, while in the other case they just make the y italics.To display blocks of code or error messages, skip a line above and below, and do one of the following (all give the same result):

For instance, typing

produces:

Could you edit your question to take these points into account?

Please also keep that in mind for future questions.

It makes the code display correctly, and makes it possible to copy and paste.

In that way it helps other users who try to answer your questions.

Please include complete code that allows to reproduce the input and output in the question.

For example, you probably defined

`a`

in some way, which you did not provide.