matlab求解一元四次方程区间值,急,f(x)=-x^4+32x^3-208x^2-1436x+122860

问题描述:

matlab求解一元四次方程区间值,急,
f(x)=-x^4+32x^3-208x^2-1436x+12286
0

x=0:.1:24;
y=-x.^4+32*x.^3-208*x.^2-1436*x+12286;
plot(x,y)
如果想看具体的值,前面两句去掉后面的分号即可.

r =
-36.3775
-7.6853
6.0314 + 2.7511i
6.0314 - 2.7511i
>>
所以,x再次范围内无解

y=@(x)-((16-x).^2*(576-(24-x).^2)./(24-x).^2);[x,fval] = fminunc(y,8)Optimization terminated:relative infinity-norm of gradient less than options.TolFun.x =7.3593fval =-80.6403在x=7.359时取得最大值80....

可用符号方程求解的命令
solve('(16-x)^2*(576-(24-x)^2)/(24-x)^2=0','x')
得到
ans =

[ 16]
[ 16]
[ 0]
[ 48]
可知在0-24区间内的饥解为16