我正在尝试为“mu”求解方程“eq”。我如何告诉最大值我只想要积极的结果,这是最好的方法var : abs(mu), res;
吗?但是,我的主要问题是,结果包含%i
,它来自哪里?它不应该可以解决R
吗,不需要复数,就像我在“手动”计算中展示的那样?
算术解决方案:
(%i16) eq: RN^2 = R^2+N^2;
(eq) (121*G^2*h2^2*t1^2)/(100*h1^2*t2^2)=(G^2*v^2)/(4*mu^2)+G^2/4
(%i20) res: solve(eq,mu); var : abs(mu), res; expand(var); res, numer;
(res) [mu=-(5*%i*h1*t2*v)/sqrt(25*h1^2*t2^2-121*h2^2*t1^2),mu=(5*%i*h1*t2*v)/sqrt(25*h1^2*t2^2-121*h2^2*t1^2)]
(var) 5*abs(h1)*abs(t2)*abs(1/sqrt(25*h1^2*t2^2-121*h2^2*t1^2))*abs(v)
(%o19) 5*abs(h1)*abs(t2)*abs(1/sqrt(25*h1^2*t2^2-121*h2^2*t1^2))*abs(v)
(%o20) [mu=-(5*%i*h1*t2*v)/(25*h1^2*t2^2-121*h2^2*t1^2)^0.5,mu=(5*%i*h1*t2*v)/(25*h1^2*t2^2-121*h2^2*t1^2)^0.5]
数值解法:
(%i26) t1: 64`mm;
t2: 33`mm;
h1: 47`mm;
h2: 28`mm;
v: 2;
(t1) 64 ` mm
(t2) 33 ` mm
(h1) 47 ` mm
(h2) 28 ` mm
(v) 2
(%i42) res: solve(eq,mu); var : abs(mu), res; var, numer; res, numer;
(res) [mu=-(5*%i*h1*t2*v)/sqrt(25*h1^2*t2^2-121*h2^2*t1^2),mu=(5*%i*h1*t2*v)/sqrt(25*h1^2*t2^2-121*h2^2*t1^2)]
(var) 1410/sqrt(2714239)
(%o41) 0.8558449047226222
(%o42) [mu=-(0.8558449047226222*%i)/(-1)^0.5,mu=(0.8558449047226222*%i)/(-1)^0.5]
手工求解(否定结果省略): https ://www.bilder-upload.eu/bild-07c372-1620053087.png.html