I have the equation

dy/dx=2e^-x-y^2 with y(0)=1


I have h=0.2 and need to find an approximation of y at x=0.4 using midpoint Eulers method.


So so far i have

f1=2e^-x
f2=-y^2

and when n=0, t=0.4, x1=0 and x2=1
when n=1, t=0.5, x1=1 and x2=1.5
when n=2, t=0.6, x1=0.8414, x2=2.85


Are these correct? iF not what am i doing wrong!?