Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Running coupled differential equations' topicStudent Support Forum > General > "Running coupled differential equations"

< Previous CommentHelp | Reply To Comment | Reply To Topic
Author Comment/Response
Bill Simpson
07/30/12 11:57am

You are missing a ",t" in your

NDSolve[{D[rho[1, 1, t], t] == rho11,
...
D[rho[4, 1, t]] == rho41, <---right there
...
]

But even with that fixed it then throws

NDSolve::ndum: encountered non-numerical value for a derivative at t==0

NDSolve works strictly and entirely with numeric values for everything except the functions (and their derivatives) and t. I'm guessing you either have symbolic variables for Jx, Jy, gamma, d, Jz and perhaps other variables that you didn't provide values for in your example notebook or you assumed NDSolve would let you use symbolic variables.

Just as a quick experiment I tried using DSolve, which will happily let you use symbolic variables, but that threw

DSolve:: dsvar: 0 cannot be used as a variable.

and it might be possible to overcome that problem if you just cannot supply numeric values for all your variables.

URL: ,

Subject (listing for 'Running coupled differential equations')
Author Date Posted
Running coupled differential equations koh 07/29/12 01:57am
Re: Running coupled differential equations Bill Simpson 07/30/12 11:57am
< Previous CommentHelp | Reply To Comment | Reply To Topic