Fourier series (sine,cosine)

In summary, the homework statement is that given f(x) = 2x+1 periodic from -pi<x<pi, find the Fourier series from (-pi to pi) as well as the sine series from [0, pi] and cosine series from (0,pi). The attempt at a solution is to restrict f to the domain [0, π] and then extend it so that it's an even or odd function on the interval [-π, π]. In other words, when -π≤x<0, you have f(x) = ±f(|x|). However, regardless I got ak and a0 as 0 even when I used f(x) =
  • #1
Kuma
134
0

Homework Statement



Given f(x) = 2x+1 periodic from -pi<x<pi. Find the Fourier series from (-pi to pi) as well as the sine series from [0, pi] and cosine series from (0,pi)

Homework Equations


The Attempt at a Solution



So since f(x) is periodic it is odd, so then a0 and ak = 0.

for bk:

bk = 1/pi int f(x) sin kx from -pi to pi.
skipping forward, I get bk = [(-1)^ k][-4/k]

now I am a bit confused about the sine and cosine series. I thought if f(x) was odd then it turns into a sine series automatically so isn't it basically the same thing as what I got?

And the cosine series should just be 0?
 
Physics news on Phys.org
  • #2
Kuma said:
So since f(x) is periodic it is odd, so then a0 and ak = 0.
f isn't odd. For example, f(1) = 3 while f(-1) = -1. Clearly, f(1) ≠ -f(-1).

now I'm a bit confused about the sine and cosine series. I thought if f(x) was odd then it turns into a sine series automatically so isn't it basically the same thing as what I got?

And the cosine series should just be 0?
The idea is to restrict f to the domain [0, π] and then extend it so that it's an even or odd function on the interval [-π, π]. In other words, when -π≤x<0, you have f(x) = ±f(|x|).
 
  • #3
vela said:
f isn't odd. For example, f(1) = 3 while f(-1) = -1. Clearly, f(1) ≠ -f(-1).The idea is to restrict f to the domain [0, π] and then extend it so that it's an even or odd function on the interval [-π, π]. In other words, when -π≤x<0, you have f(x) = ±f(|x|).

I thought when you have f(x+p) when its periodic it is just equal to f(x)?
Regardless I got ak and a0 as 0 even when I used f(x) = 2x+1

And shouldn't it be f(x) = f(-x)?

if x E [0,pi] then f(x) = 2x +1 and if x E [-pi,0], f(-x) = 2x+1??
 
Last edited:
  • #4
Kuma said:
I thought when you have f(x+p) when its periodic it is just equal to f(x)?
If p is the period, then yes. But what does that have to do with anything about f being even or odd?

Regardless I got ak and a0 as 0 even when I used f(x) = 2x+1
All I can say is you got the wrong answer since you haven't shown your work.

And shouldn't it be f(x) = f(-x)?
Yes, if f is an even function.

if x E [0,pi] then f(x) = 2x +1 and if x E [-pi,0], f(-x) = 2x+1??
No, that's not right. Take ##x=+\pi/2 \in [0,\pi]## so ##f(\pi/2) = \pi+1##. Now take ##x=-\pi/2 \in [-\pi,0]##. You're saying ##f(-x) = 2x+1##, but you have
$$f(-x) = f(-(-\pi/2)) = f(\pi/2) = \pi+1$$ whereas
$$2x+1 = 2(-\pi/2) + 1 = -\pi + 1.$$ Clearly, f(-x) ≠ 2x+1.
 
  • #5
Ok I figured it out. For the Fourier series I got ak and a0 as 0? But for the cosine series i did this
F(x) = f(x) for 0<x<pi
F(x) = -f(-x) for -pi<x<0

where f(x) = 2x+1

that results in an even function so I solved for a0 and ak from there.
 
  • #6
How are you getting a0=0 for the regular Fourier series?
 
  • #7
Oh yeah I made a calculation error i believe.

ao = 1/2pi int from pi to -pi 2x+1 dx
= 1/2pi (x^2 + x) from pi to -pi
= 1/2pi [pi^2 + pi - ((-pi)^2 -pi]
= 1

ak = 1/pi int 2x+1 cos kx dx from -pi to pi

u = 2x+1 dv = cos kx
du = 2 dx v = 1/k sin kx

x from -pi to pi
=1/pi[(2x+1 sin kx)/k) - 2/k int (sin kx) from -pi to pi]

= 1/pi[0 - 2/k (-1/k cos kx from -pi to pi)]
= 1/pi[2/k^2 (cos kx from -pi to pi)] = 0

that right?
 
  • #8
Looks good.
 

What is a Fourier series?

A Fourier series is a mathematical representation of a periodic function as a sum of sine and cosine waves. It is used to decompose a complex function into simpler components in order to analyze its behavior.

How is a Fourier series calculated?

A Fourier series is calculated by finding the coefficients of the sine and cosine terms through integration. These coefficients represent the amplitude and frequency of each component wave, and when added together, they reconstruct the original function.

What is the difference between a Fourier series and a Fourier transform?

A Fourier series is used for periodic functions, while a Fourier transform is used for non-periodic functions. A Fourier series represents a function as a sum of discrete frequency components, while a Fourier transform represents a function as a continuous spectrum of frequencies.

What is the significance of the Fourier series?

The Fourier series has many practical applications in various fields such as engineering, physics, and signal processing. It is used for signal analysis, synthesis, filtering, and approximation of functions. It also provides a powerful tool for solving differential equations.

Can any function be represented by a Fourier series?

No, not all functions can be represented by a Fourier series. The function must satisfy certain conditions, such as being periodic and having a finite number of discontinuities, in order for it to have a valid Fourier series representation. Functions that do not satisfy these conditions may still have a Fourier transform representation.

Similar threads

  • Calculus and Beyond Homework Help
Replies
3
Views
250
  • Calculus and Beyond Homework Help
Replies
1
Views
181
  • Calculus and Beyond Homework Help
Replies
1
Views
520
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
397
  • Calculus and Beyond Homework Help
Replies
2
Views
362
  • Calculus and Beyond Homework Help
Replies
1
Views
323
  • Calculus and Beyond Homework Help
Replies
16
Views
546
  • Calculus and Beyond Homework Help
Replies
6
Views
901
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
Back
Top