# Problem involving Laurent series expansion

Suppose that a series $$\sum_{n=-\infty}^{\infty}\dfrac{a_n}{z^n}$$ converges to an analytic function $A(z)$ in some annulus $R_1<|z|<R_2$. That sum $A(z)$ is called the $z$-transform of $a_n$. Show that if the annulus contains the unit circle $|z|=1$, then $$a_n=\dfrac{1}{2\pi}\int_{-\pi}^{\pi}\!A\left(e^{i\theta}\right)e^{in\theta}\,\mathrm{d}\theta,\quad n\in\mathbb{Z}$$

I don't understand the first equality in the solution below, \begin{align} a_n&=\dfrac{1}{2\pi i}\int_{C(0,1)}\!A(z)z^{n-1}\,\mathrm{d}z\\ &=\dfrac{1}{2\pi i}\int_{-\pi}^{\pi}\!A\left(e^{i\theta}\right)e^{i\theta(n-1)}\cdot ie^{i\theta}\,\mathrm{d}\theta\\ &=\dfrac{1}{2\pi}\int_{-\pi}^{\pi}\!A\left(e^{i\theta}\right)e^{in\theta}\,\mathrm{d}\theta \end{align} $$\tag*{\blacksquare}$$ How to get the first equality?

Well $A(z)$ is a function that can be expressed as a Laurent series whose coefficients are precisely $a_{-n}$. So use the formula to find the coefficients of a Laurent series and you get the first equality