29
votes
How do I work with Root objects?
This answer is to summarize the most important points about working with Root objects.
Essential reading:
Algebraic Numbers in the documentation.
What are ...
Community wiki
29
votes
Code I get from wolfram isn't working in mathematica
You can chalk this up as a W|A bug.
We do indeed try to factor with the approach stated by OP. When that times out, we try a different approach, but fail to update the code provided to the user.
The ...
23
votes
Accepted
20
votes
Expressing a polynomial as a sum of squares
Here is a somewhat heuristic approach, that relies in this case on the SOS having integer coefficients. I will indicate an alteration that gives a numerical approximation in the general case.
Start ...
19
votes
Accepted
Out of memory when computing a coefficient of a large symmetric polynomial
Split it into 3 steps to get result immediately.
...
18
votes
Neural Network for polynomial fit
... however in Mathematica the net always performs a linear fit, no matter how many layers und neurons I use.
I'm guessing you're using only DotPlusLayers. These ...
17
votes
Accepted
Code I get from wolfram isn't working in mathematica
I believe your question is completely valid and I gave it a big upvote. Assuming that WolframAlpha did indeed use this command to get the result, I'm not sure on what mystical machine they ran it on.
...
17
votes
Accepted
What is Mathematica's equivalent to Maple's collect with distributed option?
CoefficientRules[eq, {x, y}] /. ({a_, b_} -> c_) :> c x^a y^b // Total
Generalize it to a function:
...
15
votes
Accepted
Solving quintic in radicals
I wrote this function based on Daniel Lazard's paper Solving Quintics by Radicals:
...
15
votes
Curve Fitting Data using Polynomial
EDIT:
If you just want a cleaner function, then stick with the excellent answers from @AntonAntonov and @MichaelE2. As they have shown, curve fitting can be done quite easily for your data in ...
14
votes
How to extract all the coefficients of a homogeneous polynomial
Using an undocumented function:
...
14
votes
Accepted
14
votes
Accepted
How can I find a parametric equation for an implicit surface?
Putting Michael E2's comment into an answer.
...
13
votes
Accepted
How can I find the roots for $x^4-18x^2-8x+21$ in a nice form?
Your equation seems to be a casus irreducibilis; the solutions cannot be expressed using only real numbers.
You can make them "nicer" by using Root objects (try <...
12
votes
Accepted
Build a Companion Matrix of a Polynomial?
Here is a slight variation of your method for generating a (Frobenius) companion matrix. This version also yields an upper Hessenberg matrix, but has the (monicized) coefficients appear at the top ...
12
votes
12
votes
Accepted
MMA has an error in calculating the minimum polynomial of a rational number
This is because MinimalPolynomial[s, x, Extension -> a] gives the characteristic polynomial of the algebraic number $s$ over the field $Q[a]$.
https://...
11
votes
Solving quintic in radicals
I reproduced the algorithm from this post and I tried to use it on your example: An Easy Way To Solve The Solvable Quintic Using Two Sextics.
As mentioned in the article, for the quintic equation:
$$a ...
11
votes
Finding coefficients in polynomial function
One liner:
Solve[PolynomialRemainder[6 x^3 - 5 x^2 - 12 x + k, 3 x + 2, x] == 0, k]
Community wiki
11
votes
Accepted
11
votes
Accepted
Factor a bivariate polynomial treating one variable as constant
Although there might be various approaches, it seems that proceeding the most obvious one should be good enough
We have
...
11
votes
Accepted
Integrate Squared Legendre Polynomial
Generate a sequence using Table then use FindSequenceFunction to find the general form
...
11
votes
Accepted
Removing terms with odd degrees in polynomial
Approach #1
I think the following code does the trick:
...
11
votes
Accepted
Finding astroids
An alternative method for visualization and faster than ContourPlot with PlotPoints -> 1000 for nearly the same high quality ...
11
votes
What is Mathematica's equivalent to Maple's collect with distributed option?
Update 2:
An alternative way to define a function that works like Maple's collect using CoefficientRules + FromCoefficientRules:
...
11
votes
Accepted
PolynomialQ behaviour
We can use PolynomialExpressionQ, which has an optional 3rd argument that tests if all coefficients satisfy a constraint:
...
10
votes
Accepted
Removing terms of certain degree in multivariable polynomial
poly = a x^2*y - b x*y - c x*y^2 + d x + e y;
var = {x, y};
FromCoefficientRules[Select[CoefficientRules[poly, var], Total@#[[1]] == 3 &], var]
a x^2 y - c ...
10
votes
Finding the number of odd quintinomial coefficients
A slower but still useful approach employs ListCorrelate.
...
10
votes
Mathematica function equivalent to MATLAB's residue function (partial fraction expansion)
This is cheating, but:
...
10
votes
Accepted
Is there a way to speed up Integrate when the integrand contains a product of polynomials each of which having a large degree?
Perhaps this?:
Table[1/2 Gamma[(1 + n)/2], {n, 0, Length@# - 1}] . # &@
CoefficientList[poly1*poly2, x]
Low-order check:
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
polynomials × 1003equation-solving × 251
algebraic-manipulation × 110
simplifying-expressions × 69
factorization × 63
plotting × 52
symbolic × 50
functions × 45
coefficients × 42
list-manipulation × 41
algebra × 37
special-functions × 36
performance-tuning × 33
linear-algebra × 32
series-expansion × 31
calculus-and-analysis × 29
output-formatting × 25
expression-manipulation × 25
groebner-bases × 25
matrix × 24
fitting × 24
complex × 24
function-construction × 23
numerics × 22
replacement × 21