# How is the integral form of Ramanujan theta function derived?

Ramanujan theta function defined as-$$f(a,b)=\sum_{n=0}^\infty a^{\frac{n(n+1)}{2}}b^{\frac{n(n-1)}{2}}$$ And it's integral representation:$$f(a,b)=1+\int_0^\infty \frac{2ae^{-t^{2}/2}}{\sqrt{2\pi}}\left[\frac{1-a\sqrt{ab}\operatorname{cosh}(\sqrt{\operatorname{log}(ab)}t)}{a^3b-2a\sqrt{ab}\operatorname{cosh}(\sqrt{\operatorname{log}(ab)}t)+1}\right]dt+\int_0^\infty \frac{2be^{-t^{2}/2}}{\sqrt{2\pi}}\left[\frac{1-b\sqrt{ab}\operatorname{cosh}(\sqrt{\operatorname{log}(ab)}t)}{ab^3-2b\sqrt{ab}\operatorname{cosh}(\sqrt{\operatorname{log}(ab)}t)+1}\right]dt$$how is it derived?

I checked this paper but still did not understand.

For $$B>A >0$$ $$\sqrt{\pi}\sum_{n=0}^N (AB)^{n^2}(A/B)^n=\sum_{n=0}^N (A/B)^ne^{(n\sqrt{\log AB})^2}\int_{-\infty}^\infty e^{-t^2}dt$$ Using Cauchy integral theorem we can move the line of integration obtaining $$=\sum_{n=0}^N (A/B)^ne^{(n\sqrt{\log AB})^2}\int_{-\infty}^\infty e^{-(t+n\sqrt{\log AB})^2}dt =\sum_{n=0}^N (A/B)^n\int_{-\infty}^\infty e^{-t^2-2nt\sqrt{\log AB}}dt$$ $$=\int_{-\infty}^\infty e^{-t^2}\sum_{n=0}^N (A/B)^ne^{-2nt\sqrt{\log AB}}dt=\int_{-\infty}^\infty e^{-t^2}\frac{1- (A/B)^{N+1}e^{-2(N+1)t\sqrt{\log AB}}}{1- (A/B)e^{-2t\sqrt{\log AB}}}dt$$
For $$A,B$$ fixed, since $$\sqrt{\log AB}$$ is purely imaginary then $$|e^{-t^2} \frac{e^{-2(N+1)t\sqrt{\log AB}}}{1- (A/B)e^{-2t\sqrt{\log AB}}}|$$ is bounded in $$L^1$$ norm so that $$\int_{-\infty}^\infty e^{-t^2} \frac{(A/B)^{N+1}e^{-2(N+1)t\sqrt{\log AB}}}{1- (A/B)e^{-2t\sqrt{\log AB}}}dt\to 0$$ thus
$$\sqrt{\pi}\sum_{n=0}^\infty (AB)^{n^2}(A/B)^n=\int_{-\infty}^\infty e^{-t^2}\frac{1}{1- (A/B)e^{-2t\sqrt{\log AB}}}dt$$ Note sure if the last result can be extended by analytic continuation.
• Can you please explain the step you did when you used Cauchy theorem, i did not understand why an $\infty$ came above the summation May 30 '20 at 10:26
• The $\infty$ is a typo, I edited my sloppy answer several times until it was correct @Pj30 May 31 '20 at 6:54