Solution (source code)

= Solution

Logarithmically differentiate the convergent product of the <modular discriminant>. On compact subsets of $\mathbb H$, <absolute convergence> permits termwise differentiation and rearrangement of the resulting divisor sums:
$$
\frac1{2\pi i}\frac{\Delta'(\tau)}{\Delta(\tau)}=1-24\sum_{m\geq1}\frac{mq^m}{1-q^m}=1-24\sum_{n\geq1}\sigma_1(n)q^n=E_2(\tau).
$$
The division is valid because $\Delta$ has no interior zeros. Its weight-twelve inversion law is $\Delta(-1/\tau)=\tau^{12}\Delta(\tau)$. Taking a logarithmic derivative, including the derivative $1/\tau^2$ of $-1/\tau$, yields
$$
\frac1{\tau^2}\frac{\Delta'(-1/\tau)}{\Delta(-1/\tau)}=\frac{12}\tau+\frac{\Delta'(\tau)}{\Delta(\tau)}.
$$
Thus the <Eisenstein series of weight two> has the anomalous transformation
$$
\boxed{E_2(-1/\tau)=\tau^2E_2(\tau)+\frac{6\tau}{\pi i}.}
$$

Let $y=\operatorname{Im}\tau$. Under inversion, $y$ becomes $y/|\tau|^2$. Using $\tau^2-|\tau|^2=2iy\tau$, the anomalous term cancels:
$$
E_2^*(-1/\tau)=\tau^2E_2(\tau)+\frac{6\tau}{\pi i}-\frac{3|\tau|^2}{\pi y}=\tau^2\left(E_2(\tau)-\frac3{\pi y}\right)=\tau^2E_2^*(\tau).
$$
The Fourier expansion gives $E_2(\tau+1)=E_2(\tau)$, and translation leaves $y$ unchanged. Since translation and inversion generate the projective <modular group> and weight two is unchanged by $-I$, the <almost holomorphic weight-two Eisenstein series> satisfies
$$
\boxed{E_2^*(\gamma\tau)=(c\tau+d)^2E_2^*(\tau)\qquad\gamma\in SL_2(\mathbb Z).}
$$
It is modular in the transformation sense, but is not a holomorphic <modular form>. Substituting $\operatorname{Im}(\gamma\tau)=y/|c\tau+d|^2$ into this law also gives the useful full-group anomaly
$$
E_2(\gamma\tau)=(c\tau+d)^2E_2(\tau)+\frac{6c(c\tau+d)}{\pi i}.
$$