Find Maximum of any discrete function (not necessarily a PDF) Unicorn Meta Zoo #1: Why another podcast? Announcing the arrival of Valued Associate #679: Cesar ManaraWhy $2x$? Can't it be $x$?maximum area of a rectangle inscribed in a semi - circle with radius r.Finding the max/min turning points of $y=sin x$Can I calculate a fractional sum with functional equations and/or infinite series?Finding maximum of discrete functionDiscrete function: finding a maximumMaximum of a discrete function using derivativesWhat is the correct parametrisation of this curve, and why is it so?Finding the maximum value of summation of $sin$ series.Optimization for Exponential Bacteria Growth Rate

With indentation set to `0em`, when using a line break, there is still an indentation of a size of a space

Need of separate security plugins for both root and subfolder sites Wordpress?

Putting Ant-Man on house arrest

Arriving in Atlanta after US Preclearance in Dublin. Will I go through TSA security in Atlanta to transfer to a connecting flight?

How to count in linear time worst-case?

Do I need to protect SFP ports and optics from dust/contaminants? If so, how?

Multiple options vs single option UI

Why didn't the Space Shuttle bounce back into space as many times as possible so as to lose a lot of kinetic energy up there?

What is ls Largest Number Formed by only moving two sticks in 508?

Passing args from the bash script to the function in the script

Is it acceptable to use working hours to read general interest books?

Did the Roman Empire have penal colonies?

Is accepting an invalid credit card number a security issue?

How to use @AuraEnabled base class method in Lightning Component?

Does Mathematica have an implementation of the Poisson Binomial Distribution?

Suing a Police Officer Instead of the Police Department

What is the least dense liquid under normal conditions?

Is this homebrew racial feat, Stonehide, balanced?

Is there any hidden 'W' sound after 'comment' in : Comment est-elle?

Why isn't everyone flabbergasted about Bran's "gift"?

Map material from china not allowed to leave the country

Error: Syntax error. Missing ')' for CASE Statement

Align column where each cell has two decimals with siunitx

Implementing 3DES algorithm in Java: is my code secure?



Find Maximum of any discrete function (not necessarily a PDF)



Unicorn Meta Zoo #1: Why another podcast?
Announcing the arrival of Valued Associate #679: Cesar ManaraWhy $2x$? Can't it be $x$?maximum area of a rectangle inscribed in a semi - circle with radius r.Finding the max/min turning points of $y=sin x$Can I calculate a fractional sum with functional equations and/or infinite series?Finding maximum of discrete functionDiscrete function: finding a maximumMaximum of a discrete function using derivativesWhat is the correct parametrisation of this curve, and why is it so?Finding the maximum value of summation of $sin$ series.Optimization for Exponential Bacteria Growth Rate










6












$begingroup$


How can we find the maximum of any discrete function, say



$$
f(n)=frac(n+1)^22^n,quad nin mathbbN
$$



that is not the PDF of any distribution? (This query is unrelated to statistics.)



By generating observations, we can obtain the maximum to be $9/4$ when $n=2$. However, other less rigourous methods using inequalities give poor estimates for this maximum point.



Wrong Approach 1 (Binomial Expansion):



$$2^n = (1+1)^nge beginpmatrixn\2endpmatriximplies frac(1+n)^2(1+1)^nle frac2(1+n)^2n(n-1)=frac2left(1+frac1n right)^21-frac1nle 2 quad(nto infty )$$



Wrong Approach 2 (Bernoulli Inequality):



$$
2^n=(1+1)^nge 1+n(1)implies frac(1+n)^2(1+1)^nlefrac(1+n)^21+n=1+nto infty quad (nto infty )
$$



How can we find the exact maximum point? If we try to differentiate with respect to $n$, we can get $napprox 1.88$, then we can try $n=1$ and $n=2$, but differentiation is just the wrong approach for a discrete function.










share|cite|improve this question











