To apply the Euler method, I'm given an equation of the form y' = y - t^2 + 1, 0 <= t <=2, y(0) = 0.5 and f(y,t) = y'. I set h = (b-a)/N where N is the number of iterations and h is the step size. t = a, w = y(0) then I loop w = w + h*f(t,w), t = a + i*h N times.
I'm trying to change an...