Hi,
I've been impressed with the Manhattan challenge problem series, so here's my two cents. I came across this problem today while calculating the return for my investment :)
Question: I plan to buy an investment instrument for a 20 years term. The investment company guarantees 10% annual rate of return compounded yearly. If I invest $20,000 per year throughout the term period (i.e. 20 years), what's the total fund value at the end of term period?
Solution:
Compound Interest formula = P*((1 + r/100)^n), where P is principal, r is rate per annum, and n is number of years
So, basically, we need to find out the following:
20,000*((1+10/100)^20) + 20,000*((1+10/100)^19) + 20,000*((1+10/100)^18) + .. + 20,000*((1+10/100)^1)
= 20,000*[x^20 + x^19 + .. + x], where x = 1 + 10/100
Getting x^n + x^(n-1) + x^(n-2) + ... + x is the tricky part.
Say y = x^n + x^(n-1) + x^(n-2) + ... + x --- (1)
From 1,
y - x^n = x^(n-1) + x^(n-2) + ... + x
=> y - x^n + 1 = x^(n-1) + x^(n-2) + ... + x + 1---- (2)
Also, from 1,
y = x(x^(n-1) + x^(n-2) + ... + x + 1) --- (3)
Combining 2 and 3,
y = x ( y - x^n + 1)
=> y = xy - x^(n+1) + x
=> x^(n+1) - x = xy - y
=> y(x-1) = x(x^(n) - 1)
=> y = x(x^(n) - 1) / (x - 1)
check if formula is correct (example):
What is 3^4 + 3^3 + 3^2 + 3 ?
= 81 + 27 + 9 + 3
= 120
Using the formula (y = x(x^(n) - 1) / (x - 1)):
3^4 + 3^3 + 3^2 + 3 = 3(3^4 - 1) / (3 -1)
= 3(81 - 1) / (3 - 1)
= 3*80/2
= 3*40
= 120
Now, using the formula, after 20 years, the total fund value would be 20,000 * [1.1(1.1^20 - 1)/(1.1-1)]; x = 1 + 10/100 = 110/100 = 1.1
= 20,000 * [1.1 * 6.7275 / 0.1]
= 20,000 * 11 * 6.7275
= $1,480,050
Hope you find it useful.
Regards,
vishal