Used to calculate the sum of an infinite geometric series where the common ratio is less than 1 and greater than -1. If the common ratio is out of these upper and lower bounds, the answer will NOT be correct.
A geometric sequence is a sequence where nth term is the preceding term multiplied by a common ratio. For example: 2,4,8,16,32. Likewise, 32,16,8,4,2 is also a geometric sequence.
A geometric series is simply the sum of these numbers.
author: Near
This equation generates the following summation as an example when a = 3 and r = 0.4:
`sum = 3 / (1 - 0.4) = 5`
To see how the summation to this value as k approaches infinity we take a look at several successive summations of intermediate values of k
[k = 0] `sum a*r^k = 3 * 0.4^0 = 3`
[k = 1] `sum a*r^k = (3 * 0.4^0) + (3*0.4^1) = 3 + 1.2 = 4.2`
[k = 2] `sum a*r^k = (3 * 0.4^0) + (3*0.4^1) + (3*0.4^2) = 3 + 1.2 + 0.48 = 4.68`
[k = 3] `sum a*r^k = (3 * 0.4^0) + (3*0.4^1) + (3*0.4^2) + (3*0.4^3) = 3 + 1.2 + 0.48 + 0.192 = 4.872`
[k = 4] `sum a*r^k = (3 * 0.4^0) + (3*0.4^1) + (3*0.4^2) + (3*0.4^3) + (3*0.4^4) = 3 + 1.2 + 0.48 + 0.192 + 0.0768 = 4.9488`
[k = 5] `sum a*r^k = (3 * 0.4^0) + (3*0.4^1) + (3*0.4^2) + (3*0.4^3) + (3*0.4^4) + (3*0.4^5) = 3 + 1.2 + 0.48 + 0.192 + 0.0768 + 0.03072 = 4.97952`
It is pretty easy to see the summation is progressing closer and closer to 5.