1

我在 mupad 中使用 numeric::fsolve 来求解 x1 x2 m1 和 m2。使用的命令是:

Scase2:=numeric::fsolve([m1,g2,eqn1,eqn2],m1=0,m2=0..infinity,x1=-3.14..3.14,x2=-3.14..3.14],RestrictedSearch,MultiSolutions)

返回的答案是:

[m1 = 0.0, m2 = -8.678897929, x1 = 3.38742203*10^(-17), x2 = 2.77006362], [m1 = 0.0, m2 = 19705.59085, x1 = -1486.62367, x2 = 157.7356704], [m1 = 0.0, m2 = -6151.321562, x1 = -6.594711892*10^(-18), x2 = 78.32275445], [m1 = 0.0, m2 = -2334.614422, x1 = -1.047226205*10^(-13), x2 = -48.81668048], [m1 = 0.0, m2 = 38.00363756, x1 = -70.90099452, x2 = 11.28424375], [m1 = 0.0, m2 = -3017.254857, x1 = -5.285351078*10^(-17), x2 = 55.38965896], [m1 = 0.0, m2 = -14353.49312, x1 = -3.299575199*10^(-16), x2 = 119.665553], [m1 = 0.0, m2 = 4746.862416, x1 = 216.8709045, x2 = 69.03215292], [m1 = 0.0, m2 = -337.6953647, x1 = 4.231726504*10^(-19), x2 = 18.53286231], [m1 = 0.0, m2 = 59888.45924, x1 = 769.621396, x2 = -244.978099], [m1 = 0.0, m2 = -754.4068652, x1 = 7.46136118*10^(-19), x2 = 26.99119714], [m1 = 0.0, m2 = -72400.20717, x1 = -1.43883627*10^(-12), x2 = -269.417393], [m1 = 0.0, m2 = -2953.978962, x1 = -3.936403445*10^(-22), x2 = -54.84860971], [m1 = 0.0, m2 = -0.6449920855, x1 = -2.627245131*10^(-15), x2 = -0.5757632436], [m1 = 0.0, m2 = -1646.776257, x1 = 3.55576955*10^(-15), x2 = -40.34209161], [m1 = 0.0, m2 = -52.36064061, x1 = -5.846045816*10^(-13), x2 = -6.937973456], [m1 = 0.0, m2 = 31302.17624, x1 = 707.7689947, x2 = 225.2898681], [m1 = 0.0, m2 = -6184.407888, x1 = 400.9347135, x2 = 127.621483], [m1 = 0.0, m2 = -30523.06702, x1 = 6.438047089*10^(-17), x2 = -175.083226], [m1 = 0.0, m2 = -212.5775725, x1 = 8.213227391*10^(-19), x2 = -14.08916721]

但是求解器返回的答案包括指定范围之外的解决方案。好吧,手动可以找到可接受的解决方案,有没有更好的方法来做到这一点?为什么求解器返回可接受范围之外的解决方案?

4

1 回答 1

1

求解器的行为与记录相同,请查看 RestrictedSearch 的文档:

请注意,搜索范围之外的解决方案可能会在内部找到。这些可以通过选项 MultiSolutions 访问。参见示例 7。

于 2015-01-23T09:50:47.677 回答