# periods of higher weight modular forms

For now let $f\in S_2(\Gamma_0(N))$ and define $I(\alpha,\beta)=\int_\alpha^\beta f(z)dz$. If $M\in\Gamma_0(N)$ it is immediate to prove that $I(\alpha,M(\alpha))$ is independent of $\alpha$: this uses (1) modularity which shows that $I(M(\alpha),M(\beta))=I(\alpha,\beta)$, and (2) the fact that $f$ is holomorphic, so that the evident contour integral vanishes.

My question is what happens in higher weight $f\in S_k(\Gamma_0(N))$, where $f(z)dz$ is no more an invariant differential. It is natural to consider the period polynomial $I(\alpha,\beta)=\int_\alpha^\beta(X-z)^{k-2}f(z)dz$, and modularity again shows $I(M(\alpha),M(\beta))=I(\alpha,\beta)|_{2-k}M^{-1}$. But I cannot seem to use holomorphy to deduce something analogous to the weight $2$ case. Am I missing something ?

In the case $k >2$, the integral $I(\alpha,M(\alpha))$ does indeed depend on $\alpha$.
I think the right point of view is using group cohomology as follows. Let $f \in S_k(\Gamma_0(N))$ and let $\alpha \in \mathcal{H}$. Using your notations, the map $M \in \Gamma_0(N) \mapsto I(\alpha,M(\alpha))$ is a 1-cocycle on $\Gamma_0(N)$ with values in the space of polynomials $V_k = \mathbf{C}[X]_{\leq k-2}$. If you change $\alpha$ then the cocycle changes by a coboundary since by Stokes' formula
So there is a well-defined cohomology class $\phi_f \in H^1(\Gamma_0(N),V_k)$. If I recall correctly, the original version of the Eichler-Shimura isomorphism (maybe only for $N=1$?) says that $S_k(\Gamma_0(N))^2$ is isomorphic to $H^1(\Gamma_0(N),V_k)$.