# Solving autonomous system of ODE numerically by Runge-Kutta method

I have an autonomous system $y''= \exp(y)$ with initial conditions $y(0) = 1, y'(0) = \sqrt{2 e}$, which I have to solve numerically by secod-order RG method. (Actuall I must solve BVP, but now i'm interested in another question).

I have recurrent formulas for y (as for second first-order equation): $y(t+h) = y(t) + \frac{1}{2} \left(F_1+F_2\right)$ where $F_1 = h \exp(x,y)$ and $F_2 = h \exp(x+h, y+F_1)$. I have the initial value for $F_1$ to start a procedure, but I don't understand how to calculate $F_2$ in my case. I mean what should I do to use or not to use $x+h$ in calculating $F_2$?

Not sure where the formulas in the question come from but the obvious reference suggests to rewrite the second-order differential equation as the first-order differential system $$z'=f(z),\qquad z=(y',y),\qquad f:(u,v)\mapsto(\mathrm e^v,u),$$ hence RK2 applied to $z$ reads $$z \to z+hf(z+\tfrac12hf(z)),$$ or, equivalently, $$y'\to y'+h\mathrm e^{y'+hy/2},\qquad y\to y+h\left(y'+\tfrac12h\mathrm e^y\right).$$ Finally, RK2 amounts to iterating the pair of relations $$y'(t+h)=y'(t)+h\mathrm e^{y'(t)+hy(t)/2},\quad y(t+h)=y(t)+h\left(y'(t)+\tfrac12h\mathrm e^{y(t)}\right).$$