# NDSolve simple matrix problem in mathematica

I have a problem with command NDSolve in mathematica. If we have simple second order differential equation, it is easy to write code in mathematica. But if we have matrix problem (for example 4 unknown functions 4x1 matrix to display it) and also rather than simple constants, we have matrices 4x4. Can I type simple in matrix form this equation and then apply NDSolve without expanding the system. Short code attached here:

http://www.sendspace.com/file/trlx29

Kind regards and thank you in advance,

-

qu[t_] = {qu1[t], qu2[t], qu3[t], qu4[t]};

Some equations' lhs are equal to zero, and 0==0 gives True. So the system is overdetermined. It wouldn't be solved by DSolve[] even after deleting such cases. As for initial conditions here simplified example. As for the initial conditions here is a simplified example: func = {x[t], y[t]}//Flatten; system = {x'[t], y'[t]}//Flatten; rhs = {3 t, 2 t}//Flatten; incond = {x[0], y[0]}//Flatten; indata = {1, 3}//Flatten; NDSolve[#[[1]] == #[[2]] & /@ (Transpose[{Flatten[{system, incond}], Flatten[{rhs, indata}]}]), func, {t, 0, 1}] –  Andrew Sep 8 '11 at 7:46
Dear Mr Andrew, I got your suggestions and it is very good for initial conditions. In older system I used * instead . for matrix, now this is correct in new code, and also I wrote in second equation -S, (because it should be eq1=0, eq2=S, eq3=0), so it is clear. And also I wrote K2n=..,K3n=..,K4n=..(not K2n:=..because K2n, K3n and K4n are also functions only of qp) with same initial conditions, but code doesnt work again.sendspace.com/file/h5xcge Message: NDSolve::dsfun: {qu1[t],qu2[t],qu3[t],qu4[t]} cannot be used as a function. >> –  George Sep 8 '11 at 12:19
The functions list should be a one-level list, I specially have written it above as func = {x[t], y[t]}//Flatten; though flattening is not required in this case. Here {qu1[t],qu2[t],qu3[t],qu4[t]}//Flatten instead of {qu1[t],qu2[t],qu3[t],qu4[t]}` should do. –  Andrew Sep 8 '11 at 12:32