Confusion about Fourier sine/cosine series












1












$begingroup$


So I'm practicing some Fourier series problems and I've stumbled upon this:



For a function:
$$f(x)=xcdot sgn(sin(2x)) quad quad text{where } x in(0, pi)$$



(a) Write a function as a Fourier sine series on the interval $(-pi, pi)$



(b) Write a function as a Fourier cosine series on the inverval $(-pi, pi)$



At the time I had no idea what Fourier sine/cosine series was (just knew what a Fourier series was in general). Then I googled it and and found a couple of definitions which state the following:




  1. If a function is odd then $a_n=0$ and the Fourier series collapses to $f(x)=sum_{n=1}^{infty}b_nsin(nx)$

  2. If a function is even then $b_n=0$ and the Fourier series collapses to $f(x) = frac{a_0}{2}+sum_{n=0}^{infty}a_ncos(nx)$


I guess it's obvious what my confusion is here. How does the problem expect me to write both for the same function, since the function is either even or odd? What I've managed to do so far is to convert the function to a piecewise form:



$$ f(x)=begin{cases}
0 ,& x = frac{pi}{2} \
x, & x in(0, frac{pi}{2})\
-x & x in(frac{pi}{2},pi)
end{cases}
$$



And from here I'd have no problem finding the Fourier series in general, but that's not what's asked here.



So any ideas on what is meant here?



Thanks.










share|cite|improve this question









