Prove that there does not exist any holomorphic function $f(z)$, such that $|f(z)| =\frac{K}{\cosh x}$ where $K>0$ is a constant, and $x=Re(z)$.
My idea is to use the maximum modulus principle. $|f(z)| =\frac{K}{\cosh x} = \frac{2K}{e^x+e^{-x}} \leq K$. An entire function with bounded modulus must be a constant. This leads to a contradiction.
My question is, in my attempt, I assume $f$ to be holomorphic on $\mathbb{C}$. Is it possible to prove the same result when $f$ is holomorphic on $\Omega$ where $\Omega$ is a domain? And is it possible not to use maximum modulus principle?
Thank you for any help!
For a solution which does not need the maximum modulus principle and works on more general domains, see Complex function does not have a modulus equal to a function of its real part.