\documentclass[11pt,twoside]{article}	
\usepackage{latex-macros/course}
\graphicspath{{/toc/a/class/6.042/fall02/problemrepository/figures/}}

\renewcommand{\coursecopyrightnames}%
{\href{http://theory.lcs.mit.edu/~meyer/}{Prof.~Albert~R.~Meyer}}

%\renewcommand{\coursecopyrightnames}{Prof.~Albert~R.~Meyer}

%\hidesolutions
%\showsolutions

\renewcommand{\reading}{Week 7 Notes.  \emph{Optional:} Rosen \S2.2, \S3.2
  through Example 17.}

\begin{document}

\problemset{6}


\begin{problem}           
A Harvard BS graduates and starts with an annual salary of \$140,000, with
a \$25,000 raise guaranteed every year.  An MIT SB graduate starts with
\$100,000, with a guaranteed 15\% raise every year.  Assume the bankrate is
a fixed $3\%$ per year.  That is, the bank will pay \$1.03 a year from now
if you deposit \$1.00 today.

\begin{problemparts}
\ppart Suppose both graduates retire after the same number of years.  Use
the fact that $x = o((1+\epsilon)^x)$ to explain why the MIT SB must come
out ahead if they work for enough years.  (You should \emph{not} make use of
closed forms for various sums in your explanation.)

\solution{
The Harvard graduate only gets a fixed annual income raise. Thus, after x years the total income of the Harvard graduate is bounded by $Ax^2$ for some large constant A. The MIT graduate raise is based on a certain percentage of the annual income. Therefore, the income for a particular year x will be in the form of $B(1+C)^x$ for some constant B and C. \\
Now we have to show that after a certain year the \bf{anual} income of the MIT graduate will be larger than the \bf{total} income of the Harvard graduate. To do so, $B(1+C)^x >  Ax^2$ for large enough x. It is sufficient to show $x^2 = o((1+C)^x)$ which is equivilant to $x = o((1+C')^x) $ with $1+ C' = (1+C)^2$. This follows directly from the fact that $x=o((1+\epsilon)^x)$. Thus, the MIT graduate anual income will be greater than the total income of the Harvard student after a certain amount of years. It is just the question if it is in their lifetimes !    
}

\ppart Suppose both graduates retire after $n$ years.  For which values of
$n$ is the MIT graduate's salary package better that the Harvard grad's?

\solution{\

One dollar after year $i$ is worth $r^i$ in today's currency, where
\[
r= \frac{1}{1.03} = 0.970\, 873\, \dots
\]
So 
\begin{eqnarray*}
\mbox{Hvd}_n & = & \sum_{i=0}^{n} (140000+ 25000i)r^i\\
        & = & 140000 \cdot \sum_{i=0}^{n} r^i + 25000 \cdot \sum_{i=0}^{n} i r^i,\\
\mbox{MIT}_n & = & 100000 \cdot \sum_{i=0}^{n} {1.15}^i r^i \\
        & = & 100000 \cdot \sum_{i=0}^{n} (1.15r)^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 & = & 140000 \frac{(1- r^{n+1})}{1- r}  + 
                   25000 \frac{(r - (n+1) r^{n+1} + n r^{n+2})}{(1-r)^2}\\
  & = &  \frac{1000 \cdot (140\cdot (1 - r - r^{n+1} + r^{n+2}) + 25 \cdot (r - (n+1) r^{n+1} + n r^{n+2}))}{(1-r)^2}\\
  & = &  \frac{1000\cdot (29.2 r - (165 + 25n)\cdot r^{n+1} + (140 + 25n )\cdot r^{n+2}))}{(1-r)^2}\\
\mbox{MIT}_n & = &  \frac{{100000(1 - (1.15r)^{n+1})}}{1 - 1.15r} \\ 
             & = & \frac{103000}{0.12} \cdot ((1.15r)^{n+1} - 1)
\end{eqnarray*}
and for $n=15$,
% Matlab script 
% n = 15
% r = 1.03
% display(sprintf('%f',103000.0 / 0.12 *((1.15 * r )^(n+1) - 1.0) - 1000.0 *(29.2*r -(165+25*n)*r^(n+1) +(140 +25*n)*r^(n+2))/(1-r)^2))
\begin{eqnarray*}
\mbox{Hvd}_{15} & = &   \frac{1000\cdot (29.2 r - (165 + 25 \cdot 15)\cdot r^{16} + (140 + 25 \cdot 15 )\cdot r^{17}))}{(1-r)^2}  = 4,034,764\\
\mbox{MIT}_{15} & = &  \frac{103000}{0.12} \cdot ((1.15r)^{16} - 1) = 4,146,917.
\end{eqnarray*}
Thus the the overall income of the MIT graduate is less the first 14 years and more after the 15th year when compared to the Harvard graduate ! (Longterm, a MIT degree is more worth but we knew that already.)}

\end{problemparts}
\end{problem}                                 


\iffalse
\problemdata      
        {annuities-3} % latex-friendly label for the prob.
        {Annuities} % The topic(s) of the problem content.
        {?} % Source (if known)
        {S02 PS6; F01 PS6} % Usage (list ones you are aware of).
        {Christos Kapoutsis, S02} % Last revision info (author, date).
\fi

\begin{problem}
Suppose you deposit \$40 into your MIT Credit Union account
today, \$39 in one month from now, \$38 in two months from now, and so on.
Given that the bankrate is constantly 0.2\% per month, how long will
it take to save \$500?

\solution{

After the first deposit you will have \$40. After the second deposit, you will have \$$(40\times 1.002 +
39)$. After your third deposit, your saved money will be \$$\bigl(
(40\times 1.002 + 39)\times 1.002 + 38) =$ \$$\bigl( 40\times
(1.002)^2 + 39\times 1.002 + 38\bigr)$, and so on. So, after the $n$th 
deposit, where $n \leq 41$,   
$$
S_n = \sum_{i=0}^{n-1} (40 - i) (1.002)^{n-i-1}
$$
dollars will be in your account. Substituting $j=n-i-1$, we can
rewrite this as  
$$
S_n = \sum_{j=0}^{n-1} \bigl( 40 - (n-j-1)\bigr) (1.002)^{j};
$$
and then as 
$$
S_n = (41-n) 
\Bigl( \sum_{j=0}^{n-1} (1.002)^{j}   \Bigr)+
\Bigl( \sum_{j=0}^{n-1} j (1.002)^{j} \Bigr).
$$
Using the closed forms from Course Notes~7, we can finally write $S_n$
as 
\[
S_n = 
(41-n)
\Bigl( \frac{1-1.002^n}{1-1.002} \Bigr)+
\Bigl( \frac{1.002-n1.002^n+(n-1)1.002^{n+1}}{(1-1.002)^2} \Bigr).
\]
% Matlab code 
% n = 15;
% display(sprintf('%f',(41-n)*(1-1.002^n)/(1- 1.002) + (1.002 - n*1.002^n + (n-1)*1.002^(n+1))/(1- 1.002)^2 ))
Solving 
$$
S_n \geq 500
$$ 
for $n$, we get $n\geq 15$. That is, you'll need 1.25~years
to save~\$500.
}
\end{problem}

\iffalse

\begin{problem}
Find closed-form expressions for the following sums.

\begin{problemparts}

\problempart
\[
\sum_{i=1}^n \frac{9^{i+1} - 7^{i-1}}{11^i}
\]

\solution{
Split the expression into two geometric series and then
apply the formula for the sum of a geometric series.

\begin{eqnarray*}
\sum_{i=0}^n \frac{9^i - 7^i}{11^i}
    & = &   \sum_{i=0}^n \left(\frac{9}{11}\right)^i -
        \sum_{i=0}^n \left(\frac{7}{11}\right)^i \\
    & = &   \frac{1 - \left(\frac{9}{11}\right)^{n+1}}{1 - \frac{9}{11}}
          - \frac{1 - \left(\frac{7}{11}\right)^{n+1}}{1 - \frac{7}{11}} \\
    & = &   - \frac{11}{2} \cdot \left(\frac{9}{11}\right)^{n+1}
        + \frac{11}{4} \cdot \left(\frac{7}{11}\right)^{n+1}
        + \frac{11}{4}
\end{eqnarray*}
}


\problempart
\[
\prod_{i=n}^{2n} 3^{4i + 5}
\]
\hint Take the logarithm.

\solution{
This product can be reduced to an easy sum by taking a
logarithm.

\begin{eqnarray*}
\prod_{i=1}^{n} 3^{4i + 5}
    & = &   3^{\log_3\left( \prod_{i=1}^{n} 3^{4i + 5} \right)} \\
    & = &   3^{\sum_{i=1}^n 4i+5} \\
    & = &   3^{2n(n+1) + 5n}
\end{eqnarray*}
}

\end{problemparts}

\end{problem}
\fi


\begin{problem} %Adapted from F02 ps6-7

Use the integral method to find upper and lower bounds for the following
summation that differ by at most 0.05.
\[
\sum_{i=1}^{\infty} \frac{1}{i^3}
\]
\hint Try adding the first few terms explicitly and then use integrals to
bound the sum of the remaining terms.

\solution{

We can bound the summation above as follows:
\begin{eqnarray*}
\sum_{i=1}^{\infty} \frac{1}{i^3}
    & \leq &    \frac{1}{1} + \frac{1}{8} + \frac{1}{27} +
            \int_4^{\infty} \frac{1}{(x-1)^3} \ dx \\
    & & =       \frac{1}{1} + \frac{1}{8} + \frac{1}{27} +
            \left( - \frac{1}{2\cdot(x-1)^2} \right)_4^{\infty} \\
    & & =       \frac{1}{1} + \frac{1}{8} + \frac{1}{27} +
            \frac{1}{18} \\
    & & =       1.2176\ldots
\end{eqnarray*}



We can lower bound the summation similarly:

\begin{eqnarray*}
\sum_{i=1}^{\infty} \frac{1}{i^3}
    & \geq &    \frac{1}{1} + \frac{1}{8} + \frac{1}{27} +
            \int_4^{\infty} \frac{1}{x^3} \ dx \\
    & = &       \frac{1}{1} + \frac{1}{8} + \frac{1}{27} +
            \left( - \frac{1}{2x^2} \right)_4^{\infty} \\
    & = &       \frac{1}{1} + \frac{1}{8} + \frac{1}{27} +
            \frac{1}{32} \\
    & = &     1.1933   \ldots
\end{eqnarray*}
}
\end{problem}


\begin{problem}
\bparts

\ppart Show that $\log (n!) = \Theta(n\log n)$.
\solution{
First, we have 

\begin{align*}
\log (n!) &= \sum_{i=1}^n \log i\\
&< \sum_{i=1}^n \log n\\
&=n\log n. 
\end{align*}

On the other hand, 

\begin{align*}
\log (n!) &= \sum_{i=1}^n \log i\\
 & > \sum_{i=\ceil{n/2}}^n \log i\\
    & > \sum_{i=\ceil{n/2}}^n \log (n/2)\\
    & > \frac{n \log (n/2)}{2}\\
    & = \frac{n ((\log n) -1)}{2}\\
    & = \frac{n \log n}{2} - \frac{n}{2}\\
    & > \frac{n \log n}{2} -\frac{n \log n}{6} & \text{for all large $n$.}\\
    & = \frac{1}{3} \cdot n \log n.
\end{align*}



Therefore, $\frac{1}{3}\cdot n \log n < \log(n!) <n\log n$. In other words, $\log(n!)=\Theta(n\log n)$. 
}


\ppart Suppose $f,g$ are nonnegative real-valued functions and
   $\lim_{x\to\infty}f(x) = \infty$.  Show that if $f = \Theta(g)$, then
   $\log f \sim \log g$.



\solution{
If $f=\Theta(g)$, then there exists $c_1, c_2\geq0$ and an $x_0$ such that for all $x\geq x_0, c_1f(x)\leq g(x)\leq c_2f(x)$. It follows that
\begin{align*}
\lim_{x\rightarrow\infty} \frac{\log g(x)}{\log f(x)}
&\geq \lim_{x\rightarrow\infty}\frac{\log(c_1f(x))}{\log f(x)}\\
&= \lim_{x\rightarrow\infty}\frac{\log c_1+\log f(x))}{\log f(x)}\\
&= \lim_{x\rightarrow\infty}\left(1+\frac{\log c_1}{\log f(x)}\right)\\
&=1
\end{align*}
Similarly,
\begin{align*}
\lim_{x\rightarrow\infty} \frac{\log g(x)}{\log f(x)}
&\leq \lim_{x\rightarrow\infty}\frac{\log(c_2f(x))}{\log f(x)}\\
&= \lim_{x\rightarrow\infty}\frac{\log c_2+\log f(x))}{\log f(x)}\\
&= \lim_{x\rightarrow\infty}\left(1+\frac{\log c_2}{\log f(x)}\right)\\
&=1
\end{align*}

Therefore, $\lim_{x\to\infty}\frac{\log g(x)}{\log f(x)}=1$. In other words, $\log f\sim\log g$.

}
\eparts
\end{problem}




\begin{problem}
Regrouping or reordering the terms of an infinite series is ok for
\emph{absolutely convergent} series, namely, series for which the sum of
the absolute values of their terms converges.  In other cases, rearranging
terms is not ok.  \iffalse An extreme example is
\[
S \eqdef \sum_{i=0}^{\infty} (-1)^i = 1 + (-1) + 1 + (-1) + \cdots
\]
because by regrouping the terms we can deduce:
\begin{eqnarray*}
S & = & [ 1 + (-1) ] + [ 1 + (-1) ] + \cdots = 0 + 0 + \cdots = 0,\\
S & = & 1 + [(-1) + 1] + [(-1) + 1] + \cdots = 1 + 0 + 0 + \cdots = 1.
\end{eqnarray*}

To see the problem here, let $S_n \eqdef \sum_{i=0}^{n}(-1)^i$.  Then $S_n
= 1$ for odd $n$ and $S_n = 0$ for even $n$.  Hence $S_n$ does not have a
well-defined limit as $n$ tends to infinity, implying that $S$ is not a
convergent series.

Even for convergent, but not absolutely convergent, series, rearranging
terms can cause big changes.\fi
For example, consider the series
\begin{equation}\label{1n}
1 - 1/2 + 1/3 - 1/4 \dots
\end{equation}
which converges, but is not absolutely convergent.

Let $r$ be any real number.  Explain how to reorder terms in~(\ref{1n}), so
that the resulting series converges to $r$.

\solution{

Note that the sum of the negative terms goes to negative infinity, because
the sum
\[
-1/2 - 1/4 - 1/6 -  \dots - 1/2n = -H_n/2 \sim (-\ln n)/ 2
\]
and $\ln n$ goes to infinity with $n$.  Similarly, the sum of the positive
terms goes to positive infinity.

To reorder the terms to converge to $r$, begin by taking the positive terms
in decreasing order until their sum first exceeds $r$.  Next, take the
negative terms in order of decreasing magnitude until the sum of all the
terms taken---positive and negative---first goes below $r$.  Now take the
remaining positive terms in decreasing order until the sum again exceeds $r$,
then the negative terms till the sum goes below $r$, and so on.  It is always
possible to move the sum above or below $r$ by taking enough of the remaining
positive or negative terms, because the remaining positive terms sum to
positive infinity and the remaining negative terms sum to negative
infinity.  Also, the running sum of the positive and negative terms taken
in this way goes above and below $r$ at most by the magnitude of the last
term taken.  Since the magnitude of the terms goes to zero, this implies
that the sum goes above and below $r$ by an amount that decreases to zero.
But this is exactly what it means to say the sum converges to $r$.


This argument applies to \emph{any} convergent series that is not
absolutely convergent to show that it can be reordered to converge to
\emph{any} desired number, or to diverge.  The moral: when reordering terms
in a series, be sure to check for absolute convergence.
}

\end{problem}


\end{document}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\iffalse

\problemdata      
        {?} % latex-friendly label for the prob.
        {Annuities} % The topic(s) of the problem content.
        {?} % Source (if known)
        {Fall 2001, quiz 3} % Usage (list ones you are aware of).
        {Christos Kapoutsis, S02} % Last revision info (author, date).

\begin{problem}
Suppose that you plan to purchase an annuity that pays you $m$ dollars per
year for $n$ years, starting $d$ years from now.  Suppose the interest
rate you could earn from a bank is such that \$$r$ deposited today will grow
to be $\$1$ in one year, \eg if the interest rate is 5\%, then $r =
1/1.05$.  Assume this rate will remain fixed forever.

\bparts

\ppart Find a closed-form formula in $m,n,d$ and $r$ for the current value
of this annuity.

\solution{
\begin{eqnarray*}
\text{Current price of the annuity}
& = & \sum_{i=d}^{n+d-1} mr^i\\
& = & \sum_{i=0}^{n+d -1}mr^i - \sum_{i=0}^{d-1}mr^i\\
& = & \frac{m ((r^{n+d} -1) - (r^{d}-1))}{r-1}\\
& = & \frac{mr^d(1- r^n)}{1-r}
\end{eqnarray*}
}


\ppart Find a closed-form formula for the same annuity if instead of
$n$ years, it pays forever.
\eparts

\solution{$\frac{mr^d}{1-r}$}

\end{problem}


\begin{problem}
Theory Pig wants to borrow $d$ dollars so that he can purchase a
stylish new pigsty.  At the end of each year for the next $n$ years, Theory
Pig will drop by the bank to make a payment on the loan.  The banker will
immediately invest this returned money at an $r$\% annual rate of
return. The banker wants to wind up with at least as much money as a result
of Theory Pig's payments as he would if he had invested the whole $d$
dollars at $r$\% for $n$ years starting today.

Write a closed form formula in $d,n$ and $r$ for the least annual payment
the banker might ask from Theory Pig.

\solution{
Let $R \eqdef (1+r/100)$, so that after 1 year, a one dollar
investment is worth $R$ dollars.  The banker will require that
\begin{equation*}
p \geq \frac{dR^{n}(R-1)}{R^n - 1}.
\end{equation*}
We derive this bound as follows:

Suppose that Theory Pig pays $p$ dollars at the end of each year.  The
banker can invest the first payment for $n-1$ years, the second payment
for $n-2$ years, etc., so that after $n$ years his total cash is:
\begin{eqnarray*}
\sum_{i=1}^{n} p \cdot R^{i-1}
& = & \sum_{i=0}^{n-1} p \cdot R^i\\
& = & p \frac{R^n - 1}{R - 1}.
\end{eqnarray*}
On the other hand, if the banker could invested the $d$ dollars today, then
after $n$ years his total cash is $d R^{n}$.  The first amount must
be at least as large as this, so
\begin{eqnarray*}
p \frac{R^n - 1}{R - 1} & \geq & dR^{n}\\
p &\geq& \frac{dR^{n}(R-1)}{R^n - 1}.
\end{eqnarray*}
}

\end{problem}


\begin{problem} 
Shady finance people often assert that a loan can be paid off more quickly
by making half-size payments twice as often.  The theory is that frequent
payments prevent interest from building up.  Let's analyze this.

Suppose that I take out a loan for $L$ dollars, and at the end of every
month, the bank charges me $m$\% monthly interest on the loan.
\begin{problemparts}

\problempart 
First, let's consider a ``frequent payment'' repayment
strategy.  Suppose that I pay $P$ dollars to the bank every month,
right after the bank charges me interest.  So after 1 month I owe $Ls -
P$ dollars, after 2 months I owe $(L s - P)s - P$ dollars, \etc, where $s
\eqdef 1 + m/100$.  Give a closed-form expression for the number
of months until the loan is repaid.

\noindent
(Assume that interest charges are smaller than my monthly payment; that
is, $L(1-s) < P$.  Do not worry about rounding to an integral number of
months.)

\solution{
After $k$ months, I owe
\[
L s^k - P \cdot s^{k-1} - P \cdot s^{k-2} - \cdots - P =
L s^k - P \cdot \frac{s^k - 1}{s-1}.
\]
The loan is paid when the amount that I owe equals zero; that is, when
\begin{eqnarray*}
L s^k - P \cdot \frac{s^k - 1}{s-1} & = & 0.
\end{eqnarray*}
Solving for $k$, the number of months until the loan is repaid, gives
\begin{eqnarray*}
k & = &	\frac{\ln\left(\frac{P}{P-(s-1)L}\right)}{\ln s}.
\end{eqnarray*}
}

\problempart Now let's consider an ``infrequent payment, late start''
repayment strategy.  Suppose that I pay $2P$ dollars to the bank every two
months, making the first payment two months after I take out the loan.
Thus, after 2 months I owe $L s^2 - 2P$ dollars, and after 4 months I owe
$(L s^2 - 2P) s^2 - 2P$ dollars.  Give a closed-form expression for the
number of months until the loan in repaid.

