# Tagged Questions

Questions on the functionality operating on polynomials

6answers
8k views

### Finding real roots of negative numbers (for example, $\sqrt[3]{-8}$)

Say I want to quickly calculate $\sqrt[3]{-8}$, to which the most obvious solution is $-2$. When I input $\sqrt[3]{-8}$ or Power[-8, 3^-1], Mathematica gives the ...
3answers
1k views

### Funny behaviour when plotting a polynomial of high degree and large coefficients

I am trying to plot a polynomial of degree $29$ on the domain $[0,1]$, with fairly large coefficients: ...
5answers
2k views

### How do I reassign canonical ordering of symbols?

I have a big polynomial that evaluates to: $$A^2 e^2 \phi ^- \phi ^++A e \phi ^- \phi ^+ c_{2 w} g_Z+\frac{1}{2} A e g h W^- \phi ^+ +\ll13\gg,$$ which is supposed to represent some terms in the ...
4answers
1k views

### How to keep Collect[] result in order?

For example, Collect[(1 + x + Cos[s] x^2)^3, x] gives the result ...
1answer
204 views

### Undocumented fourth parameter of Collect; how long has it been there?

While tinkering with How to get a list of monomials of a polynomial without coefficients? on a whim I tried a fourth argument in Collect and found: ...
4answers
648 views

### Decomposing a matrix with polynomial elements into a polynomial with matrix coefficients

Let's say I have a matrix, $\mathbf{M}$, that is polynomially dependent on a single variable, such as M = {{15 + a^2, a + 5 a^2}, {a - 5 a^2, 2}} and I want to ...
3answers
2k views

### Computing the genus of an algebraic curve

How-to compute the genus of an algebraic curve in Mathematica ? In my case the algebraic curve is explicitly defined by a polynomial.
2answers
349 views

### What are Root objects with multiple polynomials?

In Mathematica 9 a new flavor of Root object with multiple polynomials was introduced. For example, ...
4answers
3k views

### Is there a way to Collect[] for more than one symbol?

Oftentimes you find yourself looking for polynomials in multiple variables. Consider the following expression: a(x - y)^3 + b(x - y) + c(x - y) + d as you can ...
1answer
179 views

### What's going on here? Some kind of rationalization “under the covers”?

