Skip to main content
replaced http://mathematica.stackexchange.com/ with https://mathematica.stackexchange.com/
Source Link

You were using an older version of the function I posted in the linked answerlinked answer. With the new version, copied from that answer, it's possible to specify the option PlotPoints to increase the resolution of the plot grid that's used for bracketing. This in principle allows you really find all roots. The tradeoff is that the speed decreases with increasing PlotPoints. Since even the original code in the question runs very long, I only ramped the points up to 500 to show how it improves the plot in principle. Caution - this takes a few minutes to run:

For[Subscript[d, B] = end, Subscript[d, B] >= start, Subscript[d, B] -= prec, roots = Sort[findAllRoots[Detf[e, n], {e, -1, 0}, PlotPoints -> 500], Less]; Do[PrependTo[LIST[[i]], {N[Subscript[d, B]], roots[[i]]}], {i, Length[roots]}];] LIST = DeleteCases[LIST, {}]; ListPlot[LIST, AxesLabel -> {"\!\(\*SubscriptBox[\(d\), \(B\)]\)", "E"}] 

roots

As you can see, the number of missing roots is much smaller with this additional option. Now it's up to you to increase it to 1000 if you have the patience.

You were using an older version of the function I posted in the linked answer. With the new version, copied from that answer, it's possible to specify the option PlotPoints to increase the resolution of the plot grid that's used for bracketing. This in principle allows you really find all roots. The tradeoff is that the speed decreases with increasing PlotPoints. Since even the original code in the question runs very long, I only ramped the points up to 500 to show how it improves the plot in principle. Caution - this takes a few minutes to run:

For[Subscript[d, B] = end, Subscript[d, B] >= start, Subscript[d, B] -= prec, roots = Sort[findAllRoots[Detf[e, n], {e, -1, 0}, PlotPoints -> 500], Less]; Do[PrependTo[LIST[[i]], {N[Subscript[d, B]], roots[[i]]}], {i, Length[roots]}];] LIST = DeleteCases[LIST, {}]; ListPlot[LIST, AxesLabel -> {"\!\(\*SubscriptBox[\(d\), \(B\)]\)", "E"}] 

roots

As you can see, the number of missing roots is much smaller with this additional option. Now it's up to you to increase it to 1000 if you have the patience.

You were using an older version of the function I posted in the linked answer. With the new version, copied from that answer, it's possible to specify the option PlotPoints to increase the resolution of the plot grid that's used for bracketing. This in principle allows you really find all roots. The tradeoff is that the speed decreases with increasing PlotPoints. Since even the original code in the question runs very long, I only ramped the points up to 500 to show how it improves the plot in principle. Caution - this takes a few minutes to run:

For[Subscript[d, B] = end, Subscript[d, B] >= start, Subscript[d, B] -= prec, roots = Sort[findAllRoots[Detf[e, n], {e, -1, 0}, PlotPoints -> 500], Less]; Do[PrependTo[LIST[[i]], {N[Subscript[d, B]], roots[[i]]}], {i, Length[roots]}];] LIST = DeleteCases[LIST, {}]; ListPlot[LIST, AxesLabel -> {"\!\(\*SubscriptBox[\(d\), \(B\)]\)", "E"}] 

roots

As you can see, the number of missing roots is much smaller with this additional option. Now it's up to you to increase it to 1000 if you have the patience.

Source Link
Jens
  • 98.4k
  • 7
  • 217
  • 541

You were using an older version of the function I posted in the linked answer. With the new version, copied from that answer, it's possible to specify the option PlotPoints to increase the resolution of the plot grid that's used for bracketing. This in principle allows you really find all roots. The tradeoff is that the speed decreases with increasing PlotPoints. Since even the original code in the question runs very long, I only ramped the points up to 500 to show how it improves the plot in principle. Caution - this takes a few minutes to run:

For[Subscript[d, B] = end, Subscript[d, B] >= start, Subscript[d, B] -= prec, roots = Sort[findAllRoots[Detf[e, n], {e, -1, 0}, PlotPoints -> 500], Less]; Do[PrependTo[LIST[[i]], {N[Subscript[d, B]], roots[[i]]}], {i, Length[roots]}];] LIST = DeleteCases[LIST, {}]; ListPlot[LIST, AxesLabel -> {"\!\(\*SubscriptBox[\(d\), \(B\)]\)", "E"}] 

roots

As you can see, the number of missing roots is much smaller with this additional option. Now it's up to you to increase it to 1000 if you have the patience.