Compute j-invariant of elliptic curve in non-Weierstrass form with arbitrary coefficients
One can compute the j-invariant of an elliptic curve not in Weierstrass form in Sage via the following (where the curve x+x2+y−x2y−xy2+x2y2=0 -- not in Weierstrass form -- is used as an example):
x,y = polygen(QQ,'x,y')
E = Jacobian(x+x^2+y-x^2*y-x*y^2+x^2*y^2)
E.j_invariant()
If we include numerical coefficients of the various terms, this still works. However, I would like Sage to compute the j-invariant of such curves in non-Weierstrass form with arbitrary coefficients, e.g. ax+bx2+cy−dx2y−exy2+fx2y2. Is this possible? I tried including the line:
var('a,b,c,d,e,f')
But got an error. Can anyone help? Thanks!