u_star = u[k] + dt*f(u[k], t[k]) u[k+1] = u[k] + 0.5*dt*f(u[k], t[k]) + 0.5*dt*f(u_star, t[k+1]) ## function argument as list items