Finding the Fourier series of a piecewise function












0












$begingroup$


I'm s little confused about Fourier series of functions that are piecewise. Here’s an example of such a function:
$$f(x) = begin{cases}
x & -fracpi2 < x < fracpi2 \[5pt]
pi - x & fracpi2 < x < frac{3pi}2
end{cases}$$
Please can you explain this example to me?










share|cite|improve this question











$endgroup$












  • $begingroup$
    There is a standard formula to compute coefficients $a_0, a_n, b_n$. Your question is how these coefficients are derived or how they get computed?
    $endgroup$
    – thanasissdr
    Sep 28 '14 at 18:25












  • $begingroup$
    yes,in other word in don't know the interval of integral for obtaining coefficients.
    $endgroup$
    – Panda
    Sep 28 '14 at 19:43






  • 2




    $begingroup$
    Remember that you're not computing coefficients for two different functions - you're computing the coefficients of one function, except you will have two integrals when computing the Fourier coefficients due to the function being piecewise across the period.
    $endgroup$
    – Eweler
    Sep 28 '14 at 20:59
















0












$begingroup$


I'm s little confused about Fourier series of functions that are piecewise. Here’s an example of such a function:
$$f(x) = begin{cases}
x & -fracpi2 < x < fracpi2 \[5pt]
pi - x & fracpi2 < x < frac{3pi}2
end{cases}$$
Please can you explain this example to me?










share|cite|improve this question











$endgroup$












  • $begingroup$
    There is a standard formula to compute coefficients $a_0, a_n, b_n$. Your question is how these coefficients are derived or how they get computed?
    $endgroup$
    – thanasissdr
    Sep 28 '14 at 18:25












  • $begingroup$
    yes,in other word in don't know the interval of integral for obtaining coefficients.
    $endgroup$
    – Panda
    Sep 28 '14 at 19:43






  • 2




    $begingroup$
    Remember that you're not computing coefficients for two different functions - you're computing the coefficients of one function, except you will have two integrals when computing the Fourier coefficients due to the function being piecewise across the period.
    $endgroup$
    – Eweler
    Sep 28 '14 at 20:59














0












0








0


2



$begingroup$


I'm s little confused about Fourier series of functions that are piecewise. Here’s an example of such a function:
$$f(x) = begin{cases}
x & -fracpi2 < x < fracpi2 \[5pt]
pi - x & fracpi2 < x < frac{3pi}2
end{cases}$$
Please can you explain this example to me?










share|cite|improve this question











$endgroup$




I'm s little confused about Fourier series of functions that are piecewise. Here’s an example of such a function:
$$f(x) = begin{cases}
x & -fracpi2 < x < fracpi2 \[5pt]
pi - x & fracpi2 < x < frac{3pi}2
end{cases}$$
Please can you explain this example to me?







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 Sep 28 '14 at 21:06









alexwlchan

1,9351118




1,9351118










asked Sep 28 '14 at 17:50









PandaPanda

4141618




4141618












  • $begingroup$
    There is a standard formula to compute coefficients $a_0, a_n, b_n$. Your question is how these coefficients are derived or how they get computed?
    $endgroup$
    – thanasissdr
    Sep 28 '14 at 18:25












  • $begingroup$
    yes,in other word in don't know the interval of integral for obtaining coefficients.
    $endgroup$
    – Panda
    Sep 28 '14 at 19:43






  • 2




    $begingroup$
    Remember that you're not computing coefficients for two different functions - you're computing the coefficients of one function, except you will have two integrals when computing the Fourier coefficients due to the function being piecewise across the period.
    $endgroup$
    – Eweler
    Sep 28 '14 at 20:59


















  • $begingroup$
    There is a standard formula to compute coefficients $a_0, a_n, b_n$. Your question is how these coefficients are derived or how they get computed?
    $endgroup$
    – thanasissdr
    Sep 28 '14 at 18:25












  • $begingroup$
    yes,in other word in don't know the interval of integral for obtaining coefficients.
    $endgroup$
    – Panda
    Sep 28 '14 at 19:43






  • 2




    $begingroup$
    Remember that you're not computing coefficients for two different functions - you're computing the coefficients of one function, except you will have two integrals when computing the Fourier coefficients due to the function being piecewise across the period.
    $endgroup$
    – Eweler
    Sep 28 '14 at 20:59
















