四元一次方程组求解
的有关信息介绍如下:先教你用excel解四元一次方程:
A1x+B1y+C1z+D1k=E1
A2x+B2y+C2z+D2k=E2
A3x+B3y+C3z+D3k=E3
A4x+B4y+C4z+D4k=E4
将方程的系数一次输入到单元格A1:D4中,将方程右边的数填到E1:E4中
选中G1:G4单元格,输入公式
=MMULT(MINVERSE(A1:D4),E1:E4)
同时按Ctrl+Shift+Enter
在G1:G4中的就是方程的解
上面就是:
x+4y+5z+4k=4
2x+2y+3z+3k=6
3x+2y+2z+2k=3
4x+y+4z+2k=1
的解:x=0.037037 y=-1.59259 z=-1.8 k=4.85
用手算如下:
A=x+By+B^2z+B^3w................1
C=x+Dy+D^2z+D^3w...................2
E=x+Fy+F^2z+f^3w...................3
G=x+Hy+H^2z+H^3w..................4
1式-2式:
a-c=(b-d)y+(b^2-d^2)z+(b^3-d^3)w
同除以b-d
(a-c)/(b-d)=y+(b+d)z+(b^2+bd+d^2)w...........5
3式-2式:
e-c=(f-d)y+(f^2-d^2)z+(f^3-d^3)w
同除以f-d
(e-c)/(f-d)=y+(f+d)z+(f^2+fd+d^2)w...............6
5式-6式:
(a-c)/(b-d)-(e-c)/(f-d)=(b-f)z+(b^2+bd-f^2-fd)w=(b-f)z+[(b-f)(b+f)+d(b-f)]w
同除以:b-f
[(a-c)/(b-d)-(e-c)/(f-d)]/(b-f)=z+(b+f+d)w
z=[(a-c)/(b-d)-(e-c)/(f-d)]/(b-f)-(b+f+d)w
则将:上式分别代入1,2,3式得:
A=x+By+B^2z+B^3w................1
a=x+by+b^2{[(a-c)/(b-d)-(e-c)/(f-d)]/(b-f)-(b+f+d)w}+b^3w
a=x+by+b^2[(a-c)/(b-d)-(e-c)/(f-d)]/(b-f)]-b^2(f+d)w.......................7
c=x+dy+d^2[(a-c)/(b-d)-(e-c)/(f-d)]/(b-f)]-d^2(f+b)w..........................8
g=x+hy+h^2[(a-c)/(b-d)-(e-c)/(f-d)]/(b-f)]-h^2(b+d+f-h)w.............................9
以上是三元一次方程:
i=x+by+jw。。。。。。。。。10
k=x+dy+Lw。。。。。。。。。。11
m=x+hy+nw。。。。。。。。。。12
以上:i=a-b^2[(a-c)/(b-d)-(e-c)/(f-d)]/(b-f)] j=-b^2(f+d)
k=c-d^2[(a-c)/(b-d)-(e-c)/(f-d)]/(b-f)] L=-d^2(f+b)
m=g-h^2[(a-c)/(b-d)-(e-c)/(f-d)]/(b-f)] n=-h^2(b+d+f-h)
以上:i,k,m ,j,l,n先用Excel输入:
解由10,11,12式组成的三元一次方程得:
w=[(j-k)(h-d)-(b-d)(m-k)]/[(j-L)(h-d)-(b-d)(n-L)]
y=[(h-j)(i-k)-(j-L)(g-i)]/[(b-d)(i-k)-(d-f)(g-i)]
x=j-by-jw(代入以上两式)
z=[a-(x+by+b^3w)]/b^2
再复述一下,如何用excel解以上方程组:
A=x+By+B^2z+B^3w
C=x+Dy+D^2z+D^3w
E=x+Fy+F^2z+F^3w
G=x+Hy+H^2z+H^3w
先用execl 输入i j k l m n的算式:
i=a-b^2[(a-c)/(b-d)-(e-c)/(f-d)]/(b-f)] j=-b^2(f+d)
k=c-d^2[(a-c)/(b-d)-(e-c)/(f-d)]/(b-f)] L=-d^2(f+b)
m=g-h^2[(a-c)/(b-d)-(e-c)/(f-d)]/(b-f)] n=-h^2(b+d+f-h)
再用excel 输入:
w=[(j-k)(h-d)-(b-d)(m-k)]/[(j-L)(h-d)-(b-d)(n-L)]
y=[(h-j)(i-k)-(j-L)(g-i)]/[(b-d)(i-k)-(d-f)(g-i)]
x=j-by-jw(代入以上两式)
z=[a-(x+by+b^3w)]/b^2