# Finding the Fourier Series of a periodic rectangular wave

In summary, the problem asks for the Fourier series of a wave. The submitted solution has an error, and the student is asked to fix it.

## Homework Statement

The problem/question is attached in the file called "homework". In the third signal (the peridic rectangular wave), I am requested (sub-question b) to find the Fourier series of the wave.

## Homework Equations

The file called "solution" presents a detailed solution to the problem. What I don't understand is why the phase (page 2 in that "solution" document) $\phi_{n}$ equals $-\pi$ for even values of $n$. What I know is that when the argument of the arctan function is undefined (since it's divided by 0), it means that the angle is $\pi/2$, because only then the tan would be undefind! So why $\phi_{n} = -\pi$ then? does someone have an idea?
I do understand the $\pm\pi$ addition for the odd values of $n$ (i.e $n=3,7,11,...$), but that $\phi_{n} = -\pi$ is not completely clear to me (and quite annoying to be honest...:uhh:).

## The Attempt at a Solution

Couple of hours of thinking, going back to the basics of polar representation of numbers in the x-y plane (in fact, it's the $a_{n}-b_{n}$ plane here) but nothing practical really... any suggestions?
Thanks! :tongue:

#### Attachments

• Homework.pdf
54.4 KB · Views: 264
• Solution.pdf
488.7 KB · Views: 249
Last edited:
Something wrong here somewhere.

If tan-1(bn/an) = -π for all even n then bn = 0 for all even n. But b2 = 2Vm/πn sin^2(nπ/4) = Vm/π ≠ 0.

So there is something wrong with the submitted solution.

rude man said:
Something wrong here somewhere.

If tan-1(bn/an) = -π for all even n then bn = 0 for all even n. But b2 = 2Vm/πn sin^2(nπ/4) = Vm/π ≠ 0.

So there is something wrong with the submitted solution.

Thanks for responding rude man.
So would you then consider $n=\pi/2$ as a solution for $\phi_{n}$ for all even n? or maybe you suggest a different solution?
The way I see it, for all even n you have $a_{n}=0$ and $b_{n}$ has a value which gets lower as n grows, but also $b_{n}=0$ for $n=0,4,8,...$.

How would you fix the submitted solution?

Thanks for responding rude man.
So would you then consider $n=\pi/2$ as a solution for $\phi_{n}$ for all even n? or maybe you suggest a different solution?
The way I see it, for all even n you have $a_{n}=0$ and $b_{n}$ has a value which gets lower as n grows, but also $b_{n}=0$ for $n=0,4,8,...$.

How would you fix the submitted solution?

I guess I would just start over:

V(t) = a0/2 + Ʃ{ancos(nωt) + bnsin(nωt)} from n = 1 to ∞.

an = (Vm/π)∫cos(ωt)d(ωt) from 0 to π/2
bn = (Vm /π)∫sin(ωt)d(ωt) from 0 to π/2

Notice that d(ωt) = ωdt. It's easier to integrate w/r/t ωt rather than t. So the limits of integration change from 0 → T/4 to 0 → π/2.

To express this series in the form V(t) = a0/2 + Ʃcncos(nωt - ψ) from n = 1 to ∞,

cn = √(an2 + bn2)
and ψn = tan-1(bn/an).

This is all standard textbook stuff.

In computing ψ be sure to retain the signs of a and b separately. For example, if a = 1 and b = -2, tan-1(1/-2) ~ π - 0.46 whereas if a = -1 and b = 2, tan-1(-1/2) ~ -0.46. These angles are different and are separated by π.

Happy computing!