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












6












$begingroup$


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



$$
f(n)=frac{(n+1)^2}{2^n},quad nin mathbb{N}
$$



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 begin{pmatrix}n\2end{pmatrix}implies frac{(1+n)^2}{(1+1)^n}le frac{2(1+n)^2}{n(n-1)}=frac{2left(1+frac{1}{n} right)^2}{1-frac{1}{n}}le 2 quad(nto infty )$$



Wrong Approach 2 (Bernoulli Inequality):



$$
2^n=(1+1)^nge 1+n(1)implies frac{(1+n)^2}{(1+1)^n}lefrac{(1+n)^2}{1+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=sqrt{2}$. The function itself is not easy to differentiate.
    $endgroup$
    – NetUser5y62
    Apr 20 at 5:53








  • 3




    $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 $pmsqrt{2}$. 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)^2}{2^n},quad nin mathbb{N}
$$



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 begin{pmatrix}n\2end{pmatrix}implies frac{(1+n)^2}{(1+1)^n}le frac{2(1+n)^2}{n(n-1)}=frac{2left(1+frac{1}{n} right)^2}{1-frac{1}{n}}le 2 quad(nto infty )$$



Wrong Approach 2 (Bernoulli Inequality):



$$
2^n=(1+1)^nge 1+n(1)implies frac{(1+n)^2}{(1+1)^n}lefrac{(1+n)^2}{1+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=sqrt{2}$. The function itself is not easy to differentiate.
    $endgroup$
    – NetUser5y62
    Apr 20 at 5:53








  • 3




    $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 $pmsqrt{2}$. 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)^2}{2^n},quad nin mathbb{N}
$$



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 begin{pmatrix}n\2end{pmatrix}implies frac{(1+n)^2}{(1+1)^n}le frac{2(1+n)^2}{n(n-1)}=frac{2left(1+frac{1}{n} right)^2}{1-frac{1}{n}}le 2 quad(nto infty )$$



Wrong Approach 2 (Bernoulli Inequality):



$$
2^n=(1+1)^nge 1+n(1)implies frac{(1+n)^2}{(1+1)^n}lefrac{(1+n)^2}{1+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)^2}{2^n},quad nin mathbb{N}
$$



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 begin{pmatrix}n\2end{pmatrix}implies frac{(1+n)^2}{(1+1)^n}le frac{2(1+n)^2}{n(n-1)}=frac{2left(1+frac{1}{n} right)^2}{1-frac{1}{n}}le 2 quad(nto infty )$$



Wrong Approach 2 (Bernoulli Inequality):



$$
2^n=(1+1)^nge 1+n(1)implies frac{(1+n)^2}{(1+1)^n}lefrac{(1+n)^2}{1+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

555215




555215








  • 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=sqrt{2}$. The function itself is not easy to differentiate.
    $endgroup$
    – NetUser5y62
    Apr 20 at 5:53








  • 3




    $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 $pmsqrt{2}$. 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=sqrt{2}$. The function itself is not easy to differentiate.
    $endgroup$
    – NetUser5y62
    Apr 20 at 5:53








  • 3




    $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 $pmsqrt{2}$. 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=sqrt{2}$. 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=sqrt{2}$. The function itself is not easy to differentiate.
$endgroup$
– NetUser5y62
Apr 20 at 5:53






3




3




$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 $pmsqrt{2}$. 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 $pmsqrt{2}$. 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: Prove that $$frac{(n+1)^2}{2^n}le frac{9}{4}$$ 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



















4












$begingroup$

Hint: Consider the ratio of successive terms $dfrac{f(n)}{f(n-1)}$, for $nge 1$. (This ratio here equals $dfrac{(n+1)^2}{2n^2}$.) Try and find for which values of $n$ we have $color{blue}{dfrac{f(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$














    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: Prove that $$frac{(n+1)^2}{2^n}le frac{9}{4}$$ 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)^2}{2^n}le frac{9}{4}$$ 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)^2}{2^n}le frac{9}{4}$$ 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)^2}{2^n}le frac{9}{4}$$ 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











    4












    $begingroup$

    Hint: Consider the ratio of successive terms $dfrac{f(n)}{f(n-1)}$, for $nge 1$. (This ratio here equals $dfrac{(n+1)^2}{2n^2}$.) Try and find for which values of $n$ we have $color{blue}{dfrac{f(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$


















      4












      $begingroup$

      Hint: Consider the ratio of successive terms $dfrac{f(n)}{f(n-1)}$, for $nge 1$. (This ratio here equals $dfrac{(n+1)^2}{2n^2}$.) Try and find for which values of $n$ we have $color{blue}{dfrac{f(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$
















        4












        4








        4





        $begingroup$

        Hint: Consider the ratio of successive terms $dfrac{f(n)}{f(n-1)}$, for $nge 1$. (This ratio here equals $dfrac{(n+1)^2}{2n^2}$.) Try and find for which values of $n$ we have $color{blue}{dfrac{f(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 $dfrac{f(n)}{f(n-1)}$, for $nge 1$. (This ratio here equals $dfrac{(n+1)^2}{2n^2}$.) Try and find for which values of $n$ we have $color{blue}{dfrac{f(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,628513




        3,628513






























            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

            Plaza Victoria

            Brian Clough

            Cáceres