我在Maxima中有一个微分方程组。我正在尝试得出解决方案。

diff_eq1: 'diff(p(t),t) = (5/2 + (3^(1/2))/24 - (5/8)*p(t) - ((3^(1/2))/24)*q(t)) * p(t);
diff_eq2: 'diff(q(t),t) = (7/8 + (3*(3^(1/2))/2) - (3*(3^(1/2))/8)*p(t) - (7/8)*q(t)) * q(t);
atvalue (p(t), t=0, 0.25);
atvalue (q(t), t=0, 3);
sol: desolve([diff_eq1, diff_eq2], [p(t),q(t)]);
plot2d([rhs(sol[1]), rhs(sol[2])], [t,0,5]);

但是我有一个错误:
plot2d: expression evaluates to non-numeric value everywhere in plotting range.
plot2d: expression evaluates to non-numeric value everywhere in plotting range.
plot2d: nothing to plot.

最佳答案

似乎maxima尚未找到解决方案。但是,您可以使用Runge-Kutta方法获得数值结果。

http://maxima.sourceforge.net/docs/manual/en/maxima_50.html

diff_eq1: (5/2 + (3^(1/2))/24 - (5/8)*p - ((3^(1/2))/24)*q) * p;
diff_eq2: (7/8 + (3*(3^(1/2))/2) - (3*(3^(1/2))/8)*p - (7/8)*q) * q;

(p0: 0.25, q0: 3);
sol: rk([diff_eq1, diff_eq2], [p, q], [p0, q0], [t, 0, 2, 0.1])$
pq: map( lambda([x], [x[2], x[3]]), sol)$
plot2d( [discrete, pq], [xlabel, "p"], [ylabel, "q"]);

关于differential-equations - 非线性微分方程解的图解,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/13575119/

10-09 02:37