Planck distribution

Quantum Mechanics
 K. Konishi, G. Paffuti

We present some elementary aspects of Plack's distribution.

Definitions

ClearAll["Global`*"];
Off[General::spell, General::spell1,InterpolatingFunction::"dmval"]

Velocity of light, Planck's constant and Boltzmann's constant  in CGS units:

c=  2.9979  (10^10);  h= 6.626 (10^(-27));  k = 1.38  (10^(-16));

Energy density for a black body as a function of frequency ν:

uν[ν_, T_]:= ((8π h (ν^3))/(c^3)) (1/(Exp[((h ν)/(k T ))] -1))

and as a function of wave length  λ = c/ν

uλ[λ_,T_]:= ((8π h c)/(λ^5))(1/(Exp[((h c)/(k T λ ))] -1))

Examples

Variation with T

It is convenient to measure wavelengths in mm = (10^(-1)) cm,  μm = (10^(-4))cm  or nm = (10^(-7))cm, depending on the temperature.

mm= (10^(-1)); μm = (10^(-4)); nm = (10^(-7));

For T = 500, 400, 300 K respectively:

Plot[{uλ[x μm,500],uλ[x μm,400],uλ[x μm,300]},{x,0,25},PlotStyle->{Blue,Green,Red},PlotRange->All,AxesLabel->{"μm","(Subscript[u, λ])"},Epilog->{Text["500 K",{10,0.4`}],Text["400 K",{11,0.15`}],Text["300 K",{10,0.06`}]}]

Wien law

According to Wien law the wavelengths corresponding to maxima must satisfy the relation  T (Subscript[λ, max]) = cost.

λMax=Table[λ/.FindMaximum[uλ[μm λ,T],{λ,1,20}][[2]],{T,{500,400,300}}]

λMax*{500,400,300}

3K Cosmic Background Radiation

Observations and theory show that the Cosmic Radiation Background ( CMB ) is given by a Planck distribution. Some recent results are:
COBE :  2.725 ± 0.002 K,  WMAP precision  4 μK,  ref.[1]

Plot[{uλ[mm λ,2.725`] (10^12),uλ[mm λ,3.`] (10^12)},{λ,0,4},PlotStyle->{RGBColor[1,0,0],RGBColor[0,1,0.5`]},PlotRange->All,AxesLabel->{"mm","\!\(\*SuperscriptBox[\(10\), \(\(12\)\(\\ \)\)]\)uλ"},Epilog->{Text["3 K",{1.5`,3.5`}],Text["2.7 K",{1.5`,1.5`}]}]

Sun

Solar spectrum is well described by a Planck's distribution with temperature T = 5780 K. Here we present an interactive plot obtained with Manipulate (see Mathematica Help).

The general, simplyfied syntax is 
Manipulate[expr, {{parameter, initialValue}, minimum, maximum}]
expr is any expression, here Plot. 
Click the button menu in the top right corner of a Manipulate output open a popup menu, allowing animations etc.

The slider allows an interactive change in the temperature. The default value is the Sun temperature. The spectrum superimposed with the option Filling for Plot is the true visible spectrum, encoded in Mathematica.

Manipulate[Plot[((uλ[nm x,T])/(10^5)),{x,0,2400},ImagePadding->25,AxesLabel->{"nm","(10^(-5)) uλ"},
ColorFunction-> (ColorData["VisibleSpectrum"][#1]&),ColorFunctionScaling->False,Filling-> Axis],{{T,5780},4000,8000,Appearance->"Labeled"}]

Mathematica note

The syntax  
funct[#1]&
is the abstract for for a function funct. The symbol  #1 gives the slot for the arugument to be passed to the function and & is the symbol for function. In this case the function is  ColorData["VisibleSpectrum"].   ColorData["VisibleSpectrum"][λ]  gives the RGBColor associated to a radiation of wave length λ in nm. The function becomes constant when the light is no more visible.
A  Mathematica construct can be  (func[#1]&)@ (arg).  @ is the prefix form for a function, any function, and the previous instruction means compute the function f at the argument arg.
The reader must refer to Mathematica Help for more details, a simple example is given below.

{Sin[0.7], Sin@0.7, Sin[#1]& @0.7}

References

1) http://map.gsfc.nasa.gov