【问题标题】:assigning in system of differential equations在微分方程组中分配
【发布时间】:2010-06-06 19:45:32
【问题描述】:

当我在数值上求解一个由两个微分方程组成的系统时:

s1:=diff(n[Di](t), t)=...;
s2:=diff(n[T](t), t)=...;
ics:={...};   #initial condition.
sys := {s1, s2, ics}: 
sol:=dsolve(sys,numeric);

关于“t”,则“t=4”的解(例如)为 sol(4):

[t=4, n1(t)=const1, n2(t)=const2].

现在,如何将 n1(t) 和 n2(t) 的值用于另一个方程中的所有“t”,即“p”,它涉及 n1(t) 或 n2(t)(如:{p=a+n1(t)*n2(t)+f(t)},其中定义了“a”和“f(t)”),并为“t”的间隔绘制“p” ?

【问题讨论】:

  • 14 个问题和 0 个接受的答案?祝你好运。并在下次格式化您的代码。

标签: maple differential-equations


【解决方案1】:

也许举个例子会有所帮助。

s1:=diff(n1(t), t)=sin(t);
s2:=diff(n2(t), t)=cos(t);
ics:={n1(0)=1,n2(0)=0}:
sys := {s1, s2} union ics:
sol:=dsolve(sys,numeric,output=listprocedure);
N1:=eval(n1(t),sol);
N2:=eval(n2(t),sol);
N1(0);
N1(1.1);
N2(0);
N2(1.1);
p := 11.3 + N1*N2 + tan:
plot(p, 0..1.1);

您可以查看 DEplot 例程,它专门用于绘制 ode 解。

【讨论】:

    猜你喜欢
    • 2021-05-27
    • 1970-01-01
    • 1970-01-01
    • 2014-11-28
    • 2016-09-20
    • 2021-01-29
    • 1970-01-01
    • 2014-12-29
    • 2016-03-21
    相关资源
    最近更新 更多