how to prove complex rational function has this property Let's say we have a rational function $f$ (i.e polynom divided by polynom) , and assume that $f$ has no poles in the upper plane $\{z;Imz \geq 0\}$.  
we have to prove that: $$sup\{|f(z)|; Imz \geq 0\} = sup\{|f(z)|; Imz = 0\}$$ 


*

*I assume that we are dealing in cases where the suprimum exists.

*every approach I tried, I can't really understand what is the significant of function being rational. I know, for example, that there is finite number of zero's, and finite number of poles, but I can't see how it is helpful.

 A: We know that the function is holomorphic on the upper half plane and thus does not have any local maxima on the interior of the upper half plane (maximum principle). Since $f$ is rational, it's behavior at infinity is easy to deal with. Let's consider the cases:
First case: $f(z) \to \infty$ as $z \to \infty$. Then the supremeum on the real line and on the upper half plane $H$ are both $\infty$.
Next case: $f(z) \to c \in \mathbb{C}$ as $z \to \infty$. If $|c|= \sup_\mathbb{R} |f|$ then it is also $\sup_{H} |f|$. Otherwise, $|c|< \sup_\mathbb{R} |f|$ and there is a a big ball $B$. where $|f| < \sup_\mathbb{R} |f|$ outside $B$. But $\overline{B} \cap H$ is compact and so $f$ achieves is max on the boundary. The max doesn't occur on the upper semicircle by construction of $B$, so it must occur on $\mathbb{R} \cap \overline{B}$. This max is then the max on $H$ of $|f|$ because $|f|$ is smaller than $|c|$ outside $B$. Hence $$\max_H |f| = \max_{H \cap \overline{B}} |f| = \max_{\mathbb{R} \cap \overline{B}} |f|= \max_\mathbb{R} |f|$$
