solving system of mixed ode's and algebraic equations



Hello,

I have a system of equations, some of them are ode's, some of them are algebraic equations,
i.e. (warning: extremely simple example):

diff(y1(x),x) = y2(x)
diff(y2(x),x) = y3(x)
2*y3(x) = y2(x)
2*y4(x) = 2

I am trying to solve something like this by first splitting it into an algebraic problem and an ode problem,
solving the algebraic system, substituting the solution into the ode system and then solve the ode system.

So, I want to find y4(x)=1,y3(x)=y2(x)/2 and substitute this into the two ode's.

Is this a good strategy or is there a simpler way of doing this in maxima? I did not find anything about solving systems of ode's, so I have written a simple function for it myself.
So how can I get the solution of the algebraic equations in a form that allows direct substitution? When I solve directly,
I get the algebraic solution in terms of an unknown %r1, which I find inconvenient.
I was thinking of finding the free variables first by writing it in echelon form and then 'not' solving
for the free variables. Is there something available that allows me to find the free variables? 


Thanks and regards,
Nijso