Message Boards Message Boards

Unable to find roots for a simple equation

I tried to find a solution to this simple equation using Mathematica's Solve:

In[37]:= Solve[(2 Sqrt[2] V (m \[Epsilon]f)^(3/2))/(
  3 \[Pi]^2 \[HBar]^3) == Ntot, \[Epsilon]f]

Out[37]= {{\[Epsilon]f -> 
   Root[-9 Ntot^2 \[Pi]^4 \[HBar]^6 + 8 m^3 V^2 #1^3 &, 1]}}

This does not give an expression for my fermi energy. So I tried reduced with some more result

In[46]:= Reduce[-9 Ntot^2 \[Pi]^4 \[HBar]^6 + 
    8 m^3 V^2 \[Epsilon]f^3 == 0, \[Epsilon]f] // FullSimplify

Out[46]= 2 m \[Epsilon]f == 
 3^(2/3) \[Pi]^(4/3) (Ntot/V)^(2/3) \[HBar]^2

I don't understand why the 2m is in front of the fermi energy but at least I can read off the solution. But if even now Mathematica cannot handle my equation:

In[54]:= Solve[
 2 m \[Epsilon]f == 
  3^(2/3) \[Pi]^(4/3) (Ntot/V)^(2/3) \[HBar]^2, \[Epsilon]f]

Out[54]= {{\[Epsilon]f -> 
   Root[-9 Ntot^2 \[Pi]^4 \[HBar]^6 + 8 m^3 V^2 #1^3 &, 1]}

Why is it that it cannot find an explicit expression for [Epsilon]f? And how to get it in another way?

POSTED BY: Willem Verheijen
4 Replies

I get Root with version 12.3 and the Reals option:

Solve[(2 Sqrt[2] V (m \[Epsilon]f)^(3/2))/(3 \[Pi]^2 \[HBar]^3) == 
  Ntot, \[Epsilon]f, Reals]

I have not tried version 13 yet.

POSTED BY: Gianluca Gorni

I am not replicating your results.

In[244]:= Solve[(2 Sqrt[
      2] V (m \[Epsilon]f)^(3/2))/(3 \[Pi]^2 \[HBar]^3) == 
  Ntot, \[Epsilon]f]

During evaluation of In[244]:= Solve::nongen: There may be values of the parameters for which some or all solutions are not valid.

Out[244]= {{\[Epsilon]f -> ((-3)^(2/3) Ntot^(2/3) \[Pi]^(
    4/3) \[HBar]^2)/(2 m V^(2/3))}, {\[Epsilon]f -> (
   3^(2/3) Ntot^(2/3) \[Pi]^(4/3) \[HBar]^2)/(
   2 m V^(2/3))}, {\[Epsilon]f -> -(((-1)^(1/3) 3^(2/3) Ntot^(
     2/3) \[Pi]^(4/3) \[HBar]^2)/(2 m V^(2/3)))}}

Possibly you are using an older version that gives the Root[...] form of result?

POSTED BY: Daniel Lichtblau

Thank you, it still confuses me but I find solace in your remark that I am not the only one.

POSTED BY: Willem Verheijen

The problem is that you are probably asking for the plain real solution, while Mathematica assumes that your parameters are complex and you ask for all complex solutions. This topic is an endless source of confusion. You can use ToRadicals and then pick manually the solution that looks real when the variables are in your expected range:

Solve[(2 Sqrt[2] V (m \[Epsilon]f)^(3/2))/(3 \[Pi]^2 \[HBar]^3) == 
   Ntot, \[Epsilon]f] // ToRadicals

You can ask Solve to give the real solution, but it will be expressed as a Root object, which is appreciated only by Mathematica fans:

Solve[(2 Sqrt[2] V (m \[Epsilon]f)^(3/2))/(3 \[Pi]^2 \[HBar]^3) == 
  Ntot, \[Epsilon]f, Reals]

Sadly, ToRadicals applied to the Root object gives an answer that is probably wrong for your needs:

Solve[(2 Sqrt[2] V (m \[Epsilon]f)^(3/2))/(3 \[Pi]^2 \[HBar]^3) == 
   Ntot, \[Epsilon]f, Reals] // ToRadicals

Same for Reduce:

Reduce[(2 Sqrt[2] V (m \[Epsilon]f)^(3/2))/(3 Pi^2 \[HBar]^3) == 
   Ntot && \[HBar] > 0 && V > 0 && m > 0 && 
  Ntot > 0, \[Epsilon]f, Reals]
% // ToRadicals
POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract