# If $i=0.09$, find $n$ and the amount of final payment.

A fund of $\$500 $is to be accumulated by$ n $annual payments of$ \$100$, plus a final payment as small as possible made one year after the last regular payment. If $i = 0.09$, find $n$ and the amount of final payment.

I have gotten as far as:

$$500 = 100 \times (1.09)^{n} + P(1.09)^{n + 1},$$ $$\frac{500 - 100(1.09)^{n}}{(1.09)^{n + 1}} = P.$$

-

You pay $100$. After a year, that has grown to $109$, and you pay another $100$, making a balance of $209$. After another year, that $209$ has grown to ... how much? And you pay another $100$, making a balance of ... how much? And you do that one more year, and how much do you have? And what happens then?
Let $x_k$ be the amount at year $k$, with $x_0 = 100$. Then we have $x_{k+1} = (1+r) x_k+100$, with $r=0.09$. A few terms suggests a general solution, $x_0 = 100, x_1 = 100(1+r)$, $x_2 = 100(1+r)^2+100(1+r),..., x_{n-1} = 100(1+r)^{n-1}+...+100$.
After the $n$th payment another year elapses before a final payment of $F_n$ is made, resulting in a total of $500$, ie, \begin{eqnarray} 500 &=& 100(1+r)^{n}+...+100(1+r) + F_n \\ & = & 100(1+r)\frac{1-(1+r)^n}{1-(1+r)} +F_n \\ & = & 100(1+\frac{1}{r})((1+r)^n-1) + F_n \end{eqnarray} Rearranging gives $F_n = 500-100(1+\frac{1}{r})((1+r)^n-1)$. Note that $F_n$ is decreasing from $F_0 = 500$, so we can compute $\max \{ n | F_n \geq 0 \}$ to find the answer.
(As a sanity check, with $r=0$ we would have $n=5$ and $F_5 = 0$, so we expect $n < 5$.)