Tag Info

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 ...

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 ...
• 36.4k
Accepted

Finding the number of odd quintinomial coefficients

Use PolynomialMod: ...
• 131k

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 ...
• 59.8k
Accepted

Out of memory when computing a coefficient of a large symmetric polynomial

Split it into 3 steps to get result immediately. ...
• 17.3k

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 ...
• 36.2k
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. ...
• 113k
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: ...
• 67.6k
Accepted

I wrote this function based on Daniel Lazard's paper Solving Quintics by Radicals: ...
• 7,293

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 ...
• 10.1k

How to extract all the coefficients of a homogeneous polynomial

Using an undocumented function: ...
Accepted

...
• 24k
Accepted

How can I find a parametric equation for an implicit surface?

Putting Michael E2's comment into an answer. ...
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 <...
• 4,694
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 ...

...
• 15.7k
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://...
• 3,665

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 ...
• 3,856

Finding coefficients in polynomial function

One liner: Solve[PolynomialRemainder[6 x^3 - 5 x^2 - 12 x + k, 3 x + 2, x] == 0, k]
Accepted

Extract common factor

I think PolynomialGCD is the most direct tool: ...
• 131k
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 ...
• 57.7k
Accepted

Integrate Squared Legendre Polynomial

Generate a sequence using Table then use FindSequenceFunction to find the general form ...
• 161k
Accepted

Removing terms with odd degrees in polynomial

Approach #1 I think the following code does the trick: ...
• 15.3k
Accepted

Finding astroids

An alternative method for visualization and faster than ContourPlot with PlotPoints -> 1000 for nearly the same high quality ...
• 241k

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: ...
• 399k
Accepted

PolynomialQ behaviour

We can use PolynomialExpressionQ, which has an optional 3rd argument that tests if all coefficients satisfy a constraint: ...
• 36.4k
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 ...
• 24.1k

Finding the number of odd quintinomial coefficients

A slower but still useful approach employs ListCorrelate. ...
• 61.9k

Mathematica function equivalent to MATLAB's residue function (partial fraction expansion)

This is cheating, but: ...
• 59.8k