Finding the Fourier Coefficients for mechanics homework

Click For Summary

Homework Help Overview

The discussion revolves around finding the Fourier coefficients for a triangular wave equation. Participants are analyzing the setup of the problem and the associated Fourier series equations.

Discussion Character

  • Exploratory, Assumption checking, Mathematical reasoning

Approaches and Questions Raised

  • The original poster attempts to compute the Fourier coefficients using the standard formulas for Fourier series, questioning the correctness of their setup and calculations. Other participants raise questions about the definitions and values of variables, particularly the angular frequency, ω.

Discussion Status

Participants are actively engaging with the problem, providing insights into the calculations and questioning each other's reasoning. Some have offered clarifications on the formulas used, while others are exploring different interpretations of the results. There is a collaborative effort to identify potential mistakes in the computations.

Contextual Notes

The problem is noted as being particularly challenging, categorized as a "computer problem" in the textbook, which may imply certain expectations regarding the complexity of the solution. Participants are also considering the implications of different conventions in the setup of the Fourier series.

\Theta
Messages
18
Reaction score
0

Homework Statement


Find the Fourier Coefficients for the triangular wave equation shown in this picture:
Fourier_Series.png

Homework Equations


##f(t)= a_0 + \sum_{n=1}^\infty a_{n}cos(n{\omega}t) + \sum_{n=1}^\infty b_{n}sin(n{\omega}t)##
##a_0 = \frac{1}{\tau}\int_{-\tau/2}^{\tau/2} f(t) \, dt##
## \omega = \frac{2\pi}{\tau}##
##a_n = \frac{2}{\tau}\int_{-\tau/2}^{\tau/2}f(t)cos(n\omega t) \, dt##
##b_n = \frac{2}{\tau}\int_{-\tau/2}^{\tau/2}f(t)sin(n\omega t) \, dt = 0, \forall n##, because it's an even function

The Attempt at a Solution


## \tau = 2##
##a_0 = \frac{1}{2}\int_{-1}^{1} 1-|t| \, dt= \frac{1}{2}[\int_{-1}^{0} 1+t \, dt+\int_{0}^{1} 1-t \, dt]=\frac{1}{2} [\frac{1}{2}+\frac{1}{2}]=\frac{1}{2} .##

##a_n = \frac{2}{2}\int_{-1}^{1}f(t)cos(n\omega t) \, dt= \int_{-1}^{0}(1+t)cos(n\omega t) \, dt + \int_{0}^{1}(1-t)cos(n\omega t) \, dt ,##
Which, when computed through many tiresome intermediate steps, gives:
##a_n= \frac{2}{n^2\pi^2} ##, which differs from the answer in the textbook, ##a_n= \frac{4}{n^2\pi^2}, n=1,3,5,7,...; a_n=0, n=2,4,6,8,10,...##

So my question is, have I set up the problem correctly and made a computational mistake somewhere along the way in my integrals? Or am I missing something in the setup of the problem and missing the point entirely? It's a *** problem in our textbook(aka the most difficult level) and it's also a "computer problem", so I'm sure my prof won't expect me to do a problem this laborious on a test, but I'd still like to know where I went sour.
 
Last edited:
Physics news on Phys.org
\Theta said:

Homework Equations


##f(t)= a_0 + \sum_{n=1}^\infty a_{n}cos(n{\omega}t) + \sum_{n=1}^\infty b_{n}sin(n{\omega}t)##
##a_0 = \frac{1}{\tau}\int_{-\tau/2}^{\tau/2} f(t) \, dt##
## \omega = \frac{2\pi}{\tau}##
##a_n = \frac{2}{\tau}\int_{-\tau/2}^{\tau/2}f(t)cos(n\omega t) \, dt##
##b_n = \frac{2}{\tau}\int_{-\tau/2}^{\tau/2}f(t)sin(n\omega t) \, dt = 0, \forall n##, because it's an even function
Are you sure about these equation? If yes, what is ##\omega##?
 
