How to Determine the Correct Fourier Series for a Given Waveform?

Click For Summary
To determine the correct Fourier series for the given piecewise waveform, the discussion highlights the importance of accurately calculating Fourier coefficients. The initial calculations revealed that the coefficients for even harmonics were zero, suggesting the function's evenness, which contradicted the sketches provided. Participants emphasized that the Fourier series must include both sine and cosine terms, particularly for functions that are neither even nor odd. Several members pointed out errors in the original coefficient calculations and suggested using limits to resolve undefined expressions. Ultimately, the conversation focused on refining the calculations to ensure they align with the characteristics of the waveform, leading to a clearer understanding of the Fourier series representation.
  • #31
Sorry i see what you're saying now. I shall try n=3 in what i have now and hope for 1/pi
 
Physics news on Phys.org
  • #32
No it doesnt.
 
  • #33
I'm still trying, and failing, to nail this.

Can someone tell me where the attached goes off course please? There's not a lot to it, but already if n=3 i don't get 1/pi.

1001.jpg
 
  • #34
You're having problems with the integration. The arguments of the sine functions are not simple x's, so dx is not the differential element for them to be integrated as just a sine function. In other words,

##\int sin(u) du = -cos(u) + C## which is fine since du is the differential element of u.

but if ##u = (n+1) x##, then ##du = (n + 1) dx##

You need to modify the integral so that the correct differential element is accounted for.
 
  • #35
Ok thanks, i shall have another look.
 
  • #36
Good evening,

I am also struggling on this question and have been for a solid week.

I am currently trying to calculate an. I so far have:

I have assumed for the time being x=wt

\int sinxcosnx.dx
\frac{1}{2} \int sin(n+1)x+sin(n-1)x.dx
\frac {1}{2} (\frac {-cos(n+1)x} {n+1} + (\frac {-cos(n-1)x}{n-1})

I have input the limits of x between pi and \frac {pi}{2} and subtracted there. Furthermore i have done the same to 2pi and \frac {3pi}{2} and added these but my result continually comes out at 0. I am expecting only odd numbers of n will produce a result. I have tried a few methods but none of them seem to be working.My hunch is that I am not integrating correctly or I am misunderstanding the relevance of (wt)?

Any assistance would be appreciate greatly.
 
  • #37
Hi Birchyuk,

Try this:

a_n = \frac{1}{\pi} \int sinxcosx.dx + \frac{1}{\pi} \int sinxcosx.dx

Insert your limits and put the equation in wolfram or mathlab. What do you get?

'V' won't make any difference as long as it's 1 but to be accurate 'V' should also be in the equation.
 
  • #38
Hi bizuputyi,

Thanks for the reply

Inputting this i get the following:

https://www4c.wolframalpha.com/Calculate/MSP/MSP103820ai5432f8fdg93e0000303fdbg66ci2bbf8?MSPStoreType=image/gif&s=4 and https://www5b.wolframalpha.com/Calculate/MSP/MSP8661cb3a0cb5a74g28300003gh8hbag7c679080?MSPStoreType=image/gif&s=33

I have produced a table in wolfram which is as below: (i have to admit i am not an expert with wolfram)

http://www.wolframalpha.com/input/?...n*3*pi/2))+(cos(n*2*pi))))/(n^2-1)),{n,2,10}]

This again shows i have both even and odd harmonics which i believe is wrong
 
Last edited by a moderator:
  • #40
Hi Bizuputyi,

Thanks for this. For my own piece of mind what is going wrong as this does not make sense to me why this is not working the way i think it should?

Thanks.
 
  • #41
Hi Guys,

I am really struggling with this same question, here is what I have done so far, but there is a mistake (a few probably) in there and I can't find it!

fx=Vsin (wt)
x=wt

So a0= 1/π∫f(x)dx

= V/π∫sin (x) dx [lim π/2 to π] + V/π∫sin (x) dx [lim 3π/2 to 2π]

So next I integrated the above to give
=V/π[-cosx] [lim π/2 to π] + V/π[-cosx] [lim 3π/2 to 2π]
=V/π[0]
=0

so I proved a0=0

Next on to an

an= V/π∫sin (x).cos (nx) dx [lim π/2 to π] + V/π∫sin (x).cos (nx) dx [lim 3π/2 to 2π]

using the trig rule 2sin A.cos B = [sin (A+B) + sin (A-B)]/2 I changed the above to

an= V/2π∫sin (x+nx)+sin (x-nx) dx [lim π/2 to π] + V/2π∫sin (x+nx)+sin (x-nx) dx [lim 3π/2 to 2π]

this was then integrated to give

= V/2π[(-cos(x+nx)/n+1)-(cos(x-nx)/n-1)]+V/2π[(-cos(x+nx)/n+1)-(cos(x-nx)/n-1)]

When I put n=1 it all cancels out to 0, but by what's written in this thread I should have -2(V/2π) to give (-V/π)

For bn I end up with

bn=V/2π∫cos (x-nx)-cos (x+nx) dx [lim π/2 to π] + V/2π∫cos (x-nx)-cos (x+nx) dx [lim 3π/2 to 2π]

which integrated to

V/2π[(sin(x).cos(x)-(x-sin (x))] [lim π/2 to π] +V/2π[(x-1/4sin(4x))-(x-sin1/3(3x))] [lim 3π/2 to 2π]

bn=1/2 when n=1 (I put the n=1 in before integration as suggested by Gneil to get this, I don't understand why it should make a difference though?)

where have I gone wrong?

I think bn is correct, but my an isn't

any help gratefully received!

EDIT- Just noticed the red bit above is wrong, not doing too well here!
 
Last edited:
  • #42
One theory I have is when I use the trig rule, I change the sin(x) of the bn function to a cos then when I integrate it goes back to a sin, after integration should bn= (something) cos(something)?
 
  • #43
ok,

bn now sorted using integration by parts.

Still having difficulty with an
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
0
Views
2K
  • · Replies 9 ·
Replies
9
Views
4K
  • · Replies 33 ·
2
Replies
33
Views
12K
Replies
3
Views
2K
  • · Replies 26 ·
Replies
26
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
6
Views
4K
Replies
1
Views
2K