# NDSolve syntax problem

Posted 9 years ago
2098 Views
|
2 Replies
|
3 Total Likes
|
 Hi, At first I am new here and new to Mathematica so sorry for any incomprehensions. I want to solve numerically the system of two ordinary differential equations y'[t] == -0.25 y[t] + (x[t])^2 x'[t] = -0.25 x[t] + y[t] - x[t] y[t] When I try that following the NDSolve manual it returns me an error message. I tried to findout something but didn´t succeed. Thanks for any help.My code is attached. Attachments:
2 Replies
Sort By:
Posted 9 years ago
 Hi Tomas,it appears that you have typed a single equal sign for the equation of the x component. This here works: NDSolve[{y'[t] == -0.25 y[t] + (x[t])^2, x'[t] == -0.25 x[t] + y[t] - x[t] y[t], x[0] == 1, y[0] == 1}, {x, y}, {t, 0, 10}] If you plot this you get sols =NDSolve[{y'[t] == -0.25 y[t] + (x[t])^2, x'[t] == -0.25 x[t] + y[t] - x[t] y[t], x[0] == 1, y[0] == 1}, {x, y}, {t, 0, 10}] and Plot[{x[t], y[t]} /. sols, {t, 0, 10}] I hope this helps.Cheers, M.
Posted 9 years ago
 Thank you for the quick help Marco and a little encouragement. It works!