Error explanation in the function NDSolve in mathematica 8

In summary, the conversation discusses the attempt to solve a system of differential equations using Mathematica. The system is presented in the form of a matrix and is periodic. When using NDSolve, an error message is received stating that the computed derivatives do not have consistent dimensionality with the initial conditions. The question is asked for clarification on the issue, with a request to see the value of the 'system' variable. The person responding also asks for clarification on whether each of the x1[0], x2[0], etc. variables are equal to a vector of 12 ones or just 1.
  • #1
Nesrine
9
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
  • #2
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:

1. What is NDSolve in Mathematica 8 and what does it do?

NDSolve is a function in Mathematica 8 that is used for solving differential equations. It takes in a set of differential equations and initial conditions, and then computes and returns a numerical solution.

2. Why am I getting an error when using NDSolve in Mathematica 8?

There could be several reasons for this. Some common reasons include incorrect syntax or input, incompatible or conflicting equations, or insufficient memory. It is important to carefully check your code and inputs to identify the specific cause of the error.

3. How do I interpret the error messages from NDSolve in Mathematica 8?

The error messages from NDSolve in Mathematica 8 typically provide information about the specific issue that caused the error. They often include the line number where the error occurred and a brief description of the problem. Refer to the Mathematica documentation or online resources for more information on interpreting error messages.

4. How can I troubleshoot and fix errors in NDSolve in Mathematica 8?

The first step is to carefully examine your code and inputs to identify the source of the error. You can also try using the "CheckAll" option in NDSolve to get more specific information about the error. Additionally, it can be helpful to consult online resources or seek assistance from other Mathematica users.

5. Are there any alternative approaches to using NDSolve in Mathematica 8?

Yes, there are other methods for solving differential equations in Mathematica 8, such as using the "DSolve" function for symbolic solutions or using numerical methods from other packages. However, NDSolve is often the most efficient and accurate method for solving differential equations in Mathematica.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • Calculus and Beyond Homework Help
Replies
1
Views
833
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
248
  • Precalculus Mathematics Homework Help
Replies
3
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
4K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
Back
Top