The function $\,h(x) := \prod_{n=1}^\infty (1 - x^n)\,$ is known as a Ramanujan theta function. It is essentially the Dedekind $\eta$ function. The connection is $\,f(q) := q h(q^{24}) = \eta(24\tau)\,$ where $\,q=\exp(2\pi i \tau).\,$ Differentiating we get $\, dq = (2\pi i)\, q\, d\tau,\,$ and $$ \frac{d}{d\tau} f(q) = (2\pi i)\, q\, f'(q).$$ Since all powers of $\,q\,$ in $\,f(q)\,$ are of the form $\,q^{24n+1}\,$ then $\,f'(q) \equiv f(q) \pmod 3.\,$ If we use the original $\,h(x)\,$ then the similar result is a little more complicated by modulo $3$ exponents. Let$\, A = A(x) := h(x)\,$ and let $\,A_0\,$ be all the terms of $\,A\,$ where the exponent of $\,x\,$ is $0$ modulo $3$ and similarly for $\,A_1\,$ and $\,A_2\,$ so that $\,A = A_0+A_1+A_2.\,$ This is the _trisection_ of the power series $\,A.\,$ Refer to my essay [A Multisection of q-Series](http://grail.eecs.csuohio.edu/~somos/multiq.html) for the nice identity $$ 0 = A_2 A_0^2 + A_0 A_1^2 + A_1 A_2^2. \tag{1}$$ Now let $\, B = B(x) := A'(x)\,$ and let $\,B_0,B_1,B_2\,$ be the trisection of $\,B.\,$ It is easy to show that $$ q\,B_0 \equiv A_1,\quad q\,B_1 \equiv -A_2, \quad B_2 \equiv 0 \pmod 3.$$ Now let $\, C = C(q) := A''(x)\,$ and let $\,C_0,C_1,C_2\,$ be the trisection of $\,C.\,$ It is easy to show that $$ q^2\,C_0 \equiv -A_2, \quad C_1 \equiv C_2 \equiv 0 \pmod 3.$$ When we make these substitutions in the expression $$ h''(x) h(x)^2 + x\, h'(x)^3 + 2\,h(x)h'(x)^2 \tag{2}$$ and reduce modulo $3$ we get the nice identity $(1)$.