\problemdata                                                             
        {harvard vs. MIT degrees} % latex-friendly label for the prob.
        {Annuities} % The topic(s) of the problem content.  
        {?} % Source (if known)                                          
        {S01 Tutorial 6, 1} % Usage (list ones you are aware of). 
        {Tina Wang, S02} % Last revision info (author, date).   
                                                                         
                                                                         
\begin{problem}           
Is a Harvard degree really worth more than an MIT degree?!  Let
us say that a person with a Harvard degree starts with \$40,000 and gets a
\$20,000 raise every year after graduation, whereas a person with an MIT
degree starts with \$30,000, but gets a 20\% raise every year.  Assume
inflation is a fixed $8\%$ every year.  That is, \$1.08 a year from now is
worth \$1.00 today.  (You'll need a calculator to get final answers; if
one is not available, it's ok to express the answer as a closed form
numerical expression.)

\begin{problemparts}


\problempart How much is a Harvard degree worth today if the holder will work
for $n$ years following graduation? 

\problempart How much is an MIT degree worth in this case?

\problempart If you plan to retire after twenty years, which degree would
be worth more?

\solution{
One dollar after year $i$ is worth $r^i$ in today's currency, where
\[
r= \frac{1}{1.08} = 0.925\, 925\, 925 \dots
\]
So 
\begin{eqnarray*}
\mbox{Hvd}_n & = & \sum_{i=0}^{n} (40000+ 20000i)r^i\\
        & = & 40000\sum_{i=0}^{n} r^i + 20000\sum_{i=0}^{n} i r^i,\\
\mbox{MIT}_n & = & 30000\sum_{i=0}^{n} {1.2}^i r^i\\
        & = & 30000\sum_{i=0}^{n} (1.2r)^i
\end{eqnarray*}

But
\[
\sum_{i=0}^{n} ir^i = \frac{{r - (n+1) r^{n+1} + n r^{n+2}}}{(1-r)^2},
\]
so 
\begin{eqnarray*}
\mbox{Hvd}_n & = & 40000 \frac{(1- r^{n+1})}{1- r}  + 
                   20000 \frac{(r - (n+1) r^{n+1} + n r^{n+2})}{(1-r)^2}\\
  & = &  \frac{20000(2(1- r^{n+1} -r +r^{n+2}) + r - (n+1) r^{n+1} + n r^{n+2})}{(1-r)^2}\\
  & = &  \frac{{20000(2 - r - (n+3)r^{n+1} + (n + 2)r^{n+2})}}{(1-r)^2}\\
\mbox{MIT}_n & = &  \frac{{30000(1 - (1.2r)^{n+1})}}{1 - 1.2r}
\end{eqnarray*}
and for $n=20$,
\begin{eqnarray*}
\mbox{Hvd}_{20} & = &  \frac{{20000(2 - r - 23r^{21} + 22r^{22})}}{(1-r)^2} = 2,010,885\\
\mbox{MIT}_{20} & = &  \frac{{30000(1 - (1.2r)^{21})}}{1 - 1.2r} = 2,197,579.
\end{eqnarray*}

so the MIT degree is more valuable! (But we knew that already.)}

\end{problemparts}
\end{problem}                                 