Let $f \in S\_2(\Gamma\_0(N))$ be a newform with trivial character. I want to compute the Petersson norm $\lVert f\rVert^2$ of $f$, *not* normalized by $1/[\operatorname{SL}\_2(\mathbf{Z}):\Gamma\_0(N)]$, as in Gross–Zagier.


From [Numerical evaluation of the Petersson product of elliptic modular forms](https://mathoverflow.net/questions/115100/numerical-evaluation-of-the-petersson-product-of-elliptic-modular-forms), I came across the formula $$\lVert f\rVert^2 = \frac{(k-1)!}{2^{2k - 1}\pi^{k + 1}}L(\operatorname{Sym}^2(f),2)$$ with $k = 2$. I implemented this in Magma. If $N$ is not square-free, I guess the correct Euler factor for the symmetric square at $p^2 \mid N$ by testing if the functional equation for the symmetric square is satisfied with $1 \pm x$ or $1 \pm px$.


However, comparing with the result of PARI/gp (which *is* normalized by $1/[\operatorname{SL}\_2(\mathbf{Z}):\Gamma\_0(N)]$, so removing that normalization), it seems that I have to multiply my result by $N$ if $N$ is square-free, the reason for which I don't understand (maybe it's a convention of the implementation of the symmetric square $L$-function in Magma?). It is even worse for $N$ not square-free, e.g. $f \in S\_2(\Gamma\_0(125))^+$ or $S\_2(\Gamma\_0(147))^{w\_3,w\_{49}}$, where the normalization factors seem to be $125$ and $147 \cdot 7/8$, respectively.


PARI's code is hard to read, and Petersson scalar products are not implemented for $N \neq 1$ in Sage.


Can someone please shed light on this?



Computing the Petersson norm of newforms of weight 2 from the symmetric square $L$-function
My guess is that the formula you are trying to use is only valid for $N=1$, and thus needs correction in general.


Maybe Shimura's paper can help sort this out. <https://doi.org/10.1002/cpa.3160290618>


In (2.1), which Shimura writes for $\Gamma\_1(N)$ but that doesn't matter when the character is trivial, his definition is
$$\langle f,f\rangle={3/\pi\over [SL\_2(Z):\Gamma\_0(N)]}\int\_\Phi |f|^2 dx dy.$$


Then in (2.5) you have
$$\langle f,f\rangle={\Gamma(2)\over (4\pi)^2}\cdot\mathop{\rm res}\limits\_{s=2} D(s,f,f)$$
where by the last display of Section 1 he defines
$$D(s,f,f)=\sum\_{n=1}^\infty {a\_n^2\over n^s}.$$
Now a comparison of Euler products gives that the local factors
of $D(s,f,f)\zeta(2s-2)$ and $L(s,Sym^2 f)\zeta(s-1)$ match, at least away from $p$ that divide $N$ (this discrepancy is the issue that David Loeffler raises). This Euler product comparison is mentioned in another paper of Shimura, see (0.4) of <https://doi.org/10.1112/plms/s3-31.1.79>


Anyway, this gives the answer up to the bad factors,
namely
$$\int\_\Phi |f|^2 dx dy={[SL\_2(Z):\Gamma\_0(N)]\over 3/\pi}\langle f,f\rangle$$
$$=[SL\_2(Z):\Gamma\_0(N)]{\pi\over 3}{1\over (4\pi)^2}\mathop{\rm res}\limits\_{s=2} D(s,f,f)$$
$$=[SL\_2(Z):\Gamma\_0(N)]{\pi\over 48\pi^2}{1\over\zeta(2)}L(2,Sym^2 f)\prod\_{p|N} C\_p$$
$$=N\prod\_{p|N}(1+1/p)\cdot{1\over 8\pi^3}L(2,Sym^2 f)\prod\_{p|N}C\_p$$


Note that this matches your asserted formula when $N=1$ and $k=2$.


In the more general case, considering a bad prime $p|N$, the Euler factor from $\zeta(s-1)/\zeta(2s-2)$ evaluated at $s=2$ exactly cancels out factor of $(1+1/p)$ in the index formula. Meanwhile, the Euler factor of $L(s,Sym^2f)$ when $p$ exactly divides $N$ is $(1-1/p^s)^{-1}$, as is the Euler factor of $D(s,f,f)$ in this case (since $a\_p^2=1$).


Finally, when $p^2|N$, the Euler factor of $D(s,f,f)$ is trivial since $a\_p^2=0$, while that of $L(s,Sym^2f)$ can be known either by theory or trial-and-error computation. For the theoretical side, one can presuably work with the $p$-minimal twist of $f$ where this minimality allows twists with nontrivial Nebentypus - see 2.1 of Coates and Schmidt, particularly (2.12). <https://doi.org/10.1515/crll.1987.375-376.104>


I think one aspect is that if $v\_p(N)$ is odd then the Euler factor of $L(s,Sym^2f)$ is trivial; while if $v\_p(N)$ is even and $f$ is itself $p$-minimal then the factor is $(1+p/p^s)^{-1}$; and otherwise the Euler factor comes from that of the $p$-minimal twist (though perhaps not completely transparently, again with this $(1+p/p^s)^{-1}$ possibly appearing).


