MATLAB难题:如何把一个复杂的含符号表达式按按一定精度化简.
来源:学生作业帮 编辑:搜搜考试网作业帮 分类:综合作业 时间:2024/07/26 16:31:50
MATLAB难题:如何把一个复杂的含符号表达式按按一定精度化简.
不是simple,是要按一定精度把分式化为小数.
y =1/2115999668407111*(5070602400912917605986812821504-4477454596699003705844035366321*z1^2/(((z1-19/20+x-3/10*(23509722736682911/9007199254740992-6186769141232345/2251799813685248*x)/(19/20-x)/(1+(23509722736682911/9007199254740992-6186769141232345/2251799813685248*x)^2/(19/20-x)^2)^(1/2))*cos((36573973662147359/9007199254740992-6186769141232345/2251799813685248*x)/z1)+((19/20-x)^2/(23509722736682911/9007199254740992-6186769141232345/2251799813685248*x)+3/10/(1+(23509722736682911/9007199254740992-6186769141232345/2251799813685248*x)^2/(19/20-x)^2)^(1/2))*(36573973662147359/9007199254740992-6186769141232345/2251799813685248*x)/z1)^2+((z1-19/20+x-3/10*(23509722736682911/9007199254740992-6186769141232345/2251799813685248*x)/(19/20-x)/(1+(23509722736682911/9007199254740992-6186769141232345/2251799813685248*x)^2/(19/20-x)^2)^(1/2))*sin((36573973662147359/9007199254740992-6186769141232345/2251799813685248*x)/z1)-((19/20-x)^2/(23509722736682911/9007199254740992-6186769141232345/2251799813685248*x)+3/10/(1+(23509722736682911/9007199254740992-6186769141232345/2251799813685248*x)^2/(19/20-x)^2)^(1/2))*cos((36573973662147359/9007199254740992-6186769141232345/2251799813685248*x)/z1))^2))^(1/2)/z1*(((z1-19/20+x-3/10*(23509722736682911/9007199254740992-6186769141232345/2251799813685248*x)/(19/20-x)/(1+(23509722736682911/9007199254740992-6186769141232345/2251799813685248*x)^2/(19/20-x)^2)^(1/2))*cos((36573973662147359/9007199254740992-6186769141232345/2251799813685248*x)/z1)+((19/20-x)^2/(23509722736682911/9007199254740992-6186769141232345/2251799813685248*x)+3/10/(1+(23509722736682911/9007199254740992-6186769141232345/2251799813685248*x)^2/(19/20-x)^2)^(1/2))*(36573973662147359/9007199254740992-6186769141232345/2251799813685248*x)/z1)^2+((z1-19/20+x-3/10*(23509722736682911/9007199254740992-6186769141232345/2251799813685248*x)/(19/20-x)/(1+(23509722736682911/9007199254740992-6186769141232345/2251799813685248*x)^2/(19/20-x)^2)^(1/2))*sin((36573973662147359/9007199254740992-6186769141232345/2251799813685248*x)/z1)-((19/20-x)^2/(23509722736682911/9007199254740992-6186769141232345/2251799813685248*x)+3/10/(1+(23509722736682911/9007199254740992-6186769141232345/2251799813685248*x)^2/(19/20-x)^2)^(1/2))*cos((36573973662147359/9007199254740992-6186769141232345/2251799813685248*x)/z1))^2)^(1/2)-1639176211415221/4503599627370496+z2/z1*(tan(2115999668407111/2251799813685248*z2/(z2+2-2*x))-1639176211415221/4503599627370496)
不是simple,是要按一定精度把分式化为小数.
y =1/2115999668407111*(5070602400912917605986812821504-4477454596699003705844035366321*z1^2/(((z1-19/20+x-3/10*(23509722736682911/9007199254740992-6186769141232345/2251799813685248*x)/(19/20-x)/(1+(23509722736682911/9007199254740992-6186769141232345/2251799813685248*x)^2/(19/20-x)^2)^(1/2))*cos((36573973662147359/9007199254740992-6186769141232345/2251799813685248*x)/z1)+((19/20-x)^2/(23509722736682911/9007199254740992-6186769141232345/2251799813685248*x)+3/10/(1+(23509722736682911/9007199254740992-6186769141232345/2251799813685248*x)^2/(19/20-x)^2)^(1/2))*(36573973662147359/9007199254740992-6186769141232345/2251799813685248*x)/z1)^2+((z1-19/20+x-3/10*(23509722736682911/9007199254740992-6186769141232345/2251799813685248*x)/(19/20-x)/(1+(23509722736682911/9007199254740992-6186769141232345/2251799813685248*x)^2/(19/20-x)^2)^(1/2))*sin((36573973662147359/9007199254740992-6186769141232345/2251799813685248*x)/z1)-((19/20-x)^2/(23509722736682911/9007199254740992-6186769141232345/2251799813685248*x)+3/10/(1+(23509722736682911/9007199254740992-6186769141232345/2251799813685248*x)^2/(19/20-x)^2)^(1/2))*cos((36573973662147359/9007199254740992-6186769141232345/2251799813685248*x)/z1))^2))^(1/2)/z1*(((z1-19/20+x-3/10*(23509722736682911/9007199254740992-6186769141232345/2251799813685248*x)/(19/20-x)/(1+(23509722736682911/9007199254740992-6186769141232345/2251799813685248*x)^2/(19/20-x)^2)^(1/2))*cos((36573973662147359/9007199254740992-6186769141232345/2251799813685248*x)/z1)+((19/20-x)^2/(23509722736682911/9007199254740992-6186769141232345/2251799813685248*x)+3/10/(1+(23509722736682911/9007199254740992-6186769141232345/2251799813685248*x)^2/(19/20-x)^2)^(1/2))*(36573973662147359/9007199254740992-6186769141232345/2251799813685248*x)/z1)^2+((z1-19/20+x-3/10*(23509722736682911/9007199254740992-6186769141232345/2251799813685248*x)/(19/20-x)/(1+(23509722736682911/9007199254740992-6186769141232345/2251799813685248*x)^2/(19/20-x)^2)^(1/2))*sin((36573973662147359/9007199254740992-6186769141232345/2251799813685248*x)/z1)-((19/20-x)^2/(23509722736682911/9007199254740992-6186769141232345/2251799813685248*x)+3/10/(1+(23509722736682911/9007199254740992-6186769141232345/2251799813685248*x)^2/(19/20-x)^2)^(1/2))*cos((36573973662147359/9007199254740992-6186769141232345/2251799813685248*x)/z1))^2)^(1/2)-1639176211415221/4503599627370496+z2/z1*(tan(2115999668407111/2251799813685248*z2/(z2+2-2*x))-1639176211415221/4503599627370496)
![MATLAB难题:如何把一个复杂的含符号表达式按按一定精度化简.](/uploads/image/z/16083364-4-4.jpg?t=MATLAB%E9%9A%BE%E9%A2%98%EF%BC%9A%E5%A6%82%E4%BD%95%E6%8A%8A%E4%B8%80%E4%B8%AA%E5%A4%8D%E6%9D%82%E7%9A%84%E5%90%AB%E7%AC%A6%E5%8F%B7%E8%A1%A8%E8%BE%BE%E5%BC%8F%E6%8C%89%E6%8C%89%E4%B8%80%E5%AE%9A%E7%B2%BE%E5%BA%A6%E5%8C%96%E7%AE%80.)
digits(3)
>> vpa(y)
ans =
.473e-15*(.507e31-.448e31*z1^2/(((z1-.950+x-1.*(.783-.824*x)/(.950-1.*x)/(1.+(2.61-2.75*x)^2/(.950-1.*x)^2)^(1/2))*cos((4.06-2.75*x)/z1)+((.950-1.*x)^2/(2.61-2.75*x)+.300/(1.+(2.61-2.75*x)^2/(.950-1.*x)^2)^(1/2))*(4.06-2.75*x)/z1)^2+((z1-.950+x-1.*(.783-.824*x)/(.950-1.*x)/(1.+(2.61-2.75*x)^2/(.950-1.*x)^2)^(1/2))*sin((4.06-2.75*x)/z1)-1.*((.950-1.*x)^2/(2.61-2.75*x)+.300/(1.+(2.61-2.75*x)^2/(.950-1.*x)^2)^(1/2))*cos((4.06-2.75*x)/z1))^2))^(1/2)/z1*(((z1-.950+x-1.*(.783-.824*x)/(.950-1.*x)/(1.+(2.61-2.75*x)^2/(.950-1.*x)^2)^(1/2))*cos((4.06-2.75*x)/z1)+((.950-1.*x)^2/(2.61-2.75*x)+.300/(1.+(2.61-2.75*x)^2/(.950-1.*x)^2)^(1/2))*(4.06-2.75*x)/z1)^2+((z1-.950+x-1.*(.783-.824*x)/(.950-1.*x)/(1.+(2.61-2.75*x)^2/(.950-1.*x)^2)^(1/2))*sin((4.06-2.75*x)/z1)-1.*((.950-1.*x)^2/(2.61-2.75*x)+.300/(1.+(2.61-2.75*x)^2/(.950-1.*x)^2)^(1/2))*cos((4.06-2.75*x)/z1))^2)^(1/2)-.364+z2/z1*(tan(.940*z2/(z2+2.-2.*x))-.364)
>> vpa(y)
ans =
.473e-15*(.507e31-.448e31*z1^2/(((z1-.950+x-1.*(.783-.824*x)/(.950-1.*x)/(1.+(2.61-2.75*x)^2/(.950-1.*x)^2)^(1/2))*cos((4.06-2.75*x)/z1)+((.950-1.*x)^2/(2.61-2.75*x)+.300/(1.+(2.61-2.75*x)^2/(.950-1.*x)^2)^(1/2))*(4.06-2.75*x)/z1)^2+((z1-.950+x-1.*(.783-.824*x)/(.950-1.*x)/(1.+(2.61-2.75*x)^2/(.950-1.*x)^2)^(1/2))*sin((4.06-2.75*x)/z1)-1.*((.950-1.*x)^2/(2.61-2.75*x)+.300/(1.+(2.61-2.75*x)^2/(.950-1.*x)^2)^(1/2))*cos((4.06-2.75*x)/z1))^2))^(1/2)/z1*(((z1-.950+x-1.*(.783-.824*x)/(.950-1.*x)/(1.+(2.61-2.75*x)^2/(.950-1.*x)^2)^(1/2))*cos((4.06-2.75*x)/z1)+((.950-1.*x)^2/(2.61-2.75*x)+.300/(1.+(2.61-2.75*x)^2/(.950-1.*x)^2)^(1/2))*(4.06-2.75*x)/z1)^2+((z1-.950+x-1.*(.783-.824*x)/(.950-1.*x)/(1.+(2.61-2.75*x)^2/(.950-1.*x)^2)^(1/2))*sin((4.06-2.75*x)/z1)-1.*((.950-1.*x)^2/(2.61-2.75*x)+.300/(1.+(2.61-2.75*x)^2/(.950-1.*x)^2)^(1/2))*cos((4.06-2.75*x)/z1))^2)^(1/2)-.364+z2/z1*(tan(.940*z2/(z2+2.-2.*x))-.364)