Find the half-range Fourier series expansion of $f(x) = cos(x)$












2












$begingroup$


I am stuck on the problem of calculating the half-range Fourier series expansion of $$f(x) = cos(x),$$ $$0 < x < frac{pi}{2}$$



I am at the point where I have calculated the definite integral of $b_n$.



$$b_n = frac{4}{pi}int_{0}^{frac{pi}{2}} cos(x)sin(nx) dx = frac{4}{pi} cdot frac{n - sin(frac{pi n}{2})}{(n^2 - 1)}$$




According to this Wikipedia link, the correct answer for $b_n$ is



$$b_n = frac{4}{pi} int_{0}^{frac{pi}{2}} cos(x)sin(nx) dx = frac{4}{pi} cdot frac{n((-1)^n + 1)}{(n^2 - 1)}.$$



Can someone please explain to me how to go from
$$frac{n - sin(frac{pi n}{2})}{(n^2 - 1)}$$
to $$frac{n((-1)^n + 1)}{(n^2 - 1)}.$$



I understand that, for example, $$cos(npi)$$ can be written as $$(-1)^n,$$
because $cos(npi)$ has alternating $1's$ and $0's$ as $n$ increases.

However, for $sin(frac{npi}{2})$ the alteration is $1$, $0$, $-1$, $0$.

I have been stuck on this problem for hours now.
I will greatly appreciate any explanation :)










share|cite|improve this question









$endgroup$












  • $begingroup$
    Recheck your work for $b_n$. The formula doesn't look right - the numerator should have a factor of $n$ in the least.
    $endgroup$
    – A.S.
    Oct 17 '15 at 10:25


















2












$begingroup$


I am stuck on the problem of calculating the half-range Fourier series expansion of $$f(x) = cos(x),$$ $$0 < x < frac{pi}{2}$$



I am at the point where I have calculated the definite integral of $b_n$.



$$b_n = frac{4}{pi}int_{0}^{frac{pi}{2}} cos(x)sin(nx) dx = frac{4}{pi} cdot frac{n - sin(frac{pi n}{2})}{(n^2 - 1)}$$




According to this Wikipedia link, the correct answer for $b_n$ is



$$b_n = frac{4}{pi} int_{0}^{frac{pi}{2}} cos(x)sin(nx) dx = frac{4}{pi} cdot frac{n((-1)^n + 1)}{(n^2 - 1)}.$$



Can someone please explain to me how to go from
$$frac{n - sin(frac{pi n}{2})}{(n^2 - 1)}$$
to $$frac{n((-1)^n + 1)}{(n^2 - 1)}.$$



I understand that, for example, $$cos(npi)$$ can be written as $$(-1)^n,$$
because $cos(npi)$ has alternating $1's$ and $0's$ as $n$ increases.

However, for $sin(frac{npi}{2})$ the alteration is $1$, $0$, $-1$, $0$.

I have been stuck on this problem for hours now.
I will greatly appreciate any explanation :)










share|cite|improve this question









$endgroup$












  • $begingroup$
    Recheck your work for $b_n$. The formula doesn't look right - the numerator should have a factor of $n$ in the least.
    $endgroup$
    – A.S.
    Oct 17 '15 at 10:25
















2












2








2


2



$begingroup$


I am stuck on the problem of calculating the half-range Fourier series expansion of $$f(x) = cos(x),$$ $$0 < x < frac{pi}{2}$$



I am at the point where I have calculated the definite integral of $b_n$.



$$b_n = frac{4}{pi}int_{0}^{frac{pi}{2}} cos(x)sin(nx) dx = frac{4}{pi} cdot frac{n - sin(frac{pi n}{2})}{(n^2 - 1)}$$




According to this Wikipedia link, the correct answer for $b_n$ is



$$b_n = frac{4}{pi} int_{0}^{frac{pi}{2}} cos(x)sin(nx) dx = frac{4}{pi} cdot frac{n((-1)^n + 1)}{(n^2 - 1)}.$$



Can someone please explain to me how to go from
$$frac{n - sin(frac{pi n}{2})}{(n^2 - 1)}$$
to $$frac{n((-1)^n + 1)}{(n^2 - 1)}.$$



