I have a question about a naive test to tell whether a complex elliptic curve $E$ has complex multiplication.
Recall that the endomorphism ring $End(E)$ of $E$ is isomorphic to either $\mathbb{Z}$ or an order in an imaginary quadratic field $K$. In the latter case we say that $E$ has CM by $K$.
Suppose that we are given an elliptic curve over $\mathbb{C}$, say $$E: y^2=x^3+17x^2-19.$$ One wants to know if there is an imaginary quadratic field $K$ for which $E$ has CM by $K$.
Let $j(E)$ be the j-invariant of our elliptic curve (for example, the above curve has j-invariant $\frac{6179217664}{363641}$) and recall that the j-invariant, viewed as a modular function, gives a surjective map from the upper half plane to $\mathbb{C}$. Let $\omega$ be any element in the preimage of $j(E)$. We now define a second elliptic curve: $$E_\omega: y^2=4x^3-g_2(\omega)-g_3(\omega),$$ where $g_2=60G_4$ and $g_3=140G_6$ are multiples of the appropriate Eisenstein series. Both of these elliptic curves are defined over $\mathbb{C}$ and have the same j-invariant. They are therefore isogenous. It is known that the elliptic curve $E_\omega$ is isomorphic to the complex torus $\mathbb{C}/\Lambda_\omega$ where $\Lambda_\omega=\mathbb{Z}+\mathbb{Z}\omega$.
It is easy to show that $\mathbb{C}/\Lambda_\omega$ has CM by some imaginary quadratic field if and only if $\omega$ is an imaginary, quadratic number. In this case the endomorphism ring of $\mathbb{C}/\Lambda_\omega$ will be an order in the field $\mathbb{Q}(\omega)$.
This suggests a test for CM: given an elliptic curve $E$ defined over $\mathbb{C}$ with j-invariant $j(E)$, find a preimage of $j(E)$ under the modular function $j:\mathbb{H}\rightarrow\mathbb{C}$ and determine whether or nor the preimage generates an imaginary quadratic extension of $\mathbb{Q}$.
Now for my question: can this test actually be performed? Wikipedia tells me that the inverse of the j-invariant can be computed in terms of hypergeometric functions, but I don't know if one could use this inverse to determine whether a given j-invariant was associated to a curve with CM.