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

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

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

Mathematica 11.0.0 on Win 7

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

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

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

Gijsbert

Reproduced Mac 11.0.1. Please submit as product feedback: Contact Wolfram Support by Email or Phone

Done.

Gijsbert

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

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

Cheers,
M.

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.

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

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

Cheers,

Marco

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

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

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

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.

The following also fails in the Cloud

NSolve[2.5 x==0,x]

Apparently for any numeric coefficient of x.

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.

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.

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

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…