Why does the approximation for exponents $(a+b)^c approx a^c-bc (a+1)^cb$ work?

Clash Royale CLAN TAG#URR8PPP
up vote
6
down vote
favorite
I was working with some code involving exponents in an environment where exponents can only be calculated if the base of the exponent is an integer. I needed a good fast way to approximate this without causing overflow issues. I accidentally stumbled upon an incredible approximation method and I'm not sure why it works.
Suppose you have an exponent in the form of $x^y$ where $x$ is not an integer and you want to approximate the value using only exponents which have integers for their base-values.
Break $x$ into two parts, an integer part, and an additive. For example $3.7to 3 + 0.7$.
Therefor, $xto(a+b)$ where $a$ is an integer part.
The approximation formula is:
$$(a+b)^c approx a^c-bc (a+1)^cb$$
Or in my original form:
$$(a+b)^c approx ((a+b)-b)^c(1-b) ((a+b)+(1-b))^cb$$
It's remarkably close to the right solution seemingly every time. Granted I've only been able to check about 100 cases, but I'm fascinated.
For example:
$$37.5^28 â 37^14cdot38^14$$
And sure enough, if we divide both parts, the ratio is 1.002 which is very close.
Edit: Thanks to RayDansh pointing out in the comments, this is accurate IFF $a+b$ is big. In fact, the larger $a$ gets the more accurate this approximation seems to get.
Can anyone shed some light as to why this approximation method I've stumbled upon works?
exponential-function exponentiation approximation
 |Â
show 3 more comments
up vote
6
down vote
favorite
I was working with some code involving exponents in an environment where exponents can only be calculated if the base of the exponent is an integer. I needed a good fast way to approximate this without causing overflow issues. I accidentally stumbled upon an incredible approximation method and I'm not sure why it works.
Suppose you have an exponent in the form of $x^y$ where $x$ is not an integer and you want to approximate the value using only exponents which have integers for their base-values.
Break $x$ into two parts, an integer part, and an additive. For example $3.7to 3 + 0.7$.
Therefor, $xto(a+b)$ where $a$ is an integer part.
The approximation formula is:
$$(a+b)^c approx a^c-bc (a+1)^cb$$
Or in my original form:
$$(a+b)^c approx ((a+b)-b)^c(1-b) ((a+b)+(1-b))^cb$$
It's remarkably close to the right solution seemingly every time. Granted I've only been able to check about 100 cases, but I'm fascinated.
For example:
$$37.5^28 â 37^14cdot38^14$$
And sure enough, if we divide both parts, the ratio is 1.002 which is very close.
Edit: Thanks to RayDansh pointing out in the comments, this is accurate IFF $a+b$ is big. In fact, the larger $a$ gets the more accurate this approximation seems to get.
Can anyone shed some light as to why this approximation method I've stumbled upon works?
exponential-function exponentiation approximation
Well, here's your intuition. The exponent terms you've discovered are such that whichever of $a$ and $a+1$ are closer to $a+b$, those will be weighted more than the other term. And both happen to be remarkably close to $a+b$. Hence your discovery.
â Rushabh Mehta
Aug 14 at 23:48
2
What about $1.5^100âÂÂ1^50*2^50$? Quite inaccurate.
â RayDansh
Aug 14 at 23:48
Just trying to show how the approximation loses accuracy as $x$ decreases and $y$ increases.
â RayDansh
Aug 14 at 23:49
1
@RayDansh I think the point is that it improves for large $a$.
â Ian
Aug 14 at 23:49
@RayDansh Right you are; I was only testing with large numbers. Seems to get 100% accurate asaapproached infinity. How odd
â Albert Renshaw
Aug 14 at 23:50
 |Â
