#
# PYTHON • MyCompiler
#
# Curva Eliptica Mordell
# https://[Log in to view URL]
# Curva Eliptica Mordell
# 
# 2026 Novembro Sex, 13
# 2026 Novembro Sáb, 14
#
# by 
# j
# 

import matplotlib.pyplot as plt

#
# Gera a Curva De Mordell
#

def graphmordell(f,xmin,xmax,n):
    
    plt.style.use('dark_background')

    plt.figure(figsize=(6,6))
    
    x = []
    y = []
    z = []
    w = []

    delta = (xmax - xmin)/n

    t = xmin

    while (t < xmax): 

        e = (t**3 + 17)**(1/2)
        r = 0.5*t + 4
        
        x.append(t)
        y.append(e)
        z.append(-e)
        w.append(r)
        
        t += delta

    plt.plot(x,y,'-')
    plt.plot(x,z,'-')
    plt.plot(x,w,'-')

    # plt.axis('equal') 
    plt.title('Curva Eliptica Mordell | $y² = x³ + 17$')

    plt.scatter(-2,3,color="red")
    plt.text(-2+0.0,3-0.75,"$(-2,3)$")

    plt.scatter(2,5,color="red")
    plt.text(2+0.0,5-0.75,"$(2,5)$")

    plt.scatter(0.25,4.125,color="red")
    plt.text(0.25+0.0,4.125-0.75,"$(1/4,33/8)$")
        
    # plt.legend()
    # plt.xticks([])  
    # plt.yticks([])
    # plt.xlim([-2, 4])
    # plt.ylim([-30, +30])

    plt.xlabel("x")
    plt.ylabel("y")
    
    plt.grid(False)
    plt.show()

graphmordell(1,-2.571,3,100)

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: