0
$\begingroup$

After playing around with the Planck radiation law for the spectral energy density, (differentiation and setting equal to 0 to find the maximum wavelength $x$) I'm stuck on how to deal with what I'm left with.

I'm having difficulty trying to solve and plot the roots of this equation. I know it's a transcendental equation and will have to solved numerically though I'm at a loss how to do this on programs such as Wolfram Mathematica 7 or MATLAB.

Could not get this to work: $$x=\frac{a \exp(a/x)}{-5 (\exp(a/x)-1)}$$

where $a$ is a constant

$\endgroup$
2
  • 2
    $\begingroup$ Please include your equation as code that can be copy and pasted - also it would be nice if you said what you had tried so that people don't waste time trying the same things. $\endgroup$ Apr 20, 2015 at 20:24
  • $\begingroup$ I'm not sure, but I don't believe this can be solved on Mathematica 7. $\endgroup$
    – Michael E2
    Apr 21, 2015 at 1:28

1 Answer 1

2
$\begingroup$

A plot like that in the reference provided in the Question can be obtained as follows. Solve the given equation (with x normalized to a for convenience and without loss of generality):

Reduce[x == Exp[1/x]/(5 - 5 Exp[1/x]), x]
(* Element[C[1], Integers] && -1 + E^x^(-1) != 0 && 
 -5 + ProductLog[C[1], 5*E^5] != 0 && x == (-5 + ProductLog[C[1], 5*E^5])^(-1) *)

and pick out the solution,

x = %[[4, 2]] /. C[1] -> i
(* (-5 + ProductLog[i, 5*E^5])^(-1) *)

Plotting is straightforward.

ListPlot[Quiet @ Table[N[{Re[x], Im[x]}], {i, -20, 20}], PlotRange -> All]

Mathematica graphics

$\endgroup$
2
  • 1
    $\begingroup$ In v10.1 {Re[x], Im[x]} can also be written ReIm[x] $\endgroup$
    – Bob Hanlon
    Apr 21, 2015 at 0:07
  • $\begingroup$ @BobHanlon Something I did not know. Thanks! Strangely, Table[N[ReIm[z]], {i, 1000000}]; is slightly slower than Table[N[{Re[z], Im[z]}], {i, 1000000}]; measured with AbsoluteTiming - 2.5 vs 2.2 sec on my PC.. I would have expected it to be as much as a factor of two faster $\endgroup$
    – bbgodfrey
    Apr 21, 2015 at 21:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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