I understand that, for example, $$cos(npi)$$ can be written as $$(-1)^n,$$
because $cos(npi)$ has alternating $1's$ and $0's$ as $n$ increases.

However, for $sin(frac{npi}{2})$ the alteration is $1$, $0$, $-1$, $0$.

I have been stuck on this problem for hours now.
I will greatly appreciate any explanation :)










share|cite|improve this question









$endgroup$




I am stuck on the problem of calculating the half-range Fourier series expansion of $$f(x) = cos(x),$$ $$0 < x < frac{pi}{2}$$



I am at the point where I have calculated the definite integral of $b_n$.



$$b_n = frac{4}{pi}int_{0}^{frac{pi}{2}} cos(x)sin(nx) dx = frac{4}{pi} cdot frac{n - sin(frac{pi n}{2})}{(n^2 - 1)}$$




According to this Wikipedia link, the correct answer for $b_n$ is



$$b_n = frac{4}{pi} int_{0}^{frac{pi}{2}} cos(x)sin(nx) dx = frac{4}{pi} cdot frac{n((-1)^n + 1)}{(n^2 - 1)}.$$



Can someone please explain to me how to go from
$$frac{n - sin(frac{pi n}{2})}{(n^2 - 1)}$$
to $$frac{n((-1)^n + 1)}{(n^2 - 1)}.$$



I understand that, for example, $$cos(npi)$$ can be written as $$(-1)^n,$$
because $cos(npi)$ has alternating $1's$ and $0's$ as $n$ increases.

However, for $sin(frac{npi}{2})$ the alteration is $1$, $0$, $-1$, $0$.

I have been stuck on this problem for hours now.
I will greatly appreciate any explanation :)







fourier-series






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Oct 17 '15 at 10:17









Joe NiemandJoe Niemand

111




111












  • $begingroup$
    Recheck your work for $b_n$. The formula doesn't look right - the numerator should have a factor of $n$ in the least.
    $endgroup$
    – A.S.
    Oct 17 '15 at 10:25




















  • $begingroup$
    Recheck your work for $b_n$. The formula doesn't look right - the numerator should have a factor of $n$ in the least.
    $endgroup$
    – A.S.
    Oct 17 '15 at 10:25


















$begingroup$
Recheck your work for $b_n$. The formula doesn't look right - the numerator should have a factor of $n$ in the least.
$endgroup$
– A.S.
Oct 17 '15 at 10:25






$begingroup$
Recheck your work for $b_n$. The formula doesn't look right - the numerator should have a factor of $n$ in the least.
$endgroup$
– A.S.
Oct 17 '15 at 10:25












2 Answers
2






active

oldest

votes


















0












$begingroup$

for $n=1,5,9,....$ the $sin(frac{npi}{2})=1$
$$frac{n-sin(frac{npi}{2})}{n^2-1}=frac{n-1}{n^2-1}=frac{1}{n+1}$$



for $n=2,4,6,8....$ all terms equal zero



for $n=3,7,11,...$ the $sin(frac{npi}{2})=-1$
$$frac{n-sin(frac{npi}{2})}{n^2-1}=frac{n+1}{n^2-1}=frac{1}{n-1}$$



now add the $frac{1}{n+1}$ with $frac{1}{n-1}$ to get what you want
$$frac{1}{n+1}+frac{1}{n-1}=frac{2n}{n^2-1}=frac{n((-1)^n + 1)}{(n^2 - 1)}.$$






share|cite|improve this answer









