Message Boards Message Boards

0
|
9605 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Help solving a system of differential equations with NDSolve

Posted 9 years ago

Dears

most recently i encountered with another problem in mathematica NDSolve i had defined some equations "lagrangeo1" ,"lagrangei1", and "lagrangei2" that are differential equations. but when it started to solve:

lagrangesolve = NDSolve[{lagrangei1 == 0, lagrangei2 == 0, lagrangeo1 == 0,o1[0] == -36,i1[0] ==18,i2[0] == 18, o1'[0] == 0.5, i1'[0] == 0,i2'[0] == -0.75}, {o1, i1, i2}, {t, 0, 100}]

(o1,i1,i2 are my variables) it said :

NDSolve::ndsdtc: The time constraint of 1.` seconds was exceeded trying to solve for derivatives, so the system will be treated as a system of differential-algebraic equations. You can use Method->{"EquationSimplification"->"Solve"} to have the system solved as ordinary differential equations. >> NDSolve::njnum: The Jacobian is not a matrix of numbers at ... ... General::stop: Further output of NDSolve::njnum will be suppressed during this calculation. >> NDSolve::icfail: Unable to find initial conditions that satisfy the residual function within specified tolerances. Try giving initial conditions for both values and derivatives of the functions. >>

will be glad if anyone could help me

regards

POSTED BY: Amir Arshia
2 Replies

Much easier to help when a full example is presented. Else it's just guessing.

POSTED BY: Daniel Lichtblau

It will help if we can replicate your error. The error is suggesting you to add "EquationSimplification"->"Solve" as an option to your NDSolve. If error persisted, post part of your code which replicates this error, and we can discuss more.

POSTED BY: Ashkan Akbariyeh
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract