If we add to this the corresponding expansion for the derivative of the velocity v^{(1)}_{i+1} = v^{(1)}_i+hv^{(2)}_i+O(h^2), and retain only terms up to the second derivative of the velocity since our error goes as O(h^3) , we have hv^{(2)}_i\approx v^{(1)}_{i+1}-v^{(1)}_i. We can then rewrite the Taylor expansion for the velocity as v_{i+1} = v_i+\frac{h}{2}\left( v^{(1)}_{i+1}+v^{(1)}_{i}\right)+O(h^3).