Number of roots in right half plane

I want to find the number of roots, using the argument principle, to the equation $P(z)=z^5+z^4+2z^3-8z-1=0$ such that $Re(z)>0$. I'm aware there exists one real positive root since $P(0)=-1<0$ and $P(+\infty)=+\infty$, as well as the fact I only need to consider the roots in the first quadrant and multiply by 2.

So as I track the path of $w=P(z)$, I notice that when $z$ moves from $(0,0)$ to $(R,0)$, $P(z)$ moves from the negative real axis to the positive real axis. I'm not sure how the argument changes in this case. Does it increase or decrease by $\pi$?

• If we parametrize right half plane, and change parameter with $w=\dfrac{1+z}{1-z}$ from unit circle to right half plane, apply in $\int_\gamma \dfrac{f'(w)}{f(w)}dw$ where $\gamma:|z|=1$ can solve the problem properly! – Nosrati Oct 14 '17 at 20:06

Since, for large enough $R$, the segment $[0,R]$ passes through a zero of $P$, a contour containing that segment is not suitable for an application of the argument principle. One needs a contour on which the function has no zeros for that.
If one avoids the real zero by making a small detour around the zero, whether the argument increases or decreases by $\pi$ depends on whether one passes the real zero in the upper or in the lower half-plane.
I think it is easier here to consider a semicircular contour, using the segment between $iR$ and $-iR$ on the imaginary axis, and the semicircle $\{Re^{i\varphi} : -\pi/2 \leqslant \varphi \leqslant \pi/2\}$. If $R$ is large enough, $P$ behaves essentially like $z \mapsto z^5$ on the semicircle, so the change of argument there is about $5\pi$ (with the approximation error getting smaller for larger $R$). On the imaginary axis, at $iR$ the value of $P$ is $R^4 + iR^5 + \text{ insignificant bits}$, and $P(0) = -1$. Since $\operatorname{Re} P(is) = s^4-1$, the part of the curve traced by $P(is)$ for $1 < \lvert s\rvert < R$ lies in the right half plane, and the part for $\lvert s\rvert < 1$ in the left. Since $P(i) = -9i$ and $P(-i) = 9i$, the argument of $P(z)$ decreases by approximately $\pi$ on the path from $iR$ to $i$ and from $-i$ to $-iR$, and it decreases by exactly $\pi$ on the part from $i$ to $-i$. Hence the overall change of argument on the contour is approximately $5\pi - 3\pi = 2\pi$, and since the change of argument is an integer multiple of $2\pi$, it is exactly $2\pi$, so there is precisely one zero of $P$ in the right half-plane.