How to show that $\left| \Gamma \left(x + iy \right) \right|^{2} \approx (\pi y^{(2x - 1)}) /(\cosh(\pi y))$? I found the approximation:
$$\left| \Gamma \left(x + iy \right) \right|^{2} \approx \frac{\pi y^{(2x - 1)}}{\cosh(\pi y)}
$$
for $y \gt 2$, within an answer for another question, but I could not figure out where it comes from, nor find it anywhere else. How is this approximation derived and what is the error in the approximation?
 A: From the context in which the approximation was used, $0\leq x\leq 1$ and $y>2$. I will assume that $y\gg x$ and, therefore, $y \gg 1$.
From the Stirling approximation,
$$
\Gamma(z) \approx \sqrt{\frac{2\pi}{z}} \left(\frac{z}{e}\right)^{z},
$$
Since $\Gamma(z)$ is a holomorphic function for $\mathrm{Re}(z)>0$, $\Gamma(\bar{z})=\overline{\Gamma(z)}$. Therefore,
$$
|\Gamma(z)|^2 = \Gamma(z) \Gamma(\bar{z}) \approx \frac{2\pi}{\sqrt{z \bar{z}}}\left(\frac{z}{e}\right)^{z} \left(\frac{\bar{z}}{e}\right)^{\bar{z}}=\frac{2\pi}{|z|}\left(\frac{z}{e}\right)^{z} \left(\frac{\bar{z}}{e}\right)^{\bar{z}}.
$$
Using $z=re^{i\theta}$,
$$
|\Gamma(z)|^2 \approx \frac{2\pi}{r} (r e^{-1+i\theta})^{z} (re^{-1-i\theta})^{\bar{z}} = 2\pi r^{z+\bar{z}-1} \exp(z(-1+i\theta)-\bar{z}(1+i\theta)).
$$
Using $z + \bar{z} = 2x $, $z-\bar{z}=2iy$ and $r^2=x^2+y^2$, we get
$$
|\Gamma(z)|^2 \approx 2\pi (x^2+y^2)^{(2x-1)/2} \exp(-2x -2y\theta).
$$
Assuming $y \gg x$ and $y \gg 1$, $x^2+y^2 \approx y^2$ and $\theta \approx \pi/2$, leading to
$$
|\Gamma(z)|^2 \approx 2\pi y^{2x-1} \exp(-\pi y),
$$
in which the term $2x$ in the argument of the exponential vanished because it's negligible compared to $\pi y$. Since $2\cosh y = e^y + e^{-y} \approx e^y$ for large $y$, we have finally
$$
|\Gamma(x+iy)|^2 \approx \frac{\pi y^{2x-1}}{\cosh(\pi y)}.
$$
The plot below shows the accuracy of the approximation as function of $y$ for $x=0$ and $x=1$.

The plot below shows the error, defined as $\left| |\Gamma|^2_{exact}-|\Gamma|^2_{approx.} \right|/|\Gamma|^2_{exact}$. For $x=1/2$ the formula is exact; the error as function of $y$ seems to be identical for $x=0$ and $x=1$. The error here is plotted for $x=0.1$, $x=0.6$ and $x=1$.

