<\$BlogRSDUrl\$>

Vito Prosciutto: Teaching community college math on the road to a PhD.

## 11:10Some math content

While I was thinking about the post below, I set myself the problem of finding a quick way of calculating the earnings on a savings account where a regular amount is invested each month. The interesting part here is less the answer than the process to see how we can solve a harder than typical math problem.

Consider the case where we're investing \$100/month at 6% annually (which is 0.5% monthly, thus my choice of a 6% rate). So at the end of the first month there's the \$100 investment, plus its interest (I=prt) of \$.50. At the end of the second month, we've added \$100 and we're going to pay interest on \$200.50. And the process repeats. That's not terribly helpful. Let's look at the abstract case.

Let the a be the monthly investment amount and x be the monthly interest rate. Now we have the following amounts at the end of each month:
Month 1: ax
Month 2: (ax+a)x=ax2+ax
Month 3: (ax2+ax+a)x=ax3+ax2+ax

Now we see a pattern. We can factor out the a and see that we're left with
[sum from i=1 to n] xi

We just need a formula to express this more succinctly. Trying some concrete numbers to see what happens helps when I pick x=10. Then we're talking about (letting the lower limit be 0 rather than 1) a number which is all 1's. It occurs to me that this can be described by taking xn+1-1 and dividing by x-1. I double check this with some polynomial long division to make sure that it is in fact the expected xn+...+x+1 and now I know that I can find the total saved after n months by taking
P=a[((1+(r/12))n+1-1)/(r/12)-1] where r is the annual savings rate. We add 1 because x will be 1 plus the monthly savings rate. The minus 1 at the end is to take care of the fact that our expression is actually for the sum from 0 to n but we don't want to include that 0 term (which reflects another contribution to the pot at the end of the savings term which hasn't had interest applied to it).

Next I'll have to tackle the installment loan payment amount formula. How hard can it be?   