# Complex Integral Help

Hello i am confused with this complex integral! It isnt for math homework.
$\large\int^{T/2}_{-T/2}p(t)e^{-j2πnt/T}dt$

$p(t)$ is $A$ for $-T/4 < t < T/4$
$-A$ otherwise
Its a kind of pulse!

-
You could always write e to a power as exp(power) to increase readability, especially if your exponent is a fraction. I can't tell what your exponent says at all. It's fine, you already have an answer, but just for the future. –  Graphth Feb 6 '12 at 15:50
@Graphth i noticed it but i think that font should be larger.To see it clearly i had to zoom with my browser. Maybe there is an option to increase size.(there is! \large or \huge) –  Parhs Feb 6 '12 at 22:10

$$\int_{-\frac{T}{2}}^\frac{T}{2}p(t)e^\frac{-j2πnt}{T}dt=$$ $$-A\int_{-\frac{T}{2}}^{-\frac{T}{4}}e^\frac{-j2πnt}{T}dt+A\int_{-\frac{T}{4}}^{\frac{T}{4}}e^\frac{-j2πnt}{T}dt-A\int_{\frac{T}{4}}^{\frac{T}{2}}e^\frac{-j2πnt}{T}dt=$$ $$-A\frac{e^{jn\frac{π}{2}}-e^{jπn}}{-j2πn}+A\frac{e^{-jn\frac{π}{2}}-e^{jn\frac{π}{2}}}{-j2πn}-A\frac{e^{jπn}-e^{jn\frac{π}{2}}}{-j2πn}=$$ $$A\frac{\sin\left(n\frac{π}{2}\right)}{n\pi}=A\frac{(-1)^n}{n\pi}$$