No analytic function $f$ has modulus $|f(z)|=1/\cosh(\Re z)$ An analytic function $f(z) = f(x+iy)$ in $\mathbb{C}$ cannot have modulus $\frac{A}{\cosh(x)}$ for some constant $A \neq 0$.
Can we do so simply using the Cauchy-Riemann Equations?
I tried working by contradiction:
Say there is such a $f(z)$. Given $f(z) = u(x,y) + i v(x,y)$ is analytic, it satisfies: $u_x = v_y$ and $u_y = -v_x$
We also see that: $$|f(z)|^2 = u(x,y)^2 + v(x,y)^2 = (\frac{A}{\cosh x})^2$$
I tried reaching a contradiction, but seem to be getting lost in a mess of reformulations. 
My start point is: 
$$u_x = v_y \text{ and } u_y = -v_x$$
along with
$$u(x,y)u_x + v(x,y)v_x = -A^2 \frac{sinh x}{(cosh x )^3}$$
and 
$$u(x,y)u_y + v(x,y)v_y = 0$$
I would appreciate some hints!
 A: So
$$
\begin{align*}
uu_x+vv_x&=-A^2\frac{\sinh x}{\cosh^3 x}\\
-uv_x+vu_x&=0\\
\end{align*}
$$
So
$$
u_x=-u\frac{\sinh x}{\cosh x}
$$
(remember $u^2+v^2=\dfrac{A^2}{\cosh^2 x}$) and similarly $v_x=-v\dfrac{\sinh x}{\cosh x}$.  So
$$
u=\frac{1}{\cosh x}\cdot f(y)\text{ and }v=\frac{1}{\cosh x}\cdot g(y)
$$
and there are no $g$ that gives $u_x=v_y$.
A: Here is another (perhaps interesting) proof: let $g(z)=(e^{z}+e^{-z})f(z)$. Then $|g(z)|\leq 2A $ because $|e^{z}+e^{-z}| \leq e^{x}+e^{-x} =2\cosh x$. By Louiville's Theorem $g$ is a constant, say $c$. Clearly, $c \neq 0$. We have $(e^{z}+e^{-z})f(z)=c$. You get a contradiction by taking $z=i\pi /2$
A: We could look at it this way:
If $f(z) \ne 0$ is holomorphic, then $\ln \vert f(z) \vert$ is harmonic.
For if $f(z) =  u(z) + iv(z) \ne 0$ is holomorphic, locally we may write
$f(z) = r(z) e^{i\theta(z)}, \tag 1$
where
$r(z) = \vert f(z) \vert \ne 0, \tag 2$
and 
$\theta(z) = \arg (f(z)) = \tan^{-1} \dfrac{v(z)}{u(z)} \tag 3$
when $u(z) \ne 0$, and
$\theta(z) = \arg (f(z)) = \cot^{-1} \dfrac{u(z)}{v(z)} \tag 4$
when $v(z) \ne 0$; note $u(z)$ and $v(z)$ cannot both be zero since $f(z) \ne 0$.
Now since $f(z) \ne 0$ is holomorphic, so is $\ln f(z)$; we have from (1)
$\ln f(z) = \ln r(z) + i\theta(z); \tag 5$
it follows that 
$\ln r(z) = \ln \vert f(z) \vert \tag 6$
is harmonic, being the real part of the holomorphic function $\ln f(z)$.
Now if 
$\vert f(z) \vert = A(\cosh x)^{-1}, \tag 7$
the from what we have done above, $\ln A(\cosh x)^{-1}$ is harmonic; but it is easily computed that
$\nabla^2 \ln (A(\cosh x)^{-1}) = \left ( \dfrac{\partial^2}{\partial x^2} + \dfrac{\partial^2}{\partial y^2} \right )  \ln (A(\cosh x)^{-1}) =  \dfrac{\partial^2}{\partial x^2} \ln (A(\cosh x)^{-1}) \ne 0; \tag 8$
it follows that $\ln A(\cosh x)^{-1}$ is not harmonic, hence $A(\cosh x)^{-1}$is not the modulus of any holomorphic function $f(z)$.
Note:  If $f(z)$ is entire, we can also argue from Liouville's theorem:
$\vert f(z) \vert = A(\cosh x)^{-1}$ is bounded; but a bounded entire function is constant, so $\vert f(z) \vert = A(\cosh x)^{-1}$ is impossible.
