List of system of differiential equations in mathematica

Click For Summary
SUMMARY

The discussion centers on solving a system of differential equations in Mathematica using the NDSolve function. The user encountered an error related to the Table function when attempting to generate multiple solutions with varying initial conditions. The error message indicated an issue with the iterator format in the Table function. After troubleshooting, the user resolved the issue by correcting the syntax in their code.

PREREQUISITES
  • Understanding of differential equations and their initial conditions
  • Familiarity with Mathematica's NDSolve function
  • Knowledge of the Table function in Mathematica
  • Basic coding skills in Mathematica for troubleshooting syntax errors
NEXT STEPS
  • Explore advanced features of NDSolve in Mathematica
  • Learn about error handling and debugging techniques in Mathematica
  • Investigate how to optimize performance when generating large datasets in Mathematica
  • Study the use of dynamic variables in Table for generating multiple solutions
USEFUL FOR

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

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