# Changes of variable from quartic to Weierstrass

I have the quartic curve v^2 = u^4-2*u^3+5*u^2+8*u+4 which I convert to an elliptic curve of the form y^2 + a1*x*y + a3*y = x^3 + a2*x^2 + a4*x + a6. The code is given by :

var( 'u,v,a,b,c,q,x,y,d' );
f = a*u^4 + b*u^3 + c*u^2 + d*u + q^2
# we want to find an algebraic passage from u, v and the quartic
# v^2 = f
# to a Weierstass equation in two new variables x, y
x = (2*q*(v+q) + d*u)/u^2
y = ((2*q)^3*(v+q) + (2*q)^2*( d*u + c*u^2 ) - d^2*u^2)/((2*q)*u^3)
# inverse transformation:
u = ((2*q)*(x+c)-d^2/q)/y
v = -q + (u*(u*x-d))/(2*q)
# one can easily define rational functions (u,v) -> (x,y) and (x,y) -> (u,v)
# to be used in the concrete situation
a1 = d/q
a2 = c - ((d/(2*q)))^2
a3 = b*(2*q)
a4 = -a*(2*q)^2
a6 = a2*a4
((y^2 + a1*x*y + a3*y) - (x^3 + a2*x^2 + a4*x + a6)).factor()
def passageQuarticToWeierstrass( a, b, c, d, q, field=QQ ):
"""implement the standard formulas
"""
a1, a2, a3, a4 = d/q, c - ((d/(2*q)))^2, b*(2*q), -a*(2*q)^2
a6 = a2 * a4
print ( a1, a2, a3, a4, a6 )
return EllipticCurve(field,(a1, a2, a3, a4, a6))
a, b, c, d, q = 1,-2,5,8,2
E = passageQuarticToWeierstrass( a, b, c, d, q );E


The output yield :

Elliptic Curve defined by E : y^2 + 4*x*y - 8*y = x^3 + x^2 - 16*x - 16 over Rational Field.


Now, I want to transform E into a short Weierstrass equation which should yield : E' : y^2 = x^3 -3267*x +45630 with the corresponding change of variable.

This is what I tried, but did not quite worked. (slightly different numerator expression but correct denominators for u and v).

reset('x')
reset('y')
var('x,y,Y')
a, b, c, d, q = 1,-2,5,8,2 #coefficients of quartic v^2
a1, a2, a3, a4, a6 = 4, 1, -8, -16, -16 #coefficients of elliptic curve E
E=y^2 + 4*x*y - 8*y -(x^3 + x^2 - 16*x - 16)
F=E.subs({y:y-(a1*x+a3)/2}) #eliminates xy and y term on the LHS of E
eq3=eq2.subs({x:x-((a2+1/4*(a1)^2)/3)}) #eliminates the x^2 term from the RHS to give E of the form y^2 = x^3 +Ax +B
eq5=eq4.subs({x:(1/3^2)*x})
eq6=eq5*729;eq6
u=((2*q)*(x+c)-(d^2/q))/y #the inverse transformation from from E to quartic
eq7=u.subs({y:y-(a1*x+a3)/2}).subs({x:x-((a2+1/4*(a1)^2)/3)})
eq8=eq7.subs({x : (x/3^2)}).subs({y:y/(3^3)});eq8
v = -q + (u*(u*x-d))/(2*q) #the inverse transformation from from E to quartic
eq9=v.subs({y:y-(a1*x+a3)/2}).subs({x:x-((a2+1/4*(a1)^2)/3)})
eq10=eq9.subs({x : (x/3^2)}).subs({y:y/(3^3)})
eq11=eq10.simplify_full()
eq12=eq11.subs({y^2:(x^3-3267*x+45630)});eq12


The output yield :

 -x^3 + 729*y^2 + 3267*x - 45630 #wrote this in the form:Y^2 = x^3 - 3267*x +45630  where Y=3^3*y
u = -12*(x - 42)/(6*x - y - 198)
v =  2*(x^3 - 162*x^2 + 6291*x + 108*y - 37962)/(x^3 + 36*x^2 - 12*(x - 33)*y - 5643*x + 84834)


The problem lies in the expression of u and v. The correct expression is suppose to be

u = -12*(x - 6)/(6*x - y - 198)

and

v = 2*((x^3-18*x^2+3267*x-324*y-71658)/(x^3+36*x^2-12*x*y-5643*x+396*y+84834)).

I have checked and have no idea where my coding went wrong that it yields the incorrect numerator but the correct denominator in the expression of u and v. Can someone help me throw in some suggestions.

edit retag close merge delete

1

Just to get the Weierstrass form, one can use

sage: u,v=polygens(QQ,'u,v')
sage: E=Curve(-v^2 + u^4-2*u^3+5*u^2+8*u+4)
sage: Jacobian(E)
Elliptic Curve defined by y^2 = x^3 - 121/3*x + 1690/27 over Rational Field

( 2018-01-04 02:58:23 -0500 )edit

@FrédéricC Could it also provide the change of variables x, y, u and v? At the moment I am working hard on getting the corresponding change of variable for u and v.

( 2018-01-04 03:49:36 -0500 )edit
2

Just a tiny modification of the above code:

u,v=polygens(QQ,'u,v')
E=Curve(-v^2 + u^4-2*u^3+5*u^2+8*u+4)
Jacobian(E, morphism=True)


it yields:

Scheme morphism:
From: Affine Plane Curve over Rational Field defined by u^4 - 2*u^3 + 5*u^2 - v^2 + 8*u + 4
To:   Elliptic Curve defined by y^2 = x^3 - 121/3*x + 1690/27 over Rational Field
Defn: Defined on coordinates by sending (u, v) to
(7/3*u^4*v + 58/3*u^3*v - 1/3*u^2*v - 88/3*u*v - 8/3*v : -12*u^6 + 12*u^5 + 120*u^4 + 120*u^3 + 180*u^2 + 12*u - 48 : -v^3)

( 2018-01-04 14:51:09 -0500 )edit

@castor Can it also some how yield the change of variable for (x,y)

( 2018-01-04 18:49:21 -0500 )edit

Is this question a duplicate of

Does the answer there also completely clear the situation here?

( 2018-01-05 19:33:34 -0500 )edit