Error explanation in the function NDSolve in mathematica 8

Click For Summary
SUMMARY

The forum discussion addresses an error encountered while using the NDSolve function in Mathematica 8 to solve a system of differential equations. The user defined a vector X[t] and a periodic matrix A, but received the error message "NDSolve::ndfdmc: Computed derivatives do not have dimensionality consistent with the initial conditions." This indicates a mismatch between the dimensionality of the computed derivatives and the initial conditions provided. Clarification was sought regarding whether the initial conditions for x1[0], x2[0], etc., were intended to be vectors or scalar values.

PREREQUISITES
  • Understanding of differential equations and their representations in Mathematica.
  • Familiarity with the NDSolve function in Mathematica 8.
  • Knowledge of matrix operations and dimensionality in mathematical contexts.
  • Basic experience with periodic functions and their implications in differential equations.
NEXT STEPS
  • Review the documentation for NDSolve in Mathematica 8 to understand its requirements for initial conditions.
  • Learn about dimensionality and consistency in mathematical modeling, particularly in the context of differential equations.
  • Explore examples of solving systems of differential equations with periodic coefficients in Mathematica.
  • Investigate the implications of vector versus scalar initial conditions in numerical solutions.
USEFUL FOR

Mathematics students, researchers in applied mathematics, and anyone using Mathematica for solving differential equations will benefit from this discussion.

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 ·
Replies
3
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 4 ·
Replies
4
Views
5K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 5 ·
Replies
5
Views
3K