Group Abstract Group Abstract

Message Boards Message Boards

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

syntax problem in code

2 Replies

Thanks a lot Marco sir...

Hi,

try this:

NDSolve[{x'[t] == 0.5 x[t] y[t] (1 + x[t]) (2 - x[t]), y'[t] == x[t]^2 (y[t]^2) - 0.5 (y[t]^2) (x[t] + 1) (x[t] + 2), x[0] == 4, y[0] == 10000}, {x, y}, {t, 0, 1000}]

You should use the [ ] only for functions. If you want to set normal parenthesis, use ( ).

Plotting the result

Plot[{x[t] /. sols, y[t] /. sols}, {t, 0, 10}]

gives

enter image description here

Cheers, Marco.

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