x=2 # This is the x-value of your initial condition. y=1 # This is the y-value of your initial condition. x_for_est = 1.7 # This is the x-value for your function approximation. step_size = -.01 # this is the step size steps = (x_for_est - x)/step_size steps = round(steps) for i in range(0,steps): new_y = y+(x-2*y)*(step_size) # The parathesis holds the differential equation for the approximation. print(new_y) y=new_y x=x+step_size i=i+1