\solution{
After $k$ months, where $k$ is even, I owe
\[
L s^k - 2P \cdot s^{k-2} - 2P \cdot s^{k-4} - \ldots - 2P = 
L s^k - 2P \cdot \frac{s^k - 1}{s^2 - 1}.
\]
As before, the loan is repaid when the amount I owe equals zero.  This
happens when
\begin{eqnarray*}
k & = &	\frac{\ln\left(\frac{2P}{2P-(s^2-1)L}\right)}{\ln s}.
\end{eqnarray*}
}

\problempart Finally, let's consider an ``infrequent payment, early
start'' strategy.  As before, I pay $2P$ dollars to the bank every two
months, but now I make the first payment one month after I take out the
loan.  Thus, after 1 month I owe $L s - 2P$ dollars, and after 3 months I
owe $(L s - 2P) s^2 - 2P$ dollars.  Give a closed-form expression for the
number of months until the loan is repaid.

\solution{
After $k$ months, where $k$ is odd, I owe
\[
L s^k - 2P \cdot s^{k-1} - 2P \cdot s^{k-3}- \ldots - 2P =
L s^k - 2P \cdot \frac{s^{k+1} - 1}{s^2 - 1}.
\]
The loan is repaid when
\begin{eqnarray*}
k & = &	\frac{\ln\left(\frac{2P}{2Ps-(s^2-1)L}\right)}{\ln s}.
\end{eqnarray*}
}

\problempart Suppose that I take a loan of $L = \$100,000$.  The monthly
interest rate is $m = (1/2)\%$.  I either pay the bank $P = \$600$ every
month or $2P = \$1,200$ every two months, depending on the repayment
strategy that I choose.  How long will repayment take for each of the
three strategies?

\solution{
Substitution gives the following results:
\begin{center}
\begin{tabular}{lcr}
frequent payment & \hspace{1in} & 360 months \\
infrequent payment, late start & & 362 months \\
infrequent payment, early start & & 356 months
\end{tabular}
\end{center}
}

\problempart 
In 50 words or fewer, explain the merits of frequent and
infrequent payment strategies.

\solution{Getting money to the bank early is more important than the
frequency of payments.}

\end{problemparts}

\end{problem}


\iffalse
\problemdata     
{S01-PS5-1} 
{Annuities}              
{S98-PS5, S01-PS5} 		
{S01 Karger}


\begin{problem}
A college loan officer offers prospective M.Eng students the following
deal.  He will give them \$23,100 at the start of each year for five years
starting today to pay for their college tuition.  He offers the following
plan for repayment:\\
Wait five years, then repay \$$x.00$ at the start
of each year for the next ten years.

Suppose the annual interest rate is 8\%.  What value of $x$ will make the 
present value of the repayment equal to the present value of the loan?