$endgroup$







  • 4




    $begingroup$
    Why do you say that differentiation is the wrong approach? That is the best approach for this question.
    $endgroup$
    – Kavi Rama Murthy
    Apr 20 at 5:06






  • 2




    $begingroup$
    Extend this function to positive real numbers, then use derivatives to show that it grows up to some point and then decreases (i.e. it is unimodal). The discrete maximum occurs at one of the immediate integer neighbors of the continuous maximum point, because it is less than those values on either side, by monotonicity. This works for any unimodal function.
    $endgroup$
    – Conifold
    Apr 20 at 5:26











  • $begingroup$
    @Conifold : I think it is generally not advisable to differentiate discrete distributions because many complications can occur - the least of which we need to check for differentiability. For instance, consider $f(n) = |n^2 - 2|$, where $n$ is any natural number. It has minimum value at $n=1$, but it is not differentiable at $x=sqrt2$. The function itself is not easy to differentiate.
    $endgroup$
    – NetUser5y62
    Apr 20 at 5:53







  • 4




    $begingroup$
    The question is whether the discrete function extends to a (piecewise) differentiable function. If so, the use of calculus is highly effective, and hence advisable. The points of non-differentiability should be treated as additional critical points and tested for potential maxima/minima along with zeros of the derivative on each interval between them. In your example you have three such intervals separated by $pmsqrt2$. Note that you will have to do the same when investigating maxima/minima of the continuous function $f(x) = |x^2 - 2|$, it is not the discreteness that makes the difference.
    $endgroup$
    – Conifold
    Apr 20 at 6:26















6












$begingroup$


How can we find the maximum of any discrete function, say



$$
f(n)=frac(n+1)^22^n,quad nin mathbbN
$$



that is not the PDF of any distribution? (This query is unrelated to statistics.)



By generating observations, we can obtain the maximum to be $9/4$ when $n=2$. However, other less rigourous methods using inequalities give poor estimates for this maximum point.



Wrong Approach 1 (Binomial Expansion):



$$2^n = (1+1)^nge beginpmatrixn\2endpmatriximplies frac(1+n)^2(1+1)^nle frac2(1+n)^2n(n-1)=frac2left(1+frac1n right)^21-frac1nle 2 quad(nto infty )$$



Wrong Approach 2 (Bernoulli Inequality):



$$
2^n=(1+1)^nge 1+n(1)implies frac(1+n)^2(1+1)^nlefrac(1+n)^21+n=1+nto infty quad (nto infty )
$$



How can we find the exact maximum point? If we try to differentiate with respect to $n$, we can get $napprox 1.88$, then we can try $n=1$ and $n=2$, but differentiation is just the wrong approach for a discrete function.










share|cite|improve this question











$endgroup$







  • 4




    $begingroup$
    Why do you say that differentiation is the wrong approach? That is the best approach for this question.
    $endgroup$
    – Kavi Rama Murthy
    Apr 20 at 5:06






  • 2




    $begingroup$
    Extend this function to positive real numbers, then use derivatives to show that it grows up to some point and then decreases (i.e. it is unimodal). The discrete maximum occurs at one of the immediate integer neighbors of the continuous maximum point, because it is less than those values on either side, by monotonicity. This works for any unimodal function.
    $endgroup$
    – Conifold
    Apr 20 at 5:26











  • $begingroup$
    @Conifold : I think it is generally not advisable to differentiate discrete distributions because many complications can occur - the least of which we need to check for differentiability. For instance, consider $f(n) = |n^2 - 2|$, where $n$ is any natural number. It has minimum value at $n=1$, but it is not differentiable at $x=sqrt2$. The function itself is not easy to differentiate.
    $endgroup$
    – NetUser5y62
    Apr 20 at 5:53







  • 4




    $begingroup$
    The question is whether the discrete function extends to a (piecewise) differentiable function. If so, the use of calculus is highly effective, and hence advisable. The points of non-differentiability should be treated as additional critical points and tested for potential maxima/minima along with zeros of the derivative on each interval between them. In your example you have three such intervals separated by $pmsqrt2$. Note that you will have to do the same when investigating maxima/minima of the continuous function $f(x) = |x^2 - 2|$, it is not the discreteness that makes the difference.
    $endgroup$
    – Conifold
    Apr 20 at 6:26













6












6








6


2



$begingroup$


How can we find the maximum of any discrete function, say



$$
f(n)=frac(n+1)^22^n,quad nin mathbbN
$$



that is not the PDF of any distribution? (This query is unrelated to statistics.)



By generating observations, we can obtain the maximum to be $9/4$ when $n=2$. However, other less rigourous methods using inequalities give poor estimates for this maximum point.



Wrong Approach 1 (Binomial Expansion):



$$2^n = (1+1)^nge beginpmatrixn\2endpmatriximplies frac(1+n)^2(1+1)^nle frac2(1+n)^2n(n-1)=frac2left(1+frac1n right)^21-frac1nle 2 quad(nto infty )$$



Wrong Approach 2 (Bernoulli Inequality):



$$
2^n=(1+1)^nge 1+n(1)implies frac(1+n)^2(1+1)^nlefrac(1+n)^21+n=1+nto infty quad (nto infty )
$$



How can we find the exact maximum point? If we try to differentiate with respect to $n$, we can get $napprox 1.88$, then we can try $n=1$ and $n=2$, but differentiation is just the wrong approach for a discrete function.










