## Problems for due beginning of class Friday, Sept. 19

Two analytic problems -- hand these in on paper at the beginning of class

## 1) Approximate Wien's law:

As the following python plot shows if you simplify the Planck function by removing the -1 in the denominator, the location of the peak wavenumber doesn't really change too much. The advantage of the approximate version is that it is easier to differentiate and solve for the maximum wavenumber. Take the derivitive of approx_plancwavenum and solve for the wavenumber where the derivitive is zero. Show that it agrees roughly with the value for the exact equation and the wikipedia result.



In :

import numpy as np
from matplotlib import pyplot as plt




In :

%matplotlib inline




In :

def planckwavenum(waven,Temp):
"""
input: wavenumber (m^{-1}), Temp (K)
output: planck function in W/m^2/m^{-1}/sr
"""
h=6.63e-34
c=3.e8
c1=2.*h*c**2.
kb=1.38e-23
c2=h*c/(kb*Temp)
Bwaven=c1*waven**3./(np.exp(c2*waven) -1)
return Bwaven




In :

def approx_planckwavenum(waven,Temp):
"""
input: wavenumber (m^{-1}), Temp (K)
output: planck function in W/m^2/m^{-1}/sr
"""
h=6.63e-34
c=3.e8
c1=2.*h*c**2.
kb=1.38e-23
c2=h*c/(kb*Temp)
Bwaven=c1*waven**3./(np.exp(c2*waven))
return Bwaven




In :

wavenum_icm=np.arange(25,2500,20) #in inverse cm
wavenum_im=wavenum_icm*100.  #in inverse m
the_temp=300.  #K
flux=planckwavenum(wavenum_im,the_temp)*np.pi*100 #convert to W/m^2/cm^-1
approx=approx_planckwavenum(wavenum_im,the_temp)*np.pi*100
fig=plt.figure(1,figsize=(9,9))
fig.clf()
ax1.plot(wavenum_icm,flux,color='r',label='exact')
ax1.plot(wavenum_icm,approx,color='k',label='approx')
ax1.legend()



## 2) Show formally using change of variables that if you start with

$$B_\lambda =\frac{2 h c^2 \lambda^{-5}}{\exp \left ( \frac{hc}{k_b \lambda T} \right ) - 1}$$

and make the change $n=1/\lambda$ you get the function used in planckwavenum()



In :