Mathematica Error explanation in the function NDSolve in mathematica 8

AI Thread Summary
The discussion revolves around solving a system of differential equations using Mathematica, where the user encounters an error with NDSolve. The system is defined with a periodic matrix A and a vector X containing multiple functions. The user specifies initial conditions where all functions are set equal to a vector of twelve ones. The error message indicates a dimensionality inconsistency between the computed derivatives and the initial conditions. Participants suggest clarifying the value of the 'system' variable and question whether the initial conditions are intended to represent each function as a vector of twelve ones or as individual values of one. This distinction is crucial for resolving the dimensionality issue in the NDSolve function.
Nesrine
Messages
8
Reaction score
0
Hello ,

I have tried to solve a system of differentiel equations with mathematica that is presented as follow

X[t_] = {x1[t], x2[t], x3[t], x4[t], x5[t], x6[t] , x7[t], x8[t],
x9[t], x10[t], x11[t], x12[t]};
system = MapThread[#1 == #2 &, {X'[t], A.X[t]}];

where the matrix A is periodic.

when I used NDSolve :

sol = NDSolve[{system,
x1[0] == x2[0] == x3[0] == x4[0] == x5[0] == x6[0] == x7[0] ==
x8[0] == x9[0] == x10[0] == x11[0] ==
x12[0] == {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}}, {x1, x2, x3, x4,
x5, x6, x7, x8, x9, x10, x11, x12}, {t, 0, T}];

I have got an error message that is :

NDSolve::ndfdmc: Computed derivatives do not have dimensionality consistent with the initial conditions. >>

Can someone please explain it to me??

Thank you very much
 
Physics news on Phys.org
Show us what value your 'system' variable has when you are doing that.

Seeing exactly what NDSolve is actually being given might answer the question.

Are you saying that each of your x1[0],x2[0]... are all equal to a vector of 12 1's?
Or are you thinking that each of your x1[0],x2[0]... are each equal to 1?
 
Last edited:

Similar threads

Replies
3
Views
3K
Replies
1
Views
3K
Replies
2
Views
2K
Replies
4
Views
5K
Replies
2
Views
205
Replies
0
Views
143
Replies
4
Views
3K
Replies
3
Views
4K
Replies
5
Views
3K
Back
Top