<s>[INST] Converting equation into short Weierstrass form I have the curve $y^2 + 4y = x^3 + 3x^2 −x + 1$. I need to find a transformation of the form $X=x+a$ and $Y=y+b$
that turns this curve into the standard form of the elliptic curve: $$Y^2=X^3+AX+B.$$
I completed the square for the left side and now have $(y+2)^2= x^3 + 3x^2 −x + 5$, but I'm not sure what to do next to fix the right side. Any help would be great!
 [/INST] You need to complete the cube in terms of $x$, this is very similar to completing the square, except that we have
$$(x+a)^3 = x^3 + 3ax^2 + 3a^2x + a^3$$
so if the coefficient of $x^2$ is $c$ then $(x + c/3)$ is the variable you should rewrite
$x^3 + cx^2 +dx + e$ in terms of so that you get
$$x^3 + cx^2 +dx + e =(x+c/3)^3 + A(x+c/3) + B$$
for some coefficients $A,B$ that you can solve for using this equation,
in your case $c/3=1$ so this should work out nicely!
</s>