show 3 more comments
up vote
6
down vote
favorite
up vote
6
down vote
favorite
I was working with some code involving exponents in an environment where exponents can only be calculated if the base of the exponent is an integer. I needed a good fast way to approximate this without causing overflow issues. I accidentally stumbled upon an incredible approximation method and I'm not sure why it works.
Suppose you have an exponent in the form of $x^y$ where $x$ is not an integer and you want to approximate the value using only exponents which have integers for their base-values.
Break $x$ into two parts, an integer part, and an additive. For example $3.7to 3 + 0.7$.
Therefor, $xto(a+b)$ where $a$ is an integer part.
The approximation formula is:
$$(a+b)^c approx a^c-bc (a+1)^cb$$
Or in my original form:
$$(a+b)^c approx ((a+b)-b)^c(1-b) ((a+b)+(1-b))^cb$$
It's remarkably close to the right solution seemingly every time. Granted I've only been able to check about 100 cases, but I'm fascinated.
For example:
$$37.5^28 â 37^14cdot38^14$$
And sure enough, if we divide both parts, the ratio is 1.002 which is very close.
Edit: Thanks to RayDansh pointing out in the comments, this is accurate IFF $a+b$ is big. In fact, the larger $a$ gets the more accurate this approximation seems to get.
Can anyone shed some light as to why this approximation method I've stumbled upon works?
exponential-function exponentiation approximation
I was working with some code involving exponents in an environment where exponents can only be calculated if the base of the exponent is an integer. I needed a good fast way to approximate this without causing overflow issues. I accidentally stumbled upon an incredible approximation method and I'm not sure why it works.
Suppose you have an exponent in the form of $x^y$ where $x$ is not an integer and you want to approximate the value using only exponents which have integers for their base-values.
Break $x$ into two parts, an integer part, and an additive. For example $3.7to 3 + 0.7$.
Therefor, $xto(a+b)$ where $a$ is an integer part.
The approximation formula is:
$$(a+b)^c approx a^c-bc (a+1)^cb$$
Or in my original form:
$$(a+b)^c approx ((a+b)-b)^c(1-b) ((a+b)+(1-b))^cb$$
It's remarkably close to the right solution seemingly every time. Granted I've only been able to check about 100 cases, but I'm fascinated.
For example:
$$37.5^28 â 37^14cdot38^14$$
And sure enough, if we divide both parts, the ratio is 1.002 which is very close.
Edit: Thanks to RayDansh pointing out in the comments, this is accurate IFF $a+b$ is big. In fact, the larger $a$ gets the more accurate this approximation seems to get.
Can anyone shed some light as to why this approximation method I've stumbled upon works?
exponential-function exponentiation approximation
edited Aug 15 at 3:29
AccidentalFourierTransform
1,301627
1,301627
asked Aug 14 at 23:41
Albert Renshaw
6791625
6791625
Well, here's your intuition. The exponent terms you've discovered are such that whichever of $a$ and $a+1$ are closer to $a+b$, those will be weighted more than the other term. And both happen to be remarkably close to $a+b$. Hence your discovery.
â Rushabh Mehta
Aug 14 at 23:48
2
What about $1.5^100âÂÂ1^50*2^50$? Quite inaccurate.
â RayDansh
Aug 14 at 23:48
Just trying to show how the approximation loses accuracy as $x$ decreases and $y$ increases.
â RayDansh
Aug 14 at 23:49
1
@RayDansh I think the point is that it improves for large $a$.
â Ian
Aug 14 at 23:49
@RayDansh Right you are; I was only testing with large numbers. Seems to get 100% accurate asaapproached infinity. How odd
â Albert Renshaw
Aug 14 at 23:50
 |Â
show 3 more comments
Well, here's your intuition. The exponent terms you've discovered are such that whichever of $a$ and $a+1$ are closer to $a+b$, those will be weighted more than the other term. And both happen to be remarkably close to $a+b$. Hence your discovery.
â Rushabh Mehta
Aug 14 at 23:48
2
What about $1.5^100âÂÂ1^50*2^50$? Quite inaccurate.
â RayDansh
Aug 14 at 23:48
Just trying to show how the approximation loses accuracy as $x$ decreases and $y$ increases.
â RayDansh
Aug 14 at 23:49
1
@RayDansh I think the point is that it improves for large $a$.
â Ian
Aug 14 at 23:49
@RayDansh Right you are; I was only testing with large numbers. Seems to get 100% accurate asaapproached infinity. How odd
â Albert Renshaw
Aug 14 at 23:50
Well, here's your intuition. The exponent terms you've discovered are such that whichever of $a$ and $a+1$ are closer to $a+b$, those will be weighted more than the other term. And both happen to be remarkably close to $a+b$. Hence your discovery.
â Rushabh Mehta
Aug 14 at 23:48
Well, here's your intuition. The exponent terms you've discovered are such that whichever of $a$ and $a+1$ are closer to $a+b$, those will be weighted more than the other term. And both happen to be remarkably close to $a+b$. Hence your discovery.
â Rushabh Mehta
Aug 14 at 23:48
2
2
What about $1.5^100âÂÂ1^50*2^50$? Quite inaccurate.
â RayDansh
Aug 14 at 23:48
What about $1.5^100âÂÂ1^50*2^50$? Quite inaccurate.
â RayDansh
Aug 14 at 23:48
Just trying to show how the approximation loses accuracy as $x$ decreases and $y$ increases.
â RayDansh
Aug 14 at 23:49
Just trying to show how the approximation loses accuracy as $x$ decreases and $y$ increases.
â RayDansh
Aug 14 at 23:49
1
1
@RayDansh I think the point is that it improves for large $a$.
â Ian
Aug 14 at 23:49
@RayDansh I think the point is that it improves for large $a$.
â Ian
Aug 14 at 23:49
@RayDansh Right you are; I was only testing with large numbers. Seems to get 100% accurate as
a approached infinity. How oddâ Albert Renshaw
Aug 14 at 23:50
@RayDansh Right you are; I was only testing with large numbers. Seems to get 100% accurate as
a approached infinity. How oddâ Albert Renshaw
Aug 14 at 23:50
 |Â
show 3 more comments
3 Answers
3
active
oldest
votes
up vote
18
down vote
accepted
Write your approximation
$$a^c-bc cdot (a+1)^cb=a^cleft(1+frac 1aright)^bc$$
and your approximation is $$left(1+frac 1aright)^bapprox 1+frac ba$$
Which is the first two terms of the binomial expansion. It will be reasonably accurate when $frac ba ll 1$ The next term is $frac b(b-1)2a^2$
2
Doesn't get clearer than this +1
â user159517
Aug 15 at 0:31
add a comment |Â
up vote
6
down vote
As a general rule, if you see a lot of products and exponents it may clear things up to take logs. In your case,
$$(a+b)^c â a^c-bc cdot (a+1)^cb$$
becomes
$$c log(a+b) approx c(1-b) log(a) + cb log(a+1)$$
or just
$$log(a+b) approx (1-b) log(a) + b log(a+1).$$
This is equivalent to doing a linear interpolation of $log x$ between the points $a$ and $a+1$. This will be pretty accurate when $a$ is large because $log x$ will be close to linear between $a$ and $a+1$.
add a comment |Â
up vote
1
down vote
The answer is obvious. If we expand both sides of the formula by the binomial theorem, we get for the first two: $(a+b)^c=a^c+cba^c-1+ ...$ for both forms of the equation. Now, it is immediately apparent that this approximation will improve as a gets larger because the discarded terms become less significant. That is, for larger a, $a^n>>a^n-1$.
Of course it improves, but why is it significantly better than just keeping $a^c$?
â Ian
Aug 14 at 23:58
Look at the rest of the binomial expansion terms that are omitted above
â Dr Peter McGowan
Aug 15 at 0:00
add a comment |Â
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
18
down vote
accepted
Write your approximation
$$a^c-bc cdot (a+1)^cb=a^cleft(1+frac 1aright)^bc$$
and your approximation is $$left(1+frac 1aright)^bapprox 1+frac ba$$
Which is the first two terms of the binomial expansion. It will be reasonably accurate when $frac ba ll 1$ The next term is $frac b(b-1)2a^2$
2
Doesn't get clearer than this +1
â user159517
Aug 15 at 0:31
add a comment |Â
up vote
18
down vote
accepted
Write your approximation
$$a^c-bc cdot (a+1)^cb=a^cleft(1+frac 1aright)^bc$$
and your approximation is $$left(1+frac 1aright)^bapprox 1+frac ba$$
Which is the first two terms of the binomial expansion. It will be reasonably accurate when $frac ba ll 1$ The next term is $frac b(b-1)2a^2$
2
Doesn't get clearer than this +1
â user159517
Aug 15 at 0:31
add a comment |Â
up vote
18
down vote
accepted
up vote
18
down vote
accepted
Write your approximation
$$a^c-bc cdot (a+1)^cb=a^cleft(1+frac 1aright)^bc$$
and your approximation is $$left(1+frac 1aright)^bapprox 1+frac ba$$
Which is the first two terms of the binomial expansion. It will be reasonably accurate when $frac ba ll 1$ The next term is $frac b(b-1)2a^2$
Write your approximation
$$a^c-bc cdot (a+1)^cb=a^cleft(1+frac 1aright)^bc$$
and your approximation is $$left(1+frac 1aright)^bapprox 1+frac ba$$
Which is the first two terms of the binomial expansion. It will be reasonably accurate when $frac ba ll 1$ The next term is $frac b(b-1)2a^2$
answered Aug 15 at 0:01
Ross Millikan
279k22188355
279k22188355
2
Doesn't get clearer than this +1
â user159517
Aug 15 at 0:31
add a comment |Â
2
Doesn't get clearer than this +1
â user159517
Aug 15 at 0:31
2
2
Doesn't get clearer than this +1
â user159517
Aug 15 at 0:31
Doesn't get clearer than this +1
â user159517
Aug 15 at 0:31
add a comment |Â
up vote
6
down vote
As a general rule, if you see a lot of products and exponents it may clear things up to take logs. In your case,
$$(a+b)^c â a^c-bc cdot (a+1)^cb$$
becomes
$$c log(a+b) approx c(1-b) log(a) + cb log(a+1)$$
or just
$$log(a+b) approx (1-b) log(a) + b log(a+1).$$
This is equivalent to doing a linear interpolation of $log x$ between the points $a$ and $a+1$. This will be pretty accurate when $a$ is large because $log x$ will be close to linear between $a$ and $a+1$.
add a comment |Â
up vote
6
down vote
As a general rule, if you see a lot of products and exponents it may clear things up to take logs. In your case,
$$(a+b)^c â a^c-bc cdot (a+1)^cb$$
becomes
$$c log(a+b) approx c(1-b) log(a) + cb log(a+1)$$
or just
$$log(a+b) approx (1-b) log(a) + b log(a+1).$$
This is equivalent to doing a linear interpolation of $log x$ between the points $a$ and $a+1$. This will be pretty accurate when $a$ is large because $log x$ will be close to linear between $a$ and $a+1$.
add a comment |Â
up vote
6
down vote
up vote
6
down vote
As a general rule, if you see a lot of products and exponents it may clear things up to take logs. In your case,
$$(a+b)^c â a^c-bc cdot (a+1)^cb$$
becomes
$$c log(a+b) approx c(1-b) log(a) + cb log(a+1)$$
or just
$$log(a+b) approx (1-b) log(a) + b log(a+1).$$
This is equivalent to doing a linear interpolation of $log x$ between the points $a$ and $a+1$. This will be pretty accurate when $a$ is large because $log x$ will be close to linear between $a$ and $a+1$.
As a general rule, if you see a lot of products and exponents it may clear things up to take logs. In your case,
$$(a+b)^c â a^c-bc cdot (a+1)^cb$$
becomes
$$c log(a+b) approx c(1-b) log(a) + cb log(a+1)$$
or just
$$log(a+b) approx (1-b) log(a) + b log(a+1).$$
This is equivalent to doing a linear interpolation of $log x$ between the points $a$ and $a+1$. This will be pretty accurate when $a$ is large because $log x$ will be close to linear between $a$ and $a+1$.
edited Aug 15 at 0:01
Holo
4,3072629
4,3072629
answered Aug 14 at 23:59
Jair Taylor
8,48932144
8,48932144
add a comment |Â
add a comment |Â
up vote
1
down vote
The answer is obvious. If we expand both sides of the formula by the binomial theorem, we get for the first two: $(a+b)^c=a^c+cba^c-1+ ...$ for both forms of the equation. Now, it is immediately apparent that this approximation will improve as a gets larger because the discarded terms become less significant. That is, for larger a, $a^n>>a^n-1$.
Of course it improves, but why is it significantly better than just keeping $a^c$?
â Ian
Aug 14 at 23:58
Look at the rest of the binomial expansion terms that are omitted above
â Dr Peter McGowan
Aug 15 at 0:00
add a comment |Â
up vote
1
down vote
The answer is obvious. If we expand both sides of the formula by the binomial theorem, we get for the first two: $(a+b)^c=a^c+cba^c-1+ ...$ for both forms of the equation. Now, it is immediately apparent that this approximation will improve as a gets larger because the discarded terms become less significant. That is, for larger a, $a^n>>a^n-1$.
Of course it improves, but why is it significantly better than just keeping $a^c$?
â Ian
Aug 14 at 23:58
Look at the rest of the binomial expansion terms that are omitted above
â Dr Peter McGowan
Aug 15 at 0:00
add a comment |Â
up vote
1
down vote
up vote
1
down vote
The answer is obvious. If we expand both sides of the formula by the binomial theorem, we get for the first two: $(a+b)^c=a^c+cba^c-1+ ...$ for both forms of the equation. Now, it is immediately apparent that this approximation will improve as a gets larger because the discarded terms become less significant. That is, for larger a, $a^n>>a^n-1$.
The answer is obvious. If we expand both sides of the formula by the binomial theorem, we get for the first two: $(a+b)^c=a^c+cba^c-1+ ...$ for both forms of the equation. Now, it is immediately apparent that this approximation will improve as a gets larger because the discarded terms become less significant. That is, for larger a, $a^n>>a^n-1$.
edited Aug 15 at 0:02
answered Aug 14 at 23:57
Dr Peter McGowan
4737
4737
Of course it improves, but why is it significantly better than just keeping $a^c$?
â Ian
Aug 14 at 23:58
Look at the rest of the binomial expansion terms that are omitted above
â Dr Peter McGowan
Aug 15 at 0:00
add a comment |Â
Of course it improves, but why is it significantly better than just keeping $a^c$?
â Ian
Aug 14 at 23:58
Look at the rest of the binomial expansion terms that are omitted above
â Dr Peter McGowan
Aug 15 at 0:00
Of course it improves, but why is it significantly better than just keeping $a^c$?
â Ian
Aug 14 at 23:58
Of course it improves, but why is it significantly better than just keeping $a^c$?
â Ian
Aug 14 at 23:58
Look at the rest of the binomial expansion terms that are omitted above
â Dr Peter McGowan
Aug 15 at 0:00
Look at the rest of the binomial expansion terms that are omitted above
â Dr Peter McGowan
Aug 15 at 0:00
add a comment |Â
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
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2883024%2fwhy-does-the-approximation-for-exponents-abc-approx-ac-bc-a1cb-w%23new-answer', 'question_page');
);
Post as a guest
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
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
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

Well, here's your intuition. The exponent terms you've discovered are such that whichever of $a$ and $a+1$ are closer to $a+b$, those will be weighted more than the other term. And both happen to be remarkably close to $a+b$. Hence your discovery.
â Rushabh Mehta
Aug 14 at 23:48
2
What about $1.5^100âÂÂ1^50*2^50$? Quite inaccurate.
â RayDansh
Aug 14 at 23:48
Just trying to show how the approximation loses accuracy as $x$ decreases and $y$ increases.
â RayDansh
Aug 14 at 23:49
1
@RayDansh I think the point is that it improves for large $a$.
â Ian
Aug 14 at 23:49
@RayDansh Right you are; I was only testing with large numbers. Seems to get 100% accurate as
aapproached infinity. How oddâ Albert Renshaw
Aug 14 at 23:50