Fourier Series of a Piecewise Function

Click For Summary
The discussion focuses on finding the Fourier series for a piecewise function defined as f(x) = -1 for -π ≤ x ≤ 0 and f(x) = 2 for 0 ≤ x ≤ π. Participants are seeking clarification on how to apply two different methods for calculating the Fourier series: one involving complex exponentials and the other using sine and cosine functions. It is noted that the function is asymmetrical, leading to all a_n coefficients being zero in the sine and cosine method. Additionally, there is a suggestion to explore the relationship between the two methods and the importance of mastering Fourier series and transforms for scientific applications. Overall, the conversation emphasizes understanding the integral calculations and the connections between the different representations of the Fourier series.
t.kirschner99
Messages
18
Reaction score
0

Homework Statement



f(x) = -1, -π ≤ x ≤ 0
2, 0 ≤ x ≤ π

Given this find the Fourier series using both

$$a) \sum_{n=-∞}^\infty a_n e^{inx}$$
$$b) \sum_{n=0}^\infty [A_n cos(nx) + B_n sin(nx)]$$

Homework Equations



$$a_o = \frac {1} {2L} \int_{-L}^L f(t) \, dt $$
$$a_n = \frac {1} {L} \int_{-L}^L f(t)cos(\frac {nπt} {L}) \, dt $$
$$b_n = \frac {1} {L} \int_{-L}^L f(t)sin(\frac {nπt} {L}) \, dt $$

The Attempt at a Solution



Hello everyone. My problem is not calculating the numbers from the equations above, but with the conditions of the question. The question is asking about using 2 ways of completing the Fourier series. I've looked through my notes and online, but cannot find the two separate ways of doing it. Plus I don't know whether a or b is answered from using the three equations I linked above. Would someone be able to point me in the right direction?

Thanks for the help in advance guys!
 
Physics news on Phys.org
Your equations only involve sines and cosines and all three of them together provide the answer for b) !
 
  • Like
Likes t.kirschner99
BvU said:
Your equations only involve sines and cosines and all three of them together provide the answer for b) !

That is what I thought. Thanks for the confirmation!

Any idea on what kind of direction I take for A then? Combed through my notes and it only explains the process for B of course.
 
It's not very important: ##\ \ e^{iy} = (e^{-iy})^{-1}##
 
  • Like
Likes t.kirschner99
Alright. Thanks for the help BvU! Really appreciate it!
 
Wait! There's more to be had from this very useful exercise :smile:
Fourier series, Fourier transforms are extremely useful and important tools in science and imho worth a hefty investment to master.
Here you are invited to actually do the integral, which is good, provides insight and hones skills.
With experience you'll change over more and more to useful relationships, tables and numerical tools.

A first one you meet here already: your function is asymmetrical, so all ##a_n## are zero (in part b:smile:).
A second one is the link between parts a) and b) of the exercise

Have ##\mathcal{F}##un !
 
t.kirschner99 said:

Homework Statement



f(x) = -1, -π ≤ x ≤ 0
2, 0 ≤ x ≤ π

Given this find the Fourier series using both

$$a) \sum_{n=-∞}^\infty a_n e^{inx}$$
$$b) \sum_{n=0}^\infty [A_n cos(nx) + B_n sin(nx)]$$

Homework Equations



$$a_o = \frac {1} {2L} \int_{-L}^L f(t) \, dt $$
$$a_n = \frac {1} {L} \int_{-L}^L f(t)cos(\frac {nπt} {L}) \, dt $$
$$b_n = \frac {1} {L} \int_{-L}^L f(t)sin(\frac {nπt} {L}) \, dt $$

The Attempt at a Solution



Hello everyone. My problem is not calculating the numbers from the equations above, but with the conditions of the question. The question is asking about using 2 ways of completing the Fourier series. I've looked through my notes and online, but cannot find the two separate ways of doing it. Plus I don't know whether a or b is answered from using the three equations I linked above. Would someone be able to point me in the right direction?

Thanks for the help in advance guys!

Computer now working again, so here goes.

For (c): a complete, orthonormal system of functions on ##(-\pi,\pi)## is ##u_n (x) = \exp(i n x)/ \sqrt{2 \pi}, \: n = 0, \pm 1, \pm 2, \ldots.## So, if you write ##f = \sum_n c_n u_n##, then ##c_n = \langle u_n,f \rangle = \int_{-\pi}^{\pi} u_n(x)^* f(x) \, dx## where ##u_n^*(x) = \exp(-i n x)/\sqrt{2 \pi}= u_{(-n)}(x).## Note that in the summation, ##n## extends from ##-\infty## to ##+\infty##.
 
Last edited:

Similar threads

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