Complex Analysis Argument Principle Problem Let $p$ be a polynomial of degree $2$ which satisfies these conditions.
$$\frac{1}{2\pi i}\int_{|z|=2}\frac{zp'(z)}{p(z)}dz = 0  \text{, and } \frac{1}{2\pi i}\int_{|z|=2}\frac{z^2p'(z)}{p(z)}=-2$$.
if $p(0)=2017$, then the explicit form of $p(z)$ is.
I inferred that this is about Argument Principle but i don't know how to begin. Maybe you guys could help me out or have you seen any similar problems to this problem? 
 A: Lemma: Let $p(z)$ be a polynomial whose roots are all contained in some simple contour $C$, oriented counter-clockwise. If $g(z)$ is any holomorphic function, then $$\frac{1}{2\pi i} \int_{C} g(z) \frac{p'(z)}{p(z)} \, dz = \sum_{r \text{ root of } p} g(r)$$
Proof: Writing $p(z) = \prod (z-r_i)$ we have that the integral equals $$\frac{1}{2\pi i} \int_{C} \left(\sum_{i} \frac{g(z)}{z-r_i} \right) \, dz = \sum_{i} \frac{1}{2\pi i} \int_{C} \frac{g(z)}{z-r_i} \, dz = \sum_{i} g(r_i)$$ where the final equality is by the residue theorem (or Cauchy integral formula).
Let $r_1$ and $r_2$ be the roots of our quadratic $p(z)$. We claim both roots must lie inside the circle $|z| = 2$. If one of the roots does not have $|z| <2$, then neither does the other, since $r_1 = \overline{r_2}$. Then, by the lemma, we would have to conclude the second integral equals zero, contradiction.
Thus, we see that the information we are given is $$r_1 + r_2 = 0$$ and $$r_1^2 + r_2^2 = -2$$ Thus, $r_1 = -r_2 \implies r_1^2 = -1 \implies r_1, r_2 = \pm i$. Hence the quadratic $p$ equals $p(z) = D(z^2 + 1)$ for some constant $D$. Finally, we can compute $D = 2017$ using the information $p(0) = 2017$. Thus, $$p(z) = 2017 z^2 + 2017$$
A: Since $p$ is a polynomial, it has no poles, and only zeros. The generalized argument principle says that 
$$\frac{1}{2\pi i}\int_Cg(z)\frac{f'(z)}{f(z)}dz=\sum_{a}n(C,a)g(a)-\sum_{a}n(C,b)g(b)$$
Let $a_1,a_2$ be the zeros of $p(z)$.  The second condition implies that at least one of the zeros must lie inside of $C$ (otherwise the sum over zeros would be $0\neq -2$). If only one zeros lies inside of $C$ (say, $a_1$), then you'd get:
$0=a_1, -2=a_1^2$,
which is again impossible. So both zeros must lie inside of $C$, in which case:
$$0=a_1+a_2$$
$$-2=a_1^2+a_2^2$$
So write $p(z)=A(z-a_1)(z-a_2)$. You should have plenty of information to now solve for $p$. 
