Fourier Series of a step function

In summary, a Fourier series of a step function is a mathematical representation of a step function using a combination of sine and cosine functions. It is calculated using a process called Fourier analysis and has many applications in science and engineering. However, it is limited in its ability to represent certain types of functions and the accuracy of the approximation depends on the number of terms used.
  • #1
Oreith
8
0

Homework Statement


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

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

Homework Equations



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

The Attempt at a Solution



L = 4
[tex]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[/tex]

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

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
  • #2
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.
 
  • #3
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)?
 
  • #4
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.
 
  • #5
My function is only defined for 0 < x < 4. To make it periodic does my function become:

[tex]
f(x)=\left\{\begin{array}{cc}
0,&\mbox{ if }
-4< x < -2\\
1,&\mbox{ if }
-2< x < 0\\
0,&\mbox{ if }
0< x < 2\\1, & \mbox{ if } 2<x<4\end{array}\right.
[/tex]
 
  • #6
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 Oreith
  • #7
Thanks! Is the choice completely arbitrary for the complex exponential Fourier Series since it has both sine and cosine components?
 
  • #8
Oreith said:

Homework Statement


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

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

Homework Equations



[tex]a_n = \frac{2}{L}\int^{x_0 + L}_{x_0} f(x)cos(\frac{2\pi nx}{L})dx[/tex]
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:
  • #9
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.
 

1. What is a Fourier series of a step function?

A Fourier series of a step function is a mathematical representation of a step function using a combination of sine and cosine functions. It is used to approximate a step function in order to understand its behavior and make predictions.

2. How is a Fourier series of a step function calculated?

A Fourier series of a step function is calculated using a process called Fourier analysis, which involves breaking down the function into its individual frequency components using sine and cosine functions. These components are then combined to create the final Fourier series approximation.

3. What are the applications of a Fourier series of a step function?

A Fourier series of a step function has many applications in science and engineering. It is commonly used in signal processing, image processing, and data compression. It is also used in physics and mathematics to study the behavior of complex systems.

4. Can a Fourier series of a step function accurately represent any type of function?

No, a Fourier series of a step function is limited in its ability to represent certain types of functions. It works best for functions that are periodic and have a finite number of discontinuities, such as a step function. It may not accurately represent functions with infinite discontinuities or functions that are not periodic.

5. How does the number of terms in a Fourier series affect its accuracy?

The more terms that are included in a Fourier series, the more accurate the approximation will be. However, including too many terms can also lead to overfitting and loss of accuracy. The number of terms needed for a good approximation depends on the complexity of the function and the desired level of accuracy.

Similar threads

  • Calculus and Beyond Homework Help
Replies
1
Views
210
  • Calculus and Beyond Homework Help
Replies
16
Views
558
  • Calculus and Beyond Homework Help
Replies
3
Views
411
  • Calculus and Beyond Homework Help
Replies
1
Views
532
  • Calculus and Beyond Homework Help
Replies
1
Views
279
  • Calculus and Beyond Homework Help
Replies
6
Views
756
  • Calculus and Beyond Homework Help
Replies
1
Views
337
  • Calculus and Beyond Homework Help
Replies
3
Views
341
  • Calculus and Beyond Homework Help
Replies
11
Views
355
  • Calculus and Beyond Homework Help
Replies
3
Views
277
Back
Top