I have a Non-periodic function for which I have to write a Fourier series. The function is defined in an snterval $[0,L]$.

I can take odd or even extension and write the Fourier series. But I want to know if I can write the Fourier series by taking the function to be periodic with a period L, i.e I take the function to periodic with periodicity equal to its interval in which its defined. Will this method work? What condition do I have to enforce to make this work?

Also is it necessary that to write a Fourier series in an Interval, the interval should be of the form $[-X,X]$?


Yes, one can use a periodic extension of a function in order to express it as a Fourier series. A typical exercise on the subject is: consider the function $f(x)=x^2$ on the interval $[0,L]$, extended periodically... This means you'll have an expansion in terms of $\cos\frac{2\pi}{L}n x$ and $\sin\frac{2\pi}{L} nx$ (as these are periodic with period $L$), and the coefficients are $$ A_n = \frac{2}{L}\int_0^L f(x)\cos \frac{2\pi n}{L} x\,dx, \quad B_n = \frac{2}{L}\int_0^L f(x)\sin \frac{2\pi n}{L} x\,dx $$ for $n=0,1,2,\dots$ (by convention, the series contains $A_0/2$ as the constant term, which allows the above formula to work also when $n=0$.) The interval need not be symmetric ($[-a,a]$) in order for the Fourier series to exist; however, it's often more convenient to integrate over symmetric intervals.

The quality of approximation near the endpoints may be poor if the behavior of the function at both ends does not match. To mitigate this issue, and also to avoid the problem of non-symmetric interval, I suggest using even periodic extension: that is, first extend the function to $[-L,L]$ as an even function, $f(-x)=f(x)$, and then extend periodically as a function with period $2L$, meaning $f(x+2L)=f(x)$. An advantage of doing so is that $f(-L)=f(L)$ automatically, so the values at the end of the interval $[-L,L]$ match.

In practice, the above means using the cosine Fourier series $$ f(x) = \frac{A_0}{2} + \sum_{n=1}^\infty A_n\cos \frac{\pi n}{L} x $$ where $$ A_n = \frac{2}{L}\int_0^L f(x)\cos \frac{\pi n}{L} x\,dx, \quad n=0,1,2,\dots $$

My blog post illustrates the advantage of using cosines in such situations on the example of non-periodic function $e^x$.

  • $\begingroup$ I got your point on why to use even extension. But what about the validity of the other method that does not use sine or cosine extension ( the one that assumes that func is periodic in interval L itself) ? For eg f(x)=x in [0,L] so I will be taking the new function to be a Sawtooth function and finding the Fourier series. $\endgroup$ – user1825567 Sep 18 '17 at 14:13
  • 1
    $\begingroup$ I expanded the first part of answer to address this point, including coefficient formulas. $\endgroup$ – user357151 Sep 18 '17 at 15:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.