$endgroup$





















    0












    $begingroup$

    In that link the integral is from $0$ to $pi$, but your integral is from $0$ to $frac{pi}{2}$






    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%2f1484259%2ffind-the-half-range-fourier-series-expansion-of-fx-cosx%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









      0












      $begingroup$

      for $n=1,5,9,....$ the $sin(frac{npi}{2})=1$
      $$frac{n-sin(frac{npi}{2})}{n^2-1}=frac{n-1}{n^2-1}=frac{1}{n+1}$$



      for $n=2,4,6,8....$ all terms equal zero



      for $n=3,7,11,...$ the $sin(frac{npi}{2})=-1$
      $$frac{n-sin(frac{npi}{2})}{n^2-1}=frac{n+1}{n^2-1}=frac{1}{n-1}$$



      now add the $frac{1}{n+1}$ with $frac{1}{n-1}$ to get what you want
      $$frac{1}{n+1}+frac{1}{n-1}=frac{2n}{n^2-1}=frac{n((-1)^n + 1)}{(n^2 - 1)}.$$






      share|cite|improve this answer









      $endgroup$


















        0












        $begingroup$

        for $n=1,5,9,....$ the $sin(frac{npi}{2})=1$
        $$frac{n-sin(frac{npi}{2})}{n^2-1}=frac{n-1}{n^2-1}=frac{1}{n+1}$$



        for $n=2,4,6,8....$ all terms equal zero



        for $n=3,7,11,...$ the $sin(frac{npi}{2})=-1$
        $$frac{n-sin(frac{npi}{2})}{n^2-1}=frac{n+1}{n^2-1}=frac{1}{n-1}$$



        now add the $frac{1}{n+1}$ with $frac{1}{n-1}$ to get what you want
        $$frac{1}{n+1}+frac{1}{n-1}=frac{2n}{n^2-1}=frac{n((-1)^n + 1)}{(n^2 - 1)}.$$






        share|cite|improve this answer









        $endgroup$
















          0












          0








          0





          $begingroup$

          for $n=1,5,9,....$ the $sin(frac{npi}{2})=1$
          $$frac{n-sin(frac{npi}{2})}{n^2-1}=frac{n-1}{n^2-1}=frac{1}{n+1}$$



          for $n=2,4,6,8....$ all terms equal zero



          for $n=3,7,11,...$ the $sin(frac{npi}{2})=-1$
          $$frac{n-sin(frac{npi}{2})}{n^2-1}=frac{n+1}{n^2-1}=frac{1}{n-1}$$



          now add the $frac{1}{n+1}$ with $frac{1}{n-1}$ to get what you want
          $$frac{1}{n+1}+frac{1}{n-1}=frac{2n}{n^2-1}=frac{n((-1)^n + 1)}{(n^2 - 1)}.$$






          share|cite|improve this answer









          $endgroup$



          for $n=1,5,9,....$ the $sin(frac{npi}{2})=1$
          $$frac{n-sin(frac{npi}{2})}{n^2-1}=frac{n-1}{n^2-1}=frac{1}{n+1}$$



          for $n=2,4,6,8....$ all terms equal zero



          for $n=3,7,11,...$ the $sin(frac{npi}{2})=-1$
          $$frac{n-sin(frac{npi}{2})}{n^2-1}=frac{n+1}{n^2-1}=frac{1}{n-1}$$



          now add the $frac{1}{n+1}$ with $frac{1}{n-1}$ to get what you want
          $$frac{1}{n+1}+frac{1}{n-1}=frac{2n}{n^2-1}=frac{n((-1)^n + 1)}{(n^2 - 1)}.$$







          share|cite|improve this answer












          share|cite|improve this answer



          share|cite|improve this answer










          answered Oct 17 '15 at 10:41









          E.H.EE.H.E

          16.9k11969




          16.9k11969























              0












              $begingroup$

              In that link the integral is from $0$ to $pi$, but your integral is from $0$ to $frac{pi}{2}$






              share|cite|improve this answer









              $endgroup$


















                0












                $begingroup$

                In that link the integral is from $0$ to $pi$, but your integral is from $0$ to $frac{pi}{2}$






                share|cite|improve this answer









                $endgroup$
















                  0












                  0








                  0





                  $begingroup$

                  In that link the integral is from $0$ to $pi$, but your integral is from $0$ to $frac{pi}{2}$






                  share|cite|improve this answer









                  $endgroup$



                  In that link the integral is from $0$ to $pi$, but your integral is from $0$ to $frac{pi}{2}$







                  share|cite|improve this answer












                  share|cite|improve this answer



                  share|cite|improve this answer










                  answered Oct 17 '15 at 10:59









                  Fikri Irvan HalimFikri Irvan Halim

                  261




                  261






























                      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%2f1484259%2ffind-the-half-range-fourier-series-expansion-of-fx-cosx%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

                      Human spaceflight

                      Can not write log (Is /dev/pts mounted?) - openpty in Ubuntu-on-Windows?

                      張江高科駅