I have a quick question that I'm having a little trouble with, it seems simple enough but i just need a bit of clarification.
If I had a system of ode's and I was to choose the runge kutta 4 method to solve, then how would i go about obtaining the correct equation for $k_2$ if the original function $f(x_n, t_n) = \frac{dx}{dt}$ is a function of, say, $\theta$ (and not $x$ or $t$)?
E.g. if $\frac{dx}{dt} = \cosh(\theta) = f(x_n, t_n)$ then for $k_1$, Ii would use $k_1 = h f(x_n, t_n) = h(\cosh(\theta))$
but for $k_2$ the general equation is $k_2 = h f(x_n + \frac{k_1}{2}, t_n + \frac{h}{2})$ so would my desired equation for $k_2$ specific to my problem be:
$k_2 = h(\cosh(\theta)+\frac{k_1}{2})$
or
$k_2 = h(\cosh(\theta+\frac{k_1}{2})) $ ?
Thanks!