equation solving - 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 the information you provided..." So, WorkingPrecision->Automatic is indeed failing, but the workaround is to manually set any value, then NSolve works fine.
OP UPDATE: Email from WR on 11-21-2016: "In December 2015 you reported an issue with Mathematica wherein NSolve returns bad results. We believe that the issue has been resolved in the current release of Mathematica."
The following code creates two polynomials $q_1$ and $q_2$ in variables $c$ and $p$, then uses NSolve
to find roots. But the polynomials don't evaluate to zero at those roots.
pp[n_] := If[n > 0, pp[n - 1]^2 + c, p];
q1 = PolynomialQuotient[pp[4] - p, pp[2] - p, p];
q2 = PolynomialRemainder[D[pp[4], p] - 1, q1, p];
soln = NSolve[{q1 == 0 , q2 == 0}, {c, p}];
Mean[Abs[{q1, q2} /. soln]]
$\{1.07185\times 10^{12},1.12062\times 10^{13}\}$
Is this a bug, or am I doing something wrong? I've tried using Eliminate
, Solve
, and &&
between my conditions, but I got either no results or wrong results.
OP EDIT: In testing solutions offered below, I found that setting WorkingPrecision to any value, even 10, makes the results come back near the desired zeros. But if I set WorkingPrecision->Automatic then the same wrong results come back. Other users have gotten the same results I did.
I have reported this issue to support@wolfram.com
Comments
Post a Comment