2

The definition given on wikipedia for Fourier Coefficients is as follows:

$a_n=\frac{2}{P}\int_{P}^{} s(x)cos(\frac{2\pi xn}{P})dx$

where $P$= Period

Now, then while solving for Fourier series of $|sinx|$ I equated it to:

$\frac {a_o}{2} + \sum cos(\frac{2\pi xn}{P})dx$

Here, I got confused whether to take P as $\pi$ or $2\pi$ even when I know that the period of $|sinx|$ is $\pi$. This is is because most of the solution online equate the function to the series:

$\frac {a_o}{2} + \sum cos(nx)dx$ and then proceed while it should be $cos(2nx)$ according to me since period is $\pi$.

Also, in other places I have found the definiton as:

$a_n=\frac{2}{P}\int_{P}^{} s(x)cos(\frac{\pi xn}{P})dx$ which differs from wikipedia which has a 2 in the argument of $cos$.

What do I don't understand here?

Lost
  • 477
  • 1
    The question may be posed more generally: Suppose I have a $P$-periodic function $f$ with domain $[0,P]$. Then $f$ is also $2P$-periodic with domain $[0,2P]$, $3P$-periodic with domain $[0,3P]$, etc. Should these higher periodicities yield different Fourier expansions? – Semiclassical Jan 02 '21 at 21:06

1 Answers1

1

In general, and for a periodic function $\;f(x+2a)=f(x)\;$ defined on $\;[-a,a]\,,\,\,\,a\in (0,\infty)\;$, we get

$$f(x)\sim \frac{a_0}2+\sum_{n=1}^\infty a_n\cos\frac{n\pi x}L+b_n\sin\frac{n\pi x}L\;,\;\;L=a=\frac12\left|[-a,a]\right|\;$$

and

$$a_n=\frac1L\int_{-a}^a f(x)\cos\frac{n\pi x}L\,dx\;,\;\;a_n=\frac1L\int_{-a}^a f(x)\sin\frac{n\pi x}L\,dx$$

DonAntonio
  • 211,718
  • 17
  • 136
  • 287
  • Yes. But many textbooks and even wikipedia takes the argument as $2n\pi x/L$ while many take $n\pi x /L$. This suggests both should give same answer but it doesn't seem right to me. Which one is correct? – Lost Jan 03 '21 at 09:27
  • It all depends on the normalizing factor of the chosen orthonormal basis in the corresponding space of integrable function. Thyat's something we all must check and correct according to our personal preferences. – DonAntonio Jan 03 '21 at 09:57
  • And the answer is independent of that?...Since in $|sin x|$ the answers seems to differ when $pi$ to $2*pi$. – Lost Jan 03 '21 at 11:05
  • @Lost I assumed in my answer that the given interval is the canonical one, $;[-\pi,\pi];$ . Of course that things can change if you give another interval...but you didn't specify any interval at all. – DonAntonio Jan 03 '21 at 12:26
  • The interval is what you have taken. How does that change $2\pi$ to $\pi$. On wikipedia the interval is taken canonical but period $2\pi$, in my case the interval is canonical but the period is $\pi$. How does this cause a change in the definition? You have taken $cos(n\pi x/L)$ whereas wikipedia has written $cos (2\pi nx/L)$. – Lost Jan 04 '21 at 08:53
  • The interval I've taken has length $;2\pi;$ , which is what we need for functions that we want them to be periodic $;2\pi;$ . For functions periodic $;\pi;$, say like $;\cos 2x;$ or stuff, then you could take $;\left[-\pi/2,,\pi/2\right];$ or whatever. Wikipedia adopts a rather unusual (for me) definition, where it uses $;\sin\frac{2\pi nx}P;$ , but then $;P=2\pi;$ , so we're back at the same as above. In many uses, we adopt half the periodicity interval's length (many times denoted as $T$) , so in my case it is $;\pi;$ ...it's all just the same. – DonAntonio Jan 04 '21 at 09:22
  • But when $P=\pi$ in the wiki def for lets say, $|sin x|$ which has a period $\pi$ then should it be expanded to weighted sum of $cos (nx)$ or $cos (2nx)$? The former is when we take yours and latter is when we substitute $P = \pi$ in the wiki definiton. These two yield different answers. – Lost Jan 04 '21 at 11:48