Periods of the $j$-function along infinite geodesics and mock modular forms
Zagier's well-known work on traces of singular moduli relates the coefficients of certain weakly holomorphic modular forms of weight $1/2$ to traces of values of the modular $j$-function at imaginary quadratic points. A real quadratic analogue was recently studied by Duke, Imamoglu, and Tóth. They showed that the coefficients of certain weight $1/2$ mock modular forms \[ f_D = \sum_{d>0} a(d,D) q^d, \qquad D>0 \] are given in terms of traces of cycle integrals of the $j$-function. Their result applies to those coefficients $a(d,D)$ for which $dD$ is not a square. Recently Bruinier, Funke, and Imamoglu employed a regularized theta lift to show that the coefficients $a(d,D)$ for square $dD$ are traces of regularized integrals of the $j$-function. In the present paper we provide an alternate approach to this problem. We introduce functions $j_{m,Q}$ (for $Q$ a quadratic form) which are related to the $j$-function and show, by modifying the method of Duke, Imamoglu, and Tóth, that the coefficients for which $dD$ is a square are traces of cycle integrals of the functions $j_{m,Q}$.