Questions on the functionality operating on polynomials

learn more… | top users | synonyms (1)

5
votes
0answers
228 views

Computing Ehrhart's polynomial for a convex polytope

Is there a Mathematica implementation for computing the Ehrhart polynomial of a convex polytope which is specified either by its vertices or by a set of inequalities? I am interested in knowing this ...
4
votes
3answers
295 views

Finding parameters making real part of eigenvalues vanish

I have the following $\;3\times3$ matrix: $\left( \begin{array}{ccc} 0.04 -0.4 b & 0 & 0.04 -0.4 b \\ 0 & -0.08-1.2 b & -0.06-0.9 b \\ 1.04 -0.4 b & 2.08 -0.8 b & 0 ...
4
votes
1answer
188 views

Factoring a two variable polynomial in a special way

Let $$f=x^9-x^6+4x^5y+2x^3y^2-y^4$$ I would like to factorize $f$ into form: $$(y-F_1(x))\cdots(y-F_k(x))$$ over complex numbers. How can I do it with Mathematica?
4
votes
2answers
153 views

HornerForm of polynomials in terms of E^(i x)

I want to know how to get the HornerForm of the following expression in terms of E^(I x): ...
4
votes
2answers
877 views

How to define a polynomial/function from an array of coefficients?

I have the coefficients of my desired polynomial in an array CoefArr (I'm new to mathematica, so I think of everything as arrays, it is actually a list I believe) starting with the constant at index ...
4
votes
2answers
724 views

expanding a polynomial and collecting coefficients

I'm trying to expand the following polynomial ...
4
votes
2answers
158 views

Dimension of an algebraic variety

I would like to compute, using Groebner bases, the dimension of the variety defined by a set of polynomials in several variables. In the wikipedia page the method is described, and an implementation ...
4
votes
2answers
487 views

Inverse of a polynomial in a polynomial ring

Let $N$ be a prime, and $q$ be a positive integer. Given a polynomial $f(x)$ in $R = \mathbb Z[x]/(x^N-1)$, I want to find another polynomial $f_q(x)$ in $R_q = \mathbb Z_q[x]/(x^N-1)$, such that ...
4
votes
2answers
101 views

Piecewise Polynomial Interpolation

Given some data pairs $(x_i,y_i)$, with $i=0,...,m$, and a degree $r$, I wish to build a piecewise polynomial function to interpolate these data. That interpolation should be continuous, and, on every ...
4
votes
1answer
165 views

Polynomial GCD over a ring (with composite characteristic)

I'd like to implement the "Franklin-Reiter Related Message Attack" (see section 4.3 of Boneh's paper). As part of the implementation, I require to compute the GCD of two polynomials over ...
4
votes
1answer
241 views

Implementation of the Polynomial Chinese Remainder Theorem

I would like an implementation of the Chinese Remainder Theorem for polynomials in $\mathbb{Z}[x]$, that is, a function ...
4
votes
3answers
248 views

Creating a function with integral zeroes of the 0th, 1st, and 2nd derivatives

I would like to be able to randomly generate functions, each of which satisfies $f : [-10, 10] \rightarrow [-10, 10]$ All the zeroes, critical points, and inflection points have an integral ...
4
votes
2answers
205 views

Why doesn't Roots work on a certain quartic polynomial equation?

In everything that follows I am using Roots to get the solutions to the equations. I start off with this equation: $$ \frac{A}{3}x^4 - x^2 + 2ax - b^2 = 0$$ Now ...
4
votes
2answers
205 views

Better use of Mathematica's PolynomialReduce[]?

I've been using scPhiDecomp[expr_]:= PolynomialReduce[expr, {x^2-y^2,2 x y}, {x,y}] which works great on ...
4
votes
1answer
85 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 ...
4
votes
1answer
95 views

How to check if a Polynomial has a specific form

I have a polynomial F[x], for example F[x] = 1 - 2x + x^2. I wanna check whether F[x] has the form of ...
4
votes
1answer
110 views

Unexpected result for Coefficient[]

Is this just me being stupid, or is this a known bug in Mathematica? Coefficient[2 x + 2 y, x + y] gives 0, while ...
4
votes
2answers
135 views

Adapting CoefficientList (and the related functions) to work with Laurent polynomials

Is there a slick way to make CoefficientList (and the other similar functions, CoefficientRules etc) work for Laurent polynomials (i.e. where negative exponents can occur), if I don't know a priori ...
4
votes
1answer
132 views

How can I prevent a polynomial from being simplified?

I'm having a problem with polynomials. Let's say I have a polynomial "2x^2 - 5x + 6 - 3x^2" .. How can I check that this expression is not simplified ? Additionally, I would like to locate the ...
3
votes
6answers
211 views

Collecting terms of even exponents

Say I've got a polynomial of $4$ or $5$ variables (we'll say $d_1$, $d_2$, $d_3$, and $d_4$). How would you collect the terms where each $d$ is raised to an even power? It collects the terms of the ...
3
votes
2answers
172 views

