{VERSION 3 0 "IBM RISC UNIX" "3.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "with(linalg):" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "?genmatrix\n" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 186 "Solution of Forsythe's example of a line ar system:\ncalculating the forces on a bridge.\n\nAccording to Newton :\nthe forces at each point of connection in the bridge structure sum \+ to zero.\n " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 590 "alpha := sin(Pi/4); # 45 degree angle for some bridge trusses\nEqns := \{\n -alpha*f1 + f4 + alpha*f5 = 0,\n -alpha*f1 - alpha*f3 - alpha*f5 = 0,\n -f2 + f 6 = 0,\n f3 - 10 = 0,\n -f4 + f8 = 0,\n -f7 = 0,\n -alpha*f5 - f6 + alpha*f9 + f10 = 0,\n alpha*f5 + f7 + alpha*f9 -15 = 0,\n -f8 - \+ alpha*f9 + f12 + alpha*f13 = 0,\n -alpha*f9 - f11 - alpha*f13 = 0,\n \+ -f10 + f14 = 0,\n f11 = 0,\n -f12 + alpha*f16 = 0,\n -f15 - alpha *f16 = 0,\n -alpha*f13 - f14 + f17 = 0,\n alpha*f13 + f15 - 10 = 0, \n -alpha*f16 - f17 = 0 \n\};\nVars := [f1,f2,f3,f4,f5,f6,f7,f8,f9,f1 0,f11,f12,f13,f14,f15,f16,f17];\n " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 40 "A := genmatrix(Eqns,Vars,'b');\nevalm(b);" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "lin solve(A,b);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "map(evalf, % );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "evalf(cond(A));" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 260 "Eqs := [\n-I1 + I3 + I4 = 0 ,\n I1 + I5 + I6 = 0,\n-I2 - I3 - I4 = 0,\n I2 - I5 - I6 = 0,\n\n-V1 + V2 + 3*I1 = -2,\n-V3 + V4 = 0,\n V1 - V3 + 6*I3 = 4,\n V1 - V3 + 5*I4 = 2,\n V2 - V4 + 2*I5 = 0,\n V2 - V4 + 5*I6 = 3,\n\n V4 = 0\n];\nVar s := [V1,V2,V3,V4, I1,I2,I3,I4,I5,I6];" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "A := genmatrix( Eqs,Vars, 'b');\nevalm(b);\n" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "linsolve(A,b);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 7 "det(A);" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 13 "augment(A,b);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "det( % );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{MARK "0 0 0" 0 }{VIEWOPTS 1 1 0 1 1 1803 }