function lsg = rungekutta(f,n,x,h,y)

k1 = h*f(n,x,y);
k2 = h*f(n,x+0.5*h,y+0.5*k1);
k3 = h*f(n,x+0.5*h,y+0.5*k2);
k4 = h*f(n,x+h,y+k3);
lsg = y + k1/6 + k2/3 + k3/3+k4/6;