#1: with(plots): with(plottools): Diag:=proc(a,b) local x1, A, B, AB, C,x,y, labelA, labelB, labelAB, labelC, lineAandB, lineAB0: x1:=implicitplot(y^2 = x^3 + a*x + b); A:=RP(a,b); A:=pointplot(A): labelA:=textplot([op(A), 'A'], 'align'={'above'}); B:=RP(a,b); B:=pointplot(B): labelB:=textplot([op(B), 'B'], 'align'={'above'}); AB:=AddE(a,b,A,B); AB:=pointplot(AB): labelAB:=textplot([op(AB), 'A+B'], 'align'={'above'}); #lineAandB is the line between A and B using point slope form lineAandB:= y=(B[2]-A[2])/(B[1]-A[1])*(x-A[1])+A[2]; #lineAB0 is the vertical line through A+B lineAB0:= x=AB[1]; C:=solve({lineAandB, lineAB0}, {x,y}); C:=pointplot(C): #the intersection of these lines is precisely the point C labelC:=textplot([op(C), 'C'], 'align'={'above'}); #we display all relevant points and labels along with the elliptic curve display({x1,A,B,AB,C,labelA, labelB, labelAB, labelC}, 'view'=[-10..10, -20..20]); end: print(`made it here`); #2: IntSol:=proc(a,b,K) local y,x, S,t: S:=isolve({y^2-x^3+a*x-b}); select(t-> eval(x