To demonstrate the philosophy behind RK methods, let us consider the second-order RK method, RK2. The first approximation consists in Taylor expanding f(t,y) around the center of the integration interval ti to ti+1, that is, at ti+h/2, h being the step. Using the midpoint formula for an integral, defining y(ti+h/2)=yi+1/2 and ti+h/2=ti+1/2, we obtain ∫ti+1tif(t,y)dt≈hf(ti+1/2,yi+1/2)+O(h3). This means in turn that we have yi+1=yi+hf(ti+1/2,yi+1/2)+O(h3).