How to integrate this function:
$$x[n] = \frac{1}{2\pi}\int_{-\pi}^{\pi}\delta(\omega-\omega_{0}) e^{jn\omega}d\omega$$
Where:
$$\delta[\omega-\omega_0] = \begin{cases}1&n=\omega_o\\0&n\neq\omega_o\end{cases}$$
The book says the answer is suppose to be:
$$x[n] = \frac{1}{2\pi}e^{jn\omega_o} $$
Here's what i'm trying to do:
$$x[n] = \frac{1}{2\pi}\int_{-\pi}^{\pi}\delta(\omega-\omega_{0}) e^{jn\omega}d\omega$$
$$x[n] = \frac{1}{2\pi} e^{jn\omega_o} \int_{-\pi}^{\pi}d\omega$$
$$x[n] = \frac{1}{2\pi} e^{jn\omega_o} (\pi - (-\pi))$$
$$x[n] = \frac{1}{2\pi} e^{jn\omega_o} (2\pi)$$
$$x[n] = e^{jn\omega_o} $$
You've made a few mistakes, such as giving an $n$-dependent definition of $\delta (\omega-\omega_0)$ instead of an $\omega$-dependent one, and I'm sure your book wants you to work with Dirac deltas, whereas you've used a Kronecker delta. If $\omega_0\in [a,\,b]$, $\int_a^b\delta(\omega-\omega_0)f(\omega)d\omega=f(\omega_0)$ (otherwise the result is $0$); that defines the Dirac delta, as well as making the problem trivial. If the given formula were really meant to use a Kronecker delta, the integrand would be function-valued and vanish except at $\omega=\omega_0$, and the integral would be $0$. Note that the Dirac delta is a measure, not a true function.