A modular symbol corresponds to an element of homology on a modular curve (relative to the cusps) and a weight two modular form corresponds to a holomorphic one-form. Given a modular symbol and a weight two modular form, how can I approximate the integral of the modular form over the relative cycle corresponding to the modular symbol?
An example (which fails to work) is the following:
f = Newforms(Gamma0(23), 2, names='a')[0]; M = ModularSymbols(23,2); H=M.basis(); gamma=H[0]; f.period(gamma)