$endgroup$

















    1












    $begingroup$


    So I'm practicing some Fourier series problems and I've stumbled upon this:



    For a function:
    $$f(x)=xcdot sgn(sin(2x)) quad quad text{where } x in(0, pi)$$



    (a) Write a function as a Fourier sine series on the interval $(-pi, pi)$



    (b) Write a function as a Fourier cosine series on the inverval $(-pi, pi)$



    At the time I had no idea what Fourier sine/cosine series was (just knew what a Fourier series was in general). Then I googled it and and found a couple of definitions which state the following:




    1. If a function is odd then $a_n=0$ and the Fourier series collapses to $f(x)=sum_{n=1}^{infty}b_nsin(nx)$

    2. If a function is even then $b_n=0$ and the Fourier series collapses to $f(x) = frac{a_0}{2}+sum_{n=0}^{infty}a_ncos(nx)$


    I guess it's obvious what my confusion is here. How does the problem expect me to write both for the same function, since the function is either even or odd? What I've managed to do so far is to convert the function to a piecewise form:



    $$ f(x)=begin{cases}
    0 ,& x = frac{pi}{2} \
    x, & x in(0, frac{pi}{2})\
    -x & x in(frac{pi}{2},pi)
    end{cases}
    $$



    And from here I'd have no problem finding the Fourier series in general, but that's not what's asked here.



    So any ideas on what is meant here?



    Thanks.










    share|cite|improve this question









    $endgroup$















      1












      1








      1





      $begingroup$


      So I'm practicing some Fourier series problems and I've stumbled upon this:



      For a function:
      $$f(x)=xcdot sgn(sin(2x)) quad quad text{where } x in(0, pi)$$



      (a) Write a function as a Fourier sine series on the interval $(-pi, pi)$



      (b) Write a function as a Fourier cosine series on the inverval $(-pi, pi)$



      At the time I had no idea what Fourier sine/cosine series was (just knew what a Fourier series was in general). Then I googled it and and found a couple of definitions which state the following:




      1. If a function is odd then $a_n=0$ and the Fourier series collapses to $f(x)=sum_{n=1}^{infty}b_nsin(nx)$

      2. If a function is even then $b_n=0$ and the Fourier series collapses to $f(x) = frac{a_0}{2}+sum_{n=0}^{infty}a_ncos(nx)$


      I guess it's obvious what my confusion is here. How does the problem expect me to write both for the same function, since the function is either even or odd? What I've managed to do so far is to convert the function to a piecewise form:



      $$ f(x)=begin{cases}
      0 ,& x = frac{pi}{2} \
      x, & x in(0, frac{pi}{2})\
      -x & x in(frac{pi}{2},pi)
      end{cases}
      $$



      And from here I'd have no problem finding the Fourier series in general, but that's not what's asked here.



      So any ideas on what is meant here?



      Thanks.










      share|cite|improve this question









      $endgroup$




      So I'm practicing some Fourier series problems and I've stumbled upon this:



      For a function:
      $$f(x)=xcdot sgn(sin(2x)) quad quad text{where } x in(0, pi)$$



      (a) Write a function as a Fourier sine series on the interval $(-pi, pi)$



      (b) Write a function as a Fourier cosine series on the inverval $(-pi, pi)$



      At the time I had no idea what Fourier sine/cosine series was (just knew what a Fourier series was in general). Then I googled it and and found a couple of definitions which state the following:




      1. If a function is odd then $a_n=0$ and the Fourier series collapses to $f(x)=sum_{n=1}^{infty}b_nsin(nx)$

      2. If a function is even then $b_n=0$ and the Fourier series collapses to $f(x) = frac{a_0}{2}+sum_{n=0}^{infty}a_ncos(nx)$


      I guess it's obvious what my confusion is here. How does the problem expect me to write both for the same function, since the function is either even or odd? What I've managed to do so far is to convert the function to a piecewise form:



      $$ f(x)=begin{cases}
      0 ,& x = frac{pi}{2} \
      x, & x in(0, frac{pi}{2})\
      -x & x in(frac{pi}{2},pi)
      end{cases}
      $$



      And from here I'd have no problem finding the Fourier series in general, but that's not what's asked here.



      So any ideas on what is meant here?



      Thanks.







      real-analysis fourier-series






      share|cite|improve this question













      share|cite|improve this question











      share|cite|improve this question




      share|cite|improve this question










      asked Jan 21 at 10:56









      KoyKoy

      35116




      35116






















          1 Answer
          1






          active

          oldest

          votes


















          0












          $begingroup$


          How does the problem expect me to write both for the same function, since the function is either even or odd?




          You basically make an even or odd extension of the function from where it is defined on a given interval, corresponding to the cosine or sine series respectively. This inherently makes the function in consideration even or odd (on the interval given at least).



          Let $f$ be our function on an interval $[0,L]$. Then we extend $f$ to $[-L,L]$ by letting $f(x) = f(-x)$ (for the even extension) or $f(x) = -f(-x)$ (for the odd extension). For clarity's sake, $x in [-L,0]$ for these, and thus $-x in [0,L]$ (thus borrowing from the function's definition on the original interval).



          We sometimes also just "periodically extend" the function without regard to even/odd-ness. So we don't bother with this interval $[-L,0]$ really and just start extending from there.



          And then we just let this be extended periodically to the whole real line, sort of a "copy and paste" of it from $[-L,L]$ or $[0,L]$ to each period of length $2L$ or $L$. On $[-L,L]$ the function will be odd or even depending on how the function is constructed, thus why it is called an even or odd extension (since you extend that bite to the rest of the number line).



          These essentially correspond to certain reflections of the function. An example of how these extensions look for $f(x) = x$ with $x in (0,2)$.



          enter image description here






          share|cite|improve this answer









          $endgroup$













          • $begingroup$
            I understand what you're saying in theory, but I'm still having trouble applying it to an actual function (for instance the one I've used in the question). Would you be able to provide an example to how an even/odd extension would affect the piecewise form of a function (any example, doesn't have to be the one I provided), as long as the function is indeed piecewise? Thanks.
            $endgroup$
            – Koy
            Jan 21 at 11:19










          • $begingroup$
            What do you mean by "form"? Simply how it looks, e.g. its graph?
            $endgroup$
            – Eevee Trainer
            Jan 21 at 11:20










          • $begingroup$
            No, not the graph. I am able to graph the function. The actual piecewise expression, like the one I've written. What confuses me is whether I'd have more intervals (for example -pi to -pi/2 and then -pi/2 to zero and then 0 to pi/2 etc..) or can it be simplified in some way.
            $endgroup$
            – Koy
            Jan 21 at 11:22











          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%2f3081736%2fconfusion-about-fourier-sine-cosine-series%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0












          $begingroup$


          How does the problem expect me to write both for the same function, since the function is either even or odd?




          You basically make an even or odd extension of the function from where it is defined on a given interval, corresponding to the cosine or sine series respectively. This inherently makes the function in consideration even or odd (on the interval given at least).



          Let $f$ be our function on an interval $[0,L]$. Then we extend $f$ to $[-L,L]$ by letting $f(x) = f(-x)$ (for the even extension) or $f(x) = -f(-x)$ (for the odd extension). For clarity's sake, $x in [-L,0]$ for these, and thus $-x in [0,L]$ (thus borrowing from the function's definition on the original interval).



          We sometimes also just "periodically extend" the function without regard to even/odd-ness. So we don't bother with this interval $[-L,0]$ really and just start extending from there.



          And then we just let this be extended periodically to the whole real line, sort of a "copy and paste" of it from $[-L,L]$ or $[0,L]$ to each period of length $2L$ or $L$. On $[-L,L]$ the function will be odd or even depending on how the function is constructed, thus why it is called an even or odd extension (since you extend that bite to the rest of the number line).



          These essentially correspond to certain reflections of the function. An example of how these extensions look for $f(x) = x$ with $x in (0,2)$.



          enter image description here






          share|cite|improve this answer









          $endgroup$













          • $begingroup$
            I understand what you're saying in theory, but I'm still having trouble applying it to an actual function (for instance the one I've used in the question). Would you be able to provide an example to how an even/odd extension would affect the piecewise form of a function (any example, doesn't have to be the one I provided), as long as the function is indeed piecewise? Thanks.
            $endgroup$
            – Koy
            Jan 21 at 11:19










          • $begingroup$
            What do you mean by "form"? Simply how it looks, e.g. its graph?
            $endgroup$
            – Eevee Trainer
            Jan 21 at 11:20










          • $begingroup$
            No, not the graph. I am able to graph the function. The actual piecewise expression, like the one I've written. What confuses me is whether I'd have more intervals (for example -pi to -pi/2 and then -pi/2 to zero and then 0 to pi/2 etc..) or can it be simplified in some way.
            $endgroup$
            – Koy
            Jan 21 at 11:22
















          0












          $begingroup$


          How does the problem expect me to write both for the same function, since the function is either even or odd?




          You basically make an even or odd extension of the function from where it is defined on a given interval, corresponding to the cosine or sine series respectively. This inherently makes the function in consideration even or odd (on the interval given at least).



          Let $f$ be our function on an interval $[0,L]$. Then we extend $f$ to $[-L,L]$ by letting $f(x) = f(-x)$ (for the even extension) or $f(x) = -f(-x)$ (for the odd extension). For clarity's sake, $x in [-L,0]$ for these, and thus $-x in [0,L]$ (thus borrowing from the function's definition on the original interval).



          We sometimes also just "periodically extend" the function without regard to even/odd-ness. So we don't bother with this interval $[-L,0]$ really and just start extending from there.



          And then we just let this be extended periodically to the whole real line, sort of a "copy and paste" of it from $[-L,L]$ or $[0,L]$ to each period of length $2L$ or $L$. On $[-L,L]$ the function will be odd or even depending on how the function is constructed, thus why it is called an even or odd extension (since you extend that bite to the rest of the number line).



          These essentially correspond to certain reflections of the function. An example of how these extensions look for $f(x) = x$ with $x in (0,2)$.



          enter image description here






          share|cite|improve this answer









          $endgroup$













          • $begingroup$
            I understand what you're saying in theory, but I'm still having trouble applying it to an actual function (for instance the one I've used in the question). Would you be able to provide an example to how an even/odd extension would affect the piecewise form of a function (any example, doesn't have to be the one I provided), as long as the function is indeed piecewise? Thanks.
            $endgroup$
            – Koy
            Jan 21 at 11:19










          • $begingroup$
            What do you mean by "form"? Simply how it looks, e.g. its graph?
            $endgroup$
            – Eevee Trainer
            Jan 21 at 11:20










          • $begingroup$
            No, not the graph. I am able to graph the function. The actual piecewise expression, like the one I've written. What confuses me is whether I'd have more intervals (for example -pi to -pi/2 and then -pi/2 to zero and then 0 to pi/2 etc..) or can it be simplified in some way.
            $endgroup$
            – Koy
            Jan 21 at 11:22














          0












          0








          0





          $begingroup$


          How does the problem expect me to write both for the same function, since the function is either even or odd?




          You basically make an even or odd extension of the function from where it is defined on a given interval, corresponding to the cosine or sine series respectively. This inherently makes the function in consideration even or odd (on the interval given at least).



          Let $f$ be our function on an interval $[0,L]$. Then we extend $f$ to $[-L,L]$ by letting $f(x) = f(-x)$ (for the even extension) or $f(x) = -f(-x)$ (for the odd extension). For clarity's sake, $x in [-L,0]$ for these, and thus $-x in [0,L]$ (thus borrowing from the function's definition on the original interval).



          We sometimes also just "periodically extend" the function without regard to even/odd-ness. So we don't bother with this interval $[-L,0]$ really and just start extending from there.



          And then we just let this be extended periodically to the whole real line, sort of a "copy and paste" of it from $[-L,L]$ or $[0,L]$ to each period of length $2L$ or $L$. On $[-L,L]$ the function will be odd or even depending on how the function is constructed, thus why it is called an even or odd extension (since you extend that bite to the rest of the number line).



          These essentially correspond to certain reflections of the function. An example of how these extensions look for $f(x) = x$ with $x in (0,2)$.



          enter image description here






          share|cite|improve this answer









          $endgroup$




          How does the problem expect me to write both for the same function, since the function is either even or odd?




          You basically make an even or odd extension of the function from where it is defined on a given interval, corresponding to the cosine or sine series respectively. This inherently makes the function in consideration even or odd (on the interval given at least).



          Let $f$ be our function on an interval $[0,L]$. Then we extend $f$ to $[-L,L]$ by letting $f(x) = f(-x)$ (for the even extension) or $f(x) = -f(-x)$ (for the odd extension). For clarity's sake, $x in [-L,0]$ for these, and thus $-x in [0,L]$ (thus borrowing from the function's definition on the original interval).



          We sometimes also just "periodically extend" the function without regard to even/odd-ness. So we don't bother with this interval $[-L,0]$ really and just start extending from there.



          And then we just let this be extended periodically to the whole real line, sort of a "copy and paste" of it from $[-L,L]$ or $[0,L]$ to each period of length $2L$ or $L$. On $[-L,L]$ the function will be odd or even depending on how the function is constructed, thus why it is called an even or odd extension (since you extend that bite to the rest of the number line).



          These essentially correspond to certain reflections of the function. An example of how these extensions look for $f(x) = x$ with $x in (0,2)$.



          enter image description here







          share|cite|improve this answer












          share|cite|improve this answer



          share|cite|improve this answer










          answered Jan 21 at 11:08









          Eevee TrainerEevee Trainer

          7,42821338




          7,42821338












          • $begingroup$
            I understand what you're saying in theory, but I'm still having trouble applying it to an actual function (for instance the one I've used in the question). Would you be able to provide an example to how an even/odd extension would affect the piecewise form of a function (any example, doesn't have to be the one I provided), as long as the function is indeed piecewise? Thanks.
            $endgroup$
            – Koy
            Jan 21 at 11:19










          • $begingroup$
            What do you mean by "form"? Simply how it looks, e.g. its graph?
            $endgroup$
            – Eevee Trainer
            Jan 21 at 11:20










          • $begingroup$
            No, not the graph. I am able to graph the function. The actual piecewise expression, like the one I've written. What confuses me is whether I'd have more intervals (for example -pi to -pi/2 and then -pi/2 to zero and then 0 to pi/2 etc..) or can it be simplified in some way.
            $endgroup$
            – Koy
            Jan 21 at 11:22


















          • $begingroup$
            I understand what you're saying in theory, but I'm still having trouble applying it to an actual function (for instance the one I've used in the question). Would you be able to provide an example to how an even/odd extension would affect the piecewise form of a function (any example, doesn't have to be the one I provided), as long as the function is indeed piecewise? Thanks.
            $endgroup$
            – Koy
            Jan 21 at 11:19










          • $begingroup$
            What do you mean by "form"? Simply how it looks, e.g. its graph?
            $endgroup$
            – Eevee Trainer
            Jan 21 at 11:20










          • $begingroup$
            No, not the graph. I am able to graph the function. The actual piecewise expression, like the one I've written. What confuses me is whether I'd have more intervals (for example -pi to -pi/2 and then -pi/2 to zero and then 0 to pi/2 etc..) or can it be simplified in some way.
            $endgroup$
            – Koy
            Jan 21 at 11:22
















          $begingroup$
          I understand what you're saying in theory, but I'm still having trouble applying it to an actual function (for instance the one I've used in the question). Would you be able to provide an example to how an even/odd extension would affect the piecewise form of a function (any example, doesn't have to be the one I provided), as long as the function is indeed piecewise? Thanks.
          $endgroup$
          – Koy
          Jan 21 at 11:19




          $begingroup$
          I understand what you're saying in theory, but I'm still having trouble applying it to an actual function (for instance the one I've used in the question). Would you be able to provide an example to how an even/odd extension would affect the piecewise form of a function (any example, doesn't have to be the one I provided), as long as the function is indeed piecewise? Thanks.
          $endgroup$
          – Koy
          Jan 21 at 11:19












          $begingroup$
          What do you mean by "form"? Simply how it looks, e.g. its graph?
          $endgroup$
          – Eevee Trainer
          Jan 21 at 11:20




          $begingroup$
          What do you mean by "form"? Simply how it looks, e.g. its graph?
          $endgroup$
          – Eevee Trainer
          Jan 21 at 11:20












          $begingroup$
          No, not the graph. I am able to graph the function. The actual piecewise expression, like the one I've written. What confuses me is whether I'd have more intervals (for example -pi to -pi/2 and then -pi/2 to zero and then 0 to pi/2 etc..) or can it be simplified in some way.
          $endgroup$
          – Koy
          Jan 21 at 11:22




          $begingroup$
          No, not the graph. I am able to graph the function. The actual piecewise expression, like the one I've written. What confuses me is whether I'd have more intervals (for example -pi to -pi/2 and then -pi/2 to zero and then 0 to pi/2 etc..) or can it be simplified in some way.
          $endgroup$
          – Koy
          Jan 21 at 11:22


















          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%2f3081736%2fconfusion-about-fourier-sine-cosine-series%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

          MongoDB - Not Authorized To Execute Command

          How to fix TextFormField cause rebuild widget in Flutter

          in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith