【发布时间】:2021-05-11 23:34:08
【问题描述】:
我正在为二分法编写代码,并且几乎在我使用的每一种方法中都会出现此错误。我似乎无法确定问题所在,我应该使用二分法、假法位置和割线法。每次我运行代码它都会给我这个错误代码
-8
E := 1 10
S := 0.1*10^(-7);
-8
S := 1 10
f := x -> 950*ln(200000/(200000 - 3000*x)) + (-1)*9.81*x - 500;
f := proc (x) options operator, arrow; 950*ln(200000/(200000-300\
0*x))-9.81*x-500 end proc
a := 10;
a := 10
b := 50;
b := 50
while S <= b - a or E <= abs(f(a)) and E <= abs(f(b)) do
p := (a + b)/2;
if f(p) = 0 then
break;
elif f(a)*f(p) < 0 then
b := p;
else
a := c;
end if;
end do;
p := 30
Error, cannot determine if this expression is true or false: (950*ln(20/17)-598.10)*(950*ln(20/11)-794.30) < 0
【问题讨论】:
标签: maple