5
$\begingroup$

Bug introduced in 9.0 and fixed in 10.0.0


In Mathematica 8 the following expression evaluates and returns a result in terms of InverseFunction:

NSolve[Integrate[x^(1/2)/(Exp[x - μ] - 1), {x, 0, ∞}] == C, μ]

where C is a constant. But in Mathematica 9 the expression does not evaluate:

NSolve::nsmet: This system cannot be solved with the methods available to NSolve. >>

Is this a bug, a regression, or a feature? And how can this equation can be solved in V9?

Particular, trying to solve this:

NSolve[PolyLog[3/2, 20 x] == 2, x]

In Mathematica 8 and Mathematica 9 gives different results:

Mathematica 8 (correct result):

NSolve::ifun: Inverse functions are being used by NSolve, so some solutions may not be found; use Reduce for complete solution information. >>
{{x -> 0.05 InverseFunction[PolyLog, 2, 2][3/2, 
 2.0000000000000000000000000000000]}}

Mathematica 9:

NSolve::nsmet: This system cannot be solved with the methods available to NSolve. >>
NSolve[PolyLog[3/2, 20 x] == 2, x]

UPD: That's a confirmed bug with NSolve, that I already reported to developers of Wolfram Mathematica long time ago.

$\endgroup$
  • 1
    $\begingroup$ With eqn = Integrate[x^(1/2)/( Exp[x - \[Mu]] - 1), {x, 0, Infinity}] it looks like eqn is always positive so the equation has no solution. $\endgroup$ – b.gates.you.know.what Jan 26 '13 at 16:57
  • $\begingroup$ @b.gatessucks: True. Original there was a bunch of user constants. Just a mistyped after == sign. $\endgroup$ – m0nhawk Jan 26 '13 at 20:09
  • $\begingroup$ This seems to be fixed in V10 (although the output is now in terms of Root instead of InverseFunction). $\endgroup$ – Michael E2 Aug 21 '15 at 17:40
9
$\begingroup$

In general for a non-polynomial equation you can use FindRoot to solve it :

eqn[m_] = Integrate[x^(1/2)/( Exp[x - m] - 1), {x, 0, \[Infinity]}] ;

(* using 2 initial values for the solver *)
roots[r_?NumericQ] := FindRoot[eqn[m] == r, {m, -1.23, -0.456}][[1, 2]]

Check :

dataRoots = {roots[#], #} & /@ Range[0.1, 2, 0.1];

Show[ListPlot[dataRoots, PlotStyle -> {Red, PointSize[0.02]}, 
           GridLines -> Transpose[dataRoots], AxesOrigin -> {0, 0}], 
     Plot[eqn[m], {m, -10, 0}, PlotRange -> All]]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.