For $x=1$, the error is lesser than $1\times 10^{-5}$ ($0.001 \%$) for $y>2$, agreeing with the original claim on the approximation. For smaller $x$ the error is larger. Suggestions regarding the estimation of the error analytically will be appreciated.
A: I had a go at answering the approximation part of my own question, as an extension to @rafa11111's answer.
From the approximation (where $z=x +iy$): 
$$
\left| \Gamma(z) \right|^{2} \approx \frac{\pi y^{2x-1}}{\cosh(\pi y)}
$$ 
for $0 \leq x \leq 1$ and $y>>1$, define the error in the approximation as:
$$
\delta = \left| \left| \Gamma(z) \right|^{2} - \frac{\pi y^{2x-1}}{\cosh(\pi y)} \right| \cdot \frac{1}{\left| \Gamma(z) \right|^{2}}
$$
First to find the maximum error w.r.t $x$:
$$
\frac{\partial \delta}{\partial x} = sgn(\delta)\frac{\left[ 2 \ln(y) \pi y^{2x-1} \left| \Gamma(z) \right|^{2} \cosh(\pi y) - 2 \pi y^{2x-1} \left| \Gamma(z) \right| \frac{\partial \left| \Gamma(z) \right|}{\partial x} \cosh(\pi y)\right]}{\left| \Gamma(z) \right|^{4} \cosh^{2}(\pi y)}
$$
$$
= \frac{\pi y^{2x-1}}{\left| \Gamma(z) \right|^{2} \cosh(\pi y )}\left[ 2\ln(y) -2\frac{\Re(\Gamma(z) \overline{\Gamma'(z)})}{\left| \Gamma(z) \right|} \right]
$$
$$
= \frac{\pi y^{2x-1}}{\left| \Gamma(z) \right|^{2} \cosh(\pi y )}\left[ 2\ln(y) -2 \Re(\psi(z)) \right]
$$
where $sgn$ is the Sign Function (which is $=+1$ here) and $\psi(z)$ is the Digamma Function. For the derivative of the modulus of a complex function I looked here. Next equate with zero to find the maximum which occurs when:
$$
\Re(\psi(z)) = \ln(y)
$$
which can be numerically calculated and returns $x \approx 0.7885$.

Second is to find the derivative of the error w.r.t $y$:
$$
\frac{\partial \delta}{\partial y} = sgn(\delta)\frac{\left[ (2x-1) \pi y^{2x-2} \left| \Gamma(z) \right|^{2} \cosh(\pi y) - \frac{\partial}{\partial y}\left( \pi y^{2x-1} \left| \Gamma(z) \right|^{2} \cosh(\pi y) \right)\right]}{\left| \Gamma(z) \right|^{4} \cosh^{2}(\pi y)}
$$
$$
= \frac{\pi y^{2x-1}}{\left| \Gamma(z) \right|^{2} \cosh(\pi y )}\left[ \frac{2x-1}{y} -2\frac{\Re(-i \Gamma(z) \overline{\Gamma'(z)})}{\left| \Gamma(z) \right|} - \pi \tanh(\pi y) \right]
$$
$$
= \frac{\pi y^{2x-1}}{\left| \Gamma(z) \right|^{2} \cosh(\pi y )}\left[ \frac{2x-1}{y} -2 \Im(\psi(z)) -\pi \tanh(\pi y) \right]
$$
For this to be negative we need:
$$
\frac{2x-1}{y} \lt 2 \Im(\psi(z)) + \pi \tanh(\pi y)
$$
$$
y \gt \frac{2x-1}{2 \Im(\psi(z)) + \pi \tanh(\pi y)}
$$
which for $y \gt \gt 1$ approximates further to:
$$
y \gt \frac{2x-1}{2 \Im(\psi(z)) + \pi }
$$
Of which $\Im(\psi(z))$ has the same sign as $y$ and so, for $y \gt \gt 1$ , the RHS is either small (compared to $y$) and positive for $0.5 \gt x \geq 1$, zero for $x=0.5$, or negative for $0 \geq x \gt 0.5$. Therefore:
$$
\frac{\partial \delta}{\partial y} \lt 0
$$
for $y \gt \gt 1$.

So, if we take $x = 0.7885$ and $y=2$ we get $\delta = 0.0042$ which could be taken as the upper bound of the error for which the approximations hold. Then as $y \rightarrow \infty$, $\delta \rightarrow 0$ and the approximation becomes more accurate.
NB: I am a little unsure on the partial derivative of $ \Gamma(z)$ w.r.t $x$ or $y$. I reasoned that as:
$$
\frac{d  \Gamma(z) }{dz} = \int_{0}^{\infty} t^{z-1} \ln(t) e^{-t} dt =  \Gamma'(z)
$$
then
$$
\frac{\partial \Gamma(z) }{\partial x} = \int_{0}^{\infty} t^{z-1} \ln(t) e^{-t} dt = \Gamma'(z)
$$
and
$$
\frac{\partial \Gamma(z)}{\partial y} = i \int_{0}^{\infty} t^{z-1} \ln(t) e^{-t} dt = i\Gamma'(z)
$$