$begingroup$
There is a standard formula to compute coefficients $a_0, a_n, b_n$. Your question is how these coefficients are derived or how they get computed?
$endgroup$
– thanasissdr
Sep 28 '14 at 18:25






$begingroup$
There is a standard formula to compute coefficients $a_0, a_n, b_n$. Your question is how these coefficients are derived or how they get computed?
$endgroup$
– thanasissdr
Sep 28 '14 at 18:25














$begingroup$
yes,in other word in don't know the interval of integral for obtaining coefficients.
$endgroup$
– Panda
Sep 28 '14 at 19:43




$begingroup$
yes,in other word in don't know the interval of integral for obtaining coefficients.
$endgroup$
– Panda
Sep 28 '14 at 19:43




2




2




$begingroup$
Remember that you're not computing coefficients for two different functions - you're computing the coefficients of one function, except you will have two integrals when computing the Fourier coefficients due to the function being piecewise across the period.
$endgroup$
– Eweler
Sep 28 '14 at 20:59




$begingroup$
Remember that you're not computing coefficients for two different functions - you're computing the coefficients of one function, except you will have two integrals when computing the Fourier coefficients due to the function being piecewise across the period.
$endgroup$
– Eweler
Sep 28 '14 at 20:59










1 Answer
1






active

oldest

votes


















3












$begingroup$

Your function is defined on the interval $left(-dfrac pi 2, dfrac pi 2 right)cup left( dfrac pi 2 , dfrac {3pi} 2right) $. That means the length of the interval is $boxed{L= 2pi}$.



Now, how to compute the coefficients:



$a_0=displaystyle dfrac 1 L cdotint_{-frac pi 2}^ frac {3pi} 2 f(x) , dx=dfrac 1 Lcdot bigg(int_{-frac pi 2}^ frac {pi} 2 x , dx +int_{frac pi 2}^ frac {3pi} {2} (pi- x) , dxbigg)$



$a_n=displaystyle dfrac 2 L cdotint_{-frac pi 2}^ frac {3pi} 2 f(x)cdot cosleft(dfrac {2npi x} {L}right) , dx$



$b_n=displaystyle dfrac 2 L cdotint_{-frac pi 2}^ frac {3pi} 2 f(x)cdot sinleft(dfrac {2npi x} {L}right) , dx$



The Fourier series of $f$ is:



$$ displaystyle a_0+sum_{n=1}^infty Big[a_ncdot cosleft(dfrac {2npi x} {L}right)+b_n cdot sinleft(dfrac {2npi x} {L}right)Big]$$






share|cite|improve this answer











$endgroup$













  • $begingroup$
    but we know for obtaining coefficients we have to integrate function from [-T/2,T/2] and intervals are Symmetric but you didn't write that.I have been confused now.
    $endgroup$
    – Panda
    Sep 29 '14 at 14:31










  • $begingroup$
    I don't think this is necessary to be always true. In general, $a_n=displaystyleint_{x_0}^{x_0+L} f(x)cdot cosbigg(dfrac { 2 n pi x } {L}bigg), dx$ , where $L$ stands for the period of the periodic function.
    $endgroup$
    – thanasissdr
    Sep 29 '14 at 15:21














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%2f949848%2ffinding-the-fourier-series-of-a-piecewise-function%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









3












$begingroup$

Your function is defined on the interval $left(-dfrac pi 2, dfrac pi 2 right)cup left( dfrac pi 2 , dfrac {3pi} 2right) $. That means the length of the interval is $boxed{L= 2pi}$.



Now, how to compute the coefficients:



$a_0=displaystyle dfrac 1 L cdotint_{-frac pi 2}^ frac {3pi} 2 f(x) , dx=dfrac 1 Lcdot bigg(int_{-frac pi 2}^ frac {pi} 2 x , dx +int_{frac pi 2}^ frac {3pi} {2} (pi- x) , dxbigg)$



$a_n=displaystyle dfrac 2 L cdotint_{-frac pi 2}^ frac {3pi} 2 f(x)cdot cosleft(dfrac {2npi x} {L}right) , dx$



$b_n=displaystyle dfrac 2 L cdotint_{-frac pi 2}^ frac {3pi} 2 f(x)cdot sinleft(dfrac {2npi x} {L}right) , dx$



The Fourier series of $f$ is:



$$ displaystyle a_0+sum_{n=1}^infty Big[a_ncdot cosleft(dfrac {2npi x} {L}right)+b_n cdot sinleft(dfrac {2npi x} {L}right)Big]$$






share|cite|improve this answer











$endgroup$













  • $begingroup$
    but we know for obtaining coefficients we have to integrate function from [-T/2,T/2] and intervals are Symmetric but you didn't write that.I have been confused now.
    $endgroup$
    – Panda
    Sep 29 '14 at 14:31










  • $begingroup$
    I don't think this is necessary to be always true. In general, $a_n=displaystyleint_{x_0}^{x_0+L} f(x)cdot cosbigg(dfrac { 2 n pi x } {L}bigg), dx$ , where $L$ stands for the period of the periodic function.
    $endgroup$
    – thanasissdr
    Sep 29 '14 at 15:21


















3












$begingroup$

Your function is defined on the interval $left(-dfrac pi 2, dfrac pi 2 right)cup left( dfrac pi 2 , dfrac {3pi} 2right) $. That means the length of the interval is $boxed{L= 2pi}$.



Now, how to compute the coefficients:



$a_0=displaystyle dfrac 1 L cdotint_{-frac pi 2}^ frac {3pi} 2 f(x) , dx=dfrac 1 Lcdot bigg(int_{-frac pi 2}^ frac {pi} 2 x , dx +int_{frac pi 2}^ frac {3pi} {2} (pi- x) , dxbigg)$



$a_n=displaystyle dfrac 2 L cdotint_{-frac pi 2}^ frac {3pi} 2 f(x)cdot cosleft(dfrac {2npi x} {L}right) , dx$



$b_n=displaystyle dfrac 2 L cdotint_{-frac pi 2}^ frac {3pi} 2 f(x)cdot sinleft(dfrac {2npi x} {L}right) , dx$



The Fourier series of $f$ is:



$$ displaystyle a_0+sum_{n=1}^infty Big[a_ncdot cosleft(dfrac {2npi x} {L}right)+b_n cdot sinleft(dfrac {2npi x} {L}right)Big]$$






share|cite|improve this answer











$endgroup$













  • $begingroup$
    but we know for obtaining coefficients we have to integrate function from [-T/2,T/2] and intervals are Symmetric but you didn't write that.I have been confused now.
    $endgroup$
    – Panda
    Sep 29 '14 at 14:31










  • $begingroup$
    I don't think this is necessary to be always true. In general, $a_n=displaystyleint_{x_0}^{x_0+L} f(x)cdot cosbigg(dfrac { 2 n pi x } {L}bigg), dx$ , where $L$ stands for the period of the periodic function.
    $endgroup$
    – thanasissdr
    Sep 29 '14 at 15:21
















3












3








3





$begingroup$

Your function is defined on the interval $left(-dfrac pi 2, dfrac pi 2 right)cup left( dfrac pi 2 , dfrac {3pi} 2right) $. That means the length of the interval is $boxed{L= 2pi}$.



Now, how to compute the coefficients:



$a_0=displaystyle dfrac 1 L cdotint_{-frac pi 2}^ frac {3pi} 2 f(x) , dx=dfrac 1 Lcdot bigg(int_{-frac pi 2}^ frac {pi} 2 x , dx +int_{frac pi 2}^ frac {3pi} {2} (pi- x) , dxbigg)$



$a_n=displaystyle dfrac 2 L cdotint_{-frac pi 2}^ frac {3pi} 2 f(x)cdot cosleft(dfrac {2npi x} {L}right) , dx$



$b_n=displaystyle dfrac 2 L cdotint_{-frac pi 2}^ frac {3pi} 2 f(x)cdot sinleft(dfrac {2npi x} {L}right) , dx$



The Fourier series of $f$ is:



