# Why are the two answers different? (integrating exponents)

My current problem simplifies to solving $\int_0^T e^{2\pi ix/T} dx$, $T \not= 0$.

I currently have 2 ways of solving this, one of which uses the definition of $e^{i \pi}$, and the other from definition of integrating exponents.

First method: $\int_0^T e^{2\pi ix/T}dx = \int_0^T 1^{x/T}dx = \int_0^T 1dx = T$

Second method: $\int_0^T e^{2\pi ix/T}dx = e^{2 \pi i x/T}/{\frac T {2 \pi i}}|_0^T = {\frac T {2 \pi i}} (e^{2 i \pi} - 1) = 0$

• $e^{2\pi i x/T}\neq 1$ for $0< x< T$ – mickep Apr 16 '17 at 7:38
• @mickep does $e^{kx} = (e^k)^x$ not hold for complex numbers? – Thunda Apr 16 '17 at 7:39
You have $$e^{2\pi i x/T}=\cos(2\pi x/T)+i\sin(2\pi x/T).$$ Thus, clearly $e^{2\pi i x/T}\neq 1$ for $0<x<T$ (for exaple, $x=T/2$ gives $e^{\pi i}=-1$)