Explicitly compute moduli-theoretic map given the parameter for $X_0(2)$ Im trying to understand how the modular polynomial is explicitly found. I'm working through the smallest example, $X_0(2)$.
Most sources state the results, but I'am trying to understand exactly how the intermediate steps are done.
I understand how the parameter $j_{2,0}=\left(\frac{\eta(\tau)}{\eta(2\tau)}\right)^{24} = \frac{1}{q\cdot\Pi_{n\geq1}(1 + q^n)^{24}}$ is found now, and why its used. My next step is to understand how the $j$-invariants become the rational functions 
$$ j(\tau) = \frac{(r + 256)^3}{r^2}$$
and
$$j(2\tau) = \frac{(r + 16)^3}{r}$$  where $r = j_{2,0}(\tau)$ and $j(\tau) = \frac{1}{q} + 744 + 196884q + ...$
The source I am using says " easily verified by comparing the $q$-expansions", I guess my arithmetic is weak and I am having trouble seeing it.
I have been trying to compute the q expansions of the $\eta$ quotient functions and $j$-invariant using sage and see if I can find the patterns. Any suggestions or help would be appreciated!
Many thanks.
 A: Consider the function $r^{2}j$. I think you already know that $r$ is a modular function for $\Gamma_{0}(2)$. Since $j$ is a modular function for $\Gamma(1)=SL_{2}(\mathbb{Z})$ and $\Gamma_{0}(2)$ is a subgroup of $\Gamma(1)$, $j$ is also a modular function for $\Gamma_{0}(2)$. Thus, $r^{2}j$ is a modular function form $\Gamma_{0}(2)$.
From its infinite product expansion, the Dedekind eta function is a holomorphic function on $\mathbb{H}$ with no zeros and no poles on $\mathbb{H}$, hence so is $r$. Moreover, $j$ is also holomorphic on $\mathbb{H}$. Thus, $r^{2}j$ is holomorphic on $\mathbb{H}$.
Note that $\Gamma_{0}(2)$ has two cusps: $0,\infty$. Each cusp has width 2 and 1, respectively. Because $r$ has no zeros and no poles on $\mathbb{H}$ and has a simple pole at $\infty$, $r$ has a simple zero at $0$. (Remember: $r$ is a meromorphic function on $X_{0}(2)$.) Hence $(r^{2}|_{0}S)(\tau)=r^{2}(S\tau)$ has a Fourier expansion of the form
$$r^{2}(S\tau)=\sum_{n=-2}^{\infty}c_{n}q^{n/2},$$
and therefore $(r^{2}j)(S\tau)$ has a Fourier expansion of the form
$$(r^{2}j)(S\tau)=\sum_{n=0}^{\infty}a_{n}q^{n/2}.$$
This means that $r^{2}j$ is holomorphic at the cusp $0$.
Observe that any polynomial in $r$ over $\mathbb{C}$ is a modular function for $\Gamma_{0}(2)$ which is holomorphic except at $\infty$. Since $r^{2}j$ has a Fourier expansion starting with $q^{-3}$, there is a cubic polynomial $x^{3}+\alpha x^{2}+\beta x+\gamma\in\mathbb{C}[x]$ (in fact $\mathbb{Q}[x]$) such that $r^{2}j-r^{3}-\alpha r^{2}-\beta r$ has a Fourier expansion starting with constant term. (Removing the leftmost term from $r^{2}j$ successively, you can get $\alpha=3\times 256, \beta=3\times 256^{2}$. I will omit the detail.) This means that the modular function $r^{2}j-r^{3}-\alpha r^{2}-\beta r$ is holomorphic at $\infty$, hence a holomorphic modular form for $\Gamma_{0}(2)$. By dimension formula (cf. F. Diamond and J. Shurmuan, A First Course in Modular Forms, Chapter 3), $M_{0}(\Gamma_{0}(2))=\mathbb{C}$. Thus, $r^{2}j-r^{3}-\alpha r^{2}-\beta r$ is constant. (In fact, it is the constant term of the Fourier expansion of $r^{2}j-r^{3}-\alpha r^{2}-\beta r$. So, by using Fourier expansion, we can check this constant is $256^{3}$.) Therefore, we get
$$j(\tau)=\frac{(r+256)^{3}}{r^{2}}.$$
If someone finds any error, please let me know. Thank you.
