# Fourier Series - Asymmetric Square Wave

1. Oct 27, 2013

### DmytriE

Good morning everyone,

I am taking a signals and systems course where we are now studying the fourier series. I understand that this is for signals that are periodic. But I get hung up when determining the fourier coefficients. In the video by Alan Oppenheim, he derives the equation for the fourier series. Below is the analysis equation.

$a_{k} = \frac{1}{T_{0}} ∫ x(t)*e^{jk\omega_{0}t}$

He goes through an example using an asymmetric square wave with an amplitude of 1. I understand the bounds that he chooses $(-T_0/2, 0)$ and $(0, T_0/2)$.

This leads to a fourier coefficient equation of the following:
$a_{k} = \frac{1}{T_{0}} [∫ (-1)*e^{jk\omega_{0}t} + ∫ (1)*e^{jk\omega_{0}t}]$

To compute the general equation for $a_k$ should I treat the ±1 as a function and use u-substitution / integration by parts? If so, can someone at least show the first step or 2? I haven't done I.B.P. or U-substitution in some time. If I can treat the x(t) as a constant then how can I integrate to get the answer below?

General equation: $a_k = \frac{1}{jkπ} (1 - (-1^{k}))$

This example is from M.I.T. Open Courseware Alan V. Oppenheim Signals and Systems course Lecture 7 approximately 20 minutes into the video.

2. Oct 27, 2013

### AlephZero

You don't need to do all that. "1" and "-1" are just constants. If you are studying this, you should know $\int e^{at}dt$, and that formula works when $a$ is a complex number as well as when $a$ is real.

You should also know $e^{j\omega t} = \cos \omega t + j \sin \omega t$.

You also have an equation connecting $T_0$ and $\omega_0$, which is why they both disappeared in the final equation for $a_k$ (and that's also where the $\pi$ came from).

If you are confused by the $(-1)^k$ part, just work out the first few values of $a_1$, $a_2$, etc and see what happens.

3. Oct 27, 2013

### DmytriE

This is precisely what I am confused about. Is there a rule that applies to the $(-1)^k$ or do I have to input a couple numbers for $a_k$?