Mathematica Euler的方法

时间:2013-11-11 19:17:03

标签: wolfram-mathematica

我正在尝试解决Mathematica中的微分方程,我并不是很了解它。我将在下面显示等式,我的尝试和错误消息:

等式:

dp(t)/dt=rb(1-p(t))

尝试:

b = .02;
d = .015;
r = .1;
h = 1;
t = 0;
Clear[p, t]
DSolve[{p'[t] == r*b*(1 - p[t]), p[0] == .01}, p[t], t]

错误:

DSolve::deqn: Equation or list of equations expected instead of True in the first     argument {True,p[0]==0.01}. >>

1 个答案:

答案 0 :(得分:1)

您无法设置t=0,因为它是一个数字。在会话中,以下内容为

b = 2/100;
d = 15/1000;
r = 1/10;
h = 1;

DSolve[{p'[t] == r*b*(1 - p[t]), p[0] == .01}, p[t], t]
  

Mathematica graphics