Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

Undergrad research examples with cocalc

Views: 534
import matplotlib.pyplot as plt plt.rc('text', usetex=True) plt.rc('font',**{'family':'serif','serif':['Computer Modern Roman'],'size':14})
R.<x> = ZZ[] f = x^5 + 1 C = HyperellipticCurve(f) pts = [ P for P in cartesian_product([[-20..20]]*2) if C.ambient_space()(list(P)+[1]) in C ] print pts
[(-1, 0), (0, -1), (0, 1)]
g = C.plot() + points(pts,size=50,color="red") g.show(xmin=-1.5,xmax=1.5,ymin=-2,ymax=2,title="$y^2 = x^5 + 1$",aspect_ratio=1.5)