Computing Fourier Series for a Piecewise Function

In summary, we can find the Fourier series for y(x) by using the equation B_{n}=\frac{2}{L}\int_{0}^{L}y(x)\sin(\frac{n\pi x}{L})dx and applying the trig identity \sin(a) \sin (b) = \frac{1}{2} [\cos(a-b)-\cos(a+b)]. The final answer is B_{n}=\frac{4A(-1)^{\frac{n+1}{2}}}{\pi(n^{2}-4)}.
  • #1
Knissp
75
0

Homework Statement


Find the Fourier series for [tex]y(x)=\begin{cases}
A\sin(\frac{2\pi x}{L}) & 0\leq x\leq\frac{L}{2}\\
0 & \frac{L}{2}\leq x\leq L\end{cases}[/tex]

Homework Equations


[tex]B_{n}=\frac{2}{L}\int_{0}^{L}y(x)\sin(\frac{n\pi x}{L})dx[/tex]

The Attempt at a Solution



[tex]B_{n}=\frac{2}{L}\int_{0}^{L/2}A\sin(\frac{2\pi x}{L})\sin(\frac{n\pi x}{L})dx[/tex]

[tex]=\frac{2}{L}\int_{0}^{\frac{L}{2}}A\sin(\frac{\pi x}{L/2})\sin(\frac{(n/2)\pi x}{L/2})dx[/tex]

[tex]=\frac{1}{p}\int_{0}^{p}A\sin(\frac{\pi x}{p})\sin(\frac{\frac{n}{2}\pi x}{p})dx[/tex]

[tex]=\begin{cases}
0 & \frac{n}{2}=1\\
\frac{A}{2} & \frac{n}{2}\in\mathbb{Z}\text{ and }\frac{n}{2}\neq1\end{cases}[/tex]

So this takes care of the even values of n, but I'm not sure what to do when n is odd.

[tex]=\frac{1}{p}\int_{0}^{p}A\sin(\frac{\pi x}{p})\sin(\frac{(\frac{2k+1}{2})\pi x}{p})dx[/tex]

[tex]=\frac{1}{p}\int_{0}^{p}A\sin(\frac{\pi x}{p})\sin(\frac{(k\pi x+\frac{1}{2}\pi x}{p})dx[/tex]

[tex]=\frac{1}{p}\int_{0}^{p}A\sin(\frac{\pi x}{p})[\sin(\frac{k\pi x}{p})\cos(\frac{\frac{1}{2}\pi x}{p})+\cos(\frac{k\pi x}{p})\sin(\frac{\frac{1}{2}\pi x}{p})]dx[/tex]

I'm not really sure if this is going anywhere. The final answer should be [tex]B_{n}=\frac{4A(-1)^{\frac{n+1}{2}}}{\pi(n^{2}-4)}[/tex], where n is odd.

Any ideas? Thank you.
 
Last edited:
Physics news on Phys.org
  • #2
Knissp said:
[tex]B_{n}=\frac{2}{L}\int_{0}^{L/2}A\sin(\frac{2\pi x}{L})\sin(\frac{n\pi x}{L})dx[/tex]

Try using a trig identity at this point.

[tex]\sin(a) \sin (b) = ?[/tex]
 
  • #3
Thanks, that worked perfectly!
 

Related to Computing Fourier Series for a Piecewise Function

1. What is a Fourier series?

A Fourier series is a mathematical representation of a periodic function as a sum of sine and cosine functions with different amplitudes and frequencies.

2. Why is a Fourier series important?

A Fourier series is important because it allows us to decompose complex functions into simpler components, which can be easier to analyze and manipulate. This is particularly useful in signal processing, image processing, and other areas of science and engineering.

3. What is the formula for computing a Fourier series?

The formula for computing a Fourier series is: f(x) = a0/2 + ∑(ancos(nx) + bnsin(nx)), where a0 is the average value of the function, an and bn are the Fourier coefficients, and n is the frequency of the sine and cosine functions.

4. How do you determine the Fourier coefficients?

The Fourier coefficients can be determined using integration or by solving a system of equations. In general, a0 can be calculated by finding the average value of the function over one period, while an and bn can be found by integrating the function multiplied by cosine and sine functions, respectively, over one period.

5. What is the difference between a discrete Fourier series and a continuous Fourier series?

A discrete Fourier series is used to represent a periodic function that is defined only at discrete points, while a continuous Fourier series is used to represent a function that is defined for all values of x. In other words, a discrete Fourier series uses a finite number of sine and cosine functions, while a continuous Fourier series uses an infinite number of sine and cosine functions.

Similar threads

  • Calculus and Beyond Homework Help
Replies
1
Views
327
  • Calculus and Beyond Homework Help
Replies
1
Views
445
  • Calculus and Beyond Homework Help
Replies
16
Views
673
  • Calculus and Beyond Homework Help
Replies
1
Views
620
  • Calculus and Beyond Homework Help
Replies
3
Views
541
  • Calculus and Beyond Homework Help
Replies
5
Views
543
  • Calculus and Beyond Homework Help
Replies
3
Views
425
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
  • Calculus and Beyond Homework Help
Replies
5
Views
715
  • Calculus and Beyond Homework Help
Replies
4
Views
1K
Back
Top