- 积分
- 83
- 注册时间
- 2003-11-14
- 仿真币
-
- 最后登录
- 1970-1-1
|
发表于 2005-9-9 19:30:02
|
显示全部楼层
来自 新疆乌鲁木齐
Re:[求助]请教一下关于 solve 函数的问题
刚才试了一下,这个表达式本身好像不能执行(但午夜流星的方法对于可得到解析解的表达式是正确的),说明如下:
用正常的solve命令产生下面的提示:
>> solve(a*exp(b*x)+c*exp(d*x)-f)
??? Error using ==> solve
Unable to evaluate expression.
我用maple命令做了一下,产生了一个maple内部的 implicit solutions ,maple对其说明如下:
- In general, explicit solutions in terms of radicals for polynomial equations
of degree greater than 4 do not exist. In these cases, implicit solutions are
given in terms of RootOfs. Note that explicit solutions for the general
quartic polynomial equation are not by default given because they are too
complicated and messy to be of use. By setting the global variable
_EnvExplicit to true then solve will return explicit solutions for quartic
polynomials in all cases. By setting _EnvExplicit to false, all solutions
which are not rational will be reported as RootOfs.
代入具体数据能够求解个人猜测是具体解或者避免了求解过程中解析符号解的一些内部讨论,所以得到了正解.
另外用fsolve也可以得到数值的实数解
f1=inline('exp(2*x)+3*exp(4*x)-5','x');
fsolve(f1,1)
Optimization terminated successfully:
First-order optimality is less than options.TolFun.
ans =
0.0633
复数解无法得到.
方便看起见我用maple软件解了一下(当然和在matlab内部调用得到结果相同),得到的结果和上面E文内的说明有点联系. |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?注册
×
|