Questions on the functionality operating on polynomials

learn more… | top users | synonyms (1)

0
votes
1answer
49 views

How to force a Range on Fit?

I have 1001 points between {x,-5, 5}. I wanted to fit a polynomial over the data but when i try: Fit[Flatten[data], {0, x, x^2, x^4, x^5, x^6}, x] ... the range ...
0
votes
2answers
69 views

Wrong numerical results from LegendreP

{Cos[Pi/180] // N, LegendreP[46, 0.9998476951563913`], LegendreP[46, Cos[Pi/180]] // N} give ...
0
votes
0answers
76 views
0
votes
1answer
53 views

Solving for Polynomial roots

This simple Solve gives the roots of a quadratic: Solve[a x^2 + b x + c == 0, x] However, if I factor the polynomial in terms ...
4
votes
1answer
124 views

Expand power of a polynomial

I'm very new to Mathematica, so excuse my innocence. I have the following expression: $$ \left( \sum_{n=0}^r \frac{(-1)^n}{n!} y^n \right)^f $$ I would like Mathematica to expand out the expression ...
0
votes
1answer
37 views

Selecting terms on only one variable from a multiple-variable expression

Say I have a polynomial like $x y^2+15x^2 y+x+3y+10$ and I want to obtain, say, only the coefficient in $x$ alone, namely a 1. Using ...
4
votes
6answers
424 views

Easiest way to extract the coefficient of a polynomial

For a term in a polynomial, say 387 a1^4 a2^3 x^3 y^7 z^100 w^364 What is the most efficient way to extract the coefficient of this term, i.e. 387?
0
votes
0answers
34 views

How can I quickly extract a specific coefficient in a Laurent polynomial?

Suppose we have a Laurent polynomial for the following: ...
0
votes
0answers
32 views

ApartSquareFree function

I have a doubt concerning the ApartSquareFree function in Mathematica. Roughly speaking, it is supposed to compute the partial fraction decomposition of a rational function $h/g$ with the denominators ...
4
votes
3answers
237 views

Get the coefficient matrix from a quadratic form

Suppose I have a quadratic form of qf = a x^2 + b y^2 + c z^2 + 2 d x y + 2 e x z + 2 f y z How can I easily to get the symmetric matrix A, such that ...
0
votes
1answer
26 views

How do you collect trigonometric functions in a polynomial?

I have an expression that has various forms of Sin and Cos and I want to collect them specifically so that I can make substitutions. As you can see I cannot figure out how to separate i Cos[theta] ...
1
vote
4answers
91 views

Symbolic calculation on roots of polynomial

Given a polynomial like $x^3 + a_2 x^2 + a_1 x + a_0$ with roots $r_i$, I would like to symbolically compute the coefficients of a polynomial whose roots are $r_i^3 + r_i + 1$. How can I do this in ...
2
votes
1answer
55 views

Crash after long GroebnerBasis calculation

I am running a long computation of a GröbnerBasis and after some hours the kernel crashes. The memory usage increases enormous, and it crashes, when it reaches somewhat 4 GB RES, however it is ...
3
votes
1answer
220 views

Is there a package to find ALL exact roots of a polynomial, if they exist?

There are polynomials with roots not expressible with radicals but expressible as trigonometric or other functions, for which Solve[] only returns ...
3
votes
1answer
84 views

How to efficiently find only the rational roots of a rational complex polynomial?

I need to find all the rational roots of a bunch of high-order polynomials with rational complex coefficients. Is there an efficient way to do this? My best effort on an example polynomial: ...
4
votes
1answer
99 views

Does Solve[] find ALL the exact roots of rational polynomials?

Does Solve[] find ALL the exact roots of rational polynomials? I've done a bunch of tests where I created an expression with some analytic roots, and Solve[] always found them all. But is the ...
0
votes
0answers
27 views

PolynomialExtendedGCD in 2 variables

Consider a field $R$ and the ring $A=R[y]$. Consider two polynomials $g,h\in A[x]$. I want to obtain $d=\gcd(g,h)\in A[x]$ and two polynomials $s,t\in A[x]$ satisfying the Bézout relation: $sg+th=d$. ...
1
vote
1answer
111 views

Factoring an arbitary variable in mathematica

Imagine we have a equation like this gf= 1 + (a3 - a1 x)^2 w1 + (b3 - b2 x)^2 w2 how can I reach the following equation ...
0
votes
1answer
75 views

Why are CoefficientRules and MonomialList so slow?

Why is CoefficientRules so slow in this example (v10.2 on OS X 10.11.4)? ...
2
votes
3answers
80 views

expressing a rising factorial as a polynomial

I have an equation in $x$ as follows: $f(x)=\prod\limits_{j=0}^{k}(j+x)=x(1+x)(2+x)\cdots(k+x)$ I want to express this as a polynomial in $x$, i.e., as $a_0x^0+a_1x^1+\cdots+a_kx^k$ I tried doing ...
4
votes
3answers
126 views

Alternative forms to Table for iterating over replacement rules

I have a multivariate polynomial x. I get coefficients of various monomials using CoefficientRules, which returns a list of ...
2
votes
0answers
61 views

Crash on use of CoefficientList

The Kernel of my Mathematica 10.4 seems to crash on certain use of the CoefficientList command. The line CoefficientList[x + y^2, {x, y}] Produces the matrix $$ ...
5
votes
2answers
236 views

Orthogonalize polynomials with respect to Gagliardo seminorm?

For a function $f\colon [-1,1]\to\mathbb{R}$, the Gagliardo seminorm of $f$ is defined to be $$ |f| = \int_{-1}^1\int_{-1}^1 \frac{(f(x)-f(y))^2}{(x-y)^2}\, \mathrm{d}x\, \mathrm{d} y. $$ Given ...
0
votes
1answer
37 views

How to find the lowest power in multi-variable expression?

I am sorry for asking similar question again, I asked How to find the lowest power of variable in expression? and I got wonderful answer, but I have a more question for multi-variable expression. One ...
2
votes
2answers
90 views

How to find the lowest power of variable in expression?

If I have expression like a1/x +a2/x^2 + a3/x^3 I want to return 1/x^3. In general case, ...
4
votes
2answers
106 views

Efficiently strip off coefficients in front of variables?

I am working with multivariate polynomials and need a very efficient way to decompose monomials into coefficients and pure monomials. for instance consider variables ...
2
votes
0answers
31 views

Solving for coefficients of a polynomial? [closed]

I'm sure I'm doing something wrong here, but I'm damned if I can figure out what. I'm trying to find a cubic function that passes through (0, 270), (1, 312), (2,230), (3,0), but the first way I tried ...
1
vote
0answers
33 views

Rearrange generic expression into a quartic polynomial

I'm rather new to mathematica. I'm attempting to express: $$\sqrt{x} = \frac{\gamma \sqrt{y}}{-i(\Delta - g \sqrt{1 - (\frac{\tau}{4lhx})^2})+\frac{\gamma}{2}}$$ as $$0 = Ax^4 + Bx^3 + Cx^2 + Dx + ...
3
votes
1answer
92 views

Can Mathematica factor a polynomial over an algebraic number field?

If I input: Factor[x^2 + x + 1, Extension -> Sqrt[-3]] Mathematica returns: ...
4
votes
1answer
77 views

How many solutions do you get from simultaneous polynomial equations?

I have the following four simultaneous polynomial equations ...
3
votes
2answers
184 views

the exact real solutions of cubic polynomial?

Such as the equation:$x^3-5 x+1=0$, according to the cubic discriminant we know it has three real solutions. We can also find the exact expressions of them from Mathematical handbook. However, by MMA ...
2
votes
1answer
58 views

Expanding rational functions with minimal denominator

I'm working with rational functions and I want to be able to put them in a specific form and then get a list of terms in which the numerators are monomials. Take for example ...
4
votes
0answers
45 views

Using Mathematica to find an alternative continued fraction for $\zeta(5)$

Given the Riemann zeta function $\zeta(n)$. I. $x=\zeta(3)$ Using Euler's continued fraction formula, we can form $\zeta(3)$'s cfrac as, $$Ax+B = \cfrac{1}{v_1 - \cfrac{1^6}{v_2 - ...
3
votes
0answers
70 views

Change of basis of polynomials

Suppose I have a favourite basis for polynomials in $x_1,\dotsc,x_n$, say non-symmetric Macdonald polynomials to be specific. I can easily compute these, and thus the change-of-basis matrix that takes ...
0
votes
0answers
28 views

Obtain a SymmetricReduction of a bivariate (symmetric) function given in Piecewise form

I would like to re-express the following bivariate (symmetric) function (defined over the unit square) ...
2
votes
0answers
32 views

Polynomial kernel expansion

I am trying to calculate the polynomial kernel expansion using Mathematica. I have tried the Expand and Simplify functions with ...
5
votes
1answer
40 views

How to order terms in a polynomial in two variables negative lexicographically

I have several polynomials in variables p and q, each term in which has total degree n, a constant. I would like to output the polynomial in increasing powers of p (and hence decreasing powers of q), ...
6
votes
5answers
215 views

Create a list of all possible multivariate monomials of a certain order

Given variables x[i] for i=1,2,...,n I would like to create a list of all possible multivariate monomials of order ...
1
vote
0answers
43 views

How can I use x->Root outputs from Solve? [duplicate]

Do not understand the meaning of the output given by Mathematica to this equation: ...
3
votes
1answer
57 views

How to gather terms into Elementary Symmetric Polynomials?

I would like to gather the terms of this polynomial (and much higher order ones): $$q = 1-3 c+c^2+p[1]-2 c p[1]+p[2]-2 c p[2]+p[1] p[2]-c p[1] p[2]+p[3]-2 c p[3]+p[1] p[3]-c p[1] p[3]+p[2] p[3]-c ...
2
votes
2answers
69 views

How do I find a polynomial in a field?

If I have a polynomial: $$f(x) = c_0 x^0 + c_1 x^1 + c_2 x^2 + \dots + c_n x^n$$ How can I find the polynomial, modulo a prime number $p$? In other words, I want to take all of the coefficients ...
4
votes
1answer
100 views

How to equate coefficient of two polynomials? [closed]

Given two polynomials, How can I equate coefficients of them in Mathematica? For instance a + b x + (c+d) x^2 + (e+f)x^3 == 0
1
vote
2answers
81 views

What's the easiest way to remove overall factors from polynomials?

I have code that outputs polynomials (in #1) such as the ones below (note that the trailing Function character ...
2
votes
1answer
105 views

How do I find the analytical roots of this polynomial? [closed]

I want to find the analytical roots of this polynomial - x - a^3*x*(a^2*x*(a*x*(x - 1) + 1)*(x - 1) + 1)*(a*x*(x - 1) + 1)*(x - 1) ...
2
votes
3answers
81 views

How to set/adjust Precision for an iterative calculation?

How should I restructure this code? I generate a high-order polynomial poly with integer coefficients, then find roots and divide them out of poly one at a time. ...
0
votes
2answers
108 views

Finding all complex polynomial roots in a specified range efficiently

I need to find the roots of a rational polynomial that are near i. In the following code, I try that two different ways. First, I use a constraint to only find roots in the right region. Second, I ...
3
votes
1answer
80 views

How to prevent fractions in polynomial quotients?

(This was a hard question to give a succinct title to, so feel free to edit it.) When I divide polynomials, I would like Mathematica to NOT create negative powers of variables. For example: ...
3
votes
6answers
302 views

Avoiding a For-loop when finding the solution to a set of polynomial equations

There are several examples and questions regarding Map, but I couldn't find what I need. This is a minimal working example. I have two functions $\qquad ...
3
votes
2answers
77 views

Workaround for issues with Coefficient in 10.0.2

Coefficient is Mathematica 10.0.x seems to be affected by a bug. While in 10.3.1 the following ...