The euler function computes and displays approximations to points on the solution curve for the differential equation $y'=f(t,y)$ with initial condition (init_t, init_y). The step size is (final_t-init_t)/m. The function displays the points calculated and also returns a list of the points. Click the first Evaluate button to compute an approximation for $f(t,y)=t-y^2$. You may change the function and the other parameters in the last line to try other examples.
Now we can plot the points joined by line segments, plot the slope field, and display them on a single graph.
To use this worksheet in Sage, download this file eulers_method.sws and then upload it to your own Sage account.