\solution {
The formula for finding the present value of an annuity (given in lecture)
is
\[V = m \sum_{j=0}^{n-1}{1 \over (1+p)^j}\]
where $V$ is the present value, $m$ is the dollar amount of each payment, $n$ is
the number of years of the annuity, and $p = 0.08$ is the current
interest rate.

So the present value of what the college loan officer offers is
\begin{eqnarray*}
V & = & 23100 \cdot {\displaystyle\sum_{j=0}^4(\frac{1}{1+p})^j} \\
 & = & 23100 \cdot {\displaystyle\frac {(1 - \frac{1}{(1 + p)^5})} {(1 -
 \frac{1}{1 + p})}} \\
 & = & 23100 \cdot 4.312\\
 & = & \$99,610.13.
\end{eqnarray*}

The value, $V'$, of the repayment is
\[V' = x \cdot \sum_{j=5}^{14} \frac{1}{(1+p)^j}.\]

Since we want the present values to be equal, let $V' = V$, and solve for
$x$:
\begin{eqnarray*}
x & = & {\$99,610.13 \over { (\frac{1}{1+p})^5} \cdot (\sum_{j=0}^9(\frac{1}{1+p})^j) }\\
 & = & \frac {\$99,610.13} { (\frac{1} {1+p})^5 \cdot { {(1 - \frac{1}{(1+p)^{10}})} \over {(1 - \frac{1}{1+p})}}}\\
 & = & \frac  {\$99,610.13}{0.6805 \cdot 7.246}\\
 & = & \$20,196.25.
\end{eqnarray*}

So, rounding off to the nearest dollar, $x=\$20, 196$.
}

\end{problem}
\fi

\iffalse
\problempart
\[
\sum_{i=0}^{\infty} \sum_{j=0}^{\infty} \sum_{k=0}^{\infty} 2^{-(i +2j +3k)}
\]

\solution {
 Apply the formula for the sum of a geometric series three
times.

\begin{eqnarray*}
\sum_{i=0}^{\infty} \sum_{j=0}^{\infty} \sum_{k=0}^{\infty} 2^{-(i +2j +3k)}
    & = &   \sum_{i=0}^{\infty} 2^{-i} \cdot
        \left(\sum_{j=0}^{\infty} 2^{-2j} \cdot
        \left(\sum_{k=0}^{\infty} 2^{-3k} \right) \right) \\
    & = &   \sum_{i=0}^{\infty} 2^{-i} \cdot
        \left(\sum_{j=0}^{\infty} 2^{-2j} \cdot
        \frac{8}{7} \right) \\
    & = &   \sum_{i=0}^{\infty} 2^{-i} \cdot
        \frac{4}{3} \cdot \frac{8}{7} \\
    & = &   \frac{2}{1} \cdot \frac{4}{3} \cdot \frac{8}{7} \\
    & = &   \frac{64}{21}
\end{eqnarray*}
}


\problempart
\[
\sum_{i=n+1}^{2n} i^2
\]

\solution {

This expression is the difference of two sums of squares, which can be
reduced to a closed form by a standard formula.

\begin{eqnarray*}
\sum_{i=n+1}^{2n} i^2
    & = &   \sum_{i=1}^{2n} i^2 - \sum_{i=1}^{n} i^2 \\
    & = &   \frac{(2n)(2n+\frac{1}{2})(2n+1)}{3} -
        \frac{n(n+\frac{1}{2})(n+1)}{3} \\
    & = &   \frac{7}{3} n^3 + \frac{3}{2} n^2 + \frac{1}{6} n \\
    & = &   \frac{n (2n + 1) (7n + 1)}{6}
\end{eqnarray*}
}


\problempart

\[
\sum_{j=1}^n \sum_{i=0}^{\infty} j^{2/3} \cdot \left(1 - \frac{1}{2 j^{1/3}}\right)^i
\]

\solution {

This fearsome-looking sum is a paper tiger; we just apply
the formula for the sum of a geometric series followed by the formula
for the sum of an arithmetic series.

\begin{eqnarray*}
\sum_{j=1}^n \sum_{i=0}^{\infty} j^{2/3} \cdot \left(1 - \frac{1}{2 j^{1/3}}\right)^i
    & = &   \sum_{j=1}^n j^{2/3} \cdot \frac{1}{1 - \left(1 - \frac{1}{2 j^{1/3}}\right)} \\
    & = &   \sum_{j=1}^n 2j \\
    & = &   n (n+1)
\end{eqnarray*}
}

\problempart

\[
\prod_{i=2}^{n} \left(1 - \frac{1}{i^2}\right)
\]

\solution { 

We give two solutions.  First, evaluating a few terms
suggests that the product is equal to

\[
\frac{n+1}{2n}.
\]

We could verify this by induction.  The calculation needed for the
inductive step is shown below.

\begin{eqnarray*}
\prod_{i=2}^{n+1} \left(1 - \frac{1}{i^2}\right)
    & = &   \left(1 - \frac{1}{(n+1)^2}\right) \cdot
        \prod_{i=2}^{n} \left(1 - \frac{1}{i^2}\right) \\
    & = &   \left(1 - \frac{1}{(n+1)^2}\right) \cdot
        \frac{n+1}{2n} \\
    & = &   \frac{(n+1)+1}{2(n+1)}
\end{eqnarray*}

As an alternative approach, we might observe that this is a
``telescoping product''.

\begin{eqnarray*}
\prod_{i=2}^{n} \left(1 - \frac{1}{i^2}\right)
    & = & \prod_{i=2}^{n} \frac{(i-1)(i+1)}{i^2} \\
    & = & \frac{1 \cdot 3}{2 \cdot 2}
        \cdot \frac{2 \cdot 4}{3 \cdot 3}
        \cdot \frac{3 \cdot 5}{4 \cdot 4} \cdots
        \frac{(n-1) \cdot (n+1)}{n \cdot n} \\
    & = &   \frac{1}{2} \cdot {n+1}{n}
\end{eqnarray*}
}
\fi
