# Homework Help: How to calculate a harmonic of a square wave

1. May 6, 2013

### bigfattyfatfat

Hi,

I'm a bit of a newbie to additive synthesis.. I just want to clarify that I am doing the correct calculation before continuing.

If I wanted to calculate the 5th harmonic of a square wave (the fundamental freq. being 200Hz and the amplitude of the fundamental being 1)

would the calculation be

1/5 * sin (2 * 3.14 * 1000) =

?

1. The problem statement, all variables and given/known data

2. Relevant equations

3. The attempt at a solution

2. May 6, 2013

### rude man

there's a 4/pi and a "t" missing in there somewhere ...

other than that, yes.

3. May 7, 2013

### bigfattyfatfat

Thanks.

Actually I've just realised the 5th harmonic would be 9, so it would be

1/9 * sin (2 * 3.14 * 9F * t) =

But do you know what the 't' is equal to?

Thanks

4. May 7, 2013

### rude man

No, convention is that the nth harmonic is harmonically related to the first (the fundamental) by fn = n*f1.

"t" is time. You have a square wave that is a summation of harmonics, each of which is also a function of time (a sinusoidal one).

You still don't have a 4/π in your formulas ... you need it to get a square wave of unity amplitude.