Calculating Fourier Series Expansions for Piecewise Functions

Click For Summary
The discussion focuses on calculating Fourier Series expansions for two piecewise functions. For the first function, f(x) = [π - 2x, 0 < x < π | π + 2x, -π < x < 0], one participant derived a series involving cosine terms, while another provided a different expression for the coefficients. The second function, f(x) = [0, -π < x < 0 | sin(x), 0 < x < π], led to confusion over the correct coefficients, particularly for a_0 and a_n, with some participants noting that b_n coefficients are zero. There was also a request for verification of the results and clarification on the integration process used. The conversation highlights the complexities of Fourier Series calculations for piecewise functions.
kreil
Science Advisor
Insights Author
Messages
665
Reaction score
68

Homework Statement


Find the Fourier Series Expansion for:

(a) f(x) = [pi-2x, 0 < x < pi | pi+2x, -pi < x < 0]

(b) f(x) = [0, -pi < x < 0 | sin(x), 0 < x < pi]

Homework Equations



F(x)=\frac{a_0}{2}+\Sigma_{n=1}^{\infty}[a_ncos(nx)+b_nsin(nx)]

a_0=\frac{1}{\pi} \int_{- \pi}^{\pi}f(x)dx

a_n= \frac{1}{\pi} \int_{- \pi}^{\pi}f(x)cos(nx)dx

b_n= \frac{1}{\pi} \int_{- \pi}^{\pi}f(x)sin(nx)dx

The Attempt at a Solution



For (a) my final answer was:

f(x)=\frac{8}{\pi}(cos(x)+\frac{cos(3x)}{9}+...+\frac{cos(nx)}{n^2})

and i think this is correct, but for (b) i got kind of a funny answer imo;

f(x)=\frac{1}{\pi}+\frac{2}{\pi}(\frac{cos(3x)}{8}+\frac{cos(5x)}{24}+...+\frac{cos(nx)}{n^2-1})

if someone could work out b and see if they get the same answer i would appreciate it.

Josh
 
Physics news on Phys.org
Those are supposed to be piecewise functions, right?

Hmm, in my denominator (for the second one) I got something different. Here's what I got
f(x) = \sum_{n=0}^\infty \frac{cosnx}{\pi(1+1/n^2)}

Anybody else get something similar?
 
well here's my work for (b) so it can be checked:

f(x)=[0, -pi < x < 0 | sin(x), 0 < x < pi]

a_0= \frac{1}{\pi} \int_{- \pi}^{\pi}f(x)dx= \frac{1}{\pi} \int_{0}^{\pi}sin(x)dx= \frac{1}{\pi}(-cos(x))|_{0}^{\pi}=\frac{2}{\pi} \implies \frac{a_0}{2}=\frac{1}{\pi}

a_n=\frac{1}{\pi} \int_{- \pi}^{\pi}f(x)cos(nx)dx= \frac{1}{\pi} \int_0^{\pi}sin(x)cos(nx)dx=\frac{1}{\pi} \frac{cos(x)cos(nx)+nsin(x)sin(nx)}{n^2-1}|_0^{\pi}=\frac{1}{\pi}(\frac{1}{n^2-1}-\frac{cos(n \pi)}{n^2-1})=\frac{1}{\pi (n^2-1)}(1-(-1)^n)
\implies a_n=\frac{1}{\pi (n^2-1)}((-1)^{n+1}+1)

b_n=0

f(x)=\frac{1}{\pi}+\frac{2}{\pi}(\frac{cos(3x)}{8} +\frac{cos(5x)}{24}+...+\frac{cos(nx)}{n^2-1})
 
Last edited:
How did you go from the integral of sin(x) cos(nx) to what you have? A reduction formula?

The b_n's are definitely zero. I forgot to put a_0 in my solution too.
 
Question: A clock's minute hand has length 4 and its hour hand has length 3. What is the distance between the tips at the moment when it is increasing most rapidly?(Putnam Exam Question) Answer: Making assumption that both the hands moves at constant angular velocities, the answer is ## \sqrt{7} .## But don't you think this assumption is somewhat doubtful and wrong?

Similar threads

  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 11 ·
Replies
11
Views
3K
Replies
1
Views
2K