Extrapolation of $c^{-3/2}$. Optimal data points?

59 Views Asked by At

I have a computer code that does some complicated calculations and results in a real number. At the end I had to perform a infinite sum, $$ S=\sum_i^\infty x_i \;, $$ which I approximate by a finite sum with a cutoff $c$, $$ s(c) = \sum_i^c x_i\;, $$ such that $s(c) \rightarrow S$ for $c\rightarrow \infty$. More precisely, for large $c$, I know that the behavior is given by: $$ s(c) = S + a \cdot c^{-3/2} \quad \text{for }c\rightarrow \infty $$ where $a$ is some constant.

The cutoff $c$ is given by the user of the computer program. Thus I want the code to perform an extrapolation (linear regression) for several $c$. For example at $0.6c$, $0.7c$, $0.8c$, $0.9c$, and $1.0c$. However, since I know that the given behavior is only true for large $c$ the result for $1.0c$ is more reliable than e.g. for $0.6c$.

My question: Is there an optimal choice of data points for the extrapolation? I guess it would be better if the data points get more dense the closer they are at $1.0c$...?

Edit: To make it clearer: I want to know $S$! Since $c$ is given by a user of the program, this given $c$ is the largest possible cutoof for an extrapolation. Thus I can only create data points in the intervall $[0,c]$. The question is how I should chose them? I could calculate $$ \big(0.6c, \,s(0.6c)\big), \; \big(0.7c, \,s(0.7c)\big), \; \big(0.8c, \,s(0.8c)\big), \; \big(0.9c, \,s(0.9c)\big), \;\big(1.0c, \,s(1.0c)\big) $$ and then extrapolate or I could calculate $$ \big(0.7c, \,s(0.7c)\big), \; \big(0.82c, \,s(0.82c)\big), \; \big(0.91c, \,s(0.91c)\big), \; \big(0.97c, \,s(0.97c)\big), \;\big(1.0c, \,s(1.0c)\big) $$ and then extrapolate $s(c) = S + a \cdot c^{-3/2}$. The first example covers a broader cutoff region with equally spaced cutoffs whereas the second example is narrower but is biased close to $1.0c$.

1

There are 1 best solutions below

2
On

Your question isn't very clear to me. I suppose you plot $s(c)$ against $c^{-3/2}$ and find a best-fit line so that you can get $S,a$ from the intercept and gradient. If so, then yes it makes sense to use larger values of $c$. If $s(c)$ is smooth enough, then you would want as large values as possible such that the differences are still large compared to the machine precision, otherwise rounding errors will cancel all the benefit.