1 Introduction

In studying functions of a complex variable, a natural problem is to determine the locations of the zeros of the functions. There are a number of recent interesting results on the zeros of modular forms. For instance, the zeros of Hecke eigenforms of integer weight k become equidistributed in the fundamental domain as \(k \rightarrow \infty \) (see [10, 17]), yet such forms still have many zeros on the boundary and center line of the fundamental domain [7, 13].

Duke and the second author [5] studied zero locations for a canonical basis \(\{f_{k, m}(\tau )\}\) for spaces of integer weight weakly holomorphic modular forms for \({\text{ SL }}_2(\mathbb {Z})\). If the weight \(k \in 2\mathbb {Z}\) is written as \(12\ell + k'\) with \(k' \in \{0, 4, 6, 8, 10, 14\}\), then the basis elements have Fourier expansions of the form \(f_{k, m}(\tau ) = q^{-m} + O(q^{\ell +1})\), where \(q = e^{2\pi i \tau }\) as usual. If \(m \ge |\ell |-\ell \), then all of the zeros of \(f_{k, m}(\tau )\) in the standard fundamental domain for \({\text{ SL }}_2(\mathbb {Z})\) lie on the unit circle. These results were extended [6, 9] to similar canonical bases \(\{f_{k, m}^{(N)}(\tau )\}\) for the spaces \(M_k^{\sharp }(N)\) of weakly holomorphic modular forms of integer weight k and level \(N = 2, 3, 4\) with poles only at the cusp at \(\infty \), showing that many of the zeros of the basis element \(f_{k, m}^{(N)}(\tau )\) lie on an appropriate arc if m is large enough.

For spaces of modular forms with weight \(k \in \mathbb {Z}+\frac{1}{2}\), canonical bases with similar Fourier expansions exist. Zagier [20] defined such bases for spaces of weakly holomorphic modular forms of level 4 and weights \(\frac{1}{2}\) and \(\frac{3}{2}\) satisfying Kohnen’s plus space condition, and analogous bases were shown in [4] to exist in level 4 for all weights \(k \in \mathbb {Z}+\frac{1}{2}\). In this paper, we address the natural question of whether the zeros of the modular forms in such a basis lie on an arc.

Let \(\vartheta (\tau )\) be the theta function \(\vartheta (\tau ) = \sum _{n\in \mathbb Z} q^{n^2}\). For \(k = s + \frac{1}{2}\) with \(s \in \mathbb {Z}\), let \(M_k^!\) denote the space of holomorphic functions on the upper half \(\mathcal {H}\) of the complex plane which may have poles at the cusps, which transform like \(\vartheta ^{2k}\) under the action of the group \(\Gamma _0(4)\), and which satisfy Kohnen’s plus space condition, so that their Fourier expansion is of the form \(\sum _{(-1)^s n \equiv 0, 1 \pmod {4}} a(n) q^n\). As shown in [4], the space \(M_k^!\) has a canonical basis of modular forms \(\{f_{k, m}(\tau )\}\) with Fourier expansion given by

$$\begin{aligned} f_{k, m}(\tau ) = q^{-m} + O(q^{N+1}), \end{aligned}$$

where N depends only on k. Decompose the integer s as \(s = 12a + b\), where \(a \in \mathbb {Z}\) and

$$\begin{aligned} b \in \{6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 19\}. \end{aligned}$$

[This set of representatives for \(b \pmod {12}\) was chosen in [4] as the smallest b for which the first two basis elements of \(M_{b+\frac{1}{2}}^!\) are holomorphic.] We show in Sect. 2 that each of these basis elements \(f_{k, m}(\tau )\) has exactly \(5a + \frac{5m}{4} + \frac{b}{2} - C - \epsilon \) zeros in a fundamental domain for \(\Gamma _0(4)\), where \(C \in \left\{ \frac{3}{4}, 1, \frac{3}{2}, \frac{7}{4} \right\} \) depends only on b and the parity of m, and where the nonnegative integer \(\epsilon \), defined precisely in Sect. 2, counts the number of initial zeros in a certain sequence of Fourier coefficients of \(f_{k, m}\).

Let \(\mathcal {A}\) be the arc in the upper half plane given by

$$\begin{aligned} \mathcal {A} = \left\{ \left. -\frac{1}{4} + \frac{1}{4}e^{i\theta } \ \right| \ 0< \theta < \pi \right\} . \end{aligned}$$

In this paper, we will prove the following theorem about the zeros of the basis elements \(f_{k, m}(\tau )\).

Theorem 1.1

For \(k \in \mathbb {Z}+\frac{1}{2}\), assume the notation above. There are absolute, positive constants A and B such that if \(m \ge A|a| + B\), then at least \(2a + \frac{m}{2}\) of the \(5a + \frac{5m}{4} + \frac{b}{2} - C - \epsilon \) zeros of \(f_{k, m}\) in a fundamental domain for \(\Gamma _0(4)\) lie on the arc \(\mathcal {A}\). Additionally, \(A \le 9\) and \(B \le 109\).

The proof of the theorem uses contour integration on a generating function for the canonical basis elements \(f_{k, m}\) to approximate \(f_{k, m}\) by a real-valued trigonometric function on \(\mathcal {A}\). We note that for specific values of k, the bounds on A and B and the quantity \(2a+\frac{m}{2}\) can often be improved; for instance, if \(a \ge 0\) we may take \(A = 0\).

In the case of weight \(k=\frac{3}{2}\), Theorem 1.1 yields an interesting corollary pertaining to weak Maass forms and mock modular forms. Loosely speaking, a weak Maass form is a smooth complex function defined on the upper half of the complex plane which transforms like a modular form, but is not necessarily holomorphic. Such a function must also be annihilated by a Laplacian operator, and satisfy suitable growth conditions in the cusps. From the definition, it follows that a weak Maass form naturally decomposes into two parts, a “holomorphic part,” and a “non-holomorphic” part; the holomorphic parts are commonly referred to as mock modular forms (see [1] or [14], for example). A first example of a half-integral weight weak Maass form arises from the function

$$\begin{aligned} \vartheta (\tau )^3 = 1 + 6\tau + 12 q^2 + 8 q^3 + 6 q^4 + 24 q^5 + 24 q^6 + 12 q^8 + \cdots . \end{aligned}$$

If we define its Fourier coefficients by \(\vartheta (\tau )^3 =: \sum _{n\ge 0} h(n) q^n\), then it was proved by Gauss that

