Limit of a sum using complex analysis.

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











up vote
2
down vote

favorite
1












I'm trying to find the limit of this sum: $$S_n =frac1nleft(frac12+sum_k=1^ncos(kx)right)$$
I tried to find a formula for the inner sum first and I ended up getting zero as an answer.
The sum is supposed to converge to $cot(xover 2)$ and that appears in my last expression but it goes to zero.
Here is what I got with a rather long and clumsy reasoning:
$$S_n = frac12nleft(cotleft(fracx2right)sin(nx)+cos(nx)right)$$
Thanks in advance.










share|cite|improve this question

























    up vote
    2
    down vote

    favorite
    1












    I'm trying to find the limit of this sum: $$S_n =frac1nleft(frac12+sum_k=1^ncos(kx)right)$$
    I tried to find a formula for the inner sum first and I ended up getting zero as an answer.
    The sum is supposed to converge to $cot(xover 2)$ and that appears in my last expression but it goes to zero.
    Here is what I got with a rather long and clumsy reasoning:
    $$S_n = frac12nleft(cotleft(fracx2right)sin(nx)+cos(nx)right)$$
    Thanks in advance.










    share|cite|improve this question























      up vote
      2
      down vote

      favorite
      1









      up vote
      2
      down vote

      favorite
      1






      1





      I'm trying to find the limit of this sum: $$S_n =frac1nleft(frac12+sum_k=1^ncos(kx)right)$$
      I tried to find a formula for the inner sum first and I ended up getting zero as an answer.
      The sum is supposed to converge to $cot(xover 2)$ and that appears in my last expression but it goes to zero.
      Here is what I got with a rather long and clumsy reasoning:
      $$S_n = frac12nleft(cotleft(fracx2right)sin(nx)+cos(nx)right)$$
      Thanks in advance.










      share|cite|improve this question













      I'm trying to find the limit of this sum: $$S_n =frac1nleft(frac12+sum_k=1^ncos(kx)right)$$
      I tried to find a formula for the inner sum first and I ended up getting zero as an answer.
      The sum is supposed to converge to $cot(xover 2)$ and that appears in my last expression but it goes to zero.
      Here is what I got with a rather long and clumsy reasoning:
      $$S_n = frac12nleft(cotleft(fracx2right)sin(nx)+cos(nx)right)$$
      Thanks in advance.







      complex-analysis limits complex-numbers trigonometric-series






      share|cite|improve this question













      share|cite|improve this question











      share|cite|improve this question




      share|cite|improve this question










      asked 1 hour ago









      FuzzyPixelz

      191111




      191111




















          3 Answers
          3






          active

          oldest

          votes

















          up vote
          3
          down vote



          accepted










          You have, for all $x neq 2kpi$,
          $$sum_k=1^n cos(kx) = mathrmReleft( sum_k=1^n e^ikxright) = mathrmReleft( e^ix frac1-e^inx1-e^ix right)$$



          Moreover you have
          $$left|e^ix frac1-e^inx1-e^ixright| leq frac2$$



          So $$left| sum_k=1^n cos(kx) right| leq frac2$$



          And therefore you get $S_n rightarrow 0$.



          If $x = 2kpi$ for $k in mathbbZ$, you easily have $S_n rightarrow 1$.






          share|cite|improve this answer




















          • Remember that $|e^iz|=1$ for all $z in mathbbR$. So by the triangle inequality, $|1-e^inx| leq 2$.
            – TheSilverDoe
            50 mins ago











          • Thank you very much, this was very helpful.
            – FuzzyPixelz
            48 mins ago

















          up vote
          2
          down vote













          Just write $cos (kx)$ as the real part of $e^ikx$.






          share|cite|improve this answer








          New contributor




          AlexL is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.

















          • I already did that but it didn't work.
            – FuzzyPixelz
            1 hour ago






          • 1




            Then the limit is 0. Why do you think the answer is a cotan ?
            – AlexL
            57 mins ago











          • I don't know either way, but it can't be zero because the question asks for an answer in terms of $x$
            – FuzzyPixelz
            56 mins ago






          • 1




            You must have forgotten something.
            – AlexL
            54 mins ago










          • TheSilverDoe's proof convinced me and it has two different answers depending on the value of $x$ which solves my troubles, so yes not $cot$, my bad.
            – FuzzyPixelz
            45 mins ago


















          up vote
          0
          down vote













          Another view of the question.



          Instead of taking the real part of $e^ikx$ as given by the answers from TheSilverDoe and AlexL, the complex exponential can be more symmetric:



          $$beginalign*
          cos kx &= frace^-ikx+e^ikx2\
          frac12+sum_k=1^ncos kx &= frac12sum_k=-n^ne^ikx\
          &= frac12 cdot e^-inxfrace^i(2n+1)x-1e^ix-1\
          &= frac12 cdot frace^i(n+1)x-e^-inxe^ix-1\
          &= frac12 cdot frace^ileft(n+frac12right)x-e^-ileft(n+frac12right)xe^ifrac12x-e^-ifrac12x\
          &= frac12 cdot fracsinleft(n+frac12right)xsinfrac12x\
          S_n&= fracsinleft(n+frac12right)x2nsinfrac12x\
          endalign*$$



          When $e^ix ne 1$, i.e. $xne 2pi m$ for integer $m$, $S_n to 0$.




          For other $x$'s, i.e. when $x=2pi m$,



          $$beginalign*
          cos kx = cos 2pi km &= 1\
          sum_k=1^ncos kx &= n\
          frac12 + sum_k=1^ncos kx &= frac12+ n\
          S_n &= frac1nleft(frac12 + nright)\
          &= frac12n + 1\
          &to 1
          endalign*$$






          share|cite|improve this answer






















            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%2f2937135%2flimit-of-a-sum-using-complex-analysis%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
            3
            down vote



            accepted










            You have, for all $x neq 2kpi$,
            $$sum_k=1^n cos(kx) = mathrmReleft( sum_k=1^n e^ikxright) = mathrmReleft( e^ix frac1-e^inx1-e^ix right)$$



            Moreover you have
            $$left|e^ix frac1-e^inx1-e^ixright| leq frac2$$



            So $$left| sum_k=1^n cos(kx) right| leq frac2$$



            And therefore you get $S_n rightarrow 0$.



            If $x = 2kpi$ for $k in mathbbZ$, you easily have $S_n rightarrow 1$.






            share|cite|improve this answer




















            • Remember that $|e^iz|=1$ for all $z in mathbbR$. So by the triangle inequality, $|1-e^inx| leq 2$.
              – TheSilverDoe
              50 mins ago











            • Thank you very much, this was very helpful.
              – FuzzyPixelz
              48 mins ago














            up vote
            3
            down vote



            accepted










            You have, for all $x neq 2kpi$,
            $$sum_k=1^n cos(kx) = mathrmReleft( sum_k=1^n e^ikxright) = mathrmReleft( e^ix frac1-e^inx1-e^ix right)$$



            Moreover you have
            $$left|e^ix frac1-e^inx1-e^ixright| leq frac2$$



            So $$left| sum_k=1^n cos(kx) right| leq frac2$$



            And therefore you get $S_n rightarrow 0$.



            If $x = 2kpi$ for $k in mathbbZ$, you easily have $S_n rightarrow 1$.






            share|cite|improve this answer




















            • Remember that $|e^iz|=1$ for all $z in mathbbR$. So by the triangle inequality, $|1-e^inx| leq 2$.
              – TheSilverDoe
              50 mins ago











            • Thank you very much, this was very helpful.
              – FuzzyPixelz
              48 mins ago












            up vote
            3
            down vote



            accepted







            up vote
            3
            down vote



            accepted






            You have, for all $x neq 2kpi$,
            $$sum_k=1^n cos(kx) = mathrmReleft( sum_k=1^n e^ikxright) = mathrmReleft( e^ix frac1-e^inx1-e^ix right)$$



            Moreover you have
            $$left|e^ix frac1-e^inx1-e^ixright| leq frac2$$



            So $$left| sum_k=1^n cos(kx) right| leq frac2$$



            And therefore you get $S_n rightarrow 0$.



            If $x = 2kpi$ for $k in mathbbZ$, you easily have $S_n rightarrow 1$.






            share|cite|improve this answer












            You have, for all $x neq 2kpi$,
            $$sum_k=1^n cos(kx) = mathrmReleft( sum_k=1^n e^ikxright) = mathrmReleft( e^ix frac1-e^inx1-e^ix right)$$



            Moreover you have
            $$left|e^ix frac1-e^inx1-e^ixright| leq frac2$$



            So $$left| sum_k=1^n cos(kx) right| leq frac2$$



            And therefore you get $S_n rightarrow 0$.



            If $x = 2kpi$ for $k in mathbbZ$, you easily have $S_n rightarrow 1$.







            share|cite|improve this answer












            share|cite|improve this answer



            share|cite|improve this answer










            answered 56 mins ago









            TheSilverDoe

            1,10511




            1,10511











            • Remember that $|e^iz|=1$ for all $z in mathbbR$. So by the triangle inequality, $|1-e^inx| leq 2$.
              – TheSilverDoe
              50 mins ago











            • Thank you very much, this was very helpful.
              – FuzzyPixelz
              48 mins ago
















            • Remember that $|e^iz|=1$ for all $z in mathbbR$. So by the triangle inequality, $|1-e^inx| leq 2$.
              – TheSilverDoe
              50 mins ago











            • Thank you very much, this was very helpful.
              – FuzzyPixelz
              48 mins ago















            Remember that $|e^iz|=1$ for all $z in mathbbR$. So by the triangle inequality, $|1-e^inx| leq 2$.
            – TheSilverDoe
            50 mins ago





            Remember that $|e^iz|=1$ for all $z in mathbbR$. So by the triangle inequality, $|1-e^inx| leq 2$.
            – TheSilverDoe
            50 mins ago













            Thank you very much, this was very helpful.
            – FuzzyPixelz
            48 mins ago




            Thank you very much, this was very helpful.
            – FuzzyPixelz
            48 mins ago










            up vote
            2
            down vote













            Just write $cos (kx)$ as the real part of $e^ikx$.






            share|cite|improve this answer








            New contributor




            AlexL is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.

















            • I already did that but it didn't work.
              – FuzzyPixelz
              1 hour ago






            • 1




              Then the limit is 0. Why do you think the answer is a cotan ?
              – AlexL
              57 mins ago











            • I don't know either way, but it can't be zero because the question asks for an answer in terms of $x$
              – FuzzyPixelz
              56 mins ago






            • 1




              You must have forgotten something.
              – AlexL
              54 mins ago










            • TheSilverDoe's proof convinced me and it has two different answers depending on the value of $x$ which solves my troubles, so yes not $cot$, my bad.
              – FuzzyPixelz
              45 mins ago















            up vote
            2
            down vote













            Just write $cos (kx)$ as the real part of $e^ikx$.






            share|cite|improve this answer








            New contributor




            AlexL is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.

















            • I already did that but it didn't work.
              – FuzzyPixelz
              1 hour ago






            • 1




              Then the limit is 0. Why do you think the answer is a cotan ?
              – AlexL
              57 mins ago











            • I don't know either way, but it can't be zero because the question asks for an answer in terms of $x$
              – FuzzyPixelz
              56 mins ago






            • 1




              You must have forgotten something.
              – AlexL
              54 mins ago










            • TheSilverDoe's proof convinced me and it has two different answers depending on the value of $x$ which solves my troubles, so yes not $cot$, my bad.
              – FuzzyPixelz
              45 mins ago













            up vote
            2
            down vote










            up vote
            2
            down vote









            Just write $cos (kx)$ as the real part of $e^ikx$.






            share|cite|improve this answer








            New contributor




            AlexL is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.









            Just write $cos (kx)$ as the real part of $e^ikx$.







            share|cite|improve this answer








            New contributor




            AlexL is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.









            share|cite|improve this answer



            share|cite|improve this answer






            New contributor




            AlexL is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.









            answered 1 hour ago









            AlexL

            992




            992




            New contributor




            AlexL is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.





            New contributor





            AlexL is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.






            AlexL is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.











            • I already did that but it didn't work.
              – FuzzyPixelz
              1 hour ago






            • 1




              Then the limit is 0. Why do you think the answer is a cotan ?
              – AlexL
              57 mins ago











            • I don't know either way, but it can't be zero because the question asks for an answer in terms of $x$
              – FuzzyPixelz
              56 mins ago






            • 1




              You must have forgotten something.
              – AlexL
              54 mins ago










            • TheSilverDoe's proof convinced me and it has two different answers depending on the value of $x$ which solves my troubles, so yes not $cot$, my bad.
              – FuzzyPixelz
              45 mins ago

















            • I already did that but it didn't work.
              – FuzzyPixelz
              1 hour ago






            • 1




              Then the limit is 0. Why do you think the answer is a cotan ?
              – AlexL
              57 mins ago











            • I don't know either way, but it can't be zero because the question asks for an answer in terms of $x$
              – FuzzyPixelz
              56 mins ago






            • 1




              You must have forgotten something.
              – AlexL
              54 mins ago










            • TheSilverDoe's proof convinced me and it has two different answers depending on the value of $x$ which solves my troubles, so yes not $cot$, my bad.
              – FuzzyPixelz
              45 mins ago
















            I already did that but it didn't work.
            – FuzzyPixelz
            1 hour ago




            I already did that but it didn't work.
            – FuzzyPixelz
            1 hour ago




            1




            1




            Then the limit is 0. Why do you think the answer is a cotan ?
            – AlexL
            57 mins ago





            Then the limit is 0. Why do you think the answer is a cotan ?
            – AlexL
            57 mins ago













            I don't know either way, but it can't be zero because the question asks for an answer in terms of $x$
            – FuzzyPixelz
            56 mins ago




            I don't know either way, but it can't be zero because the question asks for an answer in terms of $x$
            – FuzzyPixelz
            56 mins ago




            1




            1




            You must have forgotten something.
            – AlexL
            54 mins ago




            You must have forgotten something.
            – AlexL
            54 mins ago












            TheSilverDoe's proof convinced me and it has two different answers depending on the value of $x$ which solves my troubles, so yes not $cot$, my bad.
            – FuzzyPixelz
            45 mins ago





            TheSilverDoe's proof convinced me and it has two different answers depending on the value of $x$ which solves my troubles, so yes not $cot$, my bad.
            – FuzzyPixelz
            45 mins ago











            up vote
            0
            down vote













            Another view of the question.



            Instead of taking the real part of $e^ikx$ as given by the answers from TheSilverDoe and AlexL, the complex exponential can be more symmetric:



            $$beginalign*
            cos kx &= frace^-ikx+e^ikx2\
            frac12+sum_k=1^ncos kx &= frac12sum_k=-n^ne^ikx\
            &= frac12 cdot e^-inxfrace^i(2n+1)x-1e^ix-1\
            &= frac12 cdot frace^i(n+1)x-e^-inxe^ix-1\
            &= frac12 cdot frace^ileft(n+frac12right)x-e^-ileft(n+frac12right)xe^ifrac12x-e^-ifrac12x\
            &= frac12 cdot fracsinleft(n+frac12right)xsinfrac12x\
            S_n&= fracsinleft(n+frac12right)x2nsinfrac12x\
            endalign*$$



            When $e^ix ne 1$, i.e. $xne 2pi m$ for integer $m$, $S_n to 0$.




            For other $x$'s, i.e. when $x=2pi m$,



            $$beginalign*
            cos kx = cos 2pi km &= 1\
            sum_k=1^ncos kx &= n\
            frac12 + sum_k=1^ncos kx &= frac12+ n\
            S_n &= frac1nleft(frac12 + nright)\
            &= frac12n + 1\
            &to 1
            endalign*$$






            share|cite|improve this answer


























              up vote
              0
              down vote













              Another view of the question.



              Instead of taking the real part of $e^ikx$ as given by the answers from TheSilverDoe and AlexL, the complex exponential can be more symmetric:



              $$beginalign*
              cos kx &= frace^-ikx+e^ikx2\
              frac12+sum_k=1^ncos kx &= frac12sum_k=-n^ne^ikx\
              &= frac12 cdot e^-inxfrace^i(2n+1)x-1e^ix-1\
              &= frac12 cdot frace^i(n+1)x-e^-inxe^ix-1\
              &= frac12 cdot frace^ileft(n+frac12right)x-e^-ileft(n+frac12right)xe^ifrac12x-e^-ifrac12x\
              &= frac12 cdot fracsinleft(n+frac12right)xsinfrac12x\
              S_n&= fracsinleft(n+frac12right)x2nsinfrac12x\
              endalign*$$



              When $e^ix ne 1$, i.e. $xne 2pi m$ for integer $m$, $S_n to 0$.




              For other $x$'s, i.e. when $x=2pi m$,



              $$beginalign*
              cos kx = cos 2pi km &= 1\
              sum_k=1^ncos kx &= n\
              frac12 + sum_k=1^ncos kx &= frac12+ n\
              S_n &= frac1nleft(frac12 + nright)\
              &= frac12n + 1\
              &to 1
              endalign*$$






              share|cite|improve this answer
























                up vote
                0
                down vote










                up vote
                0
                down vote









                Another view of the question.



                Instead of taking the real part of $e^ikx$ as given by the answers from TheSilverDoe and AlexL, the complex exponential can be more symmetric:



                $$beginalign*
                cos kx &= frace^-ikx+e^ikx2\
                frac12+sum_k=1^ncos kx &= frac12sum_k=-n^ne^ikx\
                &= frac12 cdot e^-inxfrace^i(2n+1)x-1e^ix-1\
                &= frac12 cdot frace^i(n+1)x-e^-inxe^ix-1\
                &= frac12 cdot frace^ileft(n+frac12right)x-e^-ileft(n+frac12right)xe^ifrac12x-e^-ifrac12x\
                &= frac12 cdot fracsinleft(n+frac12right)xsinfrac12x\
                S_n&= fracsinleft(n+frac12right)x2nsinfrac12x\
                endalign*$$



                When $e^ix ne 1$, i.e. $xne 2pi m$ for integer $m$, $S_n to 0$.




                For other $x$'s, i.e. when $x=2pi m$,



                $$beginalign*
                cos kx = cos 2pi km &= 1\
                sum_k=1^ncos kx &= n\
                frac12 + sum_k=1^ncos kx &= frac12+ n\
                S_n &= frac1nleft(frac12 + nright)\
                &= frac12n + 1\
                &to 1
                endalign*$$






                share|cite|improve this answer














                Another view of the question.



                Instead of taking the real part of $e^ikx$ as given by the answers from TheSilverDoe and AlexL, the complex exponential can be more symmetric:



                $$beginalign*
                cos kx &= frace^-ikx+e^ikx2\
                frac12+sum_k=1^ncos kx &= frac12sum_k=-n^ne^ikx\
                &= frac12 cdot e^-inxfrace^i(2n+1)x-1e^ix-1\
                &= frac12 cdot frace^i(n+1)x-e^-inxe^ix-1\
                &= frac12 cdot frace^ileft(n+frac12right)x-e^-ileft(n+frac12right)xe^ifrac12x-e^-ifrac12x\
                &= frac12 cdot fracsinleft(n+frac12right)xsinfrac12x\
                S_n&= fracsinleft(n+frac12right)x2nsinfrac12x\
                endalign*$$



                When $e^ix ne 1$, i.e. $xne 2pi m$ for integer $m$, $S_n to 0$.




                For other $x$'s, i.e. when $x=2pi m$,



                $$beginalign*
                cos kx = cos 2pi km &= 1\
                sum_k=1^ncos kx &= n\
                frac12 + sum_k=1^ncos kx &= frac12+ n\
                S_n &= frac1nleft(frac12 + nright)\
                &= frac12n + 1\
                &to 1
                endalign*$$







                share|cite|improve this answer














                share|cite|improve this answer



                share|cite|improve this answer








                edited 11 mins ago

























                answered 18 mins ago









                peterwhy

                11.4k21127




                11.4k21127



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2937135%2flimit-of-a-sum-using-complex-analysis%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Comments

                    Popular posts from this blog

                    Long meetings (6-7 hours a day): Being “babysat” by supervisor

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

                    Confectionery