ODEs: rk routing with derivs on rhs



>>>>> "Daniel" == Daniel Lakeland <dlakelan at street-artists.org> writes:

    Daniel> In my further attempts to understand my differential equations, I
    Daniel> tried to use the "rk" routine. I used "? rk" to get info about it but
    Daniel> it seems that I am limited as follows.

    Daniel> The system is 2 coupled 2nd order ODEs. It's only second order in h,
    Daniel> therefore I need an expression for h', h'', and v' for the integrator
    Daniel> and h, h', v will be my solution variables.

    Daniel> i can write these equations semi-explicitly... 

    Daniel> h' depends on h, h'' v, v'
    Daniel> v' depends on h, h', h'', v
    Daniel> h'' depends on h h' v'

    Daniel> It seems as though the rk routine is not happy with this, preferring
    Daniel> the rhs to be free of all derivatives. (the error I get is something
    Daniel> about attempting to take derivative with respect to a number)

It's not exactly clear here, but aren't you supposed to convert your
two 2nd-order ODEs into four 1st order ODEs?  Then rk should be able
to solve them. 

But I've never used rk before, and I haven't done ODEs in ages.

Ray