import matplotlib.pyplot as plt xx = [0] yy = [1] x = 0 y = 1 h=0.1 for i in range(10): y = 1.1*y - h * (2 * x / y) x = x + h xx.append(x) yy.append(y) plt.plot(xx,yy) plt.show()
import matplotlib.pyplot as plt xx = [0] yy = [1] x = 0 y = 1 h=0.1 for i in range(10): y = 1.1*y - h * (2 * x / y) x = x + h xx.append(x) yy.append(y) plt.plot(xx,yy) plt.show()