作业帮 > 综合 > 作业

matlab的solve用法

来源:学生作业帮 编辑:大师作文网作业帮 分类:综合作业 时间:2024/11/10 07:03:55
matlab的solve用法
定义syms x y a1 a2
equ1=1/120 - ((2*a2)/81 + (pi*a1)/12 + pi^2*(a2/405 + 1/12) + (pi^3*a1)/120)/pi^4
equ2=-(a2/128 + (2*pi*a1)/81 + pi^2*(a2/960 + 2/81) + (pi^3*a1)/405 - pi^4/405)/pi^5
输入solve('方程1', '方程2', 'a1', 'a1')
为什么最后a1和a2 有时候不是数值,而是仅仅只是a1 和a2
matlab的solve用法
%kkkkaaaa67720| 五级 回答正确.详细步骤是:
syms x y a1 a2
equ1=1/120 - ((2*a2)/81 + (pi*a1)/12 + pi^2*(a2/405 + 1/12) + (pi^3*a1)/120)/pi^4
equ2=-(a2/128 + (2*pi*a1)/81 + pi^2*(a2/960 + 2/81) + (pi^3*a1)/405 - pi^4/405)/pi^5
[a1,a2]=solve(equ1,equ2,'a1','a2')
a1=vpa(a1)
a2=vpa(a2)
运行结果:
a1 = -50761304626263552301236414542950/140129736313387243/(2814749767106560*pi+8727491006471547)
a2 = -675/280259472626774486
a1 = -.20616910499519232147350835793861e-1
a2 = -.24084823741137452008216073646926e-14