share|cite|improve this question











$endgroup$




How can we find the maximum of any discrete function, say



$$
f(n)=frac(n+1)^22^n,quad nin mathbbN
$$



that is not the PDF of any distribution? (This query is unrelated to statistics.)



By generating observations, we can obtain the maximum to be $9/4$ when $n=2$. However, other less rigourous methods using inequalities give poor estimates for this maximum point.



Wrong Approach 1 (Binomial Expansion):



$$2^n = (1+1)^nge beginpmatrixn\2endpmatriximplies frac(1+n)^2(1+1)^nle frac2(1+n)^2n(n-1)=frac2left(1+frac1n right)^21-frac1nle 2 quad(nto infty )$$



Wrong Approach 2 (Bernoulli Inequality):



$$
2^n=(1+1)^nge 1+n(1)implies frac(1+n)^2(1+1)^nlefrac(1+n)^21+n=1+nto infty quad (nto infty )
$$



How can we find the exact maximum point? If we try to differentiate with respect to $n$, we can get $napprox 1.88$, then we can try $n=1$ and $n=2$, but differentiation is just the wrong approach for a discrete function.







calculus sequences-and-series maxima-minima discrete-optimization






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Apr 20 at 9:34









man on laptop

1




1










asked Apr 20 at 4:42









NetUser5y62NetUser5y62

559215




559215







  • 4




    $begingroup$
    Why do you say that differentiation is the wrong approach? That is the best approach for this question.
    $endgroup$
    – Kavi Rama Murthy
    Apr 20 at 5:06






  • 2




    $begingroup$
    Extend this function to positive real numbers, then use derivatives to show that it grows up to some point and then decreases (i.e. it is unimodal). The discrete maximum occurs at one of the immediate integer neighbors of the continuous maximum point, because it is less than those values on either side, by monotonicity. This works for any unimodal function.
    $endgroup$
    – Conifold
    Apr 20 at 5:26











  • $begingroup$
    @Conifold : I think it is generally not advisable to differentiate discrete distributions because many complications can occur - the least of which we need to check for differentiability. For instance, consider $f(n) = |n^2 - 2|$, where $n$ is any natural number. It has minimum value at $n=1$, but it is not differentiable at $x=sqrt2$. The function itself is not easy to differentiate.
    $endgroup$
    – NetUser5y62
    Apr 20 at 5:53







  • 4




    $begingroup$
    The question is whether the discrete function extends to a (piecewise) differentiable function. If so, the use of calculus is highly effective, and hence advisable. The points of non-differentiability should be treated as additional critical points and tested for potential maxima/minima along with zeros of the derivative on each interval between them. In your example you have three such intervals separated by $pmsqrt2$. Note that you will have to do the same when investigating maxima/minima of the continuous function $f(x) = |x^2 - 2|$, it is not the discreteness that makes the difference.
    $endgroup$
    – Conifold
    Apr 20 at 6:26












  • 4




    $begingroup$
    Why do you say that differentiation is the wrong approach? That is the best approach for this question.
    $endgroup$
    – Kavi Rama Murthy
    Apr 20 at 5:06






  • 2




    $begingroup$
    Extend this function to positive real numbers, then use derivatives to show that it grows up to some point and then decreases (i.e. it is unimodal). The discrete maximum occurs at one of the immediate integer neighbors of the continuous maximum point, because it is less than those values on either side, by monotonicity. This works for any unimodal function.
    $endgroup$
    – Conifold
    Apr 20 at 5:26











  • $begingroup$
    @Conifold : I think it is generally not advisable to differentiate discrete distributions because many complications can occur - the least of which we need to check for differentiability. For instance, consider $f(n) = |n^2 - 2|$, where $n$ is any natural number. It has minimum value at $n=1$, but it is not differentiable at $x=sqrt2$. The function itself is not easy to differentiate.
    $endgroup$
    – NetUser5y62
    Apr 20 at 5:53







  • 4




    $begingroup$
    The question is whether the discrete function extends to a (piecewise) differentiable function. If so, the use of calculus is highly effective, and hence advisable. The points of non-differentiability should be treated as additional critical points and tested for potential maxima/minima along with zeros of the derivative on each interval between them. In your example you have three such intervals separated by $pmsqrt2$. Note that you will have to do the same when investigating maxima/minima of the continuous function $f(x) = |x^2 - 2|$, it is not the discreteness that makes the difference.
    $endgroup$
    – Conifold
    Apr 20 at 6:26







4




4




