The Stack Overflow podcast is back! Listen to an interview with our new CEO.

All Questions

Filter by
Sorted by
Tagged with
40
votes
3answers
11k views

How do I work with Root objects?

I want to solve the trigonometric equation : $$(3-\cos 4x )\cdot (\sin x - \cos x ) = 2.$$ I tried Solve[(3 - Cos[4*x])*(Sin[x] - Cos[x]) == 2, x] It returns the ...
15
votes
5answers
3k 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 ...
15
votes
2answers
513 views

How can I get the solutions of $x^n-x-t=0$ in hypergeometric form?

$x^3-x-t=0$ has three roots that can be expressed in hypergeometric form, for example $$x_1=-1-\frac{t}{2}{_2F_1\left(\frac{1}{3},\frac{2}{3};\frac{3}{2};\frac{27t^2}{4} \right)}+\frac{3t^2}{8} {...
15
votes
3answers
654 views

What are Root objects with multiple polynomials?

In Mathematica 9 a new flavor of Root object with multiple polynomials was introduced. For example, ...
13
votes
1answer
401 views

ToNumberField won't recognize Root as an explicit algebraic number

Bug fixed in 10.0.0 In Mathematica 9.0.1, it appears that ToNumberField will not always recognize a Root object as an explicit ...
12
votes
1answer
423 views

Does NRoots own an abstract counterpart? If not, can we write one?

We know when solving linear algebra equations, despite its abstract syntax, LinearSolve is much faster compared to Solve: ...
11
votes
3answers
2k views

How can we plot the complex roots of an equation?

If we'd like to display the $n$ roots of a polynomial on the complex plane as points, how can we do this? For example, if we have the equation $x^3 + x^2 + x + 1$, how can we plot the 3 roots as ...
11
votes
3answers
7k views

First positive root

Simple question but problem with NSolve. I need help how to extract first positive root? For example: ...
11
votes
1answer
2k views

Solving quintic in radicals

I need to find an explicit expression in radicals for the real root of the quintic equation ...
10
votes
3answers
514 views

Bug, fixed in new release : Wrong results from NSolve on coupled polynomials. WorkingPrecision->Automatic fails

OP UPDATE: I received an email from WR on 1-18-2016: "...It does appear that the NSolve function is not behaving properly in this case and I have forwarded an incident report to our developers with ...
10
votes
1answer
1k views

Find roots of polynomial in field extension $GF(2^n)$?

How can I find roots of polynomial in extension field $GF(2^n)$?
9
votes
5answers
2k views

How can I find the roots for $x^4-18x^2-8x+21$ in a nice form?

I'm trying to find the roots for $x^4-18x^2-8x+21$. Theoretically, one can show that it has four real roots. But the following line returns four complicated forms including complex numbers. Is there ...
9
votes
6answers
1k views

Can Mathematica tell me if a polynomial has all real roots?

I am trying on this polynomial, ...
9
votes
3answers
2k views

Checking if the roots of a function are real

I'm trying to determine if the roots of a function are real. How would you do that? (In particular I'm interested in verifying that the roots of LegendreP[6, x] ...
9
votes
2answers
296 views

Finding the condition for root of a third degree polynomial

I've a third degree polynomial (in $s$): $$as^3+bs^2+cs+d\tag1$$ I need to find the roots of the polynomial, so I can use the code: ...
9
votes
1answer
247 views

The third argument of the Root function

Consider the roots of an arbitrary indecomposable polynomial: sol = Solve[x^5 + 2 x + 1 == 0, x] The returned expression is ...
8
votes
1answer
504 views

A problem with polynomial root finding

I use the expression ...
7
votes
1answer
2k views

How to substitute the following conditions into an expression?

I have an expression: $p=a\;b\; x + b^2\; y + a\;c\; z$. I want to substitute $a\;b=1$, $b^2 = 2$ and $a\;c = 4$ to obtain $p = x + 2y + 4z$. How can I tell Mathematica to do that? I dont know how to ...
7
votes
1answer
278 views

Using a Grobner basis to calculate common roots of a system of polynomial equations

We are trying to solve the inverse kinematics of a robot with $3$ revolute joints and one prismatic arm, link $4$, able to take lengths between $1$ and $2$. We assume all other lengths are $1$. Image ...
6
votes
2answers
1k views

How to find monotonically increasing intervals of a function

I tried this code, but not working Clear[f]; f[x_] := x^3 - 3 x + 2; ForAll[{x1, x2}, x1 < x2, f[x1] < f[x2]] Reduce[%, {x1, x2}, Reals] I expected the ...
6
votes
2answers
685 views

NSolve missing solutions in Mathematica 10

Running Mathematica 8.0.4 and 10.0.0 on a Windows 8.1 machine. Processed the same code with both kernels: ...
6
votes
2answers
498 views

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

Bug introduced in 9.0 or earlier and fixed in 10.0 In everything that follows I am using Roots to get the solutions to the equations. I start off with this ...
6
votes
1answer
218 views

Solve quintic equation using differential equation

Background DiffResolvent.nb, here gives a method that solve quintic equations using differential equations. There's a progress to transform polynomial equation into differential equation. Then he ...
6
votes
2answers
1k views

NSolve erroneously gives no solution to a polynomial system

I have a polynomial system with three equations in three unknowns, the maximum degree is 26. Two equations are symmetric, i.e. eq1(x,y,z)=eq2(y,x,z). If I search ...
6
votes
0answers
89 views

When does Root have a third argument

In Mathematica "11.0.1 for Microsoft Windows (64-bit) (September 20, 2016)", Root[#^4 + 1 &, 2]; actually has three arguments, as can be seen from ...
5
votes
2answers
889 views

Finding an analytic solution of a cubic equation

I have been trying to solve a cubic equation $$y=zy^3 + z$$ in $y$ – that is, my desired result is a function $y(z)$ satisfying the equation. Now, there are three solutions of this equation and ...
5
votes
1answer
359 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 ...
5
votes
1answer
109 views

Can I absolutely rely on CountRoots and RootIntervals?

I have some polynomials of high degree with coefficients of the form a + b Sqrt[5] where a, b are integers (or at least rationals). I want to rigorously determine when they have all real roots - that ...
5
votes
1answer
223 views

How to reduce a quartic form to a quadratic form with equal roots

Preface: To clear the theoretical background this question is cross-posted on math.stackexchange here. I have a polynomial in $n$ variables of the form $$P(x_1,x_2,\dots,x_n)=\left(\sum_{i,j}a_{ij}...
5
votes
0answers
159 views

Find regions in which the roots of a third degree polynomial are real

I have to find the roots of a third degree polynomial in $\phi$ that depends from 3 parameters, namely $t,s,w\in \mathbb R$. In order to do that I've used the command ...
4
votes
3answers
883 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 \end{...
4
votes
2answers
608 views

The exact real solutions of a cubic polynomial?

Such an 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 <...
4
votes
2answers
1k views

find roots with specified coefficients

Please assume we have an equation which we want to obtain its roots. We can use ...
4
votes
2answers
575 views

How can Mathematica help me to find a real radical expression for roots of this polynomial?‎

The polynomial $P(x)=x^‎‏4‏‎-‎‏4‏x^‎‏2‏‎-‎‏2‏x+‎‏1$‏‎ has ‎‏4‏‎ real roots (this can be clearly checked by plotting). But solving $P(x)=‎‏0‏‎$, using ...
4
votes
1answer
218 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 ...
4
votes
1answer
166 views

Points on discriminant variety?

I am trying to find a way in Mathematica to compute points on discriminant variety for modest size systems, but I couldn't find one. The system is something like: ...
4
votes
2answers
142 views

Root and ToRadical[Root] do not preserve order of roots

When I look for roots to a quartic polynomial of the form $A - B x^3 + Cx^4$ for positive $A$, $B$, and $C$, it seems that ToRadicals does not preserve the root ...
4
votes
1answer
139 views

How many solutions do you get from simultaneous polynomial equations?

I have the following four simultaneous polynomial equations ...
4
votes
1answer
2k 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
4
votes
1answer
214 views

Solving for the roots of a trilinear system of polynomials

I have been trying to solve for the roots of the following system of trilinear polynomials: ...
4
votes
0answers
337 views

Homotopy Continuation solution of system of polynomials

I have very large systems (>20) of polynomial (max degree 3) equations that I would like to find a solution to. I'm not interested in all solutions as presumably there are too many (a huge number ...
3
votes
4answers
530 views

NSolve didn't get the answer for my equations within 24 hours

I have two polynomials as function of $wa$ and $wb$ , I am going to show those polynomials. This is the expression for $GS65$: ...
3
votes
4answers
393 views

Solve polynomial for coefficients in a range

I want to create a list of all roots of quadratics with coefficients in a range of $-5$ to $5$ I tried this : NSolve[Range[-5,5]*z^2+Range[-5,5]*z+Range[-5,5] == 0]...
3
votes
4answers
6k 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 ...
3
votes
6answers
388 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 f=x^4+y^...
3
votes
2answers
335 views

Finding Real Roots and Determining Range

I am interested in determining the minimum and maximum values of the real roots of polynomials of form $P(x)=\sum_{k=0}^n a_{k} x^k$ where $n$ will have a defined value (say 3,4,5...) and $a_k$ are ...
3
votes
3answers
414 views

FindFit with a sophisticated function (integral)

I am trying to find a fit to the distribution function (empiricial data) in terms of a function which is itself an integral of a product of two simpler functions (two polynomials), that is the model. ...
3
votes
2answers
658 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
2answers
532 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 ...
3
votes
1answer
130 views

Coefficients of Knuth's “Convolution Polynomials”

Donald E. Knuth gives in his paper Convolution Polynomials the code ...