def équadiff(a,b,x): dx = 1e-6 y = 1 # condition initiale u = [y] for k in range(int(x/dx)+1): y += (a*y+b)*dx u.append(y) return u