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

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
6
down vote

favorite
2












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?







share|cite|improve this question






















  • 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 a approached infinity. How odd
    – Albert Renshaw
    Aug 14 at 23:50















up vote
6
down vote

favorite
2












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?







share|cite|improve this question






















  • 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 a approached infinity. How odd
    – Albert Renshaw
    Aug 14 at 23:50













up vote
6
down vote

favorite
2









up vote
6
down vote

favorite
2






2





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?







share|cite|improve this question














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?









share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








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 as a approached 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






  • 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 a approached 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











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$






share|cite|improve this answer
















  • 2




    Doesn't get clearer than this +1
    – user159517
    Aug 15 at 0:31

















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$.






share|cite|improve this answer





























    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$.






    share|cite|improve this answer






















    • 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










    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',
    convertImagesToLinks: true,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    noCode: true, onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













     

    draft saved


    draft discarded


















    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






























    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$






    share|cite|improve this answer
















    • 2




      Doesn't get clearer than this +1
      – user159517
      Aug 15 at 0:31














    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$






    share|cite|improve this answer
















    • 2




      Doesn't get clearer than this +1
      – user159517
      Aug 15 at 0:31












    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$






    share|cite|improve this answer












    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$







    share|cite|improve this answer












    share|cite|improve this answer



    share|cite|improve this answer










    answered Aug 15 at 0:01









    Ross Millikan

    279k22188355




    279k22188355







    • 2




      Doesn't get clearer than this +1
      – user159517
      Aug 15 at 0:31












    • 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










    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$.






    share|cite|improve this answer


























      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$.






      share|cite|improve this answer
























        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$.






        share|cite|improve this answer














        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$.







        share|cite|improve this answer














        share|cite|improve this answer



        share|cite|improve this answer








        edited Aug 15 at 0:01









        Holo

        4,3072629




        4,3072629










        answered Aug 14 at 23:59









        Jair Taylor

        8,48932144




        8,48932144




















            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$.






            share|cite|improve this answer






















            • 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














            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$.






            share|cite|improve this answer






















            • 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












            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$.






            share|cite|improve this answer














            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$.







            share|cite|improve this answer














            share|cite|improve this answer



            share|cite|improve this answer








            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
















            • 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

















             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            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













































































            Comments

            Popular posts from this blog

            White Anglo-Saxon Protestant

            Is the Concept of Multiple Fantasy Races Scientifically Flawed? [closed]

            One-line joke