$begingroup$
Why do you say that differentiation is the wrong approach? That is the best approach for this question.
$endgroup$
– Kavi Rama Murthy
Apr 20 at 5:06




$begingroup$
Why do you say that differentiation is the wrong approach? That is the best approach for this question.
$endgroup$
– Kavi Rama Murthy
Apr 20 at 5:06




2




2




$begingroup$
Extend this function to positive real numbers, then use derivatives to show that it grows up to some point and then decreases (i.e. it is unimodal). The discrete maximum occurs at one of the immediate integer neighbors of the continuous maximum point, because it is less than those values on either side, by monotonicity. This works for any unimodal function.
$endgroup$
– Conifold
Apr 20 at 5:26





$begingroup$
Extend this function to positive real numbers, then use derivatives to show that it grows up to some point and then decreases (i.e. it is unimodal). The discrete maximum occurs at one of the immediate integer neighbors of the continuous maximum point, because it is less than those values on either side, by monotonicity. This works for any unimodal function.
$endgroup$
– Conifold
Apr 20 at 5:26













$begingroup$
@Conifold : I think it is generally not advisable to differentiate discrete distributions because many complications can occur - the least of which we need to check for differentiability. For instance, consider $f(n) = |n^2 - 2|$, where $n$ is any natural number. It has minimum value at $n=1$, but it is not differentiable at $x=sqrt2$. The function itself is not easy to differentiate.
$endgroup$
– NetUser5y62
Apr 20 at 5:53





$begingroup$
@Conifold : I think it is generally not advisable to differentiate discrete distributions because many complications can occur - the least of which we need to check for differentiability. For instance, consider $f(n) = |n^2 - 2|$, where $n$ is any natural number. It has minimum value at $n=1$, but it is not differentiable at $x=sqrt2$. The function itself is not easy to differentiate.
$endgroup$
– NetUser5y62
Apr 20 at 5:53





4




4




$begingroup$
The question is whether the discrete function extends to a (piecewise) differentiable function. If so, the use of calculus is highly effective, and hence advisable. The points of non-differentiability should be treated as additional critical points and tested for potential maxima/minima along with zeros of the derivative on each interval between them. In your example you have three such intervals separated by $pmsqrt2$. Note that you will have to do the same when investigating maxima/minima of the continuous function $f(x) = |x^2 - 2|$, it is not the discreteness that makes the difference.
$endgroup$
– Conifold
Apr 20 at 6:26




$begingroup$
The question is whether the discrete function extends to a (piecewise) differentiable function. If so, the use of calculus is highly effective, and hence advisable. The points of non-differentiability should be treated as additional critical points and tested for potential maxima/minima along with zeros of the derivative on each interval between them. In your example you have three such intervals separated by $pmsqrt2$. Note that you will have to do the same when investigating maxima/minima of the continuous function $f(x) = |x^2 - 2|$, it is not the discreteness that makes the difference.
$endgroup$
– Conifold
Apr 20 at 6:26










2 Answers
2






active

oldest

votes


















5












$begingroup$

Hint: Consider the ratio of successive terms $dfracf(n)f(n-1)$, for $nge 1$. (This ratio here equals $dfrac(n+1)^22n^2$.) Try and find for which values of $n$ we have $colorbluedfracf(n)f(n-1) ge 1$. Can you see how to use this information to find which $n$ maximises $f(n)$?






share|cite|improve this answer