Implementation of a recurrence relation for the polynomials appearing in the large order asymptotics of the Bessel functions

I would like to implement the recurrence relation for the polynomials $U_n(x)$ appearing in the large order asymptotics of the Bessel functions. The recurrence in question is ...
3
votes
1answer
165 views

Symbolic Integration of Special Functions

Sorry in advance if this formatting comes out strange, this is my first question! I can't find a way to integrate, e.g., a function of the Hermite polynomials for general (still integer) order. For ...
3
votes
2answers
101 views

Number of complex roots for the system of polynomials

I have a system of algebraic equations. For example: $$ \left\{ \begin{aligned} x^2 y + 2 x y + 2 &= 0,\\ y^3 + 2 x + 1 &= 0. \end{aligned} \right. $$ (In my problem the system contains 16 ...
3
votes
2answers
256 views

Tweaking Solve for systems of polynomial equations

I am trying to solve the following system of $6$ quadratic equations in $6$ variables: ...
3
votes
3answers
145 views

Multivariate Polynomial Manipulation

I have a large homogenous multivariate polynomial in, say, 5 variables $a,b,c,d,e$. As an example take the polynomial $$a^4+2abcd+a^2 b^2+e^4+cde^2.$$ Now I would like to replace $k$-th power of any ...
3
votes
1answer
311 views

Small Issue with Chebyshev Derivative Appoximation

I am trying to get approximate the derivative of a function from its Chebyshev expansion. I start out with the following random function ...
3
votes
3answers
181 views

Write a function using pattern test to test whether the input is polynomial and print error message if not

I am doing this which is supposed to be an easy problem and which I think my code should be correct but for some reasons it is not working. May anyone help correcting my mistakes? How should I write ...
3
votes
1answer
83 views

Rewrite an expression as a sum of $SU(2)$ characters?

I have an expression of the form $$q^{-3/2} t^{-7/2}[4qt^2(t + q t^2) + t^2 (q + t) (1 + q t (1 + q t))],$$ I can factor it and write it as $4((qt)^{1/2} + (qt)^{-1/2}) + (qt+1 + ...
3
votes
1answer
72 views

How to order lexicographically the monomers of a parametrized polynomial?

I want to order lexicographically the monomials in a "parametrized polynomial", i.e. polynomials whose "symbolic bits" may be either "variables" or "parameters". For example: ...
3
votes
1answer
409 views

How to do the polynomial stuff over finite fields extensions fast?

This question is raised from the problem of package FiniteFields being very slow (please, see the corresponding question): I have had an evidence that Mathematica ...
3
votes
1answer
259 views

Transform recursion for coefficients into differential equation for generating function

Assume, one is given a linear recursion with polynomial coefficients for a sequence $(a_i)_i$, such as a[i] == i a[i-1] I would like to convert this recursion ...
3
votes
0answers
123 views

Discriminant of Characteristic Polynomial

I'm doing a calculation which finds the characteristic polynomial of a matrix with rather complex entries and then determines the discriminant of that polynomial. For smaller matrices up to around 7x7 ...
2
votes
4answers
254 views

How to compute MIN$(A(x), B(x))$

I have two polynomials: $\;A(x) = \sum a_i\;x^i$, $\quad B(x) = \sum b_i\;x^i$. Given $A(x)$, $B(x)$, I want to compute $\;C(x) = $MIN$(A(x), B(x)) = c_i\;x^i$ where $c_i = $MIN$(a_i, b_i)$. How can ...
2
votes
3answers
265 views

Is it possible to use Composition for polynomial composition?

I want to do this: $P = (x^3+x)$ $Q = (x^2+1)$ $P \circ Q = P \circ (x^2+1) = (x^2+1)^3+(x^2+1) = x^6+3x^4+4x^2+2$ I used Composition for testing if that could ...
2
votes
4answers
323 views

Solving a polynomial equation with a condition of equality on roots

Let the following equation have two equal roots: f[x_] := x^3 - p x^2 + q x - r And I want to find out what the three roots are. Not knowing how to put this ...
2
votes
4answers
226 views

Working with symmetric polynomials

I have a question related to working with symmetric polynomials in some variables. Let us say, I have an expression ...
2
votes
4answers
140 views

Get the first positive coefficient in polynomial?

I have Polynomial $F(x) = \sum_{i \leq n}{a_ix^i}$. How to get the first $a_i > 0$? Thanks,
2
votes
1answer
242 views

How to get the coefficient list

polynomial=-x^4+2 b x^3+(b^2-c^2+2 c) x^2+(2 b c-2 c d) x+c^2-d^2 This is good CoefficientList[polynomial, x] But how to ...
2
votes
2answers
179 views

Generating complete lists of polynomials

I would like to generate a list of all $3$-variable Laurent polynomials with non-negative integer coefficients using a looping construct so that I can, one-by-one, check them for specific ...
2
votes
3answers
288 views

How can I reorder the factors in the terms of a polynomial?

How can I reorder the factors in the terms of a polynomial? Consider ...
2
votes
2answers
189 views

Evaluating Polynomials at Grid Points

I am continuing my quest on B-splines. The code below builds a 5x5 matrix out of B-splines, using the BSplineBasis[] routine. I now want to evaluate the polynomials that are stored in each matrix ...
2
votes
2answers
512 views

Calculating Taylor polynomial of an implicit function given by an equation

I'd like to write a procedure that will take an equation: F(x,y,z) = 0 chosen variable: x a point: ...
2
votes
3answers
244 views

Symbolic manipulation of functional form

I have a functional polynomial expression of the form: ...
2
votes
1answer
142 views

Implementation of Decompose

I'm curious as to how Decompose works so I decided to use Trace with the option ...
2
votes
2answers
75 views

Rounding only coefficients

does Mathematica have built in functionality to round the coefficients of a polynomial to a certain accuracy. Say, we do Print[0.2134320980x^2+0.0023432x] Can ...
2
votes
2answers
238 views

How to find solutions that yield of root of unity?

I have a polynomial with coefficients that are integer polynomials in another (complex) variable. For example: 1 + (1 - v^2) #1 + (-3 - v^2) #1^2 + #1^3 & I ...
2
votes
1answer
204 views

Is there any way to force Mathematica to collect a symbol in a polynomial?

Let's say that I have a polynomial like this: a + b + c Is there any way that I can get Mathematica to transform it to: ...
2
votes
2answers
421 views
2
votes
2answers
58 views

Convert polynomial to Chebyshev

I want to convert a polynomial in "standard form" to Chebyshev form. Here's one way to do it: ...
2
votes
1answer
222 views

Formatting results of a polynomial long division

I am teaching polynomial long division to my high school students. Not a pleasant topic to have to cover. I went to use Wolfram|Alpha and obviously, internally, they have a really elegant way to ...