$$ displaystyle a_0+sum_{n=1}^infty Big[a_ncdot cosleft(dfrac {2npi x} {L}right)+b_n cdot sinleft(dfrac {2npi x} {L}right)Big]$$






share|cite|improve this answer











$endgroup$



Your function is defined on the interval $left(-dfrac pi 2, dfrac pi 2 right)cup left( dfrac pi 2 , dfrac {3pi} 2right) $. That means the length of the interval is $boxed{L= 2pi}$.



Now, how to compute the coefficients:



$a_0=displaystyle dfrac 1 L cdotint_{-frac pi 2}^ frac {3pi} 2 f(x) , dx=dfrac 1 Lcdot bigg(int_{-frac pi 2}^ frac {pi} 2 x , dx +int_{frac pi 2}^ frac {3pi} {2} (pi- x) , dxbigg)$



$a_n=displaystyle dfrac 2 L cdotint_{-frac pi 2}^ frac {3pi} 2 f(x)cdot cosleft(dfrac {2npi x} {L}right) , dx$



$b_n=displaystyle dfrac 2 L cdotint_{-frac pi 2}^ frac {3pi} 2 f(x)cdot sinleft(dfrac {2npi x} {L}right) , dx$



The Fourier series of $f$ is:



$$ displaystyle a_0+sum_{n=1}^infty Big[a_ncdot cosleft(dfrac {2npi x} {L}right)+b_n cdot sinleft(dfrac {2npi x} {L}right)Big]$$







share|cite|improve this answer














share|cite|improve this answer



share|cite|improve this answer








edited Apr 17 '15 at 21:53

























answered Sep 28 '14 at 20:51









thanasissdrthanasissdr

5,57111325




5,57111325












  • $begingroup$
    but we know for obtaining coefficients we have to integrate function from [-T/2,T/2] and intervals are Symmetric but you didn't write that.I have been confused now.
    $endgroup$
    – Panda
    Sep 29 '14 at 14:31










  • $begingroup$
    I don't think this is necessary to be always true. In general, $a_n=displaystyleint_{x_0}^{x_0+L} f(x)cdot cosbigg(dfrac { 2 n pi x } {L}bigg), dx$ , where $L$ stands for the period of the periodic function.
    $endgroup$
    – thanasissdr
    Sep 29 '14 at 15:21




















  • $begingroup$
    but we know for obtaining coefficients we have to integrate function from [-T/2,T/2] and intervals are Symmetric but you didn't write that.I have been confused now.
    $endgroup$
    – Panda
    Sep 29 '14 at 14:31










  • $begingroup$
    I don't think this is necessary to be always true. In general, $a_n=displaystyleint_{x_0}^{x_0+L} f(x)cdot cosbigg(dfrac { 2 n pi x } {L}bigg), dx$ , where $L$ stands for the period of the periodic function.
    $endgroup$
    – thanasissdr
    Sep 29 '14 at 15:21


















$begingroup$
but we know for obtaining coefficients we have to integrate function from [-T/2,T/2] and intervals are Symmetric but you didn't write that.I have been confused now.
$endgroup$
– Panda
Sep 29 '14 at 14:31




$begingroup$
but we know for obtaining coefficients we have to integrate function from [-T/2,T/2] and intervals are Symmetric but you didn't write that.I have been confused now.
$endgroup$
– Panda
Sep 29 '14 at 14:31












$begingroup$
I don't think this is necessary to be always true. In general, $a_n=displaystyleint_{x_0}^{x_0+L} f(x)cdot cosbigg(dfrac { 2 n pi x } {L}bigg), dx$ , where $L$ stands for the period of the periodic function.
$endgroup$
– thanasissdr
Sep 29 '14 at 15:21






$begingroup$
I don't think this is necessary to be always true. In general, $a_n=displaystyleint_{x_0}^{x_0+L} f(x)cdot cosbigg(dfrac { 2 n pi x } {L}bigg), dx$ , where $L$ stands for the period of the periodic function.
$endgroup$
– thanasissdr
Sep 29 '14 at 15:21




















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%2f949848%2ffinding-the-fourier-series-of-a-piecewise-function%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?

File:DeusFollowingSea.jpg