Talk:Cost as a Function of Land Pressure and Investment Count/@comment-174.23.33.189-20150925151809

The sum for a * x^2 * b^x (from x = 1 to n)  is a * (b^(n+1) * (n^2 * b^2 - (2n^2 + 2n - 1) * b + n^2 + 2n + 1) - b^2 - b)  / (b-1)^3. The sum for a * b^x (from x = 1 to n) is a * (b^(n+1) -1)/(b-1). These two should be enough to solve it so long as I is not 0 (in which case b=1 causing division by zero). If I = 0 the sum of a * x^2 from (x = 1 to n) is a * (1/3 n^3 + 1/2 n^2 + 1/6 n).