Find mistake in Fourer series calculation.












2












$begingroup$



The function $f$ is $3$-periodic and $$f(t)=left{
begin{array}{ll}
t,quad &0leq tleq1\
1,quad &1<t<2\
3-t,quad &2leq t leq 3
end{array}
right. $$



Expand $f$ as a (real) Fourier series.




Attempt: I simply use the formulae for $a_0,a_n$ and $b_n$. The value of $L$ is $2L=3Leftrightarrow L=3/2.$ this gives



$$a_0=frac{1}{2L}intlimits_{-L}^{L}f(t)dt=frac{1}{3}cdot2=frac{2}{3},$$



which also is easy to see by drawing $f(t)$. Now



begin{align}
a_n &=frac{2}{3}left(intlimits_{-3/2}^{-1}cosleft(frac{2pi nt}{3}right)dt-intlimits_{-1}^{0}tcosleft(frac{2pi nt}{3}right)dt+intlimits_{0}^{1}tcosleft(frac{2pi nt}{3}right)dt+intlimits_{1}^{3/2}cosleft(frac{2pi nt}{3}right)right)\
&=frac{sin(pi n)-sinleft(frac{2pi n}{3}right)}{pi n},
end{align}



since the two middle integrals cancel and the two outer are the same. For $b_n$ I have, with identical integrals as above but replacing $cos$ by $sin$, that $b_n=0$. This means that



begin{align}
f(t)&=frac{2}{3}-sum_{n=1}^{infty}frac{sin(pi n)-sinleft(frac{2pi n}{3}right)}{pi n}cosleft(frac{2pi nt}{3}right)\
&=frac{2}{3}-frac{2}{pi}sum_{n=1}^{infty}frac{sin{left(frac{2pi n}{3}right)}}{n}cosleft(frac{2pi nt}{3}right),
end{align}



since $sin(pi n)=0 forall ninmathbb{Z}.$ However the book wants the answer to be



$$f(t)=frac{2}{3}-frac{3}{pi^2}sum_{n=1}^{infty}frac{1-cosleft(frac{2pi n}{3}right)}{n^2}cosleft(frac{2pi nt}{3}right).$$



Can someone help me find the mistake?










share|cite|improve this question











$endgroup$

















    2












    $begingroup$



    The function $f$ is $3$-periodic and $$f(t)=left{
    begin{array}{ll}
    t,quad &0leq tleq1\
    1,quad &1<t<2\
    3-t,quad &2leq t leq 3
    end{array}
    right. $$



    Expand $f$ as a (real) Fourier series.




    Attempt: I simply use the formulae for $a_0,a_n$ and $b_n$. The value of $L$ is $2L=3Leftrightarrow L=3/2.$ this gives



    $$a_0=frac{1}{2L}intlimits_{-L}^{L}f(t)dt=frac{1}{3}cdot2=frac{2}{3},$$



    which also is easy to see by drawing $f(t)$. Now



    begin{align}
    a_n &=frac{2}{3}left(intlimits_{-3/2}^{-1}cosleft(frac{2pi nt}{3}right)dt-intlimits_{-1}^{0}tcosleft(frac{2pi nt}{3}right)dt+intlimits_{0}^{1}tcosleft(frac{2pi nt}{3}right)dt+intlimits_{1}^{3/2}cosleft(frac{2pi nt}{3}right)right)\
    &=frac{sin(pi n)-sinleft(frac{2pi n}{3}right)}{pi n},
    end{align}



    since the two middle integrals cancel and the two outer are the same. For $b_n$ I have, with identical integrals as above but replacing $cos$ by $sin$, that $b_n=0$. This means that



    begin{align}
    f(t)&=frac{2}{3}-sum_{n=1}^{infty}frac{sin(pi n)-sinleft(frac{2pi n}{3}right)}{pi n}cosleft(frac{2pi nt}{3}right)\
    &=frac{2}{3}-frac{2}{pi}sum_{n=1}^{infty}frac{sin{left(frac{2pi n}{3}right)}}{n}cosleft(frac{2pi nt}{3}right),
    end{align}



    since $sin(pi n)=0 forall ninmathbb{Z}.$ However the book wants the answer to be



    $$f(t)=frac{2}{3}-frac{3}{pi^2}sum_{n=1}^{infty}frac{1-cosleft(frac{2pi n}{3}right)}{n^2}cosleft(frac{2pi nt}{3}right).$$



    Can someone help me find the mistake?










    share|cite|improve this question











    $endgroup$















      2












      2








      2


      1



      $begingroup$



      The function $f$ is $3$-periodic and $$f(t)=left{
      begin{array}{ll}
      t,quad &0leq tleq1\
      1,quad &1<t<2\
      3-t,quad &2leq t leq 3
      end{array}
      right. $$



      Expand $f$ as a (real) Fourier series.




      Attempt: I simply use the formulae for $a_0,a_n$ and $b_n$. The value of $L$ is $2L=3Leftrightarrow L=3/2.$ this gives



      $$a_0=frac{1}{2L}intlimits_{-L}^{L}f(t)dt=frac{1}{3}cdot2=frac{2}{3},$$



      which also is easy to see by drawing $f(t)$. Now



      begin{align}
      a_n &=frac{2}{3}left(intlimits_{-3/2}^{-1}cosleft(frac{2pi nt}{3}right)dt-intlimits_{-1}^{0}tcosleft(frac{2pi nt}{3}right)dt+intlimits_{0}^{1}tcosleft(frac{2pi nt}{3}right)dt+intlimits_{1}^{3/2}cosleft(frac{2pi nt}{3}right)right)\
      &=frac{sin(pi n)-sinleft(frac{2pi n}{3}right)}{pi n},
      end{align}



      since the two middle integrals cancel and the two outer are the same. For $b_n$ I have, with identical integrals as above but replacing $cos$ by $sin$, that $b_n=0$. This means that



      begin{align}
      f(t)&=frac{2}{3}-sum_{n=1}^{infty}frac{sin(pi n)-sinleft(frac{2pi n}{3}right)}{pi n}cosleft(frac{2pi nt}{3}right)\
      &=frac{2}{3}-frac{2}{pi}sum_{n=1}^{infty}frac{sin{left(frac{2pi n}{3}right)}}{n}cosleft(frac{2pi nt}{3}right),
      end{align}



      since $sin(pi n)=0 forall ninmathbb{Z}.$ However the book wants the answer to be



      $$f(t)=frac{2}{3}-frac{3}{pi^2}sum_{n=1}^{infty}frac{1-cosleft(frac{2pi n}{3}right)}{n^2}cosleft(frac{2pi nt}{3}right).$$



      Can someone help me find the mistake?










      share|cite|improve this question











      $endgroup$





      The function $f$ is $3$-periodic and $$f(t)=left{
      begin{array}{ll}
      t,quad &0leq tleq1\
      1,quad &1<t<2\
      3-t,quad &2leq t leq 3
      end{array}
      right. $$



      Expand $f$ as a (real) Fourier series.




      Attempt: I simply use the formulae for $a_0,a_n$ and $b_n$. The value of $L$ is $2L=3Leftrightarrow L=3/2.$ this gives



      $$a_0=frac{1}{2L}intlimits_{-L}^{L}f(t)dt=frac{1}{3}cdot2=frac{2}{3},$$



      which also is easy to see by drawing $f(t)$. Now



      begin{align}
      a_n &=frac{2}{3}left(intlimits_{-3/2}^{-1}cosleft(frac{2pi nt}{3}right)dt-intlimits_{-1}^{0}tcosleft(frac{2pi nt}{3}right)dt+intlimits_{0}^{1}tcosleft(frac{2pi nt}{3}right)dt+intlimits_{1}^{3/2}cosleft(frac{2pi nt}{3}right)right)\
      &=frac{sin(pi n)-sinleft(frac{2pi n}{3}right)}{pi n},
      end{align}



      since the two middle integrals cancel and the two outer are the same. For $b_n$ I have, with identical integrals as above but replacing $cos$ by $sin$, that $b_n=0$. This means that



      begin{align}
      f(t)&=frac{2}{3}-sum_{n=1}^{infty}frac{sin(pi n)-sinleft(frac{2pi n}{3}right)}{pi n}cosleft(frac{2pi nt}{3}right)\
      &=frac{2}{3}-frac{2}{pi}sum_{n=1}^{infty}frac{sin{left(frac{2pi n}{3}right)}}{n}cosleft(frac{2pi nt}{3}right),
      end{align}



      since $sin(pi n)=0 forall ninmathbb{Z}.$ However the book wants the answer to be



      $$f(t)=frac{2}{3}-frac{3}{pi^2}sum_{n=1}^{infty}frac{1-cosleft(frac{2pi n}{3}right)}{n^2}cosleft(frac{2pi nt}{3}right).$$



      Can someone help me find the mistake?







      proof-verification fourier-analysis fourier-series






      share|cite|improve this question















      share|cite|improve this question













      share|cite|improve this question




      share|cite|improve this question








      edited Jan 24 at 19:54







      Parseval

















      asked Jan 24 at 17:36









      ParsevalParseval

      3,0241719




      3,0241719






















          2 Answers
          2






          active

          oldest

          votes


















          1












          $begingroup$

          Hint: What is $f(t)$ for $-1 le t le 0$? Is it $f(t)=+t$ or $f(t)=-t$?



          Btw, you could evaluate $a_n$ as
          $$a_n = frac{2}{T} int_{0}^{T} f(t) cosleft(frac{2pi}{T}tright) dt,$$
          which could save some of your time in figuring out what $f(t)$ should be for $t<0$.





          In response to the comment,
          $$a_n = frac{2}{T}int_{-T/2}^{T/2} f(t)cosleft(frac{2pi}{T}tright) dt = frac{2}{T}int_{-T/2}^{0} f(t)cosleft(frac{2pi}{T}tright) dt + frac{2}{T}int_{0}^{T/2} f(t)cosleft(frac{2pi}{T}tright) dt.$$
          For the first integral, substitute $t = y+T$ to get
          $$int_{-T/2}^{0} f(t)cosleft(frac{2pi}{T}tright) dt = int_{T/2}^{T} f(y)cosleft(frac{2pi}{T}yright) dy.$$
          Therefore,
          $$a_n = frac{2}{T}int_{0}^{T} f(t)cosleft(frac{2pi}{T}tright) dt.$$






          share|cite|improve this answer











          $endgroup$













          • $begingroup$
            Well, ok I see one error there, should be $f(t)=-t$. Could you explain why that formula for $a_n$ works? What is $T$?
            $endgroup$
            – Parseval
            Jan 24 at 18:06










          • $begingroup$
            The two middle integrals are opposite in sign, so those terms don't cancel out, they add up. If you evaluate those integrals (integrate by parts) I think you will get the desired $1/n^2$ term.
            $endgroup$
            – Aditya Dua
            Jan 24 at 20:11










          • $begingroup$
            @Parseval Edited the answer to address your question.
            $endgroup$
            – Math Lover
            Jan 24 at 22:49



















          0












          $begingroup$


          since the two middle integrals cancel...




          They don't. Our $f(t)=begin{cases}1&-frac32 le tle -1\-t&-1le tle 0\t&0le tle 1\1&1le tle frac32end{cases}$ is even. Integrate it against an odd function like $sinleft(frac{2pi nt}{3}right)$ and we'll get zero by odd symmetry. Integrate it against something even like $cosleft(frac{2pi nt}{3}right)$, and the parts for negative $t$ will mirror the parts for positive $t$ and reinforce each other, doubling the total value. By even symmetry,
          begin{align*}a_n &= frac23int_{-frac32}^{frac32}f(t)cosleft(frac{2pi nt}{3}right),dt = frac43int_{0}^{frac32}f(t)cosleft(frac{2pi nt}{3}right),dt\
          a_n &= frac43int_0^1 tcosleft(frac{2pi nt}{3}right),dt+frac43int_1^{frac32}cosleft(frac{2pi nt}{3}right),dt\
          a_n &= frac43left[frac{3t}{2pi n}sinleft(frac{2pi nt}{3}right)+frac{9}{4pi^2 n^2}cosleft(frac{2pi nt}{3}right)right]_0^1 +frac43left[frac{3}{2pi n}sinleft(frac{2pi nt}{3}right)right]_1^{frac32}\
          a_n &= frac2{pi n}sinleft(frac{2pi n}{3}right) +frac{3}{pi^2 n^2}left(1-cosleft(frac{2pi n}{3}right)right) + frac2{pi n}left(sinpi n - sinleft(frac{2pi n}{3}right)right)\
          a_n &= frac{3}{pi^2 n^2}+frac2{pi n}(sin(pi n))-frac{3}{pi n^2}cosleft(frac{2pi n}{3}right)\
          a_n &= begin{cases}frac23& n=0\ 0& 3mid n,n>0\ frac{9}{2pi^2 n^2}& 3nmid nend{cases}end{align*}

          In that last step, we use that $sin(pi n) = 0$ and $cosleft(frac{2pi n}{3}right)$ has a cycle of values $1,-frac12,-frac12$; subtract that from $1$ and it becomes $0,frac32,frac32$. Also, we incorporate the previously calculated (by a different method) $a_0$. The book's version of the answer applies the $sin(pi n)=0$ fact, but doesn't do anything with the $cosleft(frac{2pi n}{3}right)$ term.



          So there it is. Incorporate the middle part of the integral as it should be for this even function, and we get the right answer.






          share|cite|improve this answer











          $endgroup$













            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',
            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%2f3086161%2ffind-mistake-in-fourer-series-calculation%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









            1












            $begingroup$

            Hint: What is $f(t)$ for $-1 le t le 0$? Is it $f(t)=+t$ or $f(t)=-t$?



            Btw, you could evaluate $a_n$ as
            $$a_n = frac{2}{T} int_{0}^{T} f(t) cosleft(frac{2pi}{T}tright) dt,$$
            which could save some of your time in figuring out what $f(t)$ should be for $t<0$.





            In response to the comment,
            $$a_n = frac{2}{T}int_{-T/2}^{T/2} f(t)cosleft(frac{2pi}{T}tright) dt = frac{2}{T}int_{-T/2}^{0} f(t)cosleft(frac{2pi}{T}tright) dt + frac{2}{T}int_{0}^{T/2} f(t)cosleft(frac{2pi}{T}tright) dt.$$
            For the first integral, substitute $t = y+T$ to get
            $$int_{-T/2}^{0} f(t)cosleft(frac{2pi}{T}tright) dt = int_{T/2}^{T} f(y)cosleft(frac{2pi}{T}yright) dy.$$
            Therefore,
            $$a_n = frac{2}{T}int_{0}^{T} f(t)cosleft(frac{2pi}{T}tright) dt.$$






            share|cite|improve this answer











            $endgroup$













            • $begingroup$
              Well, ok I see one error there, should be $f(t)=-t$. Could you explain why that formula for $a_n$ works? What is $T$?
              $endgroup$
              – Parseval
              Jan 24 at 18:06










            • $begingroup$
              The two middle integrals are opposite in sign, so those terms don't cancel out, they add up. If you evaluate those integrals (integrate by parts) I think you will get the desired $1/n^2$ term.
              $endgroup$
              – Aditya Dua
              Jan 24 at 20:11










            • $begingroup$
              @Parseval Edited the answer to address your question.
              $endgroup$
              – Math Lover
              Jan 24 at 22:49
















            1












            $begingroup$

            Hint: What is $f(t)$ for $-1 le t le 0$? Is it $f(t)=+t$ or $f(t)=-t$?



            Btw, you could evaluate $a_n$ as
            $$a_n = frac{2}{T} int_{0}^{T} f(t) cosleft(frac{2pi}{T}tright) dt,$$
            which could save some of your time in figuring out what $f(t)$ should be for $t<0$.





            In response to the comment,
            $$a_n = frac{2}{T}int_{-T/2}^{T/2} f(t)cosleft(frac{2pi}{T}tright) dt = frac{2}{T}int_{-T/2}^{0} f(t)cosleft(frac{2pi}{T}tright) dt + frac{2}{T}int_{0}^{T/2} f(t)cosleft(frac{2pi}{T}tright) dt.$$
            For the first integral, substitute $t = y+T$ to get
            $$int_{-T/2}^{0} f(t)cosleft(frac{2pi}{T}tright) dt = int_{T/2}^{T} f(y)cosleft(frac{2pi}{T}yright) dy.$$
            Therefore,
            $$a_n = frac{2}{T}int_{0}^{T} f(t)cosleft(frac{2pi}{T}tright) dt.$$






            share|cite|improve this answer











            $endgroup$













            • $begingroup$
              Well, ok I see one error there, should be $f(t)=-t$. Could you explain why that formula for $a_n$ works? What is $T$?
              $endgroup$
              – Parseval
              Jan 24 at 18:06










            • $begingroup$
              The two middle integrals are opposite in sign, so those terms don't cancel out, they add up. If you evaluate those integrals (integrate by parts) I think you will get the desired $1/n^2$ term.
              $endgroup$
              – Aditya Dua
              Jan 24 at 20:11










            • $begingroup$
              @Parseval Edited the answer to address your question.
              $endgroup$
              – Math Lover
              Jan 24 at 22:49














            1












            1








            1





            $begingroup$

            Hint: What is $f(t)$ for $-1 le t le 0$? Is it $f(t)=+t$ or $f(t)=-t$?



            Btw, you could evaluate $a_n$ as
            $$a_n = frac{2}{T} int_{0}^{T} f(t) cosleft(frac{2pi}{T}tright) dt,$$
            which could save some of your time in figuring out what $f(t)$ should be for $t<0$.





            In response to the comment,
            $$a_n = frac{2}{T}int_{-T/2}^{T/2} f(t)cosleft(frac{2pi}{T}tright) dt = frac{2}{T}int_{-T/2}^{0} f(t)cosleft(frac{2pi}{T}tright) dt + frac{2}{T}int_{0}^{T/2} f(t)cosleft(frac{2pi}{T}tright) dt.$$
            For the first integral, substitute $t = y+T$ to get
            $$int_{-T/2}^{0} f(t)cosleft(frac{2pi}{T}tright) dt = int_{T/2}^{T} f(y)cosleft(frac{2pi}{T}yright) dy.$$
            Therefore,
            $$a_n = frac{2}{T}int_{0}^{T} f(t)cosleft(frac{2pi}{T}tright) dt.$$






            share|cite|improve this answer











            $endgroup$



            Hint: What is $f(t)$ for $-1 le t le 0$? Is it $f(t)=+t$ or $f(t)=-t$?



            Btw, you could evaluate $a_n$ as
            $$a_n = frac{2}{T} int_{0}^{T} f(t) cosleft(frac{2pi}{T}tright) dt,$$
            which could save some of your time in figuring out what $f(t)$ should be for $t<0$.





            In response to the comment,
            $$a_n = frac{2}{T}int_{-T/2}^{T/2} f(t)cosleft(frac{2pi}{T}tright) dt = frac{2}{T}int_{-T/2}^{0} f(t)cosleft(frac{2pi}{T}tright) dt + frac{2}{T}int_{0}^{T/2} f(t)cosleft(frac{2pi}{T}tright) dt.$$
            For the first integral, substitute $t = y+T$ to get
            $$int_{-T/2}^{0} f(t)cosleft(frac{2pi}{T}tright) dt = int_{T/2}^{T} f(y)cosleft(frac{2pi}{T}yright) dy.$$
            Therefore,
            $$a_n = frac{2}{T}int_{0}^{T} f(t)cosleft(frac{2pi}{T}tright) dt.$$







            share|cite|improve this answer














            share|cite|improve this answer



            share|cite|improve this answer








            edited Jan 24 at 22:49

























            answered Jan 24 at 17:50









            Math LoverMath Lover

            14.1k31437




            14.1k31437












            • $begingroup$
              Well, ok I see one error there, should be $f(t)=-t$. Could you explain why that formula for $a_n$ works? What is $T$?
              $endgroup$
              – Parseval
              Jan 24 at 18:06










            • $begingroup$
              The two middle integrals are opposite in sign, so those terms don't cancel out, they add up. If you evaluate those integrals (integrate by parts) I think you will get the desired $1/n^2$ term.
              $endgroup$
              – Aditya Dua
              Jan 24 at 20:11










            • $begingroup$
              @Parseval Edited the answer to address your question.
              $endgroup$
              – Math Lover
              Jan 24 at 22:49


















            • $begingroup$
              Well, ok I see one error there, should be $f(t)=-t$. Could you explain why that formula for $a_n$ works? What is $T$?
              $endgroup$
              – Parseval
              Jan 24 at 18:06










            • $begingroup$
              The two middle integrals are opposite in sign, so those terms don't cancel out, they add up. If you evaluate those integrals (integrate by parts) I think you will get the desired $1/n^2$ term.
              $endgroup$
              – Aditya Dua
              Jan 24 at 20:11










            • $begingroup$
              @Parseval Edited the answer to address your question.
              $endgroup$
              – Math Lover
              Jan 24 at 22:49
















            $begingroup$
            Well, ok I see one error there, should be $f(t)=-t$. Could you explain why that formula for $a_n$ works? What is $T$?
            $endgroup$
            – Parseval
            Jan 24 at 18:06




            $begingroup$
            Well, ok I see one error there, should be $f(t)=-t$. Could you explain why that formula for $a_n$ works? What is $T$?
            $endgroup$
            – Parseval
            Jan 24 at 18:06












            $begingroup$
            The two middle integrals are opposite in sign, so those terms don't cancel out, they add up. If you evaluate those integrals (integrate by parts) I think you will get the desired $1/n^2$ term.
            $endgroup$
            – Aditya Dua
            Jan 24 at 20:11




            $begingroup$
            The two middle integrals are opposite in sign, so those terms don't cancel out, they add up. If you evaluate those integrals (integrate by parts) I think you will get the desired $1/n^2$ term.
            $endgroup$
            – Aditya Dua
            Jan 24 at 20:11












            $begingroup$
            @Parseval Edited the answer to address your question.
            $endgroup$
            – Math Lover
            Jan 24 at 22:49




            $begingroup$
            @Parseval Edited the answer to address your question.
            $endgroup$
            – Math Lover
            Jan 24 at 22:49











            0












            $begingroup$


            since the two middle integrals cancel...




            They don't. Our $f(t)=begin{cases}1&-frac32 le tle -1\-t&-1le tle 0\t&0le tle 1\1&1le tle frac32end{cases}$ is even. Integrate it against an odd function like $sinleft(frac{2pi nt}{3}right)$ and we'll get zero by odd symmetry. Integrate it against something even like $cosleft(frac{2pi nt}{3}right)$, and the parts for negative $t$ will mirror the parts for positive $t$ and reinforce each other, doubling the total value. By even symmetry,
            begin{align*}a_n &= frac23int_{-frac32}^{frac32}f(t)cosleft(frac{2pi nt}{3}right),dt = frac43int_{0}^{frac32}f(t)cosleft(frac{2pi nt}{3}right),dt\
            a_n &= frac43int_0^1 tcosleft(frac{2pi nt}{3}right),dt+frac43int_1^{frac32}cosleft(frac{2pi nt}{3}right),dt\
            a_n &= frac43left[frac{3t}{2pi n}sinleft(frac{2pi nt}{3}right)+frac{9}{4pi^2 n^2}cosleft(frac{2pi nt}{3}right)right]_0^1 +frac43left[frac{3}{2pi n}sinleft(frac{2pi nt}{3}right)right]_1^{frac32}\
            a_n &= frac2{pi n}sinleft(frac{2pi n}{3}right) +frac{3}{pi^2 n^2}left(1-cosleft(frac{2pi n}{3}right)right) + frac2{pi n}left(sinpi n - sinleft(frac{2pi n}{3}right)right)\
            a_n &= frac{3}{pi^2 n^2}+frac2{pi n}(sin(pi n))-frac{3}{pi n^2}cosleft(frac{2pi n}{3}right)\
            a_n &= begin{cases}frac23& n=0\ 0& 3mid n,n>0\ frac{9}{2pi^2 n^2}& 3nmid nend{cases}end{align*}

            In that last step, we use that $sin(pi n) = 0$ and $cosleft(frac{2pi n}{3}right)$ has a cycle of values $1,-frac12,-frac12$; subtract that from $1$ and it becomes $0,frac32,frac32$. Also, we incorporate the previously calculated (by a different method) $a_0$. The book's version of the answer applies the $sin(pi n)=0$ fact, but doesn't do anything with the $cosleft(frac{2pi n}{3}right)$ term.



            So there it is. Incorporate the middle part of the integral as it should be for this even function, and we get the right answer.






            share|cite|improve this answer











            $endgroup$


















              0












              $begingroup$


              since the two middle integrals cancel...




              They don't. Our $f(t)=begin{cases}1&-frac32 le tle -1\-t&-1le tle 0\t&0le tle 1\1&1le tle frac32end{cases}$ is even. Integrate it against an odd function like $sinleft(frac{2pi nt}{3}right)$ and we'll get zero by odd symmetry. Integrate it against something even like $cosleft(frac{2pi nt}{3}right)$, and the parts for negative $t$ will mirror the parts for positive $t$ and reinforce each other, doubling the total value. By even symmetry,
              begin{align*}a_n &= frac23int_{-frac32}^{frac32}f(t)cosleft(frac{2pi nt}{3}right),dt = frac43int_{0}^{frac32}f(t)cosleft(frac{2pi nt}{3}right),dt\
              a_n &= frac43int_0^1 tcosleft(frac{2pi nt}{3}right),dt+frac43int_1^{frac32}cosleft(frac{2pi nt}{3}right),dt\
              a_n &= frac43left[frac{3t}{2pi n}sinleft(frac{2pi nt}{3}right)+frac{9}{4pi^2 n^2}cosleft(frac{2pi nt}{3}right)right]_0^1 +frac43left[frac{3}{2pi n}sinleft(frac{2pi nt}{3}right)right]_1^{frac32}\
              a_n &= frac2{pi n}sinleft(frac{2pi n}{3}right) +frac{3}{pi^2 n^2}left(1-cosleft(frac{2pi n}{3}right)right) + frac2{pi n}left(sinpi n - sinleft(frac{2pi n}{3}right)right)\
              a_n &= frac{3}{pi^2 n^2}+frac2{pi n}(sin(pi n))-frac{3}{pi n^2}cosleft(frac{2pi n}{3}right)\
              a_n &= begin{cases}frac23& n=0\ 0& 3mid n,n>0\ frac{9}{2pi^2 n^2}& 3nmid nend{cases}end{align*}

              In that last step, we use that $sin(pi n) = 0$ and $cosleft(frac{2pi n}{3}right)$ has a cycle of values $1,-frac12,-frac12$; subtract that from $1$ and it becomes $0,frac32,frac32$. Also, we incorporate the previously calculated (by a different method) $a_0$. The book's version of the answer applies the $sin(pi n)=0$ fact, but doesn't do anything with the $cosleft(frac{2pi n}{3}right)$ term.



              So there it is. Incorporate the middle part of the integral as it should be for this even function, and we get the right answer.






              share|cite|improve this answer











              $endgroup$
















                0












                0








                0





                $begingroup$


                since the two middle integrals cancel...




                They don't. Our $f(t)=begin{cases}1&-frac32 le tle -1\-t&-1le tle 0\t&0le tle 1\1&1le tle frac32end{cases}$ is even. Integrate it against an odd function like $sinleft(frac{2pi nt}{3}right)$ and we'll get zero by odd symmetry. Integrate it against something even like $cosleft(frac{2pi nt}{3}right)$, and the parts for negative $t$ will mirror the parts for positive $t$ and reinforce each other, doubling the total value. By even symmetry,
                begin{align*}a_n &= frac23int_{-frac32}^{frac32}f(t)cosleft(frac{2pi nt}{3}right),dt = frac43int_{0}^{frac32}f(t)cosleft(frac{2pi nt}{3}right),dt\
                a_n &= frac43int_0^1 tcosleft(frac{2pi nt}{3}right),dt+frac43int_1^{frac32}cosleft(frac{2pi nt}{3}right),dt\
                a_n &= frac43left[frac{3t}{2pi n}sinleft(frac{2pi nt}{3}right)+frac{9}{4pi^2 n^2}cosleft(frac{2pi nt}{3}right)right]_0^1 +frac43left[frac{3}{2pi n}sinleft(frac{2pi nt}{3}right)right]_1^{frac32}\
                a_n &= frac2{pi n}sinleft(frac{2pi n}{3}right) +frac{3}{pi^2 n^2}left(1-cosleft(frac{2pi n}{3}right)right) + frac2{pi n}left(sinpi n - sinleft(frac{2pi n}{3}right)right)\
                a_n &= frac{3}{pi^2 n^2}+frac2{pi n}(sin(pi n))-frac{3}{pi n^2}cosleft(frac{2pi n}{3}right)\
                a_n &= begin{cases}frac23& n=0\ 0& 3mid n,n>0\ frac{9}{2pi^2 n^2}& 3nmid nend{cases}end{align*}

                In that last step, we use that $sin(pi n) = 0$ and $cosleft(frac{2pi n}{3}right)$ has a cycle of values $1,-frac12,-frac12$; subtract that from $1$ and it becomes $0,frac32,frac32$. Also, we incorporate the previously calculated (by a different method) $a_0$. The book's version of the answer applies the $sin(pi n)=0$ fact, but doesn't do anything with the $cosleft(frac{2pi n}{3}right)$ term.



                So there it is. Incorporate the middle part of the integral as it should be for this even function, and we get the right answer.






                share|cite|improve this answer











                $endgroup$




                since the two middle integrals cancel...




                They don't. Our $f(t)=begin{cases}1&-frac32 le tle -1\-t&-1le tle 0\t&0le tle 1\1&1le tle frac32end{cases}$ is even. Integrate it against an odd function like $sinleft(frac{2pi nt}{3}right)$ and we'll get zero by odd symmetry. Integrate it against something even like $cosleft(frac{2pi nt}{3}right)$, and the parts for negative $t$ will mirror the parts for positive $t$ and reinforce each other, doubling the total value. By even symmetry,
                begin{align*}a_n &= frac23int_{-frac32}^{frac32}f(t)cosleft(frac{2pi nt}{3}right),dt = frac43int_{0}^{frac32}f(t)cosleft(frac{2pi nt}{3}right),dt\
                a_n &= frac43int_0^1 tcosleft(frac{2pi nt}{3}right),dt+frac43int_1^{frac32}cosleft(frac{2pi nt}{3}right),dt\
                a_n &= frac43left[frac{3t}{2pi n}sinleft(frac{2pi nt}{3}right)+frac{9}{4pi^2 n^2}cosleft(frac{2pi nt}{3}right)right]_0^1 +frac43left[frac{3}{2pi n}sinleft(frac{2pi nt}{3}right)right]_1^{frac32}\
                a_n &= frac2{pi n}sinleft(frac{2pi n}{3}right) +frac{3}{pi^2 n^2}left(1-cosleft(frac{2pi n}{3}right)right) + frac2{pi n}left(sinpi n - sinleft(frac{2pi n}{3}right)right)\
                a_n &= frac{3}{pi^2 n^2}+frac2{pi n}(sin(pi n))-frac{3}{pi n^2}cosleft(frac{2pi n}{3}right)\
                a_n &= begin{cases}frac23& n=0\ 0& 3mid n,n>0\ frac{9}{2pi^2 n^2}& 3nmid nend{cases}end{align*}

                In that last step, we use that $sin(pi n) = 0$ and $cosleft(frac{2pi n}{3}right)$ has a cycle of values $1,-frac12,-frac12$; subtract that from $1$ and it becomes $0,frac32,frac32$. Also, we incorporate the previously calculated (by a different method) $a_0$. The book's version of the answer applies the $sin(pi n)=0$ fact, but doesn't do anything with the $cosleft(frac{2pi n}{3}right)$ term.



                So there it is. Incorporate the middle part of the integral as it should be for this even function, and we get the right answer.







                share|cite|improve this answer














                share|cite|improve this answer



                share|cite|improve this answer








                edited Jan 25 at 12:13

























                answered Jan 24 at 21:58









                jmerryjmerry

                14.6k1632




                14.6k1632






























                    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%2f3086161%2ffind-mistake-in-fourer-series-calculation%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

                    The term 'EXEC' is not recognized as the name of a cmdlet Powershell

                    NPM command prompt closes immediately [closed]

                    Error binding properties and functions in emscripten