I don't think the problem is too hard. As far as I understand, t_f (t and lower index f, italic) in your formula stands for
I just wrote some sketch here, you need to continue:
t_i
when i = n-1
; Even down-counting relations, which include lambda with indices (eq #5-#8), are consequently solvable. However, you need to have a lot of punctuality to implement this recurrent relation; intuitive variable naming is very important here.I just wrote some sketch here, you need to continue:
defaults = {'s': 10, 'd': 0.02, 'beta': 2.4e-5, # define other values here 'h': 0.01 # h is time-step? you need to define it here. are we planning to use variable-step method? } initial_conditions = {'x0': 0, # other conditions } def equation(x, y, vi, vni, **defaults) i = 0 X, Y = [], [] xi = initial_conditions['x0'] yi = initial_conditions['y0'] while i < n: xi_1 = (xi + h*(s+r*yi))/(1 + h* ...) # complete the formula # write other formulae here # reassign values xi = xi_1 yi = yi_1 # save values X.append(xi_1) Y.append(yi_1) i += 1This is likely some immunology model, may be modeling HIV infection dynamics.