Numerically solving an ODE with explicit dependence on the derivatives Suppose we have a state space consisting of $x, y, x', y'$ and a system of ODE given by:
$$x' = f(x, y')\\y' = g(y, x').$$
What is the standard approach for numerically solving this? Does being dependent upon the derivatives fundamentally change the equation? I suppose you could do a substitution producing:
$$x' = f(x, g(y, x')).$$
But I am not sure what the implication of this is.
 A: What you have is a form of differential algebraic equation (DAE).
The central problem you have is that your equations impose a constraint on possible states, as not every $(x,y,x',y')$ fulfils them.
This has to be taken into account when integrating and also when formulating your initial condition:
Almost all initial conditions are invalid.
Thus, you cannot simply apply normal solvers.
What approach to DAEs is best for you depends on the details of your problem, i.e., on your $f$ and $g$.
In your special case, I would start by trying to solve $x' = f(x, g(y, x'))$ for $x'$.
If that yields an easy and unique solution, you have an ODE for $x$ and can obtain one for $y$ by inserting your result for $x'$ in $y'=g(y,x')$.
This would not work if $g$ depended explicitly on $y'$ and $f$ depended explicitly on $x'$, so you exploit the specific structure of your DAE for this.
If solving $x' = f(x, g(y, x'))$ for $x'$ is not that easy, you might do this numerically whenever you need to compute the derivative within your ODE integration scheme, but that might require special care if your solution is not unique or numerically unstable.
In this case, a collocation method might be reasonable.
Also there might be better DAE-specific approaches for this case, which I am not aware of.
