Blackbody curves

spectral energy density

ρERayleighJeans[en_]:=(en^2);
ρEPlanckFactor[en_]:=(en/( ((E^(en/kT))-1)));
kT=1;
Plot[{ρERayleighJeans[en],ρEPlanckFactor[en],ρERayleighJeans[en]ρEPlanckFactor[en]},{en,0,20},PlotStyle->{Red,Blue,GrayLevel[0]},PlotRange->{0,1.5}]

ρE[3]

Plot[ρE[en]/.kT->3,{en,0,20}]

Plot output vs. photon energy

Clear[kT,h,c,ρE];
ρE[en_,kT_]:=(((8 π) (en^3))/(((h^3) (c^3)) ((E^(en/kT))-1)));
h=1;c=1;
Manipulate[
Plot[ρE[en,kT],{en,0,20},PlotRange->All],{kT,.1,10}]

Plot output vs. wavelength

Clear[kT,h,c,ρE];
ρE[λ_,kT_]:=((((1/λ))^3)/((E^(1/(λ kT)))-1));
Manipulate[
Plot[ρE[λ,kT],{λ,0,10},PlotRange->All,GridLines->{{0.4,0.75},None}],{kT,.01,5}]

4000/293 //N

Plot spectral energy density as a function of wavelength

ρLam[λ_]=ρE[en]/.en->((h c)/λ)
Plot[ρLam[λ]/.{h->1,c->1,kT->kTtrial},{λ,0,(10/kTtrial)},PlotRange->All]

Lineshapes: Gaussian vs. Lorentzian curves

gauss[ω_,ω0_,Δω_]:=Exp[-((((ω-ω0))^2)/((Δω)^2))];
lorentz[ω_,ω0_,Δω_]:=(((Δω)^2)/((((ω-ω0))^2)+((Δω)^2)));

ω0=5;
Δω=1;
Plot[{gauss[ω,ω0,Δω],lorentz[ω,ω0,Δω]},{ω,ω0-3Δω,ω0+3Δω},PlotStyle->{Red,Blue}]