Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

List of system of differiential equations in mathematica

  1. Oct 19, 2012 #1
    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.
     
  2. jcsd
  3. Oct 19, 2012 #2
    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.
     
  4. Oct 20, 2012 #3
    Thank you very much, it worked! silly mistake.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: List of system of differiential equations in mathematica
  1. Lists in mathematica (Replies: 4)

Loading...