Questions on the functionality operating on polynomials
2
votes
3answers
60 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 ...
4
votes
1answer
85 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
...
7
votes
1answer
133 views
Writing an expression as sum of squares of expressions
Suppose we have a symmetric homogeneous polynomial expression $P$ in $X=(x_1,\cdots, x_n)$. I want to check whether there are functions $g(X)$ so that $P$ is of the form $\sum _{1\le i<j\le n} ...
0
votes
1answer
44 views
Solving one equation, then inputting the values into another for NonlinearModelFit
Considering the equation
a*x^3 + a*x^2 + x + b == 0
I'm looking to find the best value for a and ...
4
votes
2answers
145 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
...
0
votes
3answers
111 views
List of Tribonacci Polynomials with Mathematica? [duplicate]
I want to list top ten of Tribonacci polynomials. I have following algorithm, but it doesnt work.
...
1
vote
3answers
133 views
The plot of roots of polynomials
I have polynomial equation like Tribonacci Polynomials for example: $T_3(x)=x^4+x$.
After finding the roots of this polynomial, I want to show these roots in the complex plane.
I have tried lots of ...
0
votes
1answer
54 views
Table of Polynomials [closed]
I made a function
makePolynomial
that creates a random Polynomial of a certain degree, e.g.
2+T+3T^2+8T^3-5T^4...
now I ...
11
votes
2answers
106 views
What are Root objects with multiple polynomials?
In Mathematica 9 a new flavor of Root object with multiple polynomials was introduced. For example,
...
3
votes
2answers
95 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 ...
2
votes
3answers
157 views
2
votes
2answers
89 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 ...
6
votes
0answers
61 views
Apart may use Padé method: what's that?
How does Apart work? The page tutorial/SomeNotesOnInternalImplementation#7441 says, "Apart ...
5
votes
5answers
352 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 ...
2
votes
2answers
192 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: ...
6
votes
4answers
156 views
How to collect terms with positive powers in polynomial
I am trying to collect all terms with non-negative powers of $x$ in polynomials like
$\frac{1}{x^2}\left(a x^2+x^{\pi }+x+z\right)^2$
First expand the polynomial
...
3
votes
7answers
234 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]
...
2
votes
1answer
106 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
0answers
107 views
Negative power instead of fraction
Solve returns a solution in the form {{x->y/a^2 + y^2/a^7}}.
Since I want to process the input (with another program) in terms of Laurent polynomials, I would ...
1
vote
1answer
51 views
Factorize and find the null space of a polynomial in several variables [duplicate]
I've been asked to factor the following polynomial:
poly = 6 x^3 + x^2 y - 11 xy^2 - 6 y^3 - 5 x^2 z + 11 xyz + 11 y^2 z - 2 xz^2 - 6 yz^2 + z^3
And to solve for z so that poly = 0
Can anyone help ...
1
vote
3answers
138 views
Convert coefficients of polynomials into a matrix
I have several sets of 5 polynomials of the form:
...
4
votes
0answers
102 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 ...
0
votes
1answer
82 views
Integrating polynomial functions over polytopes with an add-on package
There is a Mathematica package to evaluate integrals over polytopes:
http://library.wolfram.com/infocenter/Books/3652/
In the documentation (Functions.nb file) I ...
0
votes
3answers
162 views
How to evaluate all the essentially distinct polynomials in 4 variables over $F_2$ on points of $F_2 ^ 4$
I am a beginner with Mathematica. For my research purpose I would like to get a list of all the polynomials in $F_2[x,y,z,w]$ and for each polynomial I would like to know the result that it gives then ...
-1
votes
1answer
64 views
FindFit and Integration errors
First off, appologies for what may sound like a newbie question, as I am very new to using Mathematica.
I am trying to find a way to get Mathematica to give me an expression that would describe the ...
5
votes
1answer
203 views
How do I get a two-term polynomial with a leading negative sign to display in the correct (i.e. textbook) order?
The first three expressions evaluate as expected and the polynomial is displayed in what I would call "textbook" form. The last expression, however, switches the order of terms. Mathematica employs ...
2
votes
1answer
96 views
How to transform an expression using algebraical instead of pattern rules [duplicate]
I would like to transform rules algebraically. A very simple example would be: -
k^2 - 2 k x + x^2 /. {2*k -> 1}
This transforms to: -
$$k^2-2 k x+x^2$$
...
2
votes
1answer
138 views
Expanding a polynomial with fractional powers
Given an expression like
a + b*y + c*y^2 + d*Sqrt[f + g*y + h*y^2]
How can I programatically, expand this to a quartic without any fractional powers?
Right ...
4
votes
1answer
90 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 ...
2
votes
1answer
95 views
How can I get an exponent vector from monomials?
I am trying to get an exponent vector from a list of monomials. I am using the CoefficientRules command; however, it is returning a list that includes the ...
0
votes
3answers
468 views
Solving cubic equation for real roots
I'm looking to solve the following cubic equation for x:
$\beta\, x^3 - \gamma \,x = c$. I have plugged in some sample values ($\beta = 2$, $\gamma = 5$ and $c = 2$). When I try to solve this ...
2
votes
1answer
121 views
Implementation of Decompose
I'm curious as to how Decompose works so I decided to use Trace with the option ...
4
votes
2answers
195 views
How can I make the output from Solve look nice?
I have a problem with presenting solutions. Roots of 4th order polynomials are big expressions. Is there a way to present the roots, s2 and s3, in normal form with some substitutions? Maybe a way to ...
0
votes
0answers
25 views
Handling “Solve was unable to solve the system with inexact coefficient” errors [duplicate]
Possible Duplicate:
How to get rid of warnings when using Solve on an equation with inexact coefficients?
I've been trying to calculate the following in Mathematica:
...
5
votes
4answers
584 views
How to get exact roots of this polynomial?
The equation $$ 64x^7 -112x^5 -8x^4 +56x^3 +8x^2 -7x - 1 = 0 $$
has seven solutions $x = 1$, $x = -\dfrac{1}{2}$ and $x = \cos \dfrac{2n\pi}{11}$, where $n$ runs from $1$ to $5$. With ...
4
votes
3answers
418 views
First positive root
Simple question but problem with NSolve.
I need help how to extract first positive root? For example
eq=-70.5 + 450.33 x^2 - 25 x^4;
NSolve[eq== 0, x]
If I ...
1
vote
0answers
80 views
Know the degree of the equation with the radicals expanded
I have an equation with radicals. I would like to know what would be the degree of the polynomials if I'd move the terms and square the equation a number of times sufficient to remove all the ...
3
votes
1answer
162 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 ...
2
votes
2answers
201 views
12
votes
3answers
280 views
How to keep Collect[] result in order?
For example,
Collect[(1 + x + Cos[s] x^2)^3, x]
gives the result
...
0
votes
1answer
201 views
Generating lots of Examples in Polynomials Rings
I'm studying polynomial rings and i would like to know some tricks for generating lots of examples.
For instance, suppose i'm interested in polynomials over the integers mod (2,x^3 + 1). To get a ...
10
votes
4answers
356 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 ...
1
vote
1answer
99 views
Factorize Parametric Polynomials
Is there a possibility to factorize a parametric polynomial expression - meaning that the coefficients are defined as parameters, and not as specific numbers?
My example - a polynomial in ...
3
votes
1answer
166 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
1k views
Get polynomial interpolation formula
I'm attempting to get a polynomial interpolation formula out of Mathematica but I am absolutely lost. I stared out using ...
7
votes
2answers
271 views
How to deduce a generator formula for a polynomial sequence?
Consider a polynomial sequence $\{p_n\}$ generated by some (simple) rule:
$$
\begin{array}{l}
p_1(x)=x \\
p_2(x)=2 x-x^2 \\
p_3(x)= x^3-3 x^2+3 x \\
p_4(x)=-x^4+4 x^3-6 x^2+4 x \\
p_5(x)= x^5-5 ...
4
votes
1answer
340 views
Polynomial Approximation from Chebyshev coefficients
I would like to expand a function $f(r)$ in the domain $[0,R]$, around the points $r =0$, and $r = R$ in the following manner
$f(r = 0) = \Sigma_{i=0,i = even}^{imax} f_i (r/R)^i$
and
$f(r = R) = ...
6
votes
2answers
245 views
3D Plot: Number of Roots in x of a polynomial in x, a, b and c
I have a polynomial in four variables x,a,b and c. The number of roots of the polynomial in x depends of the choice of a, b and c. I would like to have a 3D-Plot with a, b and c on the axes, while the ...
10
votes
2answers
189 views
How can I compute the representation matrices of a point group under given basis functions?
Take the $C_{3v}$ point group for example:
...
3
votes
3answers
217 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 ...



