Solution (source code)

= Solution

The <Weierstrass equation of an elliptic curve> over a <field> $K$ has the general form
$$
y^2+a_1xy+a_3y=x^3+a_2x^2+a_4x+a_6,
$$
with nonzero <elliptic-curve discriminant>. <Admissible change of Weierstrass coordinates> relates two such equations defining isomorphic pointed curves over $K$:
$$
x=u^2x'+r,
\qquad
y=u^3y'+u^2sx'+t,
$$
where $u\in K^\times$ and $r,s,t\in K$.

If $\operatorname{char}K\ne2,3$, completing the square and translating $x$ simplify every equation. <Short Weierstrass form> is
$$
y^2=x^3+Ax+B,
\qquad
\Delta=-16(4A^3+27B^2)\ne0.
$$
Two short equations are $K$-isomorphic precisely when, for some $u\in K^\times$,
$$
A'=u^4A,
\qquad
B'=u^6B;
$$
the isomorphism from the first curve to the second is $(x,y)\mapsto(u^2x,u^3y)$.