Define a rational coordinate $h_2$ on the modular curve $X_0(2)$ by $$ h_2(z) = \bigl(\eta(z) \, / \, \eta(2z)\bigr)^{24} = q^{-1} \prod_{n=1}^\infty \, (1+q^n)^{-24} = q^{-1} - 24 + 276 q - 2048 q^2 + 11202 q^3 - 49152 q^4 + - \cdots. $$ Then $j = (h_2 + 256)^3 / h_2$. As expected, this degree-3 map is ramified only above $j=0$ (with multiplicity 3) and $j=\infty,1728$ (each with multiplicities $2+1.)$ To put this function in our standard form, we apply fractional linear transformations to $j$ and $h_2$ to put $j=0$ and $h_2 = -256$ at infinity; one choice, which also puts the preimages $0,\infty$ of $j=\infty$ at $0,1$ is $$ j = 1728 \, / \, t, \quad h_2 = 256 \, x \, / \, (1-x) $$ and this recovers our formula $t = \frac{3^3}{1^1 2^2} x^2 (1-x)$ for a degree-3 Belyi polynomial.
We next compute the degree-4 map $X_0(6)/w_2 \to X_0(2)/w_2 = X_0^+(2).$
The curve $X_0(6)/w_2$ has rational coordinate
$$
h_6^+ = \left( \frac{\eta(z) \, \eta(2z)}{\eta(3z) \, \eta(6z)} \right)^4
= q^{-1} - 4 - 2 q + 28 q^2 - 27 q^3 - 52 q^4 + 136 q^5 - 108 q^6 - 162 q^7
\cdots.
$$
We compare $q$-expansions to write $h_2^+$ as a rational function
h2 = (eta(q) / eta(q^2))^24 / q h6 = ( (eta(q) * eta(q^2)) / (eta(q^3) * eta(q^6)) )^4 / q H2 = subst( (h2+64)^2/h2, q, serreverse(1/h6) ) subst(truncate(H2), q, 1/h)[The gp function eta takes a power series $X$ to $\prod_{n=1}^\infty (1-X^n)$ without the $X^{1/24}$ (there is no support for fractional power series in gp) so we had to supply the “/q” ourselves.] The last step works because the only poles of $h_2^+$ on $X_0(6)/w_2$ are at $h_6^+ = 0, \infty,$ so the power series H2, which gives $h_2^+$ in terms of $1/h_6^+$, is simply $q^{-1} + 108 + 4374 q + 78732 q^2 + 531441 q^3 + O(q^{16}).$ Factoring the final result, we obtain $$ h_2^+ = (h_6^+ + 27)^4 \, / \, {h_6^+}^3 $$ with $h_2^+ - 256 = (h_6^+ - 81)^2 \, ({h_6^+}^2 + 14 h_6^+ + 81) \, / \, {h_6^+}^3.$ We conclude as before with a change of coordinates, here $$ h_2^+ = 256 \, / \, t, \quad h_6^+ = 27 \, x \, / \, (1-x), $$ to recover our formula $t = \frac{4^4}{1^1 3^3} x^3 (1-x)$ for a degree-4 Belyi polynomial.
The modularity of $h_2$ and $h_6^+$ follows from Ligozat’s criterion(*)
for the modularity of an eta product. They have
(*) G. Ligozat: Courbes modulaires de genre 1, Mém. Soc. Math. de France 43 (1975) = eudml.org/doc/94716. See Proposition 3.2.1, starting on page 28.We use the letter $h$ in $h_2, h_2^+, h_6^+$ to suggest “Hauptmodul”. In general, a modular curve $X$ of genus $0$ with a cusp of width $k$ at infinity always has a rational coordinate of the form $q^{-1/k} + O(1),$ defined uniquely up to an additive constant; such a function is called a “Hauptmodul”