$endgroup$




















    5












    $begingroup$

    Hint: Prove that $$frac(n+1)^22^nle frac94$$ The equal sign holds if $$n=2$$ This is equivalent to $$(n+1)^2le 9cdot 2^n-2$$. You can prove this by induction.






    share|cite|improve this answer











    $endgroup$








    • 1




      $begingroup$
      I am afraid this is precisely the result I am unable to prove. Moreover, we are guessing the upper bound and then trying to prove it. We cannot guess the bound for more complicated expressions
      $endgroup$
      – NetUser5y62
      Apr 20 at 6:12











    Your Answer








    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
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3194331%2ffind-maximum-of-any-discrete-function-not-necessarily-a-pdf%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    5












    $begingroup$

    Hint: Consider the ratio of successive terms $dfracf(n)f(n-1)$, for $nge 1$. (This ratio here equals $dfrac(n+1)^22n^2$.) Try and find for which values of $n$ we have $colorbluedfracf(n)f(n-1) ge 1$. Can you see how to use this information to find which $n$ maximises $f(n)$?






    share|cite|improve this answer









    $endgroup$

















      5












      $begingroup$

      Hint: Consider the ratio of successive terms $dfracf(n)f(n-1)$, for $nge 1$. (This ratio here equals $dfrac(n+1)^22n^2$.) Try and find for which values of $n$ we have $colorbluedfracf(n)f(n-1) ge 1$. Can you see how to use this information to find which $n$ maximises $f(n)$?






      share|cite|improve this answer









      $endgroup$















        5












        5








        5





        $begingroup$

        Hint: Consider the ratio of successive terms $dfracf(n)f(n-1)$, for $nge 1$. (This ratio here equals $dfrac(n+1)^22n^2$.) Try and find for which values of $n$ we have $colorbluedfracf(n)f(n-1) ge 1$. Can you see how to use this information to find which $n$ maximises $f(n)$?






        share|cite|improve this answer









        $endgroup$



        Hint: Consider the ratio of successive terms $dfracf(n)f(n-1)$, for $nge 1$. (This ratio here equals $dfrac(n+1)^22n^2$.) Try and find for which values of $n$ we have $colorbluedfracf(n)f(n-1) ge 1$. Can you see how to use this information to find which $n$ maximises $f(n)$?







        share|cite|improve this answer












        share|cite|improve this answer



        share|cite|improve this answer










        answered Apr 20 at 6:58









        Minus One-TwelfthMinus One-Twelfth

        3,653513




        3,653513





















            5












            $begingroup$

            Hint: Prove that $$frac(n+1)^22^nle frac94$$ The equal sign holds if $$n=2$$ This is equivalent to $$(n+1)^2le 9cdot 2^n-2$$. You can prove this by induction.






            share|cite|improve this answer











            $endgroup$








            • 1




              $begingroup$
              I am afraid this is precisely the result I am unable to prove. Moreover, we are guessing the upper bound and then trying to prove it. We cannot guess the bound for more complicated expressions
              $endgroup$
              – NetUser5y62
              Apr 20 at 6:12















            5












            $begingroup$

            Hint: Prove that $$frac(n+1)^22^nle frac94$$ The equal sign holds if $$n=2$$ This is equivalent to $$(n+1)^2le 9cdot 2^n-2$$. You can prove this by induction.






            share|cite|improve this answer











            $endgroup$








            • 1




              $begingroup$
              I am afraid this is precisely the result I am unable to prove. Moreover, we are guessing the upper bound and then trying to prove it. We cannot guess the bound for more complicated expressions
              $endgroup$
              – NetUser5y62
              Apr 20 at 6:12













            5












            5








            5





            $begingroup$

            Hint: Prove that $$frac(n+1)^22^nle frac94$$ The equal sign holds if $$n=2$$ This is equivalent to $$(n+1)^2le 9cdot 2^n-2$$. You can prove this by induction.






            share|cite|improve this answer











            $endgroup$



            Hint: Prove that $$frac(n+1)^22^nle frac94$$ The equal sign holds if $$n=2$$ This is equivalent to $$(n+1)^2le 9cdot 2^n-2$$. You can prove this by induction.







            share|cite|improve this answer














            share|cite|improve this answer



            share|cite|improve this answer








            edited Apr 20 at 6:42

























            answered Apr 20 at 5:36









            Dr. Sonnhard GraubnerDr. Sonnhard Graubner

            79.6k42867




            79.6k42867







            • 1




              $begingroup$
              I am afraid this is precisely the result I am unable to prove. Moreover, we are guessing the upper bound and then trying to prove it. We cannot guess the bound for more complicated expressions
              $endgroup$
              – NetUser5y62
              Apr 20 at 6:12












            • 1




              $begingroup$
              I am afraid this is precisely the result I am unable to prove. Moreover, we are guessing the upper bound and then trying to prove it. We cannot guess the bound for more complicated expressions
              $endgroup$
              – NetUser5y62
              Apr 20 at 6:12







            1




            1




            $begingroup$
            I am afraid this is precisely the result I am unable to prove. Moreover, we are guessing the upper bound and then trying to prove it. We cannot guess the bound for more complicated expressions
            $endgroup$
            – NetUser5y62
            Apr 20 at 6:12




            $begingroup$
            I am afraid this is precisely the result I am unable to prove. Moreover, we are guessing the upper bound and then trying to prove it. We cannot guess the bound for more complicated expressions
            $endgroup$
            – NetUser5y62
            Apr 20 at 6:12

















            draft saved

            draft discarded
















































            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.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3194331%2ffind-maximum-of-any-discrete-function-not-necessarily-a-pdf%23new-answer', 'question_page');

            );

            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







            Popular posts from this blog

            Sum ergo cogito? 1 nng

            419 nièngy_Soadمي 19bal1.5o_g

            Queiggey Chernihivv 9NnOo i Zw X QqKk LpB