Observe: eq = (.25 a + .5 b + .25 c); CoefficientRules[eq^2] CoefficientRules[eq^2 // Expand] results in {{2, 0, 0} -> 1/16, {1, 1, 0} -> 1/4, {1, 0, 1} ...
7answers
6k views

### How do I replace a variable in a polynomial?

How do I substitue z^2->x in the following polynomial z^4+z^2+4? z^4+z^2+4 /. z^2->x ...
2answers
738 views

### Factorizing polynomials over fields other than $\mathbb{C}$

I'd like to take a polynomial in $\mathbb{Z}_5[x]$ of the form $ax^2+bx+c$ and factor it into irreducible polynomials. For example: Input... x^2+4 Output... <...
4answers
2k views

### How do I find the degree of a multivariable polynomial automatically?

I have a very simple question which appears not to have already been answered on this forum. Is there built-in functionality that returns the degree of a multivariable polynomial? For example if the ...
1answer
339 views

### ToNumberField won't recognize Root as an explicit algebraic number

Bug fixed in 10.0.0 In Mathematica 9.0.1, it appears that ToNumberField will not always recognize a Root object as an ...
4answers
386 views

### How to replace every possible $A+B$ and $AB$ in expansion of $(A+B)^{10}-A^{10}-B^{10}$ with $x$ and $y$, respectively?

I would like to replace every possible $A+B$ and $AB$ in expansion of $(A+B)^{10}-A^{10}-B^{10}$ with $x$ and $y$, respectively. How to do it with the simplest code in Mathematica? For example, \...
9answers
2k views

### Defining a function that completes the square given a quadratic polynomial expression

How can I write a function that would complete the square in a quadratic polynomial expression such that, for example, CompleteTheSquare[5 x^2 + 27 x - 5, x] ...
2answers
652 views

### Surprises simplifying simple polynomials

I came across some somewhat surprising behavior of Simplify today, on something very simple. Let's take two cubic polynomials that we know have the same value: <...
4answers
9k views

### Factoring polynomials to factors involving complex coefficients

I've run into some problems using Factor on polynomials with complex coefficient factors. Reading the documentation it looks like it only factors over the ...
1answer
739 views

2answers
317 views

### How can I compute the representation matrices of a point group under given basis functions?

Take the $C_{3v}$ point group for example: ...
1answer
353 views

### Does NRoots own an abstract counterpart? If not, can we write one?

We know when solving linear algebra equations, despite its abstract syntax, LinearSolve is much faster compared to Solve: ...
3answers
400 views

### Bug: Wrong results from NSolve on coupled polynomials. WorkingPrecision->Automatic fails

OP UPDATE: I received an email from WR on 1-18-2016: "...It does appear that the NSolve function is not behaving properly in this case and I have forwarded an incident report to our developers with ...
1answer
852 views

### Find roots of polynomial in field extension $GF(2^n)$?

How can I find roots of polynomial in extension field $GF(2^n)$?
6answers
834 views

### Can Mathematica tell me if a polynomial has all real roots?

I am trying on this polynomial, ...
2answers
278 views

2answers
315 views

### On the definition of the associated Legendre polynomials

Mathematica computes for n = 1,2,...: (-1)^n (LegendreP[n, -1, -3]/Sqrt[2]) -I, -3 I, -11 I, -45 I, -197 I, ... Maple ...
4answers
151 views

### Unexpected behavior using FromDigits to reconstruct polynomial

I have an issue with the reconstruction of a polynomial using FromDigits. The documentation of the function CoefficientList says: Fold the operation for multivariate polynomials: ...
1answer
221 views

### Trouble with polynomial multiplication

Bug introduced in 10.1.0 and fixed in 10.4.0 ...
1answer
651 views

### How can I plot a Chebyshev spiral?

The Chebyshev polynomials T_n of the first kind are a certain set of orthogonal polynomials. They can be defined by T_n(cos(x))=cos(nx), the first of them are T_0(x) = 1 T_1(x) = x T_2(x) = ...
1answer
705 views

### How to express the original ideal elements in the Groebner basis?

Suppose I call GroebnerBasis[{f1, f2, ...}, {x1,x2, ...}] The output is a list {g1,g2,...} For each $g_j$, there should be ...
1answer
239 views

### Decomposition of a semialgebraic set into connected components

Is there any built-in function for doing decomposition of a semialgebraic set into connected components? The only way I now can think of is to use ...
1answer
237 views

### Speed up MinimalPolynomial

My Mathematica code runs slowly MinimalPolynomial[Sqrt[2] + Sqrt[3]+ Sqrt[5]+ Sqrt[7]+ Sqrt[11]+ Sqrt[13], x] runs slowly, but the Maple version ...
6answers
3k views

### Series expansion in terms of Hermite polynomials

I am trying to expand a polynomial in terms of orthogonal polynomials (in my case, Hermite). Maple has a nice built-in function for this, ChangeBasis. Is there a ...
3answers
413 views

### Generating a polynomial that's accurate to within an error of no more than 1/10^5

I'm currently stuck on a question for class that asks... "Find a polynomial p[x] that you can use to calculate 6 ArcTan[x] to ...
5answers
233 views

### Lowering the degree of an polynomial with an assumption that the polynomial has a factor x^2+ax+b

Let's assume $x^{10}+x^5+1$ has a factor $x^2+ax+b$ Then, If $x^2=-ax-b$, $x^{10}+x^5+1 =0$. If we successively apply $x^2=-ax-b$ to $x^{10}+x^5+1$, we can make $x^{10}+x^5+1$ to degree 1, ...
3answers
229 views

### Interval calculations in wolfram mathematica

If x = Interval[-100,100], then obviously x^2 + x = Interval[-0.25,10100], because as we know, ...