Fourier Series of a step function

Click For Summary
SUMMARY

The discussion centers on deriving the Cosine Fourier Series for the step function defined as f(x) = 0 for 0 < x < 2 and f(x) = 1 for 2 < x < 4. The correct formula for the Fourier coefficients is established as a_n = (1/4) ∫_0^4 f(x) cos(nπx/4) dx, with the effective period being 4. The necessity of extending the function to be even around x = 0 for the cosine series is confirmed, and the choice of extension is not arbitrary for the complex exponential Fourier Series.

PREREQUISITES
  • Understanding of Fourier Series, specifically Cosine Fourier Series
  • Knowledge of integration techniques for piecewise functions
  • Familiarity with the concept of periodicity in functions
  • Basic understanding of even and odd function properties
NEXT STEPS
  • Study the derivation of Fourier coefficients for piecewise functions
  • Learn about the properties of even and odd functions in Fourier analysis
  • Explore the application of complex exponential Fourier Series
  • Review examples of Fourier Series applied to non-periodic functions
USEFUL FOR

Mathematicians, engineering students, and anyone studying signal processing or harmonic analysis will benefit from this discussion on Fourier Series and their applications to step functions.

Oreith
Messages
8
Reaction score
0

Homework Statement


[/B]
<br /> f(x)=\left\{\begin{array}{cc}0,&amp;\mbox{ if }<br /> 0&lt; x &lt; 2\\1, &amp; \mbox{ if } 2&lt;x&lt;4\end{array}\right.<br />
Show that the Cosine Fourier Series of f(x) for the range [0,4] is given by:

A + B\sum^{\infty}_{n=0}\frac{(-1)^n}{(2m+1)}cos(\frac{(2m +1) \pi x}{2})

Homework Equations



a_n = \frac{2}{L}\int^{x_0 + L}_{x_0} f(x)cos(\frac{2\pi nx}{L})dx

The Attempt at a Solution



L = 4
a_n = \frac{1}{2}\int^{4}_{0} f(x)cos(\frac{\pi nx}{2})dx =\frac{1}{2}\int^{2}_{0} 0cos(\frac{\pi nx}{2})dx+\frac{1}{2}\int^{4}_{2} cos(\frac{\pi nx}{2})dx = \frac{1}{2}\int^{4}_{2} cos(\frac{\pi nx}{2})dx

= \frac{1}{2}[\frac{2 sin(2n\pi)}{\pi n} - \frac{2 sin(n\pi)}{\pi n} = \frac{1}{2}[0 - 0] = 0

I do get a non-zero a0 term but it seems weird to me that B would be zero, is my L wrong?
 
Last edited:
Physics news on Phys.org
When dealing with Fourier cosine and sine series, you are actually extending a non-periodic function onto a periodic even or odd domain. Hence the effective period is actually twice as large instead, that is to say, you are actually working with the interval -4 < x < 4 here as the basic unit.
 
Fightfish said:
When dealing with Fourier cosine and sine series, you are actually extending a non-periodic function onto a periodic even or odd domain. Hence the effective period is actually twice as large instead, that is to say, you are actually working with the interval -4 < x < 4 here as the basic unit.

I see, is this symmetrisation of the interval around x = 0 always necessary or does it depend on f(x)?
 
Well, if you want to express a non-periodic function in terms of a Fourier series, then you will have to choose how to extend it to a periodic function - there are arbitrarily many different ways of doing so, but for convenience, usually we will choose the odd or even extensions, which lead respectively to the Fourier sine and cosine series.
 
My function is only defined for 0 < x < 4. To make it periodic does my function become:

<br /> f(x)=\left\{\begin{array}{cc}<br /> 0,&amp;\mbox{ if }<br /> -4&lt; x &lt; -2\\<br /> 1,&amp;\mbox{ if }<br /> -2&lt; x &lt; 0\\<br /> 0,&amp;\mbox{ if }<br /> 0&lt; x &lt; 2\\1, &amp; \mbox{ if } 2&lt;x&lt;4\end{array}\right.<br />
 
No. Because you're asked to find the cosine series, you have to extend f(x) such that it's even about x=0.
 
  • Like
Likes   Reactions: Oreith
Thanks! Is the choice completely arbitrary for the complex exponential Fourier Series since it has both sine and cosine components?
 
Oreith said:

Homework Statement


[/B]
<br /> f(x)=\left\{\begin{array}{cc}0,&amp;\mbox{ if }<br /> 0&lt; x &lt; 2\\1, &amp; \mbox{ if } 2&lt;x&lt;4\end{array}\right.<br />
Show that the Cosine Fourier Series of f(x) for the range [0,4] is given by:

A + B\sum^{\infty}_{n=0}\frac{(-1)^n}{(2m+1)}cos(\frac{(2m +1) \pi x}{2})

Homework Equations



a_n = \frac{2}{L}\int^{x_0 + L}_{x_0} f(x)cos(\frac{2\pi nx}{L})dx
Your problem is in that formula for ##a_n##. In your problem with ##L=4## it should read
$$a_n = \frac 2 4 \int_0^4 f(x) \cos(\frac{n\pi x}{4})~dx$$
 
Last edited:
I'm sorry but I don't really see that?
 
  • #10
Oreith said:
I'm sorry but I don't really see that?
Look here, for example:
http://www.intmath.com/fourier-series/4-fourier-half-range-functions.php
 
Last edited by a moderator:
  • #11
Oreith said:
Thanks! Is the choice completely arbitrary for the complex exponential Fourier Series since it has both sine and cosine components?
That's right. There's no symmetry requirement for the complex exponential series.
 

Similar threads

  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 16 ·
Replies
16
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
1
Views
1K
Replies
6
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K