How to solve $S = x + xn + xn^2 + cdots + xn^{y-1}$ for $n$
$begingroup$
I need to come up with a formula to calculate the coefficient from this formula
$$S = x + xn + xn^2 + cdots + xn^{y-1} tag{1}$$
Variables:
$S$ - total prize pool
$x$ - amount the last place receives
$y$ - number of players
$n$ - coefficient
How do I solve for $n$?
Thank you
geometric-progressions
$endgroup$
add a comment |
$begingroup$
I need to come up with a formula to calculate the coefficient from this formula
$$S = x + xn + xn^2 + cdots + xn^{y-1} tag{1}$$
Variables:
$S$ - total prize pool
$x$ - amount the last place receives
$y$ - number of players
$n$ - coefficient
How do I solve for $n$?
Thank you
geometric-progressions
$endgroup$
$begingroup$
Read this: en.wikipedia.org/wiki/Geometric_series#Formula
$endgroup$
– Matti P.
Jan 9 at 13:45
$begingroup$
The $n$ in your equation corresponds to $r$ in Wikipedia's notation. But I'm afraid there isn't an exact formula to calculate $r$. You'll have to resort to numerical methods for solving it. You can, for example, plot $S$ as a function of $n$ and then see what the approximate answer is.
$endgroup$
– Matti P.
Jan 9 at 13:46
$begingroup$
I set the values for S, x, y. I just need to understand how to solve for n
$endgroup$
– Yuri Vaskovski
Jan 9 at 13:56
$begingroup$
Could you precise if $n$ is supposed to be small (such as $n=1+epsilon$ ? If this is the case, we can derive quite nice approximations.
$endgroup$
– Claude Leibovici
Jan 13 at 9:32
add a comment |
$begingroup$
I need to come up with a formula to calculate the coefficient from this formula
$$S = x + xn + xn^2 + cdots + xn^{y-1} tag{1}$$
Variables:
$S$ - total prize pool
$x$ - amount the last place receives
$y$ - number of players
$n$ - coefficient
How do I solve for $n$?
Thank you
geometric-progressions
$endgroup$
I need to come up with a formula to calculate the coefficient from this formula
$$S = x + xn + xn^2 + cdots + xn^{y-1} tag{1}$$
Variables:
$S$ - total prize pool
$x$ - amount the last place receives
$y$ - number of players
$n$ - coefficient
How do I solve for $n$?
Thank you
geometric-progressions
geometric-progressions
edited Jan 9 at 14:19
Blue
49.4k870157
49.4k870157
asked Jan 9 at 13:38
Yuri VaskovskiYuri Vaskovski
1
1
$begingroup$
Read this: en.wikipedia.org/wiki/Geometric_series#Formula
$endgroup$
– Matti P.
Jan 9 at 13:45
$begingroup$
The $n$ in your equation corresponds to $r$ in Wikipedia's notation. But I'm afraid there isn't an exact formula to calculate $r$. You'll have to resort to numerical methods for solving it. You can, for example, plot $S$ as a function of $n$ and then see what the approximate answer is.
$endgroup$
– Matti P.
Jan 9 at 13:46
$begingroup$
I set the values for S, x, y. I just need to understand how to solve for n
$endgroup$
– Yuri Vaskovski
Jan 9 at 13:56
$begingroup$
Could you precise if $n$ is supposed to be small (such as $n=1+epsilon$ ? If this is the case, we can derive quite nice approximations.
$endgroup$
– Claude Leibovici
Jan 13 at 9:32
add a comment |
$begingroup$
Read this: en.wikipedia.org/wiki/Geometric_series#Formula
$endgroup$
– Matti P.
Jan 9 at 13:45
$begingroup$
The $n$ in your equation corresponds to $r$ in Wikipedia's notation. But I'm afraid there isn't an exact formula to calculate $r$. You'll have to resort to numerical methods for solving it. You can, for example, plot $S$ as a function of $n$ and then see what the approximate answer is.
$endgroup$
– Matti P.
Jan 9 at 13:46
$begingroup$
I set the values for S, x, y. I just need to understand how to solve for n
$endgroup$
– Yuri Vaskovski
Jan 9 at 13:56
$begingroup$
Could you precise if $n$ is supposed to be small (such as $n=1+epsilon$ ? If this is the case, we can derive quite nice approximations.
$endgroup$
– Claude Leibovici
Jan 13 at 9:32
$begingroup$
Read this: en.wikipedia.org/wiki/Geometric_series#Formula
$endgroup$
– Matti P.
Jan 9 at 13:45
$begingroup$
Read this: en.wikipedia.org/wiki/Geometric_series#Formula
$endgroup$
– Matti P.
Jan 9 at 13:45
$begingroup$
The $n$ in your equation corresponds to $r$ in Wikipedia's notation. But I'm afraid there isn't an exact formula to calculate $r$. You'll have to resort to numerical methods for solving it. You can, for example, plot $S$ as a function of $n$ and then see what the approximate answer is.
$endgroup$
– Matti P.
Jan 9 at 13:46
$begingroup$
The $n$ in your equation corresponds to $r$ in Wikipedia's notation. But I'm afraid there isn't an exact formula to calculate $r$. You'll have to resort to numerical methods for solving it. You can, for example, plot $S$ as a function of $n$ and then see what the approximate answer is.
$endgroup$
– Matti P.
Jan 9 at 13:46
$begingroup$
I set the values for S, x, y. I just need to understand how to solve for n
$endgroup$
– Yuri Vaskovski
Jan 9 at 13:56
$begingroup$
I set the values for S, x, y. I just need to understand how to solve for n
$endgroup$
– Yuri Vaskovski
Jan 9 at 13:56
$begingroup$
Could you precise if $n$ is supposed to be small (such as $n=1+epsilon$ ? If this is the case, we can derive quite nice approximations.
$endgroup$
– Claude Leibovici
Jan 13 at 9:32
$begingroup$
Could you precise if $n$ is supposed to be small (such as $n=1+epsilon$ ? If this is the case, we can derive quite nice approximations.
$endgroup$
– Claude Leibovici
Jan 13 at 9:32
add a comment |
3 Answers
3
active
oldest
votes
$begingroup$
The equation can be written
$$frac{n^y-1}{n-1}=frac Sx$$ or in the polynomial form
$$n^y-frac Sxn+frac Sx-1=0.$$
Such an equation doesn't have a closed-form solution, except for a few small values of the degree $y$.
A numerical solution by Newton's method works well.
$endgroup$
add a comment |
$begingroup$
The practical way to do it, assuming $ S > xy$. You take the following function
$$
f(n) = left(1+frac Sx n-frac Sx right)^{1/y}
$$
and then apply it to itself, until result no longer changes, starting with $n_0=1+1/y$: $n_1=f(n_0)$, $n_2=f(n_1)$ and so on.
For example, for $y=9$, $S/x=15$, we have the following
$$n=1.111, 1.115, 1.118, 1.120, 1.121, 1.122, 1.122dots$$
$endgroup$
add a comment |
$begingroup$
As Yves Daoust wrote, you are looking for the zero of function
$$f(n)=n^y-frac{ S}{x}(n-1)-1$$ Consider its derivatives
$$f'(n)=y, n^{y-1}-frac{S}{x}$$
$$f''(n)=y,(y-1) , n^{y-2}$$ For $y>1$, the second derivative is always positive.
The first derivative cancels at
$$n_*=left(frac{S}{x y}right)^{frac{1}{y-1}}$$
So, if $f(n_*)<0$ (remember that $n=1$ is a trivial solution to be discarded), to get a starting point for Newton method, expand $f(n)$ as a Taylor series to second order around $n=n_*$ to get
$$f(n)=f(n_*)+frac 12 f''(n_*) (n-n*)^2+Oleft((n-n_*)^3right)$$ and, ignoring the high order tems
$$n_0=n_*+sqrt{-2frac{f(n_*) }{f''(n_*) }}$$
Now, iterate using
$$n_{k+1}=n_k-frac{ f(n_k)} { f'(n_k)}$$
For the values used by Vasily Mitch $(y=9,S=15x)$, $n_*=1.06594$ , $n_0=1.12738$ anf the iterates would be
$$left(
begin{array}{cc}
k & n_k \
0 & 1.127375420 \
1 & 1.123698919 \
2 & 1.123557057 \
3 & 1.123556849
end{array}
right)$$
Let us do the same with huge numbers : $y=123$, $S=123456789,x$. This will give $n_*=1.11994$ and $n_0=1.16505$. Newton iterates would be
$$left(
begin{array}{cc}
k & n_k \
0 & 1.165045878 \
1 & 1.156842265 \
2 & 1.150315554 \
3 & 1.146560370 \
4 & 1.145520226 \
5 & 1.145454006 \
6 & 1.145453756
end{array}
right)$$
$endgroup$
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3067454%2fhow-to-solve-s-x-xn-xn2-cdots-xny-1-for-n%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
The equation can be written
$$frac{n^y-1}{n-1}=frac Sx$$ or in the polynomial form
$$n^y-frac Sxn+frac Sx-1=0.$$
Such an equation doesn't have a closed-form solution, except for a few small values of the degree $y$.
A numerical solution by Newton's method works well.
$endgroup$
add a comment |
$begingroup$
The equation can be written
$$frac{n^y-1}{n-1}=frac Sx$$ or in the polynomial form
$$n^y-frac Sxn+frac Sx-1=0.$$
Such an equation doesn't have a closed-form solution, except for a few small values of the degree $y$.
A numerical solution by Newton's method works well.
$endgroup$
add a comment |
$begingroup$
The equation can be written
$$frac{n^y-1}{n-1}=frac Sx$$ or in the polynomial form
$$n^y-frac Sxn+frac Sx-1=0.$$
Such an equation doesn't have a closed-form solution, except for a few small values of the degree $y$.
A numerical solution by Newton's method works well.
$endgroup$
The equation can be written
$$frac{n^y-1}{n-1}=frac Sx$$ or in the polynomial form
$$n^y-frac Sxn+frac Sx-1=0.$$
Such an equation doesn't have a closed-form solution, except for a few small values of the degree $y$.
A numerical solution by Newton's method works well.
answered Jan 9 at 14:26
Yves DaoustYves Daoust
132k676229
132k676229
add a comment |
add a comment |
$begingroup$
The practical way to do it, assuming $ S > xy$. You take the following function
$$
f(n) = left(1+frac Sx n-frac Sx right)^{1/y}
$$
and then apply it to itself, until result no longer changes, starting with $n_0=1+1/y$: $n_1=f(n_0)$, $n_2=f(n_1)$ and so on.
For example, for $y=9$, $S/x=15$, we have the following
$$n=1.111, 1.115, 1.118, 1.120, 1.121, 1.122, 1.122dots$$
$endgroup$
add a comment |
$begingroup$
The practical way to do it, assuming $ S > xy$. You take the following function
$$
f(n) = left(1+frac Sx n-frac Sx right)^{1/y}
$$
and then apply it to itself, until result no longer changes, starting with $n_0=1+1/y$: $n_1=f(n_0)$, $n_2=f(n_1)$ and so on.
For example, for $y=9$, $S/x=15$, we have the following
$$n=1.111, 1.115, 1.118, 1.120, 1.121, 1.122, 1.122dots$$
$endgroup$
add a comment |
$begingroup$
The practical way to do it, assuming $ S > xy$. You take the following function
$$
f(n) = left(1+frac Sx n-frac Sx right)^{1/y}
$$
and then apply it to itself, until result no longer changes, starting with $n_0=1+1/y$: $n_1=f(n_0)$, $n_2=f(n_1)$ and so on.
For example, for $y=9$, $S/x=15$, we have the following
$$n=1.111, 1.115, 1.118, 1.120, 1.121, 1.122, 1.122dots$$
$endgroup$
The practical way to do it, assuming $ S > xy$. You take the following function
$$
f(n) = left(1+frac Sx n-frac Sx right)^{1/y}
$$
and then apply it to itself, until result no longer changes, starting with $n_0=1+1/y$: $n_1=f(n_0)$, $n_2=f(n_1)$ and so on.
For example, for $y=9$, $S/x=15$, we have the following
$$n=1.111, 1.115, 1.118, 1.120, 1.121, 1.122, 1.122dots$$
edited Jan 9 at 14:37
answered Jan 9 at 14:13
Vasily MitchVasily Mitch
2,6791312
2,6791312
add a comment |
add a comment |
$begingroup$
As Yves Daoust wrote, you are looking for the zero of function
$$f(n)=n^y-frac{ S}{x}(n-1)-1$$ Consider its derivatives
$$f'(n)=y, n^{y-1}-frac{S}{x}$$
$$f''(n)=y,(y-1) , n^{y-2}$$ For $y>1$, the second derivative is always positive.
The first derivative cancels at
$$n_*=left(frac{S}{x y}right)^{frac{1}{y-1}}$$
So, if $f(n_*)<0$ (remember that $n=1$ is a trivial solution to be discarded), to get a starting point for Newton method, expand $f(n)$ as a Taylor series to second order around $n=n_*$ to get
$$f(n)=f(n_*)+frac 12 f''(n_*) (n-n*)^2+Oleft((n-n_*)^3right)$$ and, ignoring the high order tems
$$n_0=n_*+sqrt{-2frac{f(n_*) }{f''(n_*) }}$$
Now, iterate using
$$n_{k+1}=n_k-frac{ f(n_k)} { f'(n_k)}$$
For the values used by Vasily Mitch $(y=9,S=15x)$, $n_*=1.06594$ , $n_0=1.12738$ anf the iterates would be
$$left(
begin{array}{cc}
k & n_k \
0 & 1.127375420 \
1 & 1.123698919 \
2 & 1.123557057 \
3 & 1.123556849
end{array}
right)$$
Let us do the same with huge numbers : $y=123$, $S=123456789,x$. This will give $n_*=1.11994$ and $n_0=1.16505$. Newton iterates would be
$$left(
begin{array}{cc}
k & n_k \
0 & 1.165045878 \
1 & 1.156842265 \
2 & 1.150315554 \
3 & 1.146560370 \
4 & 1.145520226 \
5 & 1.145454006 \
6 & 1.145453756
end{array}
right)$$
$endgroup$
add a comment |
$begingroup$
As Yves Daoust wrote, you are looking for the zero of function
$$f(n)=n^y-frac{ S}{x}(n-1)-1$$ Consider its derivatives
$$f'(n)=y, n^{y-1}-frac{S}{x}$$
$$f''(n)=y,(y-1) , n^{y-2}$$ For $y>1$, the second derivative is always positive.
The first derivative cancels at
$$n_*=left(frac{S}{x y}right)^{frac{1}{y-1}}$$
So, if $f(n_*)<0$ (remember that $n=1$ is a trivial solution to be discarded), to get a starting point for Newton method, expand $f(n)$ as a Taylor series to second order around $n=n_*$ to get
$$f(n)=f(n_*)+frac 12 f''(n_*) (n-n*)^2+Oleft((n-n_*)^3right)$$ and, ignoring the high order tems
$$n_0=n_*+sqrt{-2frac{f(n_*) }{f''(n_*) }}$$
Now, iterate using
$$n_{k+1}=n_k-frac{ f(n_k)} { f'(n_k)}$$
For the values used by Vasily Mitch $(y=9,S=15x)$, $n_*=1.06594$ , $n_0=1.12738$ anf the iterates would be
$$left(
begin{array}{cc}
k & n_k \
0 & 1.127375420 \
1 & 1.123698919 \
2 & 1.123557057 \
3 & 1.123556849
end{array}
right)$$
Let us do the same with huge numbers : $y=123$, $S=123456789,x$. This will give $n_*=1.11994$ and $n_0=1.16505$. Newton iterates would be
$$left(
begin{array}{cc}
k & n_k \
0 & 1.165045878 \
1 & 1.156842265 \
2 & 1.150315554 \
3 & 1.146560370 \
4 & 1.145520226 \
5 & 1.145454006 \
6 & 1.145453756
end{array}
right)$$
$endgroup$
add a comment |
$begingroup$
As Yves Daoust wrote, you are looking for the zero of function
$$f(n)=n^y-frac{ S}{x}(n-1)-1$$ Consider its derivatives
$$f'(n)=y, n^{y-1}-frac{S}{x}$$
$$f''(n)=y,(y-1) , n^{y-2}$$ For $y>1$, the second derivative is always positive.
The first derivative cancels at
$$n_*=left(frac{S}{x y}right)^{frac{1}{y-1}}$$
So, if $f(n_*)<0$ (remember that $n=1$ is a trivial solution to be discarded), to get a starting point for Newton method, expand $f(n)$ as a Taylor series to second order around $n=n_*$ to get
$$f(n)=f(n_*)+frac 12 f''(n_*) (n-n*)^2+Oleft((n-n_*)^3right)$$ and, ignoring the high order tems
$$n_0=n_*+sqrt{-2frac{f(n_*) }{f''(n_*) }}$$
Now, iterate using
$$n_{k+1}=n_k-frac{ f(n_k)} { f'(n_k)}$$
For the values used by Vasily Mitch $(y=9,S=15x)$, $n_*=1.06594$ , $n_0=1.12738$ anf the iterates would be
$$left(
begin{array}{cc}
k & n_k \
0 & 1.127375420 \
1 & 1.123698919 \
2 & 1.123557057 \
3 & 1.123556849
end{array}
right)$$
Let us do the same with huge numbers : $y=123$, $S=123456789,x$. This will give $n_*=1.11994$ and $n_0=1.16505$. Newton iterates would be
$$left(
begin{array}{cc}
k & n_k \
0 & 1.165045878 \
1 & 1.156842265 \
2 & 1.150315554 \
3 & 1.146560370 \
4 & 1.145520226 \
5 & 1.145454006 \
6 & 1.145453756
end{array}
right)$$
$endgroup$
As Yves Daoust wrote, you are looking for the zero of function
$$f(n)=n^y-frac{ S}{x}(n-1)-1$$ Consider its derivatives
$$f'(n)=y, n^{y-1}-frac{S}{x}$$
$$f''(n)=y,(y-1) , n^{y-2}$$ For $y>1$, the second derivative is always positive.
The first derivative cancels at
$$n_*=left(frac{S}{x y}right)^{frac{1}{y-1}}$$
So, if $f(n_*)<0$ (remember that $n=1$ is a trivial solution to be discarded), to get a starting point for Newton method, expand $f(n)$ as a Taylor series to second order around $n=n_*$ to get
$$f(n)=f(n_*)+frac 12 f''(n_*) (n-n*)^2+Oleft((n-n_*)^3right)$$ and, ignoring the high order tems
$$n_0=n_*+sqrt{-2frac{f(n_*) }{f''(n_*) }}$$
Now, iterate using
$$n_{k+1}=n_k-frac{ f(n_k)} { f'(n_k)}$$
For the values used by Vasily Mitch $(y=9,S=15x)$, $n_*=1.06594$ , $n_0=1.12738$ anf the iterates would be
$$left(
begin{array}{cc}
k & n_k \
0 & 1.127375420 \
1 & 1.123698919 \
2 & 1.123557057 \
3 & 1.123556849
end{array}
right)$$
Let us do the same with huge numbers : $y=123$, $S=123456789,x$. This will give $n_*=1.11994$ and $n_0=1.16505$. Newton iterates would be
$$left(
begin{array}{cc}
k & n_k \
0 & 1.165045878 \
1 & 1.156842265 \
2 & 1.150315554 \
3 & 1.146560370 \
4 & 1.145520226 \
5 & 1.145454006 \
6 & 1.145453756
end{array}
right)$$
edited Jan 13 at 15:14
answered Jan 13 at 7:27
Claude LeiboviciClaude Leibovici
125k1158135
125k1158135
add a comment |
add a comment |
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3067454%2fhow-to-solve-s-x-xn-xn2-cdots-xny-1-for-n%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
$begingroup$
Read this: en.wikipedia.org/wiki/Geometric_series#Formula
$endgroup$
– Matti P.
Jan 9 at 13:45
$begingroup$
The $n$ in your equation corresponds to $r$ in Wikipedia's notation. But I'm afraid there isn't an exact formula to calculate $r$. You'll have to resort to numerical methods for solving it. You can, for example, plot $S$ as a function of $n$ and then see what the approximate answer is.
$endgroup$
– Matti P.
Jan 9 at 13:46
$begingroup$
I set the values for S, x, y. I just need to understand how to solve for n
$endgroup$
– Yuri Vaskovski
Jan 9 at 13:56
$begingroup$
Could you precise if $n$ is supposed to be small (such as $n=1+epsilon$ ? If this is the case, we can derive quite nice approximations.
$endgroup$
– Claude Leibovici
Jan 13 at 9:32