查看单个帖子
旧 2014-04-21, 17:59   #1
guohf
初级会员
 
注册日期: 2009-05-24
帖子: 28
声望力: 16
guohf 正向着好的方向发展
默认 用solve解含小量的非线性方程组出现不同结果

要解方程组
(x-6e-5)^2+(y-5e-5)^2=(8e-6)^2
x^2+(y-5e-5)^2=3.6e-9

方程有实数解,可采用两种方法,得不到想要的结果,且会报错,请高手给看下,先谢了
法一:
>> ax=6e-5;ay=5e-5;
>> syms x y;
>> [x,y]=solve((ax-x)^2+(ay-y)^2-(8e-6)^2==0,x^2+(y-5e-6)^2-3.6e-9==0)

x, y得到很怪的复数解

将ax, ay的具体值代入,法二:
[x,y]=solve((x-6e-5)^2+(y-5e-5)^2-(8e-6)^2==0,x^2+(y-5e-6)^2-3.6e-9==0)

Error using mupadmex
Error in MuPAD command: Not a square matrix. [(Dom::Matrix(Dom::ExpressionField()))::_power]

Error in sym/privBinaryOp (line 1693)
Csym = mupadmex(op,args{1}.s, args{2}.s, varargin{:});

Error in sym/mpower (line 189)
B = privBinaryOp(A, p, 'symobj::mpower');
出现上面错误,不太理解这些“错误”指的是什么?在网上查了一下,添加了点:
[x,y]=solve((x-6e-5).^2+(y-5e-5).^2-(8e-6)^2==0,x.^2+(y-5e-6).^2-3.6e-9==0)

Warning: Explicit solution could not be found.
> In solve at 179
x = [ empty sym ]
y = []

此帖于 2014-04-21 18:07 被 guohf 编辑。
guohf 当前离线   回复时引用此帖