Corollary for Casselman-Shalika formula Assume $\pi$ is an unramified representation of $GL_n(F)$, where $F$ is a p-adic field. And $\phi$ is an unramified vector for $\pi$. Assume $W_{\phi}$ is a Whittaker function associated to $\phi$. Then whether $|W_{\phi}(1)|^2=\frac{1}{L(1,\pi,Ad)}$?
I will appreaciate if you can show me a detailed calculation of the equality in an specific example. Thank you all the time.
 A: The answer depends on your normalisation of $W$. Perhaps the most standard normalisation of $W$ is such that $W(1_n) = 1$, where $1_n$ is the $n \times n$ identity matrix.
Let $\pi$ be a unitary spherical representation of $\mathrm{GL}_n(F)$ with Satake parameters $\alpha_1,\ldots,\alpha_n$. Let $\widetilde{W}$ be the spherical vector of the contragredient representation $\widetilde{\pi}$. Then it is true that $$\langle W, \widetilde{W} \rangle = \int_{N_{n - 1}(F) \backslash \mathrm{GL}_{n - 1}(F)} W\begin{pmatrix}g&0\\ 0&1\end{pmatrix} \widetilde{W}\begin{pmatrix}g&0\\ 0&1\end{pmatrix} \, dg$$
is equal to
\[\frac{L(1,\pi \otimes \widetilde{\pi})}{\zeta_F(n)} = (1 - q^{-n}) \prod_{j = 1}^{n} \prod_{k = 1}^{n} \frac{1}{1 - \alpha_j \alpha_k^{-1} q^{-1}}.\]
Here $q$ is the cardinality of the residue field of $F$.
In fact, a more general statement is true, where $\pi$ is allowed to be ramified and $W$ is the newform. A proof appears in Section 7 of "Large sieve inequalities for $\mathrm{GL}(n)$-forms in the conductor aspect" by Akshay Venkatesh.
There is another nice method to prove this, which is to use the method of Michitaka Miyauchi in "Whittaker functions associated to newforms for $\mathrm{GL}(n)$ over $p$-adic fields", using Theorem 4.1, which is the Shintani-Casselman-Shalika formula for newforms, together with Cauchy-Schur identities, since the integral over $N_{n - 1}(F) \backslash \mathrm{GL}_{n - 1}(F)$ reduces to an integral over
\[\{\mathrm{diag}(\varpi^{f_1},\ldots,\varpi^{f_{n - 1}},1) : f_1 \geq \cdots \geq f_{n - 1} \geq 0\},\]
where $\varpi$ is a uniformiser for $F$.
Remarkably, such a result is also true, once suitably modified, for archimedean $F \in \{\mathbb{R},\mathbb{C}\}$, even if $\pi$ is ramified. For $\mathrm{GL}_2$, this is quite standard; for $\mathrm{GL}_n$ and $\pi$ unramified, this is due to Stade; for $\mathrm{GL}_n$ and $\pi$ ramified, this is Theorem 5.10 of my paper with Yeongseong Jo based on recent work of mine.)
All this is the adèlic version of the more classical statement that
\[\frac{|a_f(1)|^2}{\langle f,f\rangle} = \frac{1}{2\Lambda(1, \operatorname{ad} f)}\]
for an even Maass form $f$ on $\mathrm{SL}_2(\mathbb{Z}) \backslash \mathbb{H}$ with first Fourier coefficient $a_f(1)$.
