Let $f(z) = z + g(z)$ where $g$ is holomorphic. Suppose that $|\operatorname{Im} g(z)| < 1$ for $z ∈ [−1 − i, 1 − i]∪[−1 + i, 1 + i]$ and $|\operatorname{Re} g(z)| < 1$ for $z ∈ [−1 − i, −1 + i] ∪ [1 − i, 1 + i]$.
Show that $f$ has exactly one zero on the square $Q =$ {$x + iy ∈ \Bbb C : |x| < 1, |y| < 1$}.
My attempt:
I let $h(z) = z$. Then, I want to compare $|g(z)|$ and $|h(z)|$ because if $|g(z)| < |h(z)|$ then by Rouché's theorem, $h$ and $h+g$ have the same number of zeros, and $h$ has in fact one zero. But then $h+g = f$ and thus $f$ would also have the same number of zeros as $h+g$ which has one zero.
This is what I could come up with: $|g(z)| = |u(z) + iv(z)|$. Then for $z \in Q$, we have $|g(z)| \leq |u(z)| + |v(z)| < 1 + 1 = 2$ (since $|\operatorname{Im} g(z)| < 1$ for $z ∈ [−1 − i, 1 − i]∪[−1 + i, 1 + i]$ and $|\operatorname{Re} g(z)| < 1$ for $z ∈ [−1 − i, −1 + i] ∪ [1 − i, 1 + i]$)
But I don't know how to continue from here. Any help please?
An alternative is to use the argument principle.
Short version: Let $\gamma$ be a parameterization of $\partial Q$ with positive orientation. The restrictions on $g$ imply that $f$ maps the right/top/left/bottom edge of the square into the right/upper/left/lower halfplane, respectively.
It follows that $\Gamma = f \circ \gamma$ surrounds the origin exactly once, and therefore $$ 1 = \frac{1}{2 \pi i} \int_\Gamma \frac{dw}{w} = \frac{1}{2 \pi i} \int_\gamma \frac{f'(z)}{f(z)} \, dz = Z $$ where $Z$ is the number of zeros of $f$ inside the contour $\gamma$.
Details: Let $\gamma_1, \gamma_2, \gamma_3, \gamma_4: [0, 1] \to \Bbb C$ be parameterizations of the right/top/left/bottom edge of the square such that $\gamma = \gamma_1 + \gamma_2 + \gamma_3 + \gamma_4$ has positive orientation.
Let $\Gamma_j = f \circ \gamma_j$ ($j=1,2,3,4$) and $\Gamma = \Gamma_1 + \Gamma_2 + \Gamma_3 + \Gamma_4$.
The argument principle states that the number of zeros of $f$ in $Q$ is $$ Z = \frac{1}{2 \pi i} \int_\gamma \frac{f'(z)}{f(z)} \, dz = \frac{1}{2 \pi i} \int_\Gamma \frac{dw}{w} $$ so that it remains to show that the winding number $$ N(\Gamma, 0) = \frac{1}{2 \pi i} \int_\Gamma \frac{dw}{w} $$ of $\Gamma$ with respect to the origin is equal to one.
The restrictions on $g$ imply that the image of $\Gamma_1$/$\Gamma_2$/$\Gamma_3$/$\Gamma_4$ is contained in the right/upper/left/lower halfplane, respectively. For example, $$ \operatorname{Re}\Gamma_1(t) \operatorname{Re}f(\gamma_1(t)) = 1 + \operatorname{Re}g(\gamma_1(t)) > 1 + (-1) = 0 \, . $$
The idea is that $\Gamma$
so that it “surrounds” the origin exactly once, i.e. the $N(\Gamma, 0) = 1$.
To make this precise, we define two holomorphic branches of the logarithm: $$ L_1: \Bbb C \setminus (-\infty, 0] \to \Bbb C, L_1(z) = \log |z| + i \arg(z) \text{ with } -\pi < \arg z < \pi \,, \\ L_2: \Bbb C \setminus [0, \infty) \to \Bbb C, L_2(z) = \log |z| + i \arg(z) \text{ with } 0 < \arg z < 2 \pi \,. $$
Note that both $L_1$ and $L_2$ are antiderivatives of $1/z$ in their respective domains. Denote the images of the four corners of the square with $$ a = \Gamma_4(1) = \Gamma_1(0) \quad \text{(in the fourth quadrant)} \\ b = \Gamma_1(1) = \Gamma_2(0) \quad \text{(in the first quadrant)} \\ c = \Gamma_2(1) = \Gamma_3(0) \quad \text{(in the second quadrant)}\\ d = \Gamma_3(1) = \Gamma_3(0) \quad \text{(in the third quadrant)} $$ We then have $$ \int_\Gamma \frac{dw}{w} = \sum_{j=1}^4 \int_{\Gamma_j} \frac{dw}{w} \\ = \bigl(L_1(b) - L_1(a) \bigr) + \bigl(L_1(c) - L_1(b) \bigr) + \bigl(L_2(d) - L_2(c) \bigr) + \bigl(L_1(a) - L_1(d) \bigr) \\ = L_2(d) - L_1(d) = 2 \pi i $$ and that is exactly the desired result.
With respect to your attempt: The conclusion $$ |g(z)| \leq |u(z)| + |v(z)| < 1 + 1 = 2 $$ is wrong because the estimates $|u(z)| < 1$ and $|v(z)|< 1$ hold on different parts of the boundary and not simultaneously.