Mathematica List of system of differiential equations in mathematica

AI Thread Summary
The discussion centers on solving a system of differential equations in Mathematica using NDSolve, with the need to generate multiple solutions based on varying initial conditions. The user encountered an error related to the structure of their Table function, which indicated an issue with the iterator format. Suggestions were made to ensure the correct syntax for the Table function, including proper use of curly braces. After clarifying the code structure, the user resolved the issue, attributing it to a simple mistake. The conversation highlights the importance of syntax accuracy in Mathematica for generating multiple solutions efficiently.
kalish
Messages
27
Reaction score
0
Hello, I have a system of DE involving two variables depending on the parameter t. To solve it I need to specify x(0),y(0),x'(0),y'(0). I know how to solve it with NDSolve, (analytical solution doesn't work), and I want to make a list of different solutions with different initial conditions. I tried to use Table, but it refuses to compute and states :

"\!\(\*
StyleBox[\"Argument\", \"MT\"]\)\!\(\*
StyleBox[\" \", \"MT\"]\)\!\(\*
StyleBox[\"\"\", \"MT\"]\)(y^\[Prime]\[Prime])[t]-(0.1 x[t])/(10^3 \
(Power[<<2>>]+<<1>>))+(0.001 (x^\[Prime])[t])/(10^3 \
Sqrt[Power[<<2>>]+Power[<<2>>]])==0 at position 2 does not have the \
correct form for an iterator.

I just want to have thousands of solutions in one formula, how can I do that?

Thanks.
 
Physics news on Phys.org
Without seeing your code it is very hard to be certain, but often the message "at position 2 does not have the correct form for an iterator" means that your

Table[StuffToCalculate,{i,1,20}]
or
Table[StuffToCalculate,{20}]
is either missing the {} or something similar to this.

If this doesn't give you the clue to find the problem then post your code in a nice readable form that someone could execute and someone can probably point out the problem in a moment.
 
Thank you very much, it worked! silly mistake.
 

Similar threads

Replies
1
Views
2K
Replies
1
Views
2K
Replies
2
Views
1K
Replies
6
Views
4K
Replies
19
Views
2K
Replies
1
Views
2K
Back
Top