I have an equation: $$f(t)=c(e^{i2\pi\frac{n}{T}t}+e^{-i2\pi\frac{n}{T}t})$$ ...for $t\in(-\pi,\pi)$, and with $T=2\pi$. I have to draw a plot of the function $f(t)$ for $n\in\left \{0,1,2,5 \right \}$. But my question is - how can I express $i$ and $-i$ in my code (I'm writing in Python)? What is e.g the total value of the power $i2\pi\frac{n}{T}t$ for $n=1$ and $T=2$?
Thank you in advance.
Using $$ \cos(\theta) = \frac{\mathrm{e}^{i\theta} + \mathrm{e}^{-i\theta}}{2} $$ I can rewrite your equation as $$ f(t) = 2c\cos\left(2\pi\frac{n}{T}t\right) $$ which is easier to plot, no?
As for the power calculation, what you have written doesn’t make sense. You can compute the power of $f(t)$ as $$ \int_{\Omega} |f(t)|^2dt $$ where $\Omega$ is the domain of interest.