Rouche's theorem finding roots on right half-plane 
  
*
  
*Prove that the equation $z=2-e^{-z}$ has exactly one root in the right half-plane and why must this root be real?
  
*Prove that the polynomial $P(z)=z^4+2z^3+3z^2+z+2$ has exactly two zeros in the right half-plane.

For $1$, I can rearrange it to $e^{-z}+z-2=0$ and can use Rouche's theorem, but I do not know which function $|f(z)|$ and $|g(z)|$, where $|g(z)|\le|f(z)|$ I should use to show that it has the specified roots and the same confusion holds for question number $2$.
 A: We have:
$$
\left|z - 2\right| = e^{-\Re z}
$$
In the right half-plane, $\Re z > 0$ and hence $e^{-\Re z} < 1$. It follows that any roots in the right half-plane must satisfy $\left|z - 2\right| < 1$.
Apply Rouché's theorem to the circle centered at $2$ with radius $1$:
$$
\left|\left(e^{-z} + z - 2\right) - (z - 2)\right| = e^{-\Re z} < 1 = \left|z-2\right|
$$
Thus, $e^{-z} + z - 2$ and $z - 2$ have the same number of roots inside the circle, which is one.
To show that the root is real, notice that the equation $e^{-x} + x - 2 = 0$ has a positive real solution. This can be shown by studying the derivative of $f(x) = e^{-x} + x - 2$.
A: Here is a marginally different approach:
Let $\gamma_R (t) = \begin{cases} iR(4t-1) & t \in [0,\frac{1}{2}] \\
Re^{i\frac{\pi}{2}(3-4t)} & t \in (\frac{1}{2},1]
\end{cases}$, which traces out the imaginary axis segment $i [-R,R]$ and then a semicircle or radius $R$ centered at $0$ in the right half plane. Let $\Gamma_R = \gamma_R [0,1]$.


*

*Let $f(z) = e^{-z}+z-2$, $g(z) = z-2$. Both $f$ and $g$ are entire, and if $R>3$ we have $|g(z)| = |z-2| \ge |z|-2 > 1$, so $z \mapsto \frac{1}{g(z)}$ is analytic on $\Gamma_R$. Then $|\frac{f(z)}{g(z)}-1| = |\frac{e^{-z}}{z-2}|$. We have $\Re z \ge 0 $ on $\Gamma_R$, hence $|\frac{f(z)}{g(z)}-1| <1$ for $z \in \Gamma_R$ (in particular, $f$ has no zeros on $\Gamma_R$). Then Rouché's theorem shows that $f$ and $g$ have the same number of zeroes inside the area enclosed by $\Gamma_R$. Since $R>3$ was arbitrary, it follows that $f$ has exactly one zero in the area enclosed by $\Gamma_R$. Since $f(\overline{z}) = \overline{f(z)}$, it follows that the zero must be real (otherwise the distinct conjugate would be a zero as well).

*This is the same idea, but the details are a little more tedious (I probably missed an easy expansion). Let $P(z) = z^4+2z^3+3z^2+z+2$, and $Q(z) = (x-1)^2(x+2)^2$ (this was picked by trial and error). Let $\phi(z) = \frac{P(z)}{Q(z)}-1 = \frac{6z^2+5z-2}{z^4+2z^3-3z^2-4z+4}$. To apply Rouché's theorem, we need to ensure that neither $P$ nor $Q$ have any zeros on $\Gamma_R$. This is obvious by inspection for $Q$, and will follow for $P$ if we can show that $|\phi(z)| < 1$ for $z \in \Gamma_R$. It should be clear that for some $R'>0$, if $|z|> R'$, then $|\phi(z)| <\frac{1}{2}$, so we choose $R> R'$. To finish, we need to find a suitable upper bound for $|\phi(ix)|$, for $x \in [-R,R]$. A tedious expansion gives $\eta(x)=|\phi(ix)|^2=
\frac{36\,{x}^{4}+49\,{x}^{2}+4}{{x}^{8}+10\,{x}^{6}+33\,{x}^{4}+40\,{x}^{2}+16}$, and symmetry shows that we need only consider $x \in [0,R]$.
To show $\eta(x) <1$, note that the numerator and denominator are both strictly positive, so we need only show the denominator is strictly larger than the numerator, or in other words, show ${x}^{8}+10\,{x}^{6}+33\,{x}^{4}+40\,{x}^{2}+16 -( 36\,{x}^{4}+49\,{x}^{2}+4 ) >0$. If we let  $\zeta(x) = {x}^{4}+10{x}^{3}-3{x}^{2}-9{x}+12$, this is equivalent to showing $\zeta(x^2) >0$. More tedious computation shows $\zeta(-1) = 9$, 
$\zeta(-\frac{1}{2}) = 14\frac{9}{16}$, $\zeta(0) = 12$, $\zeta(\frac{1}{2}) = 8\frac{1}{16}$ and $\zeta(1) = 11$. Hence $\zeta$ has a local maximum in $(-1,0)$ and a local minimum in $(0,1)$. Since $\zeta$ is a quartic, it follows that $\zeta(x) \ge 11$ for $x\ge 1$. For $x \in (0,1)$, inspection shows that $12 -3{x}^{2}-9{x} >0$, hence $\zeta(x) >0$ for all $x \in [0,\infty)$. Consequently, $\eta(x) <1$ for all $x$. Then Rouché's theorem shows that $P$ and $Q$ have the same number of zeroes inside the area enclosed by $\Gamma_R$. Since $P(\overline{z}) = \overline{P(z)}$, it follows that either the two right half plane zeroes are real or are complex conjugates. We observe that $P(x) \ge2$ for all $x \in [0,\infty)$, from which it follows that the two right half plane zeros of $P$ are conjugates of each other.
