 \documentclass[12pt]{article}

\setlength{\oddsidemargin}{0in}
\setlength{\evensidemargin}{0in}
\setlength{\topmargin}{-0.5in}
\setlength{\textwidth}{6.5in}
\setlength{\textheight}{9.in}

\usepackage{amssymb}
\usepackage{aas_macros}
\usepackage{html}

\newcommand{\sub}[1]{\ensuremath{_{\mbox{\scriptsize#1}}}}

\title{\sc Problem Set 1}
\date{Due Friday, February 8, 2016}
\author{\bf ASTR 5420 -- Stellar Evolution \& Interiors}
\begin{document}
\maketitle

\begin{enumerate}

\item \,[5 points]
  % blackbody
  The Planck radiation spectrum per unit frequency is given by
  \begin{equation}
    B_{\nu}(T) = \frac{2h\nu^3}{c^2}\frac{1}{e^{h\nu/kT}-1} \,
    [\mbox{erg }
      \mbox{s}^{-1}
      \mbox{cm}^{-2}
      \mbox{ster}^{-1}
      \mbox{Hz}^{-1}
    ].
  \end{equation}
  Show by explicit calculation that the equivalent spectrum per unit
  wavelength is 
  \begin{equation}
    B_{\lambda}(T) = \frac{2hc^2}{\lambda^5}\frac{1}{e^{hc/\lambda kT}-1} \,
    [\mbox{erg }
      \mbox{s}^{-1}
      \mbox{cm}^{-2}
      \mbox{ster}^{-1}
      \mbox{cm}^{-1}
    ].
  \end{equation}

  
\item \,[5 points] 
  % Wien displacement law
  The Wien displacement law states that the peak of the blackbody function
  occurs at
  \begin{equation}
    \lambda\sub{max} T = 2.898 \mbox{ mm K}.
  \end{equation}
  \begin{enumerate}
    \item Show that this is equivalent to solving the problem
      $y=5(1-e^{-y})$ where $y=hc/(\lambda\sub{max}kT)$. 
      Show by inspection that the root of this equation is $y\approx4.965$,
      giving the Wien displacement law.
    \item Show that that Wien law in {\em frequency} space is
      \begin{equation}
        \frac{\nu\sub{max}}{T} = 5.88\times10^{10} \mbox{ Hz K}^{-1}.
      \end{equation}

  \end{enumerate}


\item \,[10 points]
  % Problem 1.3 from Rybicki & Lightman
  X-ray photons are produced in a cloud of radius $R$ at the uniform
  rate $\Gamma$ (photons per unit volume per unit time).  The cloud is
  at a distance $d$ away.  Neglect absorption of these photons.
  A detector at the earth has field of view of $\Delta\theta$ and
  an aperature of diamter $\Delta A$.  
  \begin{enumerate}
  \item Assume that the source is completely resolved.  What is the
    observed intensity (in photons per unit time per unit area per
    steradian) toward the center of the cloud?
  \item Assume that the source is completely unresolved.
    What is the observed average intensity when the source is in the
    beam of the detector?
  \end{enumerate}

\item \, [10 pts] Intro to coding
  \begin{enumerate}
    \item 
      Download the sample python script at \\
      \htmladdnormallink{http://physics.uwyo.edu/$\sim$hannah/teaching/ASTR5420/myfunc.py}{http://physics.uwyo.edu/~hannah/teaching/ASTR5420/myfunc.py}.
      \\
      Explain, line-by-line, what this script does.  
    \item 
      Write your own code that reads in a number $n$ 
      and outputs the sum of all positive integers up to and including 
      that number.  Points will be awarded based on the elegance
      of your solution.  
      Email your code to hjangcon@uwyo.edu, 
      subject line: ``ASTR 5420 PS1 code''

    \item Extra credit if you write your script with good error handling.  

  \end{enumerate}

\item \,[extra credit: 3 pts] Typeset your solutions in \LaTeX.

\end{enumerate}

\end{document}
