Suppose a continuous function $f:D\rightarrow \mathbb{C}$ where $D$ is a plane domain, has the property $|f(z)^2-1|<1$ for every $z$ in $D$. Show that $|f(z)-1|<1$ of $|f(z)+1|<1$ for every $z$ in $D$.
I could not solve this but I sort of have an idea. Cleary $f(z)\neq 0$ for every $z$ in $D$. If I can define two sets $U=${$z\in D||f(z)-1|<1$} , $V=${$z\in D||f(z)+1|<1$} and show both are open and by the connectedness of $D$ I can show one of thos sets have to be empty. But I just could not achieve this. Any help will be much appreciated thanks
You've got the right idea.
First note that
$$U = \{z \in D \mid |f(z) - 1| < 1\} = \{z \in D \mid f(z) - 1 \in \mathbb{D}\} = \{z \in D \mid g(z) \in \mathbb{D}\} = g^{-1}(\mathbb{D})$$
where $g(z) = f(z) - 1$. As $f$ is continuous, so is $g$, and as $\mathbb{D}$ is open, $U$ is open. Likewise, you can show that $V$ is open.
The first thing you need to do is show that $U$ and $V$ are disjoint. Suppose $z \in U\cap V$, then
$$2 = |1 + 1| = |(f(z)+1) - (f(z)-1)| \leq |f(z)+1| + |f(z) - 1| < 1 + 1 = 2$$
which is a contradiction. Therefore $U\cap V = \emptyset$.
What you need to do now is show that $D = U\cup V$. One way to do this is to suppose $z \in D\setminus(U\cup V)$, so $z \in D\setminus U$ and $z \in D\setminus V$. Therefore $|f(z) - 1| \geq 1$ and $|f(z) + 1| \geq 1$ so
$$|f(z)^2 - 1| = |(f(z) - 1)(f(z) + 1)| = |f(z) - 1||f(z) + 1| \geq 1$$
which is a contradiction. Therefore $D = U\cup V$.
Therefore, the connected set $D$ is the union of two disjoint open sets, so as you've noted, one of them must be empty (and the other must be $D$).