rungakutta[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/3,y->yold+k1*h/3};
	k3=f/.{x->xold+2*h/3,y->yold-h*k1/3+k2*h};
	k4=f/.{x->xnew,y->yold+h*(k1-k2+k3)};
ynew=yold+(h/8)*(k1+3*k2+3*k3+k4);
outlist=Append[outlist,{xnew,ynew}];
xold=xnew;
yold=ynew,steps];
Return[outlist]]