$$\begin{aligned} h(n) = {\left\{ \begin{array}{ll} 12 H(4n), &{} n\equiv 1,2 \pmod {4}, \\ 24 H(n), &{} n\equiv 3 \pmod {8}, \\ h\left( \frac{n}{4}\right) , &{} n\equiv 0 \pmod {4}, \\ 0, &{} n\equiv 7 \pmod {8}, \end{array}\right. } \end{aligned}$$

where the values H(n) are the Hurwitz class numbers. Let \(\mathcal G(\tau ) := -\frac{1}{12} + \sum _{n\ge 1} H(n) q^n\) be the generating function for the Hurwitz class numbers. Zagier [19] beautifully showed that \(\mathcal G \) is in fact the holomorphic part of a weak Maass form. More precisely, Zagier showed that the function

$$\begin{aligned} G(\tau ) := \mathcal G(\tau ) + \frac{1}{8\sqrt{\pi }} \sum _{n\in \mathbb Z} n \Gamma \left( -\frac{1}{2},4\pi n^2 \text {Im}(\tau )\right) q^{-n^2} \end{aligned}$$

is a weight \(\frac{3}{2}\) weak Maass form of moderate growth on \(\Gamma _0(4)\). Here, \(\Gamma (\cdot ,\cdot )\) denotes the incomplete gamma function.

By work of Bruinier, the second author, and Ono [2], it turns out that Zagier’s weak Maass form G is naturally related to the basis functions \(f_{\frac{3}{2},m}\) studied here, for any positive integer \(m\equiv 0,1 \pmod {4}\) which is a square. Precisely, for such m, the authors show that

$$\begin{aligned} f_{\frac{3}{2},m} = 24 G + F_{-m,\frac{3}{2}}^+ , \end{aligned}$$

where the functions

$$\begin{aligned} F_{-m,k}^+(\tau ) := \tfrac{3}{2} F_{-m}(\tau ,\tfrac{k}{2}) |_k \ \text {pr} \end{aligned}$$

are the weight k and index m Poincaré series defined in [2, (3.13)], which are weight k weak Maass forms of level 4. Denote the holomorphic part of \(F_{-m,\frac{3}{2}}^+ \) by \( \mathcal {F}_{-m,\frac{3}{2}}^+\). Because \(f_{\frac{3}{2}, m}\) is weakly holomorphic, we must have that

$$\begin{aligned} f_{\frac{3}{2},m} = 24 \mathcal G + \mathcal {F}_{-m,\frac{3}{2}}^+ . \end{aligned}$$

That is, the basis elements \(f_{\frac{3}{2},m} \) may be expressed as the sum of two mock modular forms, one of which is the generating function \(24\mathcal G \) for Hurwitz class numbers, and the other of which is the holomorphic part of the Poincaré series \(F_{-m,\frac{3}{2}}^+ \). By Theorem 1.1, the basis functions \(f_{\frac{3}{2}, m} \) have many zeros on \(\mathcal {A}\); thus, it must be the case that the mock modular forms given by \(24\mathcal G \) and \(\mathcal {F}_{-m,\frac{3}{2}}^+ \) take on equal and opposite values at many points on \(\mathcal {A}\). Precisely, we have the following theorem.

Theorem 1.2

Given the above conditions on m, there are at least \(\frac{m}{2} - 1\) points \(\tau _j^{(m)}\) on the arc \(\mathcal {A}\) at which the mock modular generating function for Hurwitz class numbers \(\mathcal G\) and the mock modular Poincaré series \(\frac{-1}{24}\mathcal {F}_{-m,\frac{3}{2}}^+\) take on equal values. That is, for such points \(\tau _j^{(m)}\), we have that

$$\begin{aligned} \mathcal G(\tau _j^{(m)}) = \tfrac{-1}{24} \mathcal {F}_{-m,\frac{3}{2}}^+(\tau _j^{(m)}). \end{aligned}$$

We note that a direct application of Theorem 1.1 gives \(\frac{m}{2} -2\) zeros of the form \(f_{\frac{3}{2}, m}\); however, the proof of Theorem 1.1 in Sect. 3 shows that for the weight \(k=\frac{3}{2}\), with \(b=13\), there is at least one extra zero.

Our results also lead to an interesting corollary in the case of weight \(\frac{3}{2}\) for any positive integer \(m\equiv 0,1 \pmod {4}\) which is not a square. In this case, it turns out that Theorem 1.1 provides information about the zeros of the Poincaré series \(F_{-m,\frac{3}{2}}^+\) themselves. Previously, Rankin [16] addressed the problem of understanding the number of zeros of general Poincaré series of level 1 and even integer weight at least 4, and gave an explicit bound on the number of zeros lying on the intersection of the standard fundamental domain with the boundary of the unit disk. Our work leads to results analogous to those of Rankin in the case of weight \(\frac{3}{2}\), by virtue of the fact that for positive integers \(m\equiv 0,1\pmod {4}\) such that m is not a square, we have from [2] that \(f_{\frac{3}{2},m} = F_{-m,\frac{3}{2}}^+ \). Thus, we have the following Corollary to Theorem 1.1, giving locations for the zeros of certain weight \(\frac{3}{2}\) Poincaré series. The number \(C_m\) is equal to \(\frac{3}{2}\) or \(\frac{3}{4}\), depending on whether m is even or odd.

Corollary 1.3

Assume the notation above, and let \(m\equiv 0,1 \pmod {4}\) such that m is not a square. There is an absolute positive constant A such that if \(m \ge A\), then at least \(\frac{m}{2}\) of the \(\frac{5m}{4}+\frac{3}{2} - C_m - \epsilon \) zeros of the Poincaré series \(F_{-m,\frac{3}{2}}^+ \) in a fundamental domain for \(\Gamma _0(4)\) lie on the arc \(\mathcal {A}\). Additionally, \(A \le 111\).

We note again that the bounds appearing here, for \(k = \frac{3}{2}\), are better than appear in the general statement of Theorem 1.1. Details supporting this computation appear in Sect. 6.

As an additional application, for any weight \(k \in \mathbb {Z}+\frac{1}{2}\), Theorem 1.1 implies the following non-vanishing theorem for coefficients of modular forms in the canonical basis for \(M_{2-k}^!\).

Theorem 1.4

Assume the notation from Theorem 1.1. Let \(m \ge A\left| a\right| +B\) with \(m \equiv 0, (-1)^{s-1} \pmod {4},\) and let \(\{f_{2-k, i}(\tau )\}\) be the canonical basis for the space \(M_{2-k}^!\). For any integer \(M > 3a + \frac{3m}{4} + \frac{b}{2} - C\), it is impossible for the Fourier coefficients of \(q^m\) in each of the first M basis elements \(f_{2-k, i}(\tau )\) with \(i \not \equiv m \pmod {4}\) to simultaneously vanish.

If \(2-k\) is positive and large enough, many of the basis elements in Theorem 1.4 are actually cusp forms. An analogous result in integer weights would resemble a weaker form of Lehmer’s conjecture on the nonvanishing of the coefficients of the cusp form \(\Delta (\tau )\), since \(\Delta \) is the first canonical basis element \(f_{12, -1}\) of weight 12. See also [3] for additional results on the nonvanishing of coefficients of cusp forms of half integral weight.

In Sect. 2 of this paper, we give definitions, notation, and the proof of Theorem 1.4. The main argument in the proof of Theorem 1.1 appears in Sect. 3, with associated computations appearing in Sects. 45, and 6.

2 Definitions

As before, let \(k = s + \frac{1}{2}\) be half integral, and write \(s = 12a + b = 6\ell + \frac{k'}{2}\) with \(a, \ell \in \mathbb {Z},\) and

$$\begin{aligned} b \in \{6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 19\} \end{aligned}$$

and \(k' \in \{0, 4, 6, 8, 10, 14\}\). The basis elements \(f_{k, m}(\tau )\) for the space \(M_k^!\) of weakly holomorphic modular forms of weight k and level 4 satisfying Kohnen’s plus space condition are constructed explicitly in [4] in terms of the weight 2, level 4 Eisenstein series given by

$$\begin{aligned} F(\tau ) = \sum _{n=0}^\infty \sigma (2n+1)q^{2n+1}, \end{aligned}$$

the weight 12, level 1 cusp form \(\Delta (\tau )\), and the theta function \(\vartheta (\tau ) = \sum _{n \in \mathbb {Z}} q^{n^2} \in M_{\frac{1}{2}}^!\), which transforms under \(\gamma = \left( {\begin{matrix} a &{} b \\ c &{} d\end{matrix}}\right) \in \Gamma _0(4)\) with character \( \rho = \rho _\gamma := \left( \frac{c}{d}\right) \varepsilon _d^{-1} ,\) where \(\varepsilon _d\) is equal to 1 or i, depending on whether d is congruent to 1 or 3 \(\pmod 4\). The basis elements have a Fourier expansion given by

$$\begin{aligned} f_{k, m}(\tau ) = q^{-m} + \mathop {\sum _{n > N}}_{(-1)^s n \equiv 0, 1\pmod {4}}a_k(m, n) q^n. \end{aligned}$$

Here N is equal to \(2\ell \) if \(\ell \) is even and \(2\ell - (-1)^s\) if \(\ell \) is odd, and \(m \ge -N\) satisfies \((-1)^{s-1}m \equiv 0, 1\pmod {4}\). All of the coefficients \(a_k(m, n)\) are integers.

Any fundamental domain for \(\Gamma _0(4)\) has three cusps, which we take to be at \(\infty , 0\), and \(\frac{1}{2}\) and which have widths 1, 4, 1 respectively. We use a fundamental domain \(\mathcal {F}\) bordered by the vertical lines with real part \(\pm \frac{1}{2}\) and the semicircles defined by \(\pm \frac{1}{4} + \frac{1}{4}e^{i\theta }\) for \(\theta \in [0, \pi ]\) (Fig. 1).

Fig. 1
figure 1

Fundamental domain \(\mathcal F\) for \(\Gamma _0(4)\)

The valence formula for \(\Gamma _0(4)\) (see, for instance, [15]) tells us that for a modular form f of half integral weight k for \(\Gamma _0(4)\), we have

$$\begin{aligned} \sum _{\tau \in \mathcal {F}} \text {Ord}_{\Gamma _0(4)}(f, \tau ) + \sum _{\zeta \in \{\infty , 0, \frac{1}{2}\}} \text {Ord}_{\Gamma _0(4)}(f, \zeta ) = \frac{k}{2}. \end{aligned}$$

Here, for points \(\tau \) in the upper half plane, \(\text {Ord}_{\Gamma _0(4)}(f, \tau ) = \text {ord}_{\Gamma _0(4)}(f, \tau )\), the usual order of f as an analytic function at \(\tau \). For the cusps \(\zeta \in \{ \infty , 0, \frac{1}{2}\}\), the quantity \(\text {Ord}_{\Gamma _0(4)}(f, \zeta )\) is determined by the q-expansion at each cusp. Specifically, \(\text {Ord}_{\Gamma _0(4)}(f, \infty )\) is the smallest exponent in the q-expansion of f at \(\infty \), while for the cusp at 0 we multiply the smallest power of q in the Fourier expansion of f at 0 by the cusp width 4 to get \(\text {Ord}_{\Gamma _0(4)}(f, 0)\). For the cusp at \(\frac{1}{2}\) the cusp width is 1, and we find that \(\text {Ord}_{\Gamma _0(4)}(f, \frac{1}{2})\) is again the smallest exponent in the q-expansion at the cusp, but we note that since \(\frac{1}{2}\) is an irregular cusp for \(\Gamma _0(4)\) for weights in \(\mathbb {Z}+\frac{1}{2}\), this exponent will be in \(\mathbb {Z}+\frac{1}{4}\) if s is odd and in \(\mathbb {Z}+\frac{3}{4}\) if s is even. For example, we find that for \(\vartheta (\tau ) \in M_{\frac{1}{2}}^!\), we have

$$\begin{aligned} \text {Ord}_{\Gamma _0(4)}(\vartheta , \infty )= & {} 0, \\ \text {Ord}_{\Gamma _0(4)}(\vartheta , 0)= & {} 0, \\ \text {Ord}_{\Gamma _0(4)}\big (\vartheta , \frac{1}{2}\big )= & {} \frac{1}{4}.\\ \end{aligned}$$

We next want to understand the behavior of the basis element \(f_{k, m}(\tau )\) at the cusps at 0 and \(\frac{1}{2}\). To do so, we use the \(N=4\) case of a theorem appearing in [8] for levels 12, 20, 28, 52. Performing explicit computations with the projection operator similar to those in [12], we find that if \(g(\tau ) \in M_k^!(4)\), then the expansions of g at the cusps at 0 and \(\frac{1}{2}\) are given by

$$\begin{aligned} g^{(0)}(\tau )&= C_1\left( g\left( \frac{\tau -1}{16}\right) +g\left( \frac{\tau +7}{16}\right) \right) ,\\ g^{(\frac{1}{2})}(\tau )&= C_2\left( g\left( \frac{2\tau +1}{8}\right) - g\left( \frac{2\tau -3}{8}\right) \right) , \end{aligned}$$

where \(C_1\) and \(C_2\) are constants. Thus, if the Fourier expansion of \(g(\tau )\) is given by \(g(\tau ) = \sum a(n) q^n\), we have

$$\begin{aligned} g^{(0)}(\tau ) = C_1 \sum _n \left( a(n) e^{2\pi i n (\frac{\tau -1}{16})} + a(n) e^{2\pi i n (\frac{\tau +7}{16})}\right) , \end{aligned}$$

and since \(\frac{\tau -1}{16}\) and \(\frac{\tau +7}{16}\) differ by exactly \(\frac{1}{2}\), then the two terms cancel when n is odd. Since \(n \equiv 0, (-1)^s \pmod {4}\), this gives

$$\begin{aligned} g^{(0)}(\tau ) = 2 C_1 \sum _n a(4n) e^{2\pi i n (\frac{\tau -1}{4})}. \end{aligned}$$

Similarly, we get cancellation for even exponents n in the expansion of \(g^{(\frac{1}{2})}(\tau )\), resulting in the expansion

$$\begin{aligned} g^{(\frac{1}{2})}(\tau ) = 2 C_2 \sum _{n \equiv (-1)^s \pmod {4}} a(n) e^{2\pi i n (\frac{2\tau +1}{8})}. \end{aligned}$$

Examining this Fourier expansion, we see that the orders of vanishing of a modular form of half integral weight in the Kohnen plus space at the cusps \(0, \frac{1}{2}\) of \(\Gamma _0(4)\) are related to the Fourier expansion of the form at the cusp at \(\infty \). Specifically, if

$$\begin{aligned} f(\tau ) = \sum _{4n \ge n_0} a(4n) q^{4n} + \sum _{4n+(-1)^s \ge n_1} a(4n + (-1)^s) q^{4n+(-1)^s}\end{aligned}$$

with \(a(n_0), a(n_1) \ne 0\), then we have

$$\begin{aligned} \text {Ord}_{\Gamma _0(4)}(f, \infty )= & {} \min \{n_0, n_1\},\\ \text {Ord}_{\Gamma _0(4)}(f, 0)= & {} \frac{n_0}{16}\cdot 4 = \frac{n_0}{4},\\ \text {Ord}_{\Gamma _0(4)}\big (f, \frac{1}{2}\big )= & {} \frac{2n_1}{8} = \frac{n_1}{4}. \end{aligned}$$

For example, let \(f_{k, m}(\tau )\) be a basis element for \(M_k^!\), where \(k = 12a + b + \frac{1}{2}\) and \(b=6\). The Fourier expansion is \(f_{k, m}(\tau ) = q^{-m} + O(q^{4+4a})\) and has exponents congruent to 0 or \(1 \pmod {4}\), and we note that \(f_{k, m}(\tau )\) vanishes to order \(-m\) at the cusp at \(\infty \). Thus, if m is even, it follows that \(\text {Ord}_{\Gamma _0(4)}(f, 0)\) is \(-\frac{m}{4}\), while \(\text {Ord}_{\Gamma _0(4)}(f, \frac{1}{2})\) is at least \(\frac{4 + 4a + 1}{4} = a + \frac{5}{4}\), with equality if the coefficient of \(q^{4+4a+1}\) is nonzero. If this coefficient is zero, then the first odd exponent in the Fourier expansion is \(4+4a+1+4\epsilon \) for some positive \(\epsilon \in \mathbb {Z}\), which means that \(\text {Ord}_{\Gamma _0(4)}(f, \frac{1}{2})\) is equal to \(\frac{4+4a+4\epsilon + 1}{4} = a + \frac{5}{4} + \epsilon \). If m is odd, then \(\text {Ord}_{\Gamma _0(4)}(f, \frac{1}{2}) = -\frac{m}{4}\), and \(\text {Ord}_{\Gamma _0(4)}(f, 0)\) is equal to \(1+a+\epsilon \) for some nonnegative integer \(\epsilon \), with \(\epsilon = 0\) only if the coefficient of \(q^{4+4a}\) is nonzero. Applying the valence formula, we find that there must be \(5a + \frac{5m}{4} + \frac{b}{2} - 1 - \epsilon \) zeros in the fundamental domain if m is even, and \(5a + \frac{5m}{4} + \frac{b}{2} - \frac{3}{4} - \epsilon \) zeros in the fundamental domain if m is odd.

Writing \(k = 12a + b + \frac{1}{2}\) as before, similar computations for each value of b show that \(f_{k, m}(\tau )\) has \(5a + \frac{5m}{4} + \frac{b}{2} - C - \epsilon \) zeros in \(\mathcal {F}\), where the constant C is as follows.

$$\begin{aligned} \begin{array}{lcl} C&{}=&{}1 \text { if } m \text { is even and } b \text { is even}; \\ C&{}=&{}\frac{3}{2} \text { if } m \text { is even and } b \text { is odd};\\ C&{}=&{}\frac{3}{4} \text { if } m \text { is odd and } b \in \{6, 8, 9, 10, 11, 13\};\\ C&{}=&{}\frac{7}{4} \text { if } m \text { is odd and } b \in \{12, 14, 15, 16, 17, 19\}. \end{array} \end{aligned}$$

Because \((-1)^{s-1} m \equiv 0, 1 \pmod {4}\), it can be checked that the number of zeros in \(\mathcal {F}\) is always an integer, as expected.

Examining the Fourier expansion

$$\begin{aligned} f_{k, m}(\tau ) = q^{-m} + \mathop {\sum _{n > N}}_{(-1)^s n \equiv 0, 1\pmod {4}}a_k(m, n) q^n, \end{aligned}$$

we see that the quantity \(\epsilon \) counts the number of initial consecutive coefficients which are equal to zero in (depending on the parity of m) either the sequence \(\{a_k(m, N+4), a_k(m, N+8), a_k(m, N+12), \ldots \}\), or the appropriate sequence \(\{a_k(m, N+1), a_k(m, N+5), a_k(m, N+9), \ldots \}\) or \(\{a_k(m, N+3), a_k(m, N+7), a_k(m, N+11), \ldots \}\).

Since Theorem 1.1 gives lower bounds on the number of zeros in the upper half plane, we can find upper bounds for \(\epsilon \). Specifically, we find that

$$\begin{aligned} \epsilon \le 3a + \frac{3m}{4} + \frac{b}{2} - C, \end{aligned}$$

so if m is large enough compared to \(\left| a\right| \) it is impossible to have more than this many consecutive coefficients of even or odd powers of q (starting from \(q^N\)) vanishing in the Fourier expansion of \(f_{k, m}(\tau )\). Because the Fourier coefficients \(a_k(m, n)\) of the basis elements \(f_{k, m}(\tau )\) satisfy the Zagier duality relation

$$\begin{aligned} a_k(m, n) = -a_{2-k}(n, m), \end{aligned}$$

as proved in [4], we may apply this duality to give Theorem 1.4.

3 Proof of Theorem 1.1

In this section, we prove Theorem 1.1, relying upon Theorems 4.1 and 5.1, which will be established in Sects. 4 and 5. We begin with the generating function for the basis elements \(f_{k,m}\), which is given by

$$\begin{aligned} B_k(z; \tau ) = \sum _m f_{k,m}(z) q^m = \frac{f_k(z)f_{2-k}^*(\tau ) + f_k^*(z)f_{2-k}(\tau )}{j(4\tau )-j(4z)}, \end{aligned}$$

where \(q=e^{2\pi i \tau }\). The weakly holomorphic modular forms \(f_k\) and \(f_k^*\), defined in [4], are the first two elements of the canonical basis for \(M_k^!\).

We fix z to be on the lower left arc \(\mathcal {A}\) of the fundamental domain \(\mathcal F\), and write \(z = -\frac{1}{4} + \frac{e^{i\theta }}{4}\) for some \(0< \theta < \pi \). By Cauchy’s theorem, we have that

$$\begin{aligned} f_{k,m}(z) = \frac{1}{2\pi i}\int _{d_\varepsilon } \frac{ B_k(z;\tau )}{q^{m+1}} dq =\int _{-\frac{1}{2} + i \varepsilon }^{\frac{1}{2} + i \varepsilon } B_k(z;\tau ) e(-m\tau ) d\tau , \end{aligned}$$
(1)

where \(d_\varepsilon \) is a circular contour traversed counterclockwise about the origin, with radius \(e^{-2\pi \varepsilon }\) for some sufficiently large real number \(\varepsilon > \frac{1}{4}\). Consider the contour \(C_v\) from \(\tau = -\frac{1}{2} + i v\) to \(\tau = \frac{1}{2} + iv\) for some fixed sufficiently small v, with \(\varepsilon>v>0\), and let \(W_{\varepsilon ,v}\) be the rectangular region whose boundary is determined by the vertices \(\pm \tfrac{1}{2} +i\varepsilon , \pm \tfrac{1}{2}+iv\). We have by the residue theorem and (1) that

$$\begin{aligned} f_{k,m}(z) = -2\pi i \sum _{w} \displaystyle \mathop { Res }_{\tau = w} \left( B_k(z;\tau )e(-m\tau )\right) + \int _{-\frac{1}{2} + i v}^{\frac{1}{2} + i v} B_k(z;\tau ) e(-m\tau ) d\tau , \end{aligned}$$
(2)

where the sum above runs through the poles w of the function \( B_k(z;\tau )e(-m\tau )\), when viewed as a function of \(\tau \), in the region \(W_{\varepsilon , v}\). We explicitly determine these residue sums in Theorem 4.1 for all z with \(\theta \in [\frac{\pi }{3}, \frac{2\pi }{3}]\). Using that result, we conclude that for z along this arc, the (normalized) basis functions \(f_{k,m}\) satisfy

$$\begin{aligned} e^{\frac{ik\theta }{2}} e^{-\frac{\pi m}{2} \sin (\theta )} f_{k,m}(z)&= 2 \cos \left( \frac{k\theta }{2} + \frac{\pi m}{2} - \frac{\pi m \cos (\theta )}{2}\right) \\&\quad + \mathcal E_{m,k}(\theta ) + e^{\frac{ik\theta }{2}} e^{-\frac{\pi m}{2} \sin (\theta )}\int _{-\frac{1}{2} + iv}^{\frac{1}{2} + iv} B_k(z;\tau ) e(-m\tau ) d\tau . \end{aligned}$$

Here the function \(\mathcal E_{m,k}\) is equal to either \(0, \mathcal C_{m,k}\) or \(\mathcal D_{m,k}\), depending on the value of \(\theta \); the functions \(\mathcal C_{m,k}\) and \(\mathcal D_{m,k}\) are defined in (4) and (5), respectively.

A short calculation, using the addition formula for cosine, reveals that

$$\begin{aligned} \cos&\left( \frac{k\theta }{2} + \frac{\pi m}{2} - \frac{\pi m \cos (\theta )}{2}\right) \nonumber \\&= {\left\{ \begin{array}{ll} -\sin \left( h_{k,m}(\theta )\right) , &{} \text { if } m\equiv 1 \!\!\!\pmod {4} \text { and } k+\frac{1}{2} \equiv 0 \!\!\!\pmod {2}, \\ \sin \left( h_{k,m}(\theta )\right) , &{} \text { if } m\equiv 3 \!\!\!\pmod {4} \text { and } k+\frac{1}{2} \equiv 1 \!\!\!\pmod {2}, \\ \cos \left( h_{k,m}(\theta )\right) , &{} \text { if } m\equiv 0 \!\!\!\pmod {4}, \end{array}\right. } \end{aligned}$$
(3)

where

$$\begin{aligned} h_{k,m}(\theta ) := \frac{k\theta }{2} - \frac{\pi m \cos (\theta )}{2}. \end{aligned}$$

The function \(\sin (h_{k,m}(\theta ))\) oscillates between \(\pm 1\) when \(h_{k,m}(\theta ) = \frac{\pi }{2}(2n+1)\) and n runs through \(\mathbb Z\). Similarly, \(\cos (h_{k,m}(\theta ))\) oscillates between \(\pm 1\) when \(h_{k,m}(\theta ) = \pi n\) and n runs through \(\mathbb Z\). Looking at the endpoints of the interval containing \(\theta \), we have that

$$\begin{aligned} h_{k,m}\left( \frac{ \pi }{3}\right) = \frac{\pi }{2}\left( \frac{k}{3} - \frac{m}{2}\right) , \ \ h_{k,m}\left( \frac{2\pi }{3}\right)&= \pi \left( \frac{k}{3} + \frac{m}{4}\right) . \end{aligned}$$

Counting odd integers in the interval

$$\begin{aligned} \left[ \frac{k}{3}-\frac{m}{2}, \frac{2k}{3} + \frac{m}{2}\right] \end{aligned}$$

and integers in the interval

$$\begin{aligned} \left[ \frac{k}{6}-\frac{m}{4}, \frac{k}{3} + \frac{m}{4}\right] , \end{aligned}$$

we conclude that in all three cases of (3) there are at least \(2a + \frac{m}{2} + 1\) points on \(\mathcal {A}\) with \(\frac{\pi }{3}< \theta < \frac{2\pi }{3}\) where

$$\begin{aligned} 2 \cos \left( \frac{k\theta }{2} + \frac{\pi m}{2} - \frac{\pi m \cos (\theta )}{2}\right) = \pm 2. \end{aligned}$$

More specifically, if \(k = 12a + b + \frac{1}{2}\), we find that there are at least \(2a + \lfloor \frac{m}{2} \rfloor + c\) points on the arc where the function is \(\pm 2\), where c depends on b and the parity of m and is given in Table 1.

Table 1 Values of c for each b

By an argument similar to that in section 4 of [9], we find that for any modular form \(f \in M_k^!\), the quantity \(e^{\frac{ik\theta }{2}} f(z)\) is real-valued for any \(z \in \mathcal {A}\). We note that the function \(2\cos (\frac{\pi m}{2} + h_{k, m}(\theta ))\) is real-valued as well, and prove in Lemma 6.1 and Sect. 6 that the quantity

$$\begin{aligned} \mathcal E_{m,k}(\theta ) + e^{\frac{ik\theta }{2}} e^{-\frac{\pi m}{2} \sin (\theta )}\int _{-\frac{1}{2} + iv}^{\frac{1}{2} + iv} B_k(z;\tau ) e(-m\tau ) d\tau \end{aligned}$$

is bounded in absolute value by 2. Since the real-valued normalized modular form must be alternately positive and negative at \(2a + \frac{m}{2} + 1\) points along \(\mathcal {A}\), we apply the Intermediate Value Theorem to see that it must be zero at \(2a + \frac{m}{2}\) distinct points on \(\mathcal {A}\), and Theorem 1.1 follows.

4 Residue sums

Essential to our proof of Theorem 1.1 in the previous section is an explicit determination of the residue sums in (2) for many different values of \(z = -\frac{1}{4} + \frac{e^{i\theta }}{4}\) on the arc \(\mathcal {A}\). We do so in Theorem 4.1 below. To describe this result, we define the functions

$$\begin{aligned} \mathcal C_{m,k}(\theta )&:= - c_{m,k}(2i)^{-k}\left( \sin (\tfrac{\theta }{2})\right) ^{-k}e^{-\frac{\pi i m}{4}} e^{\frac{\pi m}{2} \big (\frac{1}{2\tan \left( \frac{\theta }{2}\right) } - \sin (\theta )\big )}, \end{aligned}$$
(4)
$$\begin{aligned} \mathcal D_{m,k}(\theta )&:= - d_{m,k}\cdot 2^{-k} \left( \cos (\tfrac{\theta }{2})\right) ^{-k} e^{\frac{\pi i m}{4}} e^{\frac{\pi m}{2}\big ( \frac{\tan \left( \frac{\theta }{2}\right) }{2} -\sin (\theta )\big ) }, \end{aligned}$$
(5)

where the constants \(c_{m,k}\) and \(d_{m,k}\) are defined by

$$\begin{aligned} c_{m,k}:= & {} {\left\{ \begin{array}{ll} 1+i, &{} m\equiv 0 \pmod 4, \ k+\frac{1}{2} \equiv 1 \pmod 2, \\ 1-i, &{} m\equiv 0 \pmod 4, \ k+\frac{1}{2} \equiv 0 \pmod 2, \\ 0, &{} m\equiv 1 \pmod 4, \ k+\frac{1}{2} \equiv 0 \pmod 2, \\ 0 &{} m\equiv 3 \pmod 4, \ k+\frac{1}{2} \equiv 1 \pmod 2. \end{array}\right. }\end{aligned}$$
(6)
$$\begin{aligned} d_{m,k}:= & {} {\left\{ \begin{array}{ll} 1-i, &{} \text { if } m\equiv 1 \ (\!\!\!\!\mod 4), k+\frac{1}{2} \equiv 0 \ (\!\!\!\!\mod 2), \\ 1+i, &{} \text { if } m\equiv 3 \ (\!\!\!\!\mod 4), k+\frac{1}{2} \equiv 1 \ (\!\!\!\!\mod 2), \\ 0, &{} \text { if } m\equiv 0 \ (\!\!\!\!\mod 4). \end{array}\right. } \end{aligned}$$
(7)

Additionally, we define four smaller arcs \(R_d\) (\(1\le d \le 4\)) contained in \(\mathcal {A}\) by

$$\begin{aligned}&R_1 :=\left\{ \frac{-1+e^{i\theta }}{4} \ \left| \ \theta \in \left[ \frac{5\pi }{12},\frac{\pi }{2}\right) \right. \right\} ,&R_2 := \left\{ \frac{-1+e^{i\theta }}{4} \ \left| \ \theta \in \left( \frac{\pi }{2},\frac{7\pi }{12}\right] \right. \right\} , \ \ \\&R_3 := \left\{ \frac{-1+e^{i\theta }}{4} \ \left| \ \theta \in \left( \frac{\pi }{3},\frac{5\pi }{12}\right] \right. \right\} ,&R_4 := \left\{ \frac{-1+e^{i\theta }}{4} \ \left| \ \theta \in \left[ \frac{7\pi }{12},\frac{2\pi }{3}\right) \right. \right\} . \end{aligned}$$

In what follows, we choose \(v = .2125\) when \(z \in R_1 \cup R_2\) or \(\theta = \frac{\pi }{2}\), and we choose \(v = .1375\) when \(z \in R_3 \cup R_4\).

Theorem 4.1

With notation and hypotheses as above, we have that

$$\begin{aligned}&e^{\frac{ik\theta }{2}}e^{-\frac{\pi m}{2}\sin (\theta )}\int _{-\frac{1}{2} + i v}^{\frac{1}{2} + iv} B_k(z;\tau ) e(-m\tau ) d\tau \\&\;\;= {\left\{ \begin{array}{ll} e^{\frac{ik\theta }{2}} e^{-\frac{\pi m}{2}\sin (\theta )}f_{k,m}(z) - 2 \cos \left( \frac{k\theta }{2} + \frac{\pi m}{2} - \frac{\pi m \cos (\theta )}{2}\right) , &{} \theta \in \left[ \frac{5\pi }{12}, \frac{7\pi }{12}\right] , \\ e^{\frac{ik\theta }{2}}e^{-\frac{\pi m}{2}\sin (\theta )} f_{k,m}(z) \!- 2\cos \left( \tfrac{k\theta }{2} + \tfrac{\pi m}{2} - \tfrac{\pi m \cos (\theta )}{2}\right) + \mathcal C_{m,k}(\theta ), &{} \theta \in \left( \frac{\pi }{3}, \frac{5\pi }{12}\right] , \\ e^{\frac{ik\theta }{2}}e^{-\frac{\pi m}{2}\sin (\theta )} f_{k,m}(z) \!- 2\cos \left( \tfrac{k\theta }{2} + \tfrac{\pi m}{2} - \tfrac{\pi m \cos (\theta )}{2}\right) + \mathcal D_{m,k}(\theta ), &{} \theta \in \left[ \frac{7\pi }{12}, \frac{2\pi }{3}\right) . \end{array}\right. } \end{aligned}$$

Our proof of Theorem 4.1, which begins with Eq. (2), first requires that for a fixed value of z, we determine the location of the poles of the function \(B_k(z;\tau )\) lying in the region \(W_{\varepsilon ,v}\). Since the denominator of \(B_k(z; \tau )\) is \(j(4\tau )-j(4z)\), its poles may occur only at points where this denominator is zero. Thus, for each value of z we examine the set

$$\begin{aligned} \left\{ \tau \in W_{\varepsilon ,v} \ \left| \ j(4\tau ) = j(4z)\right. \right\} . \end{aligned}$$

Fixing \(z\in R_d\) and choosing the values of v noted above, we compute that the function \(B_k(z;\tau )\) has either eight or twelve poles in this region. They occur at points of the form \(\tau = w_M(z)\), where \(w_M(z) = \frac{1}{4} M(4z)\) for each matrix M in a set \(\mathcal {M}_d \subseteq SL _2(\mathbb Z)\). Here M acts on points \(z\in \mathcal {H}\) by \(M(z) = \frac{az+b}{cz+d}\), as usual, and the sets \(\mathcal M_d \) are defined by

$$\begin{aligned} \mathcal M_1&:=\{M_r^{(1)}, M_r^{(3)} \ | \ -1\le r\le 2\}, \\ \mathcal M_2&:=\{M_r^{(1)} \ | \ 0\le r \le 3\} \cup \{M_r^{(3)} \ | \ -2 \le r\le 1\}, \\ \mathcal M_3&:=\{M_r^{(1)}, M_r^{(3)} \ | \ -1\le r \le 2\} \cup \{M_r^{(2)} \ | \ -2\le r \le 1\}, \\ \mathcal M_4&:=\{M_r^{(1)} \ | \ 0\le r \le 3\} \cup \{M_r^{(3)} \ | \ -2\le r \le 1\} \cup \{M_r^{(4)} \ | \ -1\le r \le 2\}, \end{aligned}$$

in terms of the integer matrices

$$\begin{aligned} M_r^{(1)} := \left( {\begin{matrix} 1 &{} r \\ 0 &{} 1\end{matrix}}\right) , \quad M_r^{(2)} := \left( {\begin{matrix} r &{} -1 \\ 1 &{} 0\end{matrix}}\right) , \quad M_r^{(3)} := \left( {\begin{matrix} r &{} r-1 \\ 1 &{} 1\end{matrix}}\right) , \quad M_r^{(4)} := \left( {\begin{matrix} r &{} 2r-1 \\ 1 &{} 2\end{matrix}}\right) . \end{aligned}$$

In the proof, we will need to compute specific values of the function

$$\begin{aligned} A_k(z;\tau ) := \frac{f_k(z)f_{2-k}^*(\tau ) + f_k^*(z)f_{2-k}(\tau )}{\frac{d}{d\tau } j(4\tau )} \end{aligned}$$

when \(\tau \) is equal to one of these poles \(w_M(z)\) of \(B_k(z;\tau )\). These values are given in Proposition 5.1 in Sect. 5, in terms of the constants

$$\begin{aligned} \kappa _{r,k} := {\left\{ \begin{array}{ll} \frac{-1}{8\pi i}(1+i^r), &{} r\equiv 0 \pmod {2}, \\ \frac{-1}{8\pi i}(1+i^r (-1)^{k+\frac{1}{2}}), &{} r\equiv 1 \pmod {2}. \end{array}\right. } \end{aligned}$$

We devote the remainder of this section to the proof of Theorem 4.1.

Proof of Theorem 4.1

We divide the proof into five cases, depending on the value of z. We begin by rewriting \(B_k(z;\tau )\) as

$$\begin{aligned} B_k(z;\tau ) = A_k(z;\tau ) \frac{d}{d\tau } \log \left( \widetilde{j}(\tau )\right) , \end{aligned}$$

and seek to determine

$$\begin{aligned} -2\pi i \mathop {\sum _{\tau = w_M(z) }}_{M\in \mathcal M_d} Res \left( e(-m\tau )A_k(z;\tau ) \frac{d}{d\tau } \log \left( \widetilde{j}(\tau )\right) \right) \end{aligned}$$
(8)

for each \(d\in \{1,2,3,4\}\). The reason for rewriting \(B_k(z;\tau )\) in this way is that \(\widetilde{j}(\tau ) := j(4\tau )-j(4z)\) has a simple zero at any of the poles \(\tau = w_M(z)\) described above, which implies that its logarithmic derivative has simple poles at these points with residue equal to 1. Combining this with Proposition 5.1 allows us to then calculate (8) explicitly. The single case \(z=\frac{-1+i}{4}\), with \(\theta =\frac{\pi }{2}\), is not of this nature, and must be treated slightly differently. We address this in Case 5 below.

Case 1: \(z\in R_1\). For \(z\in R_1\), the function \(B_k(z;\tau )\) has eight poles in \(W_{\varepsilon ,v}\) as described above. From (8) and the discussion following, as well as Proposition 5.1, we find that

$$\begin{aligned}&-2\pi i \mathop {\sum _{\tau = w_M(z) }}_{M\in \mathcal M_1} Res \left( e(-m\tau )A_k(z;\tau ) \frac{d}{d\tau } \log \left( \widetilde{j}(\tau )\right) \right) \nonumber \\&\quad = -2\pi i \left( e(-m z) \sum _{r=-1}^2 e\left( -\frac{m r}{4}\right) \kappa _{r,k} + e(-m u)(4z+1)^{-k} \right. \nonumber \\&\qquad \qquad \qquad \times \left. \left( e\left( \frac{m}{4}\right) \kappa _{-1,k} + \kappa _{0,k} + e\left( -\frac{m}{4}\right) \kappa _{1,k}\right) \phantom {\sum _{r=-1}^2}\right) \end{aligned}$$
(9)
$$\begin{aligned}&\quad = -2\pi i ( e(-mz) + e(-mu)(4z+1)^{-k})\left( e\left( \frac{m}{4}\right) \kappa _{-1,k} + \kappa _{0,k} + e\left( -\frac{m}{4}\right) \kappa _{1,k}\right) . \end{aligned}$$
(10)

Consider the set of ordered pairs

$$\begin{aligned} T&:= \left\{ (m,k)\in \mathbb Z \times \left( \left. \tfrac{1}{2}+\mathbb Z\right) \ \right| \ \begin{array}{l} m \equiv 1\pmod {4} \text { and } k + \frac{1}{2} \equiv 0 \pmod {2} \\ m \equiv 3\pmod {4} \text { and } k + \frac{1}{2} \equiv 1 \pmod {2} \\ m \equiv 0\pmod {4} \end{array} \right\} . \end{aligned}$$

From the definition of \(f_{k, m}\), we know that the pair (mk) must be in the set T. Using this fact, a short calculation using the definition of \(\kappa _{r,k}\) reveals that for \((m,k)\in T\), we have

$$\begin{aligned} e\left( \frac{m}{4}\right) \kappa _{-1,k} + \kappa _{0,k} + e\left( -\frac{m}{4} \right) \kappa _{1,k} = \frac{-1}{2\pi i}. \end{aligned}$$

Next we simplify, using that \(z=-\frac{1}{4} + \frac{1}{4}e^{i\theta }\) and \(u=\frac{z}{4z+1}\), to obtain

$$\begin{aligned} e(-mz) + e(-mu)(4z+1)^{-k}&= e^{-\frac{\pi i m}{2}(-1+\cos (\theta ) + i\sin (\theta ))} + e^{-\frac{\pi i m}{2}(1-\cos (\theta ) + i\sin (\theta ))}e^{-i k \theta } \\&=2e^{\frac{\pi m \sin (\theta )}{2}}e^{-\frac{ik \theta }{2}} \cos \left( \frac{k\theta }{2} + \frac{\pi m}{2} - \frac{\pi m \cos (\theta )}{2}\right) . \end{aligned}$$

Combining the above, we find that (10) reduces to

$$\begin{aligned} 2e^{\frac{\pi m \sin (\theta )}{2}}e^{-\frac{ik \theta }{2}} \cos \left( \frac{k\theta }{2} + \frac{\pi m}{2} - \frac{\pi m \cos (\theta )}{2}\right) . \end{aligned}$$
(11)

We combine this with (2) and multiply through by \(e^{\frac{-\pi m \sin (\theta )}{2}} e^{\frac{i k \theta }{2}}\), which yields Theorem 4.1 in the case \(\theta \in \left[ \frac{5\pi }{12},\frac{\pi }{2}\right) \).

Case 2: \(z\in R_2\). We proceed as in Case 1, and begin with (8). Here, when \(z\in R_2\), the function \(B_k(z;\tau )\) has eight poles in \(W_{\varepsilon ,v}\) as described above. Note that the sets \(\mathcal M_1\) and \(\mathcal M_2\) which determine these poles in Case 1 and Case 2 (respectively) are identical, save for the matrix \(\left( {\begin{matrix} 1 &{} -1 \\ 0 &{} 1\end{matrix}}\right) \) which is replaced by \(\left( {\begin{matrix} 1 &{} 3 \\ 0 &{} 1\end{matrix}}\right) \), and the matrix \(\left( {\begin{matrix} 2 &{} 1 \\ 1 &{} 1\end{matrix}}\right) \) which is replaced by \(\left( {\begin{matrix} -2 &{} -3 \\ 1 &{} 1\end{matrix}}\right) \). It is not difficult to see that \(e\left( \frac{m}{4}\right) = e\left( \frac{-3m}{4}\right) \), and that \(\kappa _{-1,k} = \kappa _{3,k}\), which reveals that the residue contributions arising from \(\left( {\begin{matrix} 1 &{} -1 \\ 0 &{} 1\end{matrix}}\right) \) and \(\left( {\begin{matrix} 1 &{} 3 \\ 0 &{} 1\end{matrix}}\right) \) are the same. Moreover, for \(w=w_{M_r^{(3)}}(z)\) where \(r=\pm 2\), we have from Proposition 5.1 that \(A_k(z,w)(4z+1)^k = \kappa _{1,k}\). Thus, the residue contributions arising from \(\left( {\begin{matrix} 2 &{} 1 \\ 1 &{} 1\end{matrix}}\right) \) and \(\left( {\begin{matrix} -2 &{} -3 \\ 1 &{} 1\end{matrix}}\right) \) are also the same. Thus, Case 2 is identical to Case 1. This yields Theorem 4.1 in the case \(\theta \in \left( \frac{\pi }{2},\frac{7\pi }{12}\right] \).

Case 3: \(z\in R_3\). With \(z\in R_3,\) the function \(B_k(z;\tau )\) has twelve poles in \(W_{\varepsilon ,v}\) as described above. Note that \(\mathcal M_1\subset \mathcal M_3\), thus, for those matrices in \(\mathcal M_3 \cap \mathcal M_1 = \mathcal M_1\), we may use the calculation above in Case 1. The remaining matrices in \(\mathcal M_3\setminus \mathcal M_1\) give the following contribution to the total residue (8):

$$\begin{aligned}&-2\pi i \mathop {\sum _{\tau = w_M(z) }}_{M\in \mathcal M_3 \setminus \mathcal M_1}e(-m \tau ) A_k(z;\tau ) \nonumber \\&\quad = -2 \pi i (4z)^{-k} e\left( \frac{m}{16z}\right) \left[ \kappa _{-1,k} + e\left( \frac{-m}{4}\right) \kappa _{-1,k} + e\left( \frac{m}{4}\right) i^{2k} \kappa _{1,k} + e\left( \frac{m}{2}\right) i^{2k}\kappa _{1,k}\right] \nonumber \\&\quad = (4z)^{-k} \cdot e\left( \frac{m}{16z}\right) \cdot c_{m,k}, \end{aligned}$$
(12)

where the constant \(c_{m,k}\) is defined in (6).

Using the fact that \(z=-\frac{1}{4} + \frac{1}{4}e^{i\theta }\), Eq. (12) becomes

$$\begin{aligned} c_{m,k} \cdot (-1 + e^{i\theta })^{-k} \cdot e\left( \frac{m}{4(-1 + e^{i\theta })}\right)&= c_{m,k} \cdot (-1 + e^{i\theta })^{-k}e\left( \frac{m e^{\frac{-i\theta }{2}}}{8i \sin \left( \tfrac{\theta }{2}\right) }\right) \nonumber \\&= c_{m,k}\cdot (-1 + e^{i\theta })^{-k}e^{\frac{-\pi i m}{4}} e^{\frac{\pi m}{4\tan \left( \frac{\theta }{2}\right) }} \nonumber \\&=c_{m,k}\cdot (2 i)^{-k} \left( \sin \left( \tfrac{\theta }{2}\right) \right) ^{-k} e^{\frac{-ik\theta }{2}} e^{\frac{-\pi i m}{4}} e^{\frac{ \pi m }{ 4\tan \left( \frac{\theta }{2}\right) }}. \end{aligned}$$
(13)

We already showed that (10) reduces to (11). Adding (13) and (11) and then multiplying their sum by \(e^{\frac{ik\theta }{2}} e^{\frac{-\pi m \sin (\theta )}{2}}\) proves Theorem 4.1 in the case \(\theta \in \left( \frac{\pi }{3},\frac{5\pi }{12}\right] \).

Case 4: \(z\in R_4\). With \(z\in R_4,\) the function \(B_k(z;\tau )\) has twelve poles in \(W_{\varepsilon ,v}\). Note that \(\mathcal M_2\subset \mathcal M_4\), so for those matrices in \(\mathcal M_4 \cap \mathcal M_2 = \mathcal M_2\), we may use the calculation above in Case 2, which we showed was identical to Case 1. After some short calculations, proceeding as above, we find that the remaining matrices in \(\mathcal M_4\setminus \mathcal M_2\) give the following contribution to the total residue (8):

$$\begin{aligned}&-2\pi i \mathop {\sum _{\tau = w_M(z) }}_{M\in \mathcal M_4 \setminus \mathcal M_2}\!\!\!\!e(-m \tau ) A_k(z;\tau ) \nonumber \\&\quad = -2 \pi i (4z+2)^{-k} e\left( \frac{m}{16z+8}\right) \left[ \kappa _{-1,k} + e\left( \frac{m}{4}\right) i^{2k} \kappa _{-1,k} \right. \left. +\, e\left( -\frac{m}{4}\right) \kappa _{1,k} + e\left( -\frac{m}{2}\right) e^{-\pi i k} \kappa _{1,k}\right] \nonumber \\&\quad = (4z+2)^{-k} \cdot e\left( \frac{m}{16z+8}\right) \cdot d_{m,k}, \end{aligned}$$
(14)

where the constant \(d_{m,k}\) is defined in (7). We rewrite \(z=-\frac{1}{4} + \frac{1}{4}e^{i\theta }\) so that (14) becomes

$$\begin{aligned}&d_{m,k} \cdot (1 + e^{i\theta })^{-k}e\left( \frac{m e^{\frac{-i\theta }{2}}}{4(e^{\frac{-i\theta }{2}} + e^{\frac{i\theta }{2}})}\right) \nonumber \\&\quad = d_{m,k} \cdot (1 + e^{i\theta })^{-k}e\left( \frac{m e^{\frac{-i\theta }{2}}}{8\cos \left( \tfrac{\theta }{2}\right) }\right) =d_{m,k}\cdot 2^{-k}\left( \cos \left( \tfrac{\theta }{2}\right) \right) ^{-k} e^{\frac{-ik\theta }{2}} e^{\frac{\pi i m}{4}} e^{\frac{\pi m \tan \left( \frac{\theta }{2}\right) }{4}}.\nonumber \\ \end{aligned}$$
(15)

Adding (15) and (11) and multiplying their sum by \(e^{\frac{ik\theta }{2}} e^{\frac{-\pi m \sin (\theta )}{2}}\) yields Theorem 4.1 in the case \(\theta \in \left[ \frac{7\pi }{12},\frac{2\pi }{3}\right) .\)

Case 5: \(z=\frac{-1+i}{4} \ (\text {i.e. } \theta =\frac{\pi }{2}).\) We define for integers \(n\ge 4\)

$$\begin{aligned} \theta _n^{\pm } := \frac{\pi }{2} \pm \frac{1}{n}, \quad z_n^{\pm } := -\frac{1}{4} + \frac{e^{i \theta _n^{\pm }}}{4}. \end{aligned}$$

Then each \(z_n^+ \in R_2\) and \(z_n^- \in R_1\). From Case 1 and Case 2 of Theorem 4.1 established above, we have that

$$\begin{aligned} e^{\frac{ik\theta _n^\pm }{2}} e^{-\frac{\pi m}{2}\sin (\theta _n^\pm )} f_{k,m}(z) - 2 \cos&\left( \frac{k\theta _n^\pm }{2} + \frac{\pi m}{2} - \frac{\pi m \cos (\theta _n^\pm )}{2}\right) = \int _{\mathcal I} h_n^\pm (\tau )d\tau , \end{aligned}$$
(16)

where the interval \(\mathcal I\) is equal to \([-\frac{1}{2} + i v ,\frac{1}{2} + i v ]\) and the functions \(h_n^\pm (\tau )\) and \(F_k\) are defined by

$$\begin{aligned} h_n^\pm (\tau )&= h_{n,m,k}^{\pm }(\tau ) := e^{\frac{ik\theta _n^\pm }{2}}e^{-\frac{\pi m}{2}\sin (\theta _n^\pm )} \frac{F_k(z_n^\pm ;\tau )e(-m\tau )}{j(4\tau ) - j(4z_n^\pm )} , \end{aligned}$$
$$\begin{aligned} F_k(z;\tau ) := f_k(z)f_{2-k}^*(\tau ) + f_k^*(z)f_{2-k}(\tau ). \end{aligned}$$
(17)

We have that \( \lim _{n\rightarrow \infty } h_n^{\pm }(\tau ) = h(\tau )\) on \(\mathcal I\), where

$$\begin{aligned} h(\tau ) = h_{m,k}(\tau ) := e^{\frac{ik\pi }{4}}e^{-\frac{\pi m}{2} } \frac{F_k(-\tfrac{1}{4} + \tfrac{i}{4};\tau )e(-m\tau )}{j(4\tau ) - 1728}. \end{aligned}$$

By construction, \(h_n^{\pm }(\tau )\) and \(h(\tau )\) are integrable on \(\mathcal I \), one boundary of our rectangular region \(W_{\varepsilon ,v}\).

Consider the function \(H(\theta ,t)\) defined on the domain \(\mathcal J := \left[ \frac{\pi }{2}-\frac{1}{4},\frac{\pi }{2}+\frac{1}{4}\right] \times \left[ -\frac{1}{2},\frac{1}{2}\right] \) by

$$\begin{aligned} H(\theta ,t) = H_{k,m,\varepsilon }(\theta ,t):= e^{\frac{ik\theta }{2}}e^{-\frac{\pi m}{2}\sin (\theta )} \frac{F_k\left( -\frac{1}{4} + \frac{e^{i\theta }}{4};t + i\varepsilon \right) e(-m(t+i\varepsilon ))}{j(4(t+i\varepsilon )) - j\left( 4\left( -\frac{1}{4} + \frac{e^{i\theta }}{4}\right) \right) }. \end{aligned}$$

Note that for integers \(n\ge 4\), we have that \(\theta _n^{\pm } \in \left[ \frac{\pi }{2}-\frac{1}{4},\frac{\pi }{2}+\frac{1}{4}\right] \), and that \(H(\theta _n^{\pm },t) = h_n^{\pm }(\tau )\) when \(\tau = t+iv\) is on the path of integration \(\mathcal I\) (i.e. \(t \in [-\frac{1}{2},\frac{1}{2}]\)). By construction, the function \(H(\theta ,t)\) has no poles on \(\mathcal J\) and is continuous, so is bounded by some constant K on this region. Therefore, as a function of t, for fixed \(\theta _n^{\pm }\), the function \(H(\theta _n^{\pm },t)\) is bounded by K for \(t\in [-\frac{1}{2},\frac{1}{2}]\), and hence \(|h_n^\pm (\tau )|\le K\) for all \(\tau \in \mathcal I \). By the Bounded Convergence Theorem and (16), we have that

$$\begin{aligned} e^{\frac{ik\pi }{4}} e^{-\frac{\pi m}{2} } f_{k,m}\left( -\tfrac{1}{4} + \tfrac{i}{4}\right) - 2 \cos \left( \tfrac{k\pi }{4} + \tfrac{\pi m}{2} \right)= & {} \lim _{n\rightarrow \infty } \int _{-\frac{1}{2} + i v }^{\frac{1}{2}+iv } h_n^{\pm }(\tau ) d\tau \\= & {} \int _{-\frac{1}{2} + i v }^{\frac{1}{2}+iv} h(\tau ) d\tau . \end{aligned}$$

Thus, Theorem 4.1 holds for \(\theta =\frac{\pi }{2}\). \(\square \)

4.1 The integral weight case

It is interesting to compare this approximation for \(f_{k, m}(z)\) at \(\theta = \frac{\pi }{2}\) with a similar computation for modular forms of integral weight in a canonical basis. For an even integer k, write \(k = 12\ell + k'\), where \(k' \in \{0, 4, 6, 8, 10, 14\}\). It was shown in [5] that there exists a basis \(\{f_{k, m}\}_{m \ge -\ell }\) for the space \(M_k^!\), where \(f_{k, m}(\tau ) = q^{-m} + O(q^{\ell +1})\), and that the zeros of these basis elements lie on the unit circle when m is large enough. The proof depends on the contour integral

$$\begin{aligned} f_{k, m}(z) = \int _{-\frac{1}{2}+iA}^{\frac{1}{2}+iA} \frac{\Delta (z)^\ell }{\Delta (\tau )^\ell } \frac{E_{k'}(z)}{E_{k'}(\tau )} \frac{E_{14}(\tau )}{\Delta (\tau )} \frac{1}{j(\tau )-j(z)} q^{-m} d\tau = \int _{-\frac{1}{2}+iA}^{\frac{1}{2}+iA} G(\tau , z) d\tau . \end{aligned}$$

Fixing \(z = e^{i\theta }\) for \(\theta \in \left( \frac{\pi }{2}, \frac{2\pi }{3}\right) \), the contour can be moved downward from \(A > 1\) to pick up residues at \(\tau = z\) and \(\tau = -\frac{1}{z}\); these residues can be computed using the fact that \(\frac{d}{d\tau } j(\tau ) = \frac{E_{14}(\tau )}{\Delta (\tau )}\) to give

$$\begin{aligned} \int G(\tau , z) d\tau = f_{k, m}(z) - e^{-2\pi i m z} - z^{-k}e^{\frac{2\pi i m}{z}}. \end{aligned}$$

Multiplying by \(e^{\frac{ik\theta }{2}}e^{-2\pi m \sin (\theta )}\), we find that \(e^{\frac{ik\theta }{2}}e^{-2\pi m \sin (\theta )} f_{k, m}(e^{i\theta }) - 2\cos \big (\frac{k\theta }{2} - 2\pi m \cos (\theta )\big )\) is equal to the weighted integral.

It is natural to ask what happens when \(\theta = \frac{\pi }{2}\), when the denominator of the integrand has only one zero on the unit circle, at i, instead of the two zeros at \(e^{i\theta }, e^{i(\pi -\theta )}\) from before. Ideally, the function approximating \(f_{k, m}\) should be continuous, so the cosine term should become

$$\begin{aligned} -2 \cos \left( \frac{k\pi }{4}\right) = {\left\{ \begin{array}{ll} 0 &{} \text{ if } k \equiv 2 \pmod {4}, \\ -2 &{} \text{ if } k \equiv 0 \pmod {8}, \\ 2 &{} \text{ if } k \equiv 4 \pmod {8}. \end{array}\right. } \end{aligned}$$

In this integral weight case, continuity can be proved without invoking the Bounded Convergence Theorem. In the \(k \equiv 2 \pmod {4}\) case, \(E_{k'}(z)\) has a zero at \(z = e^{\frac{i\pi }{2}} = i\), and fixing \(z = i\) means that the entire integrand is equal to zero; therefore, the residue is zero. For the \(k \equiv 0 \pmod {4}\) cases, we note that at the point \(\tau = i\), the function \(\frac{d}{d\tau } j(\tau ) = \frac{E_{14}(\tau )}{\Delta (\tau )}\) has a simple zero, implying that \(j(\tau ) - j(i)\) has a double zero. Thus, the logarithmic derivative

$$\begin{aligned} \frac{E_{14}(\tau )}{\Delta (\tau )} \frac{1}{j(\tau )-j(z)} = \frac{\frac{d}{d\tau } (j(\tau )-j(z))}{j(\tau )-j(z)} \end{aligned}$$

contributes a factor of 2 to the residue due to the double zero, implying that we get a residue of either \(-2e^{-2\pi i m z}\) or \(-2 z^{-k} e^{\frac{2\pi i m}{z}}\) at this point. These expressions are equal if \(k \equiv 0 \pmod {4}\), and after multiplying by \(e^{\frac{i k \pi }{4}} e^{-2\pi m \sin (\frac{\pi }{2})}\), we get the value of \(\pm 2\) that we expected. Thus, the approximation of \(f_{k, m}(z)\) is continuous at \(\theta = \frac{\pi }{2}\).

This continuity argument does not seem to work when \(k \in \mathbb {Z}+ \frac{1}{2}\). In the integral weight case, fixing a value of z results in a quotient of modular forms in the variable \(\tau \) inside the integral, with a form of weight 2 in the numerator and a form of weight 0 in the denominator, and this ratio can be written as a logarithmic derivative, allowing the computation of residues. For half integral weight, the ratio of modular forms in \(\tau \) is of weight \(2-k\) in the numerator and weight 0 in the denominator, and does not simplify to a logarithmic derivative in the same way. At the poles of \(B_k(z; \tau )\) in the region \(W_{\varepsilon , v}\), though, the ratio \(A_k(z; \tau )\) of the numerator to the derivative of \(j(4\tau )\) is constant, and we can compute its values and use the logarithmic derivative to compute residues as before. However, when \(\theta = \frac{\pi }{2}\), the derivative of \(j(4\tau )\) is 0, and the argument breaks down.

5 Evaluating the function \(A_k(z;\tau )\)Ak

As we have seen in the previous section, our proof of Theorem 4.1 requires specific values of the function

$$\begin{aligned} A_k(z;\tau ) := \frac{f_k(z)f_{2-k}^*(\tau ) + f_k^*(z)f_{2-k}(\tau )}{\frac{d}{d\tau } j(4\tau )} \end{aligned}$$

when \(\tau \) is specialized to be among these poles \(w_M(z)\) of \(B_k(z;\tau )\). We state these required results in Proposition 5.1 below, in terms of the constants

$$\begin{aligned} \kappa _{r,k} := {\left\{ \begin{array}{ll} \frac{-1}{8\pi i}(1+i^r), &{} r\equiv 0 \pmod {2}, \\ \frac{-1}{8\pi i}(1+i^r (-1)^{k+\frac{1}{2}}), &{} r\equiv 1 \pmod {2}. \end{array}\right. } \end{aligned}$$

For a function \(f:\mathbb H\rightarrow \mathbb C\), we let \(Z(f) := \{z \in \mathbb H \ | \ f(z) = 0\}\).

Proposition 5.1

Let \(k \in \frac{1}{2} + \mathbb Z,\) \(r\in \mathbb Z\), and let \(z \in \mathbb H \setminus Z\left( \frac{d}{d\tau } j(4\tau )\right) \). We have that

$$\begin{aligned} A_k(z;w_{M_r^{(1)}}(z) )&= \kappa _{r,k}, \\ A_k(z;w_{M_r^{(2)}}(z) )&= (4z)^{-k}\cdot {\left\{ \begin{array}{ll} \kappa _{-1,k}, &{} r=0,1, \\ i^{2k} \kappa _{1,k}, &{} r=-1,-2, \end{array}\right. } \\ A_k(z;w_{M_r^{(3)}}(z) )&= (4z+1)^{-k} \cdot {\left\{ \begin{array}{ll} \kappa _{0,k}, &{} r=1, \\ 0, &{} r=-1, \\ \kappa _{1,k}, &{} r=\pm 2, \\ \kappa _{-1,k}, &{} r =0, \end{array}\right. }\\ A_k(z;w_{M_r^{(4)}}(z) )&= (4z+2)^{-k} \cdot {\left\{ \begin{array}{ll} \kappa _{1,k}, &{} \text {if } r=1, \\ \kappa _{-1,k}, &{} \text {if } r=0,\\ i^{2k}\kappa _{-1,k}, &{} \text {if } r=-1, \\ e^{-\pi i k} \kappa _{1,k}, &{} \text {if } r=2. \end{array}\right. } \end{aligned}$$

In Sect. 5.1, we first establish the Proposition in the case \(\tau = w_{M_r^{(1)}}(z)\). We then use that result to establish the Proposition in the remaining cases in Sect. 5.2.

5.1 Proof of Proposition 5.1 part 1: \(\tau = w_{M_r^{(1)}}(z)\)

To prove Proposition 5.1 in the case \(\tau = w_{M_r^{(1)}}(z)\) for any \(r\in \mathbb Z\), our starting point begins with work of Duke and the second author, who show in [4] for any any \(k = s + \frac{1}{2}, s \in \mathbb Z\) that

$$\begin{aligned} f_k(z) = \Delta (4z)^a f_{b+\frac{1}{2}}(z), \ \ \ f_k^*(z)=\Delta (4z)^a f^*_{b+\frac{1}{2}}(z), \end{aligned}$$

where \(s=b+12a,\) for some \(a\in \mathbb Z\) and \(b \in S\), where

$$\begin{aligned} S:= \{6,8,9,10,11,12,13,14,15,16,17,19\}. \end{aligned}$$

The 24 forms \(f_{b+\frac{1}{2}}(z), f_{b+\frac{1}{2}}^*(z)\) for \(b\in S\) are given in the Appendix of [4], as explicit polynomials in the weight 2 Eisenstein series F on \(\Gamma _0(4)\), and the weight \(\frac{1}{2}\) modular theta function \(\vartheta \). Thus, writing \(k=12 a + b + \frac{1}{2}\) in this way, a short calculation reveals that we may write the function \(F_k\) from (17) as

$$\begin{aligned} F_k(z;\tau ) = \Delta (4z)^{a}\Delta (4\tau )^{-2-a} g_b(z;\tau ), \end{aligned}$$
(18)

where

$$\begin{aligned} g_b(z;\tau ) := f_{b+\frac{1}{2}}(z)f^*_{25-b+\frac{1}{2}}(\tau ) + f_{b+\frac{1}{2}}^*(z)f_{25-b+\frac{1}{2}}(\tau ). \end{aligned}$$

We let \(\tau = w_{M_r^{(1)}}(z) = z + \frac{r}{4},\) and find from (18), and the fact that \(\Delta (z)=\Delta (z+1)\), that

$$\begin{aligned} F_k\left( z;z+\tfrac{r}{4}\right)&=\Delta (4z)^{-2}g_{b,r}(z), \end{aligned}$$
(19)

where for \(b\in S\) and \(r\in \mathbb Z\) we define \(g_{b,r}(z) := g_b\left( z;z+\tfrac{r}{4}\right) .\) To study the functions \(g_{b,r}(z)\) for any \(r\in \mathbb Z\), and hence the functions \(F_k(z;z+\tfrac{r}{4})\) by (19), we claim that it suffices to assume \(r\in \{0,1,2,3\}\). Indeed, each \(f_k(z)\) has a Fourier expansion of the form

$$\begin{aligned} \sum _{(-1)^s n \equiv 0,1 \pmod {4}} c_k(n) \ e(nz). \end{aligned}$$
(20)

Each \(f_k^*(z)\) also has an expansion of the same form. If r and \(r'\) are integers satisfying \(r\equiv r' \pmod 4\), then for any \(n\in \mathbb Z\), we have that \(e\left( n\left( z+\frac{r}{4}\right) \right) = e\big (n \big (z+ \frac{r'}{4}\big )\big )\), and hence, by the definition of \(g_{b,r}(z)\) we have that \(g_{b,r}(z) = g_{b,r'}(z)\).

In what follows, we consider the cases \(r\in \{0,1,2,3\}\) separately. We elaborate on the cases \(r=0\) and \(r=2\); the cases \(r=1\) and \(r=3\) follow similarly. Recall that elements in \(M_k^!\) transform with character \(\psi _k = \psi _{k,\gamma } := \rho ^{2k}\) under \(\gamma = \left( {\begin{matrix} a &{} b \\ c &{} d\end{matrix}}\right) \in \Gamma _0(4)\), where \(\rho =\rho _\gamma \) is defined in Sect. 2.

Case \(r=0\). By definition, we have that \(g_{b,0}(z) \in M_{26}\big (\Gamma _0(4),\psi _{b+\frac{1}{2}}\psi _{25-b+\frac{1}{2}}\big )\). However, \(\psi _{b+\frac{1}{2}}\psi _{25-b+\frac{1}{2}} = \psi _{b+\frac{1}{2},\gamma }\psi _{25-b+\frac{1}{2},\gamma } =\big (\big (\frac{c}{d}\big )\varepsilon _d^{-1}\big )^{52}\) is the trivial character, hence, \(g_{b,0}(z) \in M_{26}(\Gamma _0(4))\), and thus, \(F_k(z,z) \in M_{2}(\Gamma _0(4))\). We also have that the function \(\frac{d}{dz} j(4z) \in M_2(\Gamma _0(4))\). The Sturm bound [18] for \(M_2(\Gamma _0(4))\) is \([ SL _2(\mathbb Z) : \Gamma _0(4)] \cdot \frac{2}{12} = 1\), and thus, after directly checking Fourier expansions for each of the 12 possible choices of \(b\in S\), we may conclude that \((-4\pi i)F_k(z,z) = \frac{d}{dz}j(4z)\), and hence, Proposition 5.1 holds in the case \(r=0\), for any \(k \in \frac{1}{2} + \mathbb Z\). Since \(\kappa _{r,k} = \kappa _{r',k}\) by definition (and \(g_{b,r}(z)=g_{b,r'}(z)\) as argued above) whenever \(r\equiv r' \equiv 0 \pmod {4}\), we conclude that Proposition 5.1 holds for \(\tau = w_{M_r^{(1)}}(z)\) for any \(r\equiv 0 \pmod {4}\) and any \(k\in \frac{1}{2}+ \mathbb Z\).

Case \(r=2\). Each \(f_k(z)\) has a Fourier expansion as in (20); thus, we have that

$$\begin{aligned} f_k\left( z+\tfrac{1}{2}\right) = \!\!\!\!\sum _{(-1)^s n \equiv 0 \pmod {4}}\!\!\!\! c_k(n) e(nz) \ \ \ - \!\!\sum _{(-1)^s n \equiv 1 \pmod {4}} \!\!\!\!c_k(n) e(nz) = f_k(z) - 2 f_{k,\chi _2}(z), \end{aligned}$$

where

$$\begin{aligned} f_{k,\chi _2}(z) := \sum _{(-1)^s n \equiv 0,1 \pmod {4}} c_k(n) e(nz) \chi _2(n) = \sum _{(-1)^s n \equiv 1 \pmod {4}} c_k(n) e(nz), \end{aligned}$$

and \(\chi _2(n):= \frac{1}{2}(1-(-1)^n)\) is the Dirichlet character \(\pmod {2}\). Since \(f_k(z) \in M_k(\Gamma _0(4),\psi _k)\), it is a result from the classical theory of modular forms [11] that \(f_{k,\chi _2}(z) \in M_k(\Gamma _0(16),\psi _k \chi _2^2) = M_k(\Gamma _0(16),\psi _k )\). Thus, we deduce that \(f_k\left( z+\frac{1}{2}\right) \in M_k(\Gamma _0(16),\psi _k)\). The above argument also applies to the functions \(f_k^*(z)\), so we have that \(f_k^*\left( z+\frac{1}{2}\right) \in M_k(\Gamma _0(16),\psi _k)\) as well. Using these facts, together with the definition of \(g_{b,2}(z)\), we deduce that \(g_{b,2}(z)\) is a form in the space \(M_{26}(\Gamma _0(16),\psi _{b+\frac{1}{2}}\psi _{25-b+\frac{1}{2}}) = M_{26}(\Gamma _0(16)).\) The Sturm bound for the subgroup \(\Gamma _0(16)\) is \([ SL _2(\mathbb Z) : \Gamma _0(16)] \cdot \frac{2}{12} = 4;\) hence, the truth of Proposition 5.1 in the case \(r=2\) for any \(k \in \frac{1}{2} + \mathbb Z\) follows after computing and comparing the Fourier expansions of each of the 12 possible functions \(g_{b,2}(z)\) with the function \(\frac{d}{dz} \ j(4z) \) as in the previous case. Since \(\kappa _{r,k} = \kappa _{r',k}\) by definition (and \(g_{b,r}(z)=g_{b,r'}(z)\) as argued above) whenever \(r\equiv r' \equiv 2 \pmod {4}\), we conclude that Proposition 5.1 holds for \(\tau = w_{M_r^{(1)}}(z)\) for any \(r\equiv 2 \pmod {4}\) and any \(k\in \frac{1}{2}+ \mathbb Z\).

Case \(r=1\). As above, we may re-write

$$\begin{aligned} f_k\left( z+\tfrac{1}{4}\right)&= \!\!\!\!\!\!\!\!\sum _{(-1)^s n \equiv 0 \pmod {4}}\!\! \!\!\!\!c_k(n) e(nz) + i(-1)^s \!\!\!\!\!\!\!\!\!\!\!\sum _{(-1)^s n \equiv 1 \pmod {4}} \!\!\!\!\!\!c_k(n) e(nz) \\&= f_k(z) +(i(-1)^s -1) f_{k,\chi _2}(z). \end{aligned}$$

The truth of Proposition 5.1 in this case follows as in the previous case. We point out that the term \((-1)^{k+\frac{1}{2}}\) appearing in the definition of \(\kappa _{r,k}\) for odd r depends only on b. That is, \((-1)^{k+\frac{1}{2}} = (-1)^{b+1}\), so in this case (and in the case \(r=3\) below), the 12 possible functions \(g_{b,1}\) yield two different constants \(\kappa _{1,k}\), depending on whether b is even or odd.

Case \(r=3\). As above, we may re-write

$$\begin{aligned} f_k\left( z+\tfrac{3}{4}\right)&= \!\!\!\!\!\!\sum _{(-1)^s n \equiv 0 \pmod {4}} \!\!\!\!\!\!c_k(n) e(nz) -i(-1)^s \!\!\!\!\!\!\!\!\!\!\!\sum _{(-1)^s n \equiv 1 \pmod {4}} \!\!\!\!\!\!c_k(n) e(nz) \\&= f_k(z) -(i(-1)^s +1) f_{k,\chi _2}(z). \end{aligned}$$

The truth of Proposition 5.1 in this case follows as in the previous two cases.

5.2 Proof of Proposition 5.1 part 2

\(\tau = w_{M_r^{(d)}}(z), d\in \{2,3,4\}\) Our proof of the Proposition in this case makes uses of the Proposition in the case \(d=1\), which we established in the previous section. We divide our proof into three cases corresponding to whether d is equal to 2, 3 or 4.

Case \(d=2\). We let \(M=M_r^{(2)}.\) It is not difficult to see that we may rewrite

$$\begin{aligned} w = w_{M_r^{(2)}}(z) = {\left\{ \begin{array}{ll} \left( {\begin{matrix} 1 &{} 0 \\ 4 &{} 1\end{matrix}}\right) \left( z-\frac{1}{4}\right) , &{} r=1, \\ \left( {\begin{matrix} 1 &{} 0 \\ 4 &{} 1\end{matrix}}\right) \left( u-\frac{1}{4}\right) , &{} r=0, \\ \left( {\begin{matrix} -1 &{} 0 \\ 4 &{} -1\end{matrix}}\right) \left( z+\frac{1}{4}\right) , &{} r=-1, \\ \left( {\begin{matrix} -1 &{} 0 \\ 4 &{} -1\end{matrix}}\right) \left( u+\frac{1}{4}\right) , &{} r=-2,\\ \end{array}\right. } \end{aligned}$$

where here and throughout this section,

$$\begin{aligned} u =u(z) := \frac{z}{4z+1} = \left( {\begin{matrix} 1 &{} 0 \\ 4 &{} 1\end{matrix}}\right) z. \end{aligned}$$

Using the fact that the functions \(f_k\) and \(f_k^*\) are in the space \(M_{k}\left( \Gamma _0(4),\psi _k\right) \), we find after a short calculation (using also that \(z=\left( {\begin{matrix} 1 &{} 0 \\ -4 &{} 1\end{matrix}}\right) u\)) that

$$\begin{aligned} F_k(z;w) = {\left\{ \begin{array}{ll} (4z)^{2-k} F_k\left( z;z- \frac{1}{4}\right) , &{} r= 1, \\ (4u)^{2}(4z)^{-k} F_k\left( u;u - \frac{1}{4}\right) , &{} r=0, \\ (4z)^{2-k} i^{2k} F_k\left( z;z+\frac{1}{4}\right) , &{} r=-1, \\ (4u)^2(4z)^{-k} i^{2k} F_k\left( u;u + \frac{1}{4}\right) , &{}r=-2. \end{array}\right. } \end{aligned}$$
(21)

For ease of notation, we let

$$\begin{aligned} y=y_r(z) := {\left\{ \begin{array}{ll} z, &{} r\in \{-1,1\}, \\ u, &{}r\in \{0,-2\}. \end{array}\right. } \end{aligned}$$

Using the modular properties of the function \(j(\tau )\), and making a change of variable (\(d\tau = dw = (4y)^{-2} dy\)), we see that

$$\begin{aligned} \frac{d}{d\tau } j(4\tau ) = \frac{d}{d w} j(4 w) = (4y)^2 \frac{d}{dy} j(4y) = (4y)^2 \frac{d}{d(y\pm \frac{1}{4})} j \left( 4 \left( y\pm \tfrac{1}{4}\right) \right) , \end{aligned}$$
(22)

where the sign above is taken to be \(+\) if \(r=-1,-2,\) and − if \(r=0,1\). Combining (21) and (22), we find that

$$\begin{aligned} A_k(z;w) = {\left\{ \begin{array}{ll} (4z)^{-k} A_k\left( z;z- \frac{1}{4}\right) , &{} r= 1, \\ (4z)^{-k} A_k\left( u;u - \frac{1}{4}\right) , &{} r=0, \\ (4z)^{-k} i^{2k} A_k\left( z;z+\frac{1}{4}\right) , &{} r=-1, \\ (4z)^{-k} i^{2k} A_k\left( u;u + \frac{1}{4}\right) , &{}r=-2. \end{array}\right. } \end{aligned}$$

By Proposition 5.1 in the case \(\tau = z + \frac{r}{4}, r\in \mathbb Z,\) proved in the previous section, we have that \(A_k\left( y;y\pm \frac{1}{4}\right) \) is constant. In particular, we conclude in this case that

$$\begin{aligned} A_k(z;w_{M_r^{(2)}}(z) ) = (4z)^{-k}\cdot {\left\{ \begin{array}{ll} \kappa _{-1,k}, &{} r\in \{0,1\}, \\ i^{2k} \kappa _{1,k}, &{} r\in \{-1,-2\}. \end{array}\right. } \end{aligned}$$
(23)

Case \(d=3\). We let \(M=M_r^{(3)}.\) Proceeding as in the previous case, we rewrite

$$\begin{aligned} w=w_{M_r^{(3)}}(z) = {\left\{ \begin{array}{ll} \left( {\begin{matrix} 1 &{} 0 \\ 4 &{} 1\end{matrix}}\right) z, &{} r=1, \\ \left( {\begin{matrix} -1 &{} -1 \\ 4 &{} 3\end{matrix}}\right) \left( z-\frac{1}{2}\right) , &{} r=-1,\\ u \pm \frac{1}{4}, &{} r\in \{0,2\},\\ u - \frac{3}{4}, &{} r=-2. \end{array}\right. } \end{aligned}$$

Again, using modular properties of \(F_k(z;\tau )\), we find that

$$\begin{aligned} F_k(z;w) = {\left\{ \begin{array}{ll} (4z+1)^{2-k} F_k(z;z), &{} r=1, \\ (4z+1)^{2-k} i^{2k}F_k\left( z;z-\frac{1}{2}\right) , &{} r=-1,\\ (4z+1)^{-k} F_k\left( u;u\pm \frac{1}{4}\right) , &{} r\in \{0,2\},\\ (4z+1)^{-k} F_k\left( u;u-\frac{3}{4}\right) , &{} r=-2. \end{array}\right. } \end{aligned}$$
(24)

We also compute in these cases that

$$\begin{aligned} \frac{d}{dw}j(4w) = {\left\{ \begin{array}{ll} (4z+1)^2 \frac{d}{dz} j(4z), &{} r = \pm 1, \\ \frac{d}{du} j(4 u), &{} r= 0,\pm 2. \end{array}\right. } \end{aligned}$$
(25)

Combining (24) and (25), we have that

$$\begin{aligned} A_k(z;w) = (4z+1)^{-k} {\left\{ \begin{array}{ll} A_k(z;z), &{} r=1, \\ i^{2k}A_k\left( z;z-\frac{1}{2}\right) , &{} r=-1, \\ A_k\left( u;u\pm \frac{1}{4}\right) , &{} r=2,0 \\ A_k\left( u;u-\frac{3}{4}\right) , &{} r=-2. \end{array}\right. } \end{aligned}$$

Once again we combine Proposition 5.1 in the case \(\tau =z+\frac{r}{4}, r\in \mathbb Z,\) established in the previous section with the above, and see that in all cases \(A_k(z;\tau )\) is explicitly a constant multiple of a rational function in z. Precisely, we have that

$$\begin{aligned} A_k(z;w_{M_r^{(3)}}(z) ) = (4z+1)^{-k} \cdot {\left\{ \begin{array}{ll} \kappa _{0,k}, &{} r=1, \\ i^{2k}\kappa _{-2,k} = 0, &{} r=-1, \\ \kappa _{1,k}, &{} r\in \{- 2,2\}, \\ \kappa _{-1,k}, &{} r =0. \end{array}\right. } \end{aligned}$$
(26)

Case \(d=4\). We let \(M=M_r^{(4)}.\) Proceeding as above, we rewrite

$$\begin{aligned} w= {\left\{ \begin{array}{ll} \left( {\begin{matrix} 1 &{} 0 \\ 4 &{} 1\end{matrix}}\right) \left( z+\frac{1}{4}\right) , &{} r=1, \\ \left( {\begin{matrix} -1 &{} 0 \\ 4 &{} -1\end{matrix}}\right) \left( z+\frac{3}{4}\right) , &{} r=-1, \\ \left( {\begin{matrix} 1 &{} 0 \\ -4 &{} 1\end{matrix}}\right) \left( u-\frac{1}{4}\right) , &{} r=0, \\ \left( {\begin{matrix} 1 &{} 0 \\ 4 &{} 1\end{matrix}}\right) \left( u-\frac{3}{4}\right) ,&r=2. \end{array}\right. } \end{aligned}$$

Using modular properties of \(F_k(z;\tau )\), we find that

$$\begin{aligned} F_k(z;w) = {\left\{ \begin{array}{ll} (4z+2)^{2-k} F_k\left( z;z+\frac{1}{4}\right) , &{} r = 1,\\ (-4u+1)^{k}(4u-2)^{2-k} F_k\left( u;u-\frac{3}{4}\right) , &{}r=2, \\ (4z+2)^{2-k}i^{2k} F_k\left( z;z+\frac{3}{4}\right) , &{} r=-1, \\ (-4u+1)^{k}(-4u+2)^{2-k} F_k\left( u;u-\frac{1}{4}\right) , &{} r=0. \end{array}\right. } \end{aligned}$$
(27)

We also compute that

$$\begin{aligned} \frac{d}{dw}j(4w) = {\left\{ \begin{array}{ll} (4z+2)^2 \frac{d}{dz} j(4z), &{} r\in \{-1,1\}, \\ (4u-2)^2 \frac{d}{dz} j(4u), &{} r\in \{ 0,2\}. \end{array}\right. } \end{aligned}$$
(28)

Combining (27) and (28) we find that

$$\begin{aligned} A_k(z;w) = (4z+2)^{-k} {\left\{ \begin{array}{ll} A_k\left( z;z+\frac{1}{4}\right) , &{} r=1, \\ i^{2k}A_k\left( z;z+\frac{3}{4}\right) , &{} r=-1, \\ A_k\left( u;u-\frac{1}{4}\right) , &{} r=0, \\ e^{-\pi i k} A_k\left( u;u-\frac{3}{4}\right) , &{} r=2. \end{array}\right. } \end{aligned}$$

Once again using Proposition 5.1 in the case \(\tau =z+\frac{r}{4}, r\in \mathbb Z,\) we see that in all cases \(A_k(z;\tau )\) is explicitly a constant multiple of a rational function in z, namely

$$\begin{aligned} A_k(z;w_{M_r^{(4)}}(z) ) = (4z+2)^{-k} \cdot {\left\{ \begin{array}{ll} \kappa _{1,k}, &{} \text {if } r=1, \\ \kappa _{-1,k}, &{} \text {if } r=0,\\ i^{2k}\kappa _{-1,k}, &{} \text {if } r=-1, \\ e^{-\pi i k} \kappa _{1,k}, &{} \text {if } r=2. \end{array}\right. } \end{aligned}$$
(29)

6 Bounds

In this section, we prove that the quantity

$$\begin{aligned} \mathcal E_{m,k}(\theta ) + e^{\frac{ik\theta }{2}} e^{-\frac{\pi m}{2} \sin (\theta )}\int _{-\frac{1}{2} + iv}^{\frac{1}{2} + iv} B_k(z;\tau ) e(-m\tau ) d\tau \end{aligned}$$

is bounded in absolute value by 2, which we use in the proof of Theorem 1.1. Recall that \(\mathcal E_{m,k}(\theta )\) is equal to \(\mathcal C_{m,k}(\theta )\) if \(\theta \in \big (\frac{\pi }{3},\frac{5\pi }{12}\big ]\), is equal to \(\mathcal D_{m,k}(\theta )\) if \(\theta \in \big [\frac{7\pi }{12}, \frac{2\pi }{3}\big )\), and is equal to zero otherwise, and that the functions

$$\begin{aligned} \mathcal {C}_{m,k}(\theta )&=-c_{m,k}(2i)^{-k}\left( \sin (\tfrac{\theta }{2})\right) ^{-k} e^{-\frac{\pi {i}m}{4}}e^{\frac{\pi {m}}{2}\big (\frac{1}{2\tan \left( \frac{\theta }{2}\right) } -\sin (\theta )\big )}, \\ \mathcal D_{m,k}(\theta )&= - d_{m,k}\cdot 2^{-k} \left( \cos (\tfrac{\theta }{2})\right) ^{-k} e^{\frac{\pi i m}{4}} e^{\frac{\pi m}{2}\big ( \frac{\tan \left( \frac{\theta }{2}\right) }{2} -\sin (\theta )\big ) } \end{aligned}$$

were defined in Eqs. (4) and (5). We begin with the following lemma.

Lemma 6.1

Let \(k = 12a + b + \frac{1}{2}\) as above. If \(m\ge 4.8|a|\), then the following are true.

  1. i)

    If \(\theta \in \big (\frac{\pi }{3},\frac{5\pi }{12}\big ]\), then \( |\mathcal C_{m,k}(\theta )| < \sqrt{2}.\)

  2. ii)

    If \(\theta \in \big [\frac{7\pi }{12}, \frac{2\pi }{3}\big )\), then \(|\mathcal D_{m,k}(\theta ) | < \sqrt{2}.\)

Proof

We first observe by definition that \(|c_{m,k}e^{-\frac{\pi i m}{4}}| \le \sqrt{2}\) and \(|d_{m,k}e^{\frac{\pi i m}{4}}| \le \sqrt{2}\). We rewrite \(m=\alpha |a| + \beta ,\) where \(\beta \ge 0\) and \(\alpha \ge 4.8\), and \(k=12a+b+\frac{1}{2}\), where \(a\in \mathbb Z\) and \(b\in S\). Let \(\theta _1 \in \big (\frac{\pi }{3},\frac{5\pi }{12}\big ]\) and \(\theta _2 \in \big [\frac{7\pi }{12},\frac{2\pi }{3}\big )\). For ease of notation, we define

$$\begin{aligned} F(g,n;\theta ) := \left( 2g\left( \tfrac{\theta }{2}\right) \right) ^{-n}, \quad G(g,n;\theta ) := e^{\frac{n\pi }{2}\left( \frac{1}{2}g\left( \frac{\theta }{2}\right) - \sin (\theta )\right) }. \end{aligned}$$

Then we have that

$$\begin{aligned} |\mathcal C_{m,k}(\theta _1)|&\le \sqrt{2} \left( F\left( \sin ,b+\tfrac{1}{2};\theta _1\right) G\left( \frac{1}{\tan }, \beta ;\theta _1\right) \right) \left( F(\sin ,12a;\theta _1) G\left( \frac{1}{\tan }, \alpha |a|;\theta _1\right) \right) ,\\ |\mathcal D_{m,k}(\theta _2)|&\le \sqrt{2} \left( F\left( \cos ,b+\tfrac{1}{2};\theta _2\right) G\left( \tan , \beta ;\theta _2\right) \right) \left( F(\cos ,12a;\theta _2) G\left( \tan , \alpha |a|;\theta _2\right) \right) . \end{aligned}$$

The functions \(\frac{1}{2}\sin (\frac{\theta _1}{2})\) and \(\cos (\frac{\theta _2}{2})\) are bounded between 1 and 1.21752, and the functions \( \frac{1}{2\tan \left( \frac{\theta _1}{2}\right) } - \sin (\theta _1)\) and \(\frac{1}{2}\tan (\tfrac{\theta _2}{2}) - \sin (\theta _2)\) are bounded between \(-.314313\) and 0, when \(\theta _1\) and \(\theta _2\) are in the restricted domains given above. Thus, since \(\beta \ge 0\) and \(\frac{13}{2}<b+\frac{1}{2} < \frac{39}{2}\), we have that

$$\begin{aligned} 0<F(\sin ,b+\tfrac{1}{2};\theta _1) G\left( \frac{1}{\tan }, \beta ;\theta _1\right)<1, \ \ 0<F(\cos ,b+\tfrac{1}{2};\theta _2) G\left( \tan , \beta ;\theta _2\right) < 1, \end{aligned}$$

and hence

$$\begin{aligned}&|\mathcal C_{m,k}(\theta _1)| < \sqrt{2} F(\sin ,12a;\theta _1) G\left( \frac{1}{\tan }, \alpha |a|;\theta _1\right) , \end{aligned}$$
(30)
$$\begin{aligned}&|\mathcal D_{m,k}(\theta _2)| < \sqrt{2} F(\cos ,12a;\theta _2) G\left( \tan , \alpha |a|;\theta _2\right) . \end{aligned}$$
(31)

We consider two cases, \(a\ge 0\) and \(a<0\), and begin with the former. By an identical argument given above, noting that \(\alpha > 0\), we again have for \(a\ge 0\) that

$$\begin{aligned} 0<F(\sin ,12a;\theta _1) G\left( \frac{1}{\tan }, \alpha |a|;\theta _1\right) \le 1, \ \ 0 < F(\cos ,12a;\theta _2) G\left( \tan , \alpha |a|;\theta _2\right) \le 1, \end{aligned}$$

and hence, using this together with (30) and (31), for \(a\ge 0\), Lemma 6.1 is proved. In the second case, where \(a<0\), we rewrite \(-12a=12|a|\), so that

$$\begin{aligned} F(g,12a;\theta ) G\left( h, \alpha |a|;\theta \right) = \left( \left( 2g\left( \tfrac{\theta }{2}\right) \right) ^{12} e^{\frac{\alpha \pi }{2}\left( \frac{1}{2}h(\frac{\theta }{2}) - \sin (\theta )\right) }\right) ^{|a|}. \end{aligned}$$
(32)

If \(\alpha \ge 4.8\), then the functions

$$\begin{aligned}&\left( 2\sin \left( \tfrac{\theta _1}{2}\right) \right) ^{12} e^{\frac{\alpha \pi }{2}\left( \frac{1}{2\tan \left( \frac{\theta _1}{2}\right) } - \sin (\theta _1)\right) }, \\&\left( 2\cos \left( \tfrac{\theta _2}{2}\right) \right) ^{12} e^{\frac{\alpha \pi }{2}\left( \frac{\tan \left( \frac{\theta _2}{2}\right) }{2} - \sin (\theta _2)\right) }, \end{aligned}$$

are bounded between 0 and 1 when \(\theta _1\) and \(\theta _2\) are restricted to the domains given above. Thus, since \(|a|>0\), using this with (30), (31), and (32), Lemma 6.1 is also proved in the second case, \(a<0\). \(\square \)

We next bound the integral

$$\begin{aligned} \int _{-\frac{1}{2} + iv}^{\frac{1}{2} + i v} \frac{f_k(z)f_{2-k}^*(\tau ) + f_k^*(z)f_{2-k}(\tau )}{j(4\tau )-j(4z)}e^{-2\pi i m \tau } d\tau , \end{aligned}$$

where \(\tau = u+iv\) and v is fixed. We rewrite the integrand as

$$\begin{aligned} \left( \frac{\Delta (4z)}{\Delta (4\tau )}\right) ^a \frac{f_b(z)f_{2-b}^*(\tau ) + f_b^*(z)f_{2-b}(\tau )}{j(4\tau )-j(4z)}e^{-2\pi i m \tau }. \end{aligned}$$

To bound this, we replace the integral with the absolute value of the integrand, since the contour has length 1. Since a can be either positive or negative, we need upper and lower bounds on \(\Delta \) for the appropriate values of \(\tau \) and z. Additionally, we need a lower bound on the absolute value of the denominator \(j(4\tau ) - j(4z)\). Finally, we need upper bounds on the basis elements \(f_b\) and \(f_b^*\), which can be obtained (in the absence of explicit bounds on their coefficients) by writing them in terms of the Eisenstein series \(F(\tau )\) and the theta function \(\vartheta (\tau )\), as detailed in the appendix of [4].

If \(\frac{5\pi }{12} \le \theta \le \frac{7\pi }{12}\), we write \(z_1 = -\frac{1}{4} + \frac{1}{4} e^{i\theta }\), and let \(v_1 = 0.2125\). If \(\frac{\pi }{3}< \theta < \frac{5\pi }{12}\) or \(\frac{7\pi }{12}< \theta < \frac{2\pi }{3}\), we instead write \(z_2 = -\frac{1}{4} + \frac{1}{4} e^{i\theta }\) and let \(v_2 = 0.1375\). We have computed the following bounds using MAPLE for these values of \(\tau \) and z. Generally, this requires explicitly bounding the tail of the Fourier expansion using crude bounds on the Fourier coefficients, and then computing bounds on the initial terms on the appropriate interval. In some cases, these bounds on the initial terms require bounding the derivative and checking values on a grid of points, similar to the computations in [6].

For the theta function \(\vartheta (\tau ) = 1 + 2q + 2q^4 + \cdots \), we have

$$\begin{aligned} \left| \vartheta (\tau _1)\right| \le 1.53583, \end{aligned}$$
$$\begin{aligned} \left| \vartheta (\tau _2)\right| \le 1.90697, \end{aligned}$$
$$\begin{aligned} \left| \vartheta (z_1)\right| \le 1.44325, \end{aligned}$$
$$\begin{aligned} \left| \vartheta (z_2)\right| \le 1.52182. \end{aligned}$$

For the delta function \(\Delta (\tau ) = q - 24q + \cdots \), we have

$$\begin{aligned} 0.00407 \le \left| \Delta (4\tau _1)\right| \le 0.00551, \end{aligned}$$
$$\begin{aligned} 0.01 \le \left| \Delta (4\tau _2)\right| \le 0.11054, \end{aligned}$$
$$\begin{aligned} 0.0015 \le \left| \Delta (4z_1)\right| \le 0.00246, \end{aligned}$$
$$\begin{aligned} 0.0015 \le \left| \Delta (4z_2)\right| \le 0.00491. \end{aligned}$$

For the weight 2, level 4 Eisenstein series \(F(\tau )\), we have

$$\begin{aligned} \left| F(\tau _1)\right| \le 0.34440, \end{aligned}$$
$$\begin{aligned} \left| F(\tau _2)\right| \le 0.82688, \end{aligned}$$
$$\begin{aligned} \left| F(z_1)\right| \le 0.26477, \end{aligned}$$
$$\begin{aligned} \left| F(z_2)\right| \le 0.33151. \end{aligned}$$

For the j-function, we know that j(4z) is real, with \(582.84 \le j(4z_1) \le 1728\) and \(0 \le j(4z_2) \le 582.9\), and we have

$$\begin{aligned} \left| j(4\tau _1) - j(4z_1)\right| \ge 132, \end{aligned}$$
$$\begin{aligned} \left| j(4\tau _2) - j(4z_2)\right| \ge 1200. \end{aligned}$$

Suppose that \(k = 12a + 6 +\frac{1}{2}\) for some integer a. The integral is bounded above by

$$\begin{aligned} \left| \frac{\Delta (4z)}{\Delta (4\tau )}\right| ^a \frac{\left| f_{\frac{13}{2}}(z)f_{\frac{-9}{2}}^*(\tau ) + f_{\frac{13}{2}}^*(z)f_{\frac{-9}{2}}(\tau )\right| }{\left| j(4\tau )-j(4z)\right| } e^{2\pi m v}. \end{aligned}$$
(33)

Note that

$$\begin{aligned} f_{\frac{-9}{2}}(\tau ) = \frac{f_{\frac{39}{2}}(\tau )}{\Delta (4\tau )^2}, \ \ and \ \ f_{\frac{-9}{2}}^*(\tau ) = \frac{f_{\frac{39}{2}}^*(\tau )}{\Delta (4\tau )^2}. \end{aligned}$$

Thus, (33) can be rewritten as

$$\begin{aligned} \left| \frac{\Delta (4z)}{\Delta (4\tau )}\right| ^a \frac{\left| f_{\frac{13}{2}}(z)f_{\frac{39}{2}}^*(\tau ) + f_{\frac{13}{2}}^*(z)f_{\frac{39}{2}}(\tau )\right| }{\left| \Delta (4\tau )^2\right| \left| j(4\tau )-j(4z)\right| } e^{2\pi m v}. \end{aligned}$$

For \(z_1\) and \(\tau _1\), we have

$$\begin{aligned} \left| f_{\frac{13}{2}}(z_1)\right| \le 15.95180790, \end{aligned}$$
$$\begin{aligned} \left| f_{\frac{13}{2}}^*(z_1)\right| \le 373.3811270, \end{aligned}$$
$$\begin{aligned} \left| f_{\frac{39}{2}}(\tau _1)\right| \le 2070.877536, \end{aligned}$$
$$\begin{aligned} \left| f_{\frac{39}{2}}^*(\tau _1)\right| \le 48384.64244. \end{aligned}$$

This gives a bound on the integral of

$$\begin{aligned} (0.60443)^a \cdot 706609609 \cdot e^{\frac{.85\pi m}{2}} \end{aligned}$$

if \(a \ge 0\), and

$$\begin{aligned} (3.6734)^{-a} \cdot 706609609 \cdot e^{\frac{.85\pi m}{2}} \end{aligned}$$

if \(a < 0\). Thus, we have that

$$\begin{aligned}&e^{\frac{ik\theta }{2}} e^{-\frac{\pi m}{2}\sin (\theta )} f_{k, m}(z) - 2\cos \left( \dfrac{k\theta }{2} + \dfrac{\pi m}{2} - \dfrac{\pi m \cos (\theta )}{2}\right) \\&\le e^{-\frac{\pi m}{2} (\sin (\theta ) - .85)} (0.60443)^a \cdot 706609609 \end{aligned}$$

if \(a \ge 0\), and

$$\begin{aligned}&e^{\frac{ik\theta }{2}} e^{-\frac{\pi m}{2}\sin (\theta )} f_{k, m}(z) - 2\cos \left( \dfrac{k\theta }{2} + \dfrac{\pi m}{2} - \dfrac{\pi m \cos (\theta )}{2}\right) \\&\le e^{-\frac{\pi m}{2} (\sin (\theta ) - .85)} (3.6734)^{-a} \cdot 706609609 \end{aligned}$$

if \(a < 0\). The two quantities on the right above can be rewritten as

$$\begin{aligned} \le (0.83353)^m (0.60443)^a \cdot 706609609, \end{aligned}$$
$$\begin{aligned} \le (0.83353)^m (3.6734)^{-a} \cdot 706609609. \end{aligned}$$

We have \((0.83353)^m \cdot 706609609 \le 2\) for \(m \ge 109\), so the quantity for \(a \ge 0\) is less than 2 for \(m \ge 109\). If \(a < 0\), we have \((0.83353)^m \cdot 3.6734 \le 1\) for \(m \ge 8\), so the quantity is less than 2 for \(m \ge 8\left| a\right| +109\).

For \(z_2\) and \(\tau _2\), we have

$$\begin{aligned} \left| f_{\frac{13}{2}}(z_2)\right| \le 32.43415, \end{aligned}$$
$$\begin{aligned} \left| f_{\frac{13}{2}}^*(z_2)\right| \le 752.09673, \end{aligned}$$
$$\begin{aligned} \left| f_{\frac{39}{2}}(\tau _2)\right| \le 10147561.12, \end{aligned}$$
$$\begin{aligned} \left| f_{\frac{39}{2}}^*(\tau _2)\right| \le 235391937.7. \end{aligned}$$

This gives a bound on the integral of

$$\begin{aligned} (0.491)^a \cdot 127222365876 \cdot e^{\frac{.55\pi m}{2}} \end{aligned}$$

if \(a \ge 0\), and

$$\begin{aligned} (73.6934)^{-a} \cdot 127222365876 \cdot e^{\frac{.55\pi m}{2}} \end{aligned}$$

if \(a < 0\).

Using the bounds on \(\mathcal {C}_{m, k}(\theta _2)\) and \(\mathcal {D}_{m, k}(\theta _2)\) from Lemma 6.1 above, we find that the difference between the weighted modular form and the cosine function is bounded above by

$$\begin{aligned} \sqrt{2} + e^{-\frac{\pi m}{2} (\sin (\theta ) - .55)} (0.491)^a \cdot 127222365876 \end{aligned}$$

if \(a \ge 0\) and, if \(a < 0\), by

$$\begin{aligned} \sqrt{2} + e^{-\frac{\pi m}{2} (\sin (\theta ) - .55)} (73.6934)^{-a} \cdot 127222365876. \end{aligned}$$

These simplify to

$$\begin{aligned} \le \sqrt{2} + (0.60872)^m (0.491)^a \cdot 127222365876, \end{aligned}$$
$$\begin{aligned} \le \sqrt{2} + (0.60872)^m (73.6934)^{-a} \cdot 127222365876, \end{aligned}$$

giving that for \(a \ge 0\), the quantity is less than 2 if \(m \ge 53\), and for \(a < 0\), it is less than 2 if \(m \ge 9|a| + 53\).

For the other eleven values of b, similar computations show that the bounds on

$$\begin{aligned} \left| f_{b}(z)f_{2-b}^*(\tau ) + f_{b}^*(z)f_{2-b}(\tau )\right| \end{aligned}$$

become smaller. Specifically, for each value of b, we find that the numbers 706609609 and 127222365876 in cases 1 and 2 may be replaced by the values in Table 2. Thus, in all cases the quantity

$$\begin{aligned} \mathcal E_{m,k}(\theta ) + e^{\frac{ik\theta }{2}} e^{-\frac{\pi m}{2} \sin (\theta )}\int _{-\frac{1}{2} + iv}^{\frac{1}{2} + iv} B_k(z;\tau ) e(-m\tau ) d\tau \end{aligned}$$

is bounded in absolute value by 2.

Table 2 Upper bounds for each b