Message Boards Message Boards

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

[?] Solve a differential algebraic equation?

Posted 5 years ago

I'm trying to obtain a solution to the differential equation as a function, however I keep getting $Failed in return. I'd greatly appreciate if someone could point out what I'm doing wrong and how I can correct this while maintaining the original flexibility of it being a function. Below is the attached .nb file I'm working with. Thank you for your time and consideration.

Attachments:
POSTED BY: Joshua Champion
5 Replies
Posted 5 years ago

Look more carefully at the documentation on NDSolve. With NDSolve you get replacement rules which need to be used to access the solution. With NDSolveValue you get the solutions. The attached notebook gives both approaches. Also, it is best to not begin user variables with capitals since they can conflict with reserved names.

Kind regards,

David

POSTED BY: David Keith

Adjustment:

Attachments:
POSTED BY: Mariusz Iwaniuk
Posted 5 years ago

Mariusz,

I was writing my response while you posted yours. I like yours better. But why do we obtain different plots???

David

POSTED BY: David Keith

Hi David.

A small mistake occurred in my differential equations,I corrected, and now solution is the same as yours.

Regards Mariusz.

POSTED BY: Mariusz Iwaniuk

Ahh, my mistake was so simple, I should slap myself. Thank you, I spent a few hours looking over this thing trying to figure out my error just to simply find out (because of the .nb file that was provided) that instead of putting {X[t], Y[t]} I was putting {X,Y} so it was reading it incorrectly, again, thank you for your time! I appreciate it :3

POSTED BY: Joshua Champion
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