DrClaude said:
Are you sure about these equation? If yes, what is ##\omega##?
Well, these are the generic formula for the Fourier Series for a function. ##\omega = \frac{2\pi}{\tau}=\frac{2\pi}{2}=\pi##, I guess I wasn't as explicit about it but I considered it trivial.
 
\Theta said:
Well, these are the generic formula for the Fourier Series for a function. ##\omega = \frac{2\pi}{\tau}=\frac{2\pi}{2}=\pi##, I guess I wasn't as explicit about it but I considered it trivial.
There can be different conventions, so I just wanted to make sure that I understood.
\Theta said:
##a_n = \frac{2}{2}\int_{-1}^{1}f(t)cos(n\omega t) \, dt= \int_{-1}^{0}(1+t)cos(n\omega t) \, dt + \int_{0}^{1}(1-t)cos(n\omega t) \, dt ,##
Which, when computed through many tiresome intermediate steps, gives:
##a_n= \frac{2}{n^2\pi^2} ##
You'll have to give the intermediate steps, because the first line is correct, but the last equality doesn't follow.
 
DrClaude said:
There can be different conventions, so I just wanted to make sure that I understood.
You'll have to give the intermediate steps, because the first line is correct, but the last equality doesn't follow.
Oh, I see what you were asking. Sorry.:smile:

##a_n = \frac{2}{2}\int_{-1}^{1}f(t)cos(n\omega t) \, dt= \int_{-1}^{0}(1+t)cos(n\omega t) \, dt + \int_{0}^{1}(1-t)cos(n\omega t) \, dt ,##
##=\int_{-1}^{0}cos(n\omega t) \, dt +\int_{-1}^{0}tcos(n\omega t) \, dt +\int_{0}^{1}cos(n\omega t) \, dt -\int_{0}^{1}tcos(n\omega t) \, dt ##
##= \int_{-1}^{1}cos(n\omega t) \, dt +\int_{-1}^{0}tcos(n\omega t) \, dt -\int_{0}^{1}tcos(n\omega t) \, dt##
##= \frac{sin(n{\pi}t)}{n\pi}|_{-1}^1+\int_{-1}^{0}tcos(n\omega t) \, dt -\int_{0}^{1}tcos(n\omega t) \, dt##
##= 0 +[\frac{tsin(n{\pi}t)}{n\pi}+\frac{cos(n{\pi}t)}{n^2\pi^2}|_{-1}^0-[\frac{tsin(n{\pi}t)}{n\pi}+\frac{cos(n{\pi}t)}{n^2\pi^2}|_{0}^1##
##=0 +[0+\frac{cos(n{\pi}t)}{n^2\pi^2}|_{-1}^0-[0+\frac{cos(n{\pi}t)}{n^2\pi^2}|_{0}^1##
##= 0 + \frac{1}{n^2\pi^2}+\frac{1}{n^2\pi^2}-\frac{1}{n^2\pi^2}+\frac{1}{n^2\pi^2}##
##=\frac{2}{n^2\pi^2}##:wideeyed:

BTW, thanks a bunch for helping out DrClaude.
 
\Theta said:
Oh, I see what you were asking. Sorry.:smile:

##a_n = \frac{2}{2}\int_{-1}^{1}f(t)cos(n\omega t) \, dt= \int_{-1}^{0}(1+t)cos(n\omega t) \, dt + \int_{0}^{1}(1-t)cos(n\omega t) \, dt ,##
##=\int_{-1}^{0}cos(n\omega t) \, dt +\int_{-1}^{0}tcos(n\omega t) \, dt +\int_{0}^{1}cos(n\omega t) \, dt -\int_{0}^{1}tcos(n\omega t) \, dt ##
##= \int_{-1}^{1}cos(n\omega t) \, dt +\int_{-1}^{0}tcos(n\omega t) \, dt -\int_{0}^{1}tcos(n\omega t) \, dt##
##= \frac{sin(n{\pi}t)}{n\pi}|_{-1}^1+\int_{-1}^{0}tcos(n\omega t) \, dt -\int_{0}^{1}tcos(n\omega t) \, dt##
##= 0 +[\frac{tsin(n{\pi}t)}{n\pi}+\frac{cos(n{\pi}t)}{n^2\pi^2}|_{-1}^0-[\frac{tsin(n{\pi}t)}{n\pi}+\frac{cos(n{\pi}t)}{n^2\pi^2}|_{0}^1##
##=0 +[0+\frac{cos(n{\pi}t)}{n^2\pi^2}|_{-1}^0-[0+\frac{cos(n{\pi}t)}{n^2\pi^2}|_{0}^1##
##= 0 + \frac{1}{n^2\pi^2}+\frac{1}{n^2\pi^2}-\frac{1}{n^2\pi^2}+\frac{1}{n^2\pi^2}##

