euler[f_,{x_,x0_,xn_},{y_,y0_},steps_]:=Block[{xold=x0,yold=y0,outlist={{x0,y0}},x,y,h},h=N[(xn-x0)/steps];
Do[xnew=xold+h;
ynew=yold+h*(f/.{x->xold,y->yold});
outlist=Append[outlist,{xnew,ynew}];
xold=xnew;
yold=ynew,steps];
Return[outlist]]

impeuler[f_,{x_,x0_,xn_},{y_,y0_},steps_]:=Block[{xold=x0,yold=y0,outlist={{x0,y0}},x,y,h},h=N[(xn-x0)/steps];
Do[xnew=xold+h;
k1=f/.{x->xold,y->yold};
       k2=f/.{x->xold+h,y->yold+h*k1};
ynew =yold+(h/2)*(k1+ k2);
outlist=Append[outlist,{xnew,ynew}];
xold=xnew;
yold=ynew,steps];
Return[outlist]]