我想在MATLAB中求解此方程。通过数值解算器,我知道某些根是虚构的,而另一些是真实的。通过使用Solve,MATLAB会列出解决方案有效的条件列表。
我只希望MATLAB用解析解决方案解决此问题(不是数值方法,我可以在Mathematica中做到这一点)。有更好的解决方案,还是我可以使用的任何其他软件包?
syms f2 ep1 ep2 a1 a2 fp1 fp2 h e1 m1 mp R f r t1 f1
eqn = (((ep2*fp1 - ep1*fp2)*mp*(e1*m1*(ep2*f2*fp1*(fp2 - a2*mp) +...
ep1*fp2*(-(f1*fp2) + a2*f2*mp))*(h + R) + a2*f2*(-(ep2*f*f2*fp1*R)+...
ep1*f*f1*fp2*R - ...
ep1*ep2*(f1 - f2)*mp*r*(h + R)))* (a1*ep1*ep2*f1*(f1 - f2)...
*mp*(ep2*f*f2*fp1*R - ep1*f*f1*fp2*R + ep1*ep2*(f1 - f2)*mp*r*(h + R)) +...
e1*(ep2^2*f*f2^2*fp1^2*R*t1 + ...
ep1^2*f1*fp2*(f*f1*fp2*R*t1 - ep2*(f1 - f2)*mp*(h + R)*(-(fp1*m1) + ...
a1*m1*mp + r*t1)) + ...
ep1*ep2*fp1*(-2*f*f1*f2*fp2*R*t1 + ep2*(f1 - f2)*mp*(h + R)*(-(f2*fp1*m1)+...
a1*f1*m1*mp + f2*r*t1)))))/...
(e1*ep1*ep2*(ep2*f2*fp1 - ep1*f1*fp2)^2*(h + R)^2*(ep1*ep2*(f1 - f2)*...
(-(a2*f2*fp1) + a1*f1*fp2)*mp + e1*(ep2*f2*fp1*(fp2 - a2*mp) + ...
ep1*fp2*(-(f1*fp2) + a2*f2*mp))*t1))) * (-1) == 0;
solve(eqn,fp1)
The solutions I get are:
(a2*f2*(R*ep1*f*f1*fp2 - ep1*ep2*mp*r*(R + h)*(f1 - f2)) - e1*ep1*fp2*m1*(R + h)*(f1*fp2 - a2*f2*mp))/(R*a2*ep2*f*f2^2 - e1*ep2*m1*(R + h)*(fp2 - a2*mp)*f2)
(ep1*fp2)/ep2
(ep1*f1*mp*(R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