Geo. Series partial sum (real-world difficulty): ((x)^(n+1)-1)/((x)-1)= S where S < A

dcpiccolo

New member
Joined
Dec 18, 2017
Messages
1
Geo. Series partial sum (real-world difficulty): ((x)^(n+1)-1)/((x)-1)= S where S < A

so here is my situation.


I have a number that , let's call it A, and I need to determine base of the exponent in a geometric series (see below) where the partial sum of the series will be as close to A as possible without exceeding it.

((x)^(n+1)-1)/((x)-1)= S where S < A


The problem is that in the this real-world application, each value of the geometric series is rounded, so to the best of my skill (which isn't much) standard math can't apply:


round(x^1)+round(x^2)+round(x^3)


I can use the partial sum of geometric series equation above to find some rough upper and lower limits. So say x=2 is a lower limit and x=2.04 is an upper limit... and the value i'm solving for is x=2.03948521.

Can anyone shed some light on this problem for me or suggest a way I can at least better calculate limits? This is for a computer programming application so I am hoping to use a recursive function to solve between the limits if there is no mathematical solution, but my method of finding the limits is probably wrong too so any help would be appreciated.


Thanks.
 
It is a difficult question to discuss when one doesn't really have the vocabulary or experience to discuss it. Let's see how far we can get...

Oddity: "as close as possible" - This is not a reasonable constraint. A limit will get as close as desired. The distance of any partial sum is the sum of the series less the finite number of terms you used in the partial sum.

Oddity: It is not usually necessary to use iteration to sum a Geometric Series. Personally, I would find such coding excessive and wasteful - maybe careless.

Typically, \(\displaystyle a + ar + ar^{2} + ar^{3} +\; ... \;= \dfrac{a}{1-r}\)

Partial Sum of the first n terms is this: \(\displaystyle a + r + ar^{2} +\; ...\; + ar^{n-1} = \dfrac{a - ar^{n}}{1-r} = \dfrac{a}{1-r} -\dfrac{ar^n}{1-r}\).

Thus, your distance from your target is \(\displaystyle \dfrac{ar^{n}}{1-r}\).

Finally, if you must round to 8 decimal places, you can calculate "n" to achieve this level of precision. \(\displaystyle 0.000000005 = \dfrac{ar^{n}}{1-r}\) Solve for n. You will need logarithms. (Or, most any calculator that costs more than $50 will do it for you.)

Let's see what you get with your Real World Problem.
 
Last edited:
so here is my situation.


I have a number that , let's call it A, and I need to determine base of the exponent in a geometric series (see below) where the partial sum of the series will be as close to A as possible without exceeding it.

((x)^(n+1)-1)/((x)-1)= S where S < A


The problem is that in the this real-world application, each value of the geometric series is rounded, so to the best of my skill (which isn't much) standard math can't apply:


round(x^1)+round(x^2)+round(x^3)


I can use the partial sum of geometric series equation above to find some rough upper and lower limits. So say x=2 is a lower limit and x=2.04 is an upper limit... and the value i'm solving for is x=2.03948521.

Can anyone shed some light on this problem for me or suggest a way I can at least better calculate limits? This is for a computer programming application so I am hoping to use a recursive function to solve between the limits if there is no mathematical solution, but my method of finding the limits is probably wrong too so any help would be appreciated.

As I understand it, the sum you are interested in is not really the geometric series, but the sum of its terms after rounding. (Rounded to the nearest whole number, or truncated, or to the nearest hundredth, or what? Or might you really mean that each term is multiplied by x and then rounded to get the next term, as one might do in compound interest calculations?). You are assuming the kth term is x^k (not some ax^k); but is your first term x^0 = 1 or x^1 = x? And your goal is to find a value of x (this is called the "common ratio" in a geometric series) such that the sum of the first n terms (is n fixed, or can you choose it arbitrarily?) is the given number A, to within some (specified?) precision. (I think you are using the word "limit" to mean "bound", and not the "limit of a sequence" in a calculus sense.)

Do you see all the holes in your question?

Perhaps it would help if you gave a more specific example, with particular numbers and showing the actual summation you do. Pick a value of A and show us, if not how you are currently finding x, at least how you determine what sum you get, and how you want the result to be different.

Then we'll have a much better chance of giving you a useful answer.
 
I still am not sure what your problem is. As tkhunny points out, it is far better to reduce truncation error by minimizing the number of computations. And why would you want to round each step? That increases potential error.
 
Top