Hi there, I am new to Sage.
Let $a,b\in\mathbb{Q}$ be given. I want to calculate the $q$-expansion of $\displaystyle f(a\tau+b;\tau)=\frac{ie^{\pi ib}q^{a/2}}{\vartheta(a\tau+b;\tau)}\sum_{n\in\mathbb{Z}}\frac{(-1)^ne^{2\pi inb}q^{(n^2+n)/2+an}}{1-e^{2\pi i b}q^{n+a}}, $ where $\displaystyle \vartheta(a\tau+b;\tau)=q^{-a^2/2}\sum_{n\in\mathbb{Z}}e^{\pi i(1+2n)(b+\frac{1}{2})}q^{(1+2(n+a))^2/8}$ with $q=e^{2\pi i\tau}.$
What I have done so far is getting rid of the non-integer exponents in order to calculate the expansions: This is what I did for a=0, b=1/2, but it is very slow and does not even give me anything nice for a=0, b=1/3.
var('b,q,m,n')
th(b)=sum(exp(pi*i*(1+2*m)*(b+1/2))*q^((2*m+1)^2),m,-6,6);
S(b)=sum((-1)^n*exp(2*pi*i*n*b)*q^(4*n^2+4*n)/(1-exp(2*pi*i*b)*q^(8*n)),n,-6,6)
mu(b)=i*exp(b*i*pi)*S(b)*th(b)^(-1)
mu(1/2).series(q==0,60)
I wonder how one efficiently gets the Fourier coefficients of f. Any help is highly appreciated.
Thanks Harry