Message Boards Message Boards

[✓] NSolve[2x== 0,x] return {{}} in Mathematica 11.0.1?

GROUPS:

I just upgraded to Mathematica 11.0.1 and ran into a problem with NSolve. The following simplified example illustrates it:

NSolve[  2 x == 0, x]

This returns {{}}

Anyone else having this problem? I am running Mathematica on Ubuntu 16.04 64 bit.

Gijsbert

Answer
9 months ago
In[1]:= NSolve[2 x == 0, x]

Out[1]= {{}}

In[3]:= NSolve[2 x == 0., x]

Out[3]= {{x -> 0.}}

Mathematica 11.01 on Windows 10

POSTED BY: Frank Kampas
Answer
9 months ago

Mathematica 11.0.0 on Win 7

In[1]:= NSolve[2 x == 0, x]

Out[1]= {{x -> 0.}}
POSTED BY: David Keith
Answer
9 months ago

As also shown by David I did not have this issue with Mathematica 11.0.0 on Ubuntu 16.04 64 bit.

Gijsbert

Answer
9 months ago

Reproduced Mac 11.0.1. Please submit as product feedback: https://www.wolfram.com/support/contact/email/

POSTED BY: Sander Huisman
Answer
9 months ago

Done.

Gijsbert

Answer
9 months ago

For now you can add Simplify, FullSimplify, or N to your inputs that might solve it:

In[21]:= NSolve[2 x == 0 // N, x]

Out[21]= {{x -> 0.}}

In[22]:= NSolve[2 x == 0 // Simplify, x]

Out[22]= {{x -> 0.}}
POSTED BY: Sander Huisman
Answer
9 months ago

This seems to be a serious issue. NSolve is used in many other functions; do they all have a problem now?

Cheers, M.

POSTED BY: Marco Thiel
Answer
9 months ago

I was thinking the same! it occurred in the 11.0.0 to 11.0.1 release, so I can imagine it breaks other parts of the system as well.

POSTED BY: Sander Huisman
Answer
9 months ago

I also see this is serious. I am considering rolling back to 11.0.0. Are there an significant disadvantages to that?

POSTED BY: David Keith
Answer
9 months ago

Depends on your OS. On OSX there are Graphics3D issues.

Cheers,

Marco

POSTED BY: Marco Thiel
Answer
9 months ago

Thanks, Marco. I'm on Win 7, so I think I'll roll back rather than wait to see what happens next.

POSTED BY: David Keith
Answer
9 months ago

https://www.wolfram.com/mathematica/quick-revision-history.html

There is a list of things thy fixed/improved in 11.0.1. decide!

POSTED BY: Sander Huisman
Answer
9 months ago

Thanks Sander. I looked over the list. There are certainly there I would like to have, but I am really concerned about Mathematica's result that 2x=0 has no solution -- and the ramifications.

POSTED BY: David Keith
Answer
9 months ago

Just for completeness: the problem also occurs in the Cloud versions of the Wolfram Language.

POSTED BY: Marco Thiel
Answer
9 months ago

The following also fails in the Cloud

NSolve[2.5 x==0,x]

Apparently for any numeric coefficient of x.

POSTED BY: John McGee
Answer
9 months ago

Thank you for reporting this issue. It has already been fixed in the development version.

A call to NRoots which is used by NSolve for univariate polynomials will return incorrect results in version 11.0.1 for already factored equations of the form $a (x-x_1)^ {n_1} (x-x_2)^{n_2} \ldots (x-x_k)^{n_k} = 0$ where $a$ is not zero or an exact 1.

A possible workaround for NSolve that should not require modifications to user code is to prevent the use of NRoots in such cases, for example

Block[{NRoots}, NSolve[2 (x - 1)^2 (x - 3) == 0, x]]

(* {{x -> 1.}, {x -> 1.}, {x -> 3.}} *)

Sorry for the inconvenience, this regression was introduced as a side effect of the last minute fix for another serious problem (a crash) and unfortunately was not caught in time.

POSTED BY: Ilian Gachevski
Answer
9 months ago

Any idea when this fix will show up in the wild? I see that one of the talks for the WTC this year already refers to a version 11.1.

POSTED BY: George Woodrow III
Answer
9 months ago

While I cannot comment on future release dates, historically there has often been at least a beta around the time of the conference.

POSTED BY: Ilian Gachevski
Answer
9 months ago

While Ilian can not comment about 11.1 we can make a educated guess since the new release scheme since version 10 makes it more predictable:

dates = WolframLanguageData[WolframLanguageData[], {"DateIntroduced", "VersionIntroduced"}]; (* this is slow, can't think of another way to get these dates/versions *)
tmp = Select[Union[dates], Last[#] >= 10 &][[All, 1]];
DateString[dates[[-1, 1]] + #] & /@ MinMax[BlockMap[DateDifference @@ # &, %, 2, 1]]

Executing gives this range for version 11.1 (but of course also depends on marketing and timing around the year)

{"Wed 9 Nov 2016", "Sat 14 Jan 2017"}

This, however, could be fixed earlier in a 11.0.2 version for example...

POSTED BY: Sander Huisman
Answer
9 months ago

From this video that analyses logograms in the film Arrival by Wolfram https://www.liveedu.tv/christopherwolfram/ we can see that version 11.1 carries the date of January 24!

POSTED BY: Yi Li
Answer
5 months ago

Since he is the son, i'm pretty sure he has access to the newest internal development version. I remember reading on the Wolfram blog that they build a new version daily. The only thing I can tell you (as per an NDA) is that I have a version 'stamped' January 25th 2017. As Ilian said, the bug is fixed in that version.

POSTED BY: Sander Huisman
Answer
5 months ago

This issue seems to be resolved in version 11.1!

Gijsbert

Answer
3 months ago

Behavior shown above verified on Windows10.

I have Home edition 11.01 without service plan. Means I have to pay for 11.1 to get this bug fixed.

Walter

POSTED BY: Walter Haeffner
Answer
2 months ago

Group Abstract Group Abstract