##=\frac{2}{n^2\pi^2}##:wideeyed:

BTW, thanks a bunch for helping out DrClaude.
I think I see where I went wrong :oldbiggrin:
Looks like it was just a silly case of the negative signs cancelling each other.
Should be:
##=0 +[0+\frac{cos(n{\pi}t)}{n^2\pi^2}|_{-1}^0-[0+\frac{cos(n{\pi}t)}{n^2\pi^2}|_{0}^1##
##=\frac{cos(n\pi)}{n^2\pi^2}+\frac{cos(n\pi)}{n^2\pi^2}+\frac{cos(n\pi)}{n^2\pi^2}+\frac{cos(n\pi)}{n^2\pi^2} ##
##= \frac{4cos(n\pi)}{n^2\pi^2}##
##=\frac{4(-1)^n}{n^2\pi^2} ##
 
Last edited:
\Theta said:
##=0 +[0+\frac{cos(n{\pi}t)}{n^2\pi^2}|_{-1}^0-[0+\frac{cos(n{\pi}t)}{n^2\pi^2}|_{0}^1##
##=\frac{cos(n\pi)}{n^2\pi^2}+\frac{cos(n\pi)}{n^2\pi^2}+\frac{cos(n\pi)}{n^2\pi^2}+\frac{cos(n\pi)}{n^2\pi^2} ##
Getting closer, but that second line doesn't follow from the first.
 
DrClaude said:
Getting closer, but that second line doesn't follow from the first.

##=0 +[0+\frac{cos(n{\pi}t)}{n^2\pi^2}|_{-1}^0-[0+\frac{cos(n{\pi}t)}{n^2\pi^2}|_{0}^1##
##=\frac{cos(0)}{n^2\pi^2} - \frac{cos(-n\pi)}{n^2\pi^2}-\frac{cos(n\pi)}{n^2\pi^2}+\frac{cos(0)}{n^2\pi^2}##
##=\frac{1}{n^2\pi^2} - \frac{cos(-n\pi)}{n^2\pi^2}-\frac{cos(n\pi)}{n^2\pi^2}+\frac{1}{n^2\pi^2} ##
##=\frac{1}{n^2\pi^2} - \frac{cos(n\pi)}{n^2\pi^2}-\frac{cos(n\pi)}{n^2\pi^2}+\frac{1}{n^2\pi^2}##
##=\frac{1}{n^2\pi^2} +\frac{1}{n^2\pi^2}+\frac{1}{n^2\pi^2}+\frac{1}{n^2\pi^2}## when n is odd
and ##=\frac{1}{n^2\pi^2} - \frac{1}{n^2\pi^2}-\frac{1}{n^2\pi^2}+\frac{1}{n^2\pi^2}=0## when n is even
So the Fourier series for the function would be:
##f(t)= a_0 + \sum_{n=1}^\infty a_{n}cos(n{\omega}t) + \sum_{n=1}^\infty b_{n}sin(n{\omega}t)##
##=\frac{1}{2}+\sum_{n=1}^\infty \frac{4}{(2n-1)^2\pi^2}cos((2n-1){\pi}t)##

That looks right. DrClaude, I definitely owe you one.
 
victory.jpg


Case closed.
 

Similar threads

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