matrix.log 49 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236
  1. Sat Jun 29 13:44:52 PDT 1991
  2. REDUCE 3.4, 15-Jul-91 ...
  3. 1: 1:
  4. 2: 2:
  5. 3: 3: % Tests of eigenfunction/eigenvalue code.
  6. v := mat((1,1,-1,1,0),(1,2,-1,0,1),(-1,2,3,-1,0),
  7. (1,-2,1,2,-1),(2,1,-1,3,0))$
  8. mateigen(v,et);
  9. 4 3 2
  10. {{ET - 6*ET + 13*ET + 5*ET - 5,
  11. 1,
  12. [ 5*ARBCOMPLEX(1)*(ET - 2) ]
  13. [ ---------------------------- ]
  14. [ 3 2 ]
  15. [ 2*ET - 10*ET + 23*ET + 5 ]
  16. [ ]
  17. [ 2 ]
  18. [ ARBCOMPLEX(1)*ET*( - ET + 6*ET - 8) ]
  19. [--------------------------------------]
  20. [ 3 2 ]
  21. [ 2*ET - 10*ET + 23*ET + 5 ]
  22. [ ]
  23. [ ARBCOMPLEX(1)*ET*( - 3*ET + 7) ]
  24. [ -------------------------------- ]
  25. [ 3 2 ]
  26. [ 2*ET - 10*ET + 23*ET + 5 ]
  27. [ ]
  28. [ 3 2 ]
  29. [ ARBCOMPLEX(1)*(ET - 4*ET + 10) ]
  30. [ ---------------------------------- ]
  31. [ 3 2 ]
  32. [ 2*ET - 10*ET + 23*ET + 5 ]
  33. [ ]
  34. [ ARBCOMPLEX(1) ]
  35. },
  36. {ET - 2,
  37. 1,
  38. [ 0 ]
  39. [ ]
  40. [ 0 ]
  41. [ ]
  42. [ARBCOMPLEX(2)]
  43. [ ]
  44. [ARBCOMPLEX(2)]
  45. [ ]
  46. [ARBCOMPLEX(2)]
  47. }}
  48. eigv := third first ws$
  49. % Now check if the equation for the eigenvectors is fulfilled. Note
  50. % that also the last component is zero due to the eigenvalue equation.
  51. v*eigv-et*eigv;
  52. [ 0 ]
  53. [ ]
  54. [ 4 3 2 ]
  55. [ ARBCOMPLEX(1)*(ET - 6*ET + 13*ET + 5*ET - 5) ]
  56. [ ------------------------------------------------- ]
  57. [ 3 2 ]
  58. [ 2*ET - 10*ET + 23*ET + 5 ]
  59. [ ]
  60. [ 0 ]
  61. [ ]
  62. [ 4 3 2 ]
  63. [ ARBCOMPLEX(1)*( - ET + 6*ET - 13*ET - 5*ET + 5) ]
  64. [ ---------------------------------------------------- ]
  65. [ 3 2 ]
  66. [ 2*ET - 10*ET + 23*ET + 5 ]
  67. [ ]
  68. [ 4 3 2 ]
  69. [ 2*ARBCOMPLEX(1)*( - ET + 6*ET - 13*ET - 5*ET + 5) ]
  70. [------------------------------------------------------]
  71. [ 3 2 ]
  72. [ 2*ET - 10*ET + 23*ET + 5 ]
  73. % Example of degenerate eigenvalues.
  74. u := mat((2,-1,1),(0,1,1),(-1,1,1))$
  75. mateigen(u,eta);
  76. {{ETA - 1,2,
  77. [ARBCOMPLEX(3)]
  78. [ ]
  79. [ARBCOMPLEX(3)]
  80. [ ]
  81. [ 0 ]
  82. },
  83. {ETA - 2,1,
  84. [ 0 ]
  85. [ ]
  86. [ARBCOMPLEX(4)]
  87. [ ]
  88. [ARBCOMPLEX(4)]
  89. }}
  90. % Example of a fourfold degenerate eigenvalue with two corresponding
  91. % eigenvectors.
  92. w := mat((1,-1,1,-1),(-3,3,-5,4),(8,-4,3,-4),
  93. (15,-10,11,-11))$
  94. mateigen(w,al);
  95. {{AL + 1,
  96. 4,
  97. [ ARBCOMPLEX(5) ]
  98. [ --------------- ]
  99. [ 5 ]
  100. [ ]
  101. [ - 5*ARBCOMPLEX(6) + 7*ARBCOMPLEX(5) ]
  102. [--------------------------------------]
  103. [ 5 ]
  104. [ ]
  105. [ ARBCOMPLEX(5) ]
  106. [ ]
  107. [ ARBCOMPLEX(6) ]
  108. }}
  109. eigw := third first ws;
  110. [ ARBCOMPLEX(5) ]
  111. [ --------------- ]
  112. [ 5 ]
  113. [ ]
  114. [ - 5*ARBCOMPLEX(6) + 7*ARBCOMPLEX(5) ]
  115. EIGW := [--------------------------------------]
  116. [ 5 ]
  117. [ ]
  118. [ ARBCOMPLEX(5) ]
  119. [ ]
  120. [ ARBCOMPLEX(6) ]
  121. w*eigw - al*eigw;
  122. - ARBCOMPLEX(5)*(AL + 1)
  123. MAT((---------------------------),
  124. 5
  125. ((5*ARBCOMPLEX(6)*AL + 5*ARBCOMPLEX(6) - 7*ARBCOMPLEX(5)*AL
  126. - 7*ARBCOMPLEX(5))/5),
  127. ( - ARBCOMPLEX(5)*(AL + 1)),
  128. ( - ARBCOMPLEX(6)*(AL + 1)))
  129. % Calculate the eigenvectors and eigenvalue equation.
  130. f := mat((0,ex,ey,ez),(-ex,0,bz,-by),(-ey,-bz,0,bx),
  131. (-ez,by,-bx,0))$
  132. factor om;
  133. mateigen(f,om);
  134. 4 2 2 2 2 2 2 2 2 2
  135. {{OM + OM *(EX + EY + EZ + BZ + BY + BX ) + EX *BX
  136. 2 2
  137. + 2*EX*EY*BY*BX + 2*EX*EZ*BZ*BX + EY *BY + 2*EY*EZ*BZ*BY
  138. 2 2
  139. + EZ *BZ ,
  140. 1,
  141. 2
  142. MAT(((OM *ARBCOMPLEX(7)*EZ + OM*ARBCOMPLEX(7)*( - EX*BY + EY*BX)
  143. 3
  144. + ARBCOMPLEX(7)*BZ*(EX*BX + EY*BY + EZ*BZ))/(OM
  145. 2 2 2
  146. + OM*(EX + EY + BZ ))),
  147. 2
  148. (( - OM *ARBCOMPLEX(7)*BY + OM*ARBCOMPLEX(7)*( - EX*EZ + BZ*BX)
  149. 3
  150. - (ARBCOMPLEX(7)*EY)*(EX*BX + EY*BY + EZ*BZ))/(OM
  151. 2 2 2
  152. + OM*(EX + EY + BZ ))),
  153. 2
  154. ((OM *ARBCOMPLEX(7)*BX + OM*ARBCOMPLEX(7)*( - EY*EZ + BZ*BY)
  155. 3
  156. + ARBCOMPLEX(7)*EX*(EX*BX + EY*BY + EZ*BZ))/(OM
  157. 2 2 2
  158. + OM*(EX + EY + BZ ))),
  159. (ARBCOMPLEX(7)))
  160. }}
  161. % Specialize to perpendicular electric and magnetic field.
  162. let ez=0,ex=0,by=0;
  163. % Note that we find two eigenvectors to the double eigenvalue 0
  164. % (as it must be).
  165. mateigen(f,om);
  166. {{OM,
  167. 2,
  168. [ ARBCOMPLEX(9)*BX - ARBCOMPLEX(8)*BZ ]
  169. [-------------------------------------]
  170. [ EY ]
  171. [ ]
  172. [ ARBCOMPLEX(8) ]
  173. [ ]
  174. [ 0 ]
  175. [ ]
  176. [ ARBCOMPLEX(9) ]
  177. },
  178. 2 2 2 2
  179. {OM + EY + BZ + BX ,
  180. 1,
  181. [ - ARBCOMPLEX(10)*EY ]
  182. [ ---------------------- ]
  183. [ BX ]
  184. [ ]
  185. [ - ARBCOMPLEX(10)*BZ ]
  186. [ ---------------------- ]
  187. [ BX ]
  188. [ ]
  189. [ 2 2 2 ]
  190. [ ARBCOMPLEX(10)*(EY + BZ + BX ) ]
  191. [----------------------------------]
  192. [ OM*BX ]
  193. [ ]
  194. [ ARBCOMPLEX(10) ]
  195. }}
  196. % The following has 1 as a double eigenvalue. The corresponding
  197. % eigenvector must involve two arbitrary constants.
  198. j := mat((9/8,1/4,-sqrt(3)/8),
  199. (1/4,3/2,-sqrt(3)/4),
  200. (-sqrt(3)/8,-sqrt(3)/4,11/8));
  201. [ 9 1 - SQRT(3) ]
  202. [ --- --- ------------]
  203. [ 8 4 8 ]
  204. [ ]
  205. [ 1 3 - SQRT(3) ]
  206. J := [ --- --- ------------]
  207. [ 4 2 4 ]
  208. [ ]
  209. [ - SQRT(3) - SQRT(3) 11 ]
  210. [------------ ------------ ---- ]
  211. [ 8 4 8 ]
  212. mateigen(j,x);
  213. {{X - 1,
  214. 2,
  215. [SQRT(3)*ARBCOMPLEX(12) - 2*ARBCOMPLEX(11)]
  216. [ ]
  217. [ ARBCOMPLEX(11) ]
  218. [ ]
  219. [ ARBCOMPLEX(12) ]
  220. },
  221. {X - 2,
  222. 1,
  223. [ - SQRT(3)*ARBCOMPLEX(13) ]
  224. [ --------------------------- ]
  225. [ 3 ]
  226. [ ]
  227. [ - 2*SQRT(3)*ARBCOMPLEX(13) ]
  228. [-----------------------------]
  229. [ 3 ]
  230. [ ]
  231. [ ARBCOMPLEX(13) ]
  232. }}
  233. % The following is a good consistency check.
  234. sym := mat(
  235. (0, 1/2, 1/(2*sqrt(2)), 0, 0),
  236. (1/2, 0, 1/(2*sqrt(2)), 0, 0),
  237. (1/(2*sqrt(2)), 1/(2*sqrt(2)), 0, 1/2, 1/2),
  238. (0, 0, 1/2, 0, 0),
  239. (0, 0, 1/2, 0, 0))$
  240. ans := mateigen(sym,eta);
  241. ANS := {{ETA,
  242. 1,
  243. [ 0 ]
  244. [ ]
  245. [ 0 ]
  246. [ ]
  247. [ 0 ]
  248. [ ]
  249. [ - ARBCOMPLEX(14)]
  250. [ ]
  251. [ ARBCOMPLEX(14) ]
  252. },
  253. {ETA - 1,
  254. 1,
  255. [ 2*ARBCOMPLEX(15) ]
  256. [------------------]
  257. [ SQRT(2) ]
  258. [ ]
  259. [ 2*ARBCOMPLEX(15) ]
  260. [------------------]
  261. [ SQRT(2) ]
  262. [ ]
  263. [ 2*ARBCOMPLEX(15) ]
  264. [ ]
  265. [ ARBCOMPLEX(15) ]
  266. [ ]
  267. [ ARBCOMPLEX(15) ]
  268. },
  269. {2*ETA + 1,
  270. 1,
  271. [ - ARBCOMPLEX(16)]
  272. [ ]
  273. [ ARBCOMPLEX(16) ]
  274. [ ]
  275. [ 0 ]
  276. [ ]
  277. [ 0 ]
  278. [ ]
  279. [ 0 ]
  280. },
  281. 2
  282. {4*ETA + 2*ETA - 1,
  283. 1,
  284. [ - ARBCOMPLEX(17) ]
  285. [ ------------------- ]
  286. [ 2*SQRT(2)*ETA ]
  287. [ ]
  288. [ - ARBCOMPLEX(17) ]
  289. [ ------------------- ]
  290. [ 2*SQRT(2)*ETA ]
  291. [ ]
  292. [ ARBCOMPLEX(17)*( - 2*ETA + 1) ]
  293. [-------------------------------]
  294. [ 2*ETA ]
  295. [ ]
  296. [ ARBCOMPLEX(17) ]
  297. [ ]
  298. [ ARBCOMPLEX(17) ]
  299. }}
  300. % Check of correctness for this example.
  301. for each j in ans do
  302. for each k in solve(first j,eta) do
  303. write sub(k,sym*third j - eta*third j);
  304. [0]
  305. [ ]
  306. [0]
  307. [ ]
  308. [0]
  309. [ ]
  310. [0]
  311. [ ]
  312. [0]
  313. [0]
  314. [ ]
  315. [0]
  316. [ ]
  317. [0]
  318. [ ]
  319. [0]
  320. [ ]
  321. [0]
  322. [0]
  323. [ ]
  324. [0]
  325. [ ]
  326. [0]
  327. [ ]
  328. [0]
  329. [ ]
  330. [0]
  331. [0]
  332. [ ]
  333. [0]
  334. [ ]
  335. [0]
  336. [ ]
  337. [0]
  338. [ ]
  339. [0]
  340. [0]
  341. [ ]
  342. [0]
  343. [ ]
  344. [0]
  345. [ ]
  346. [0]
  347. [ ]
  348. [0]
  349. % Tests of nullspace operator.
  350. a1 := mat((1,2,3,4),(5,6,7,8));
  351. [1 2 3 4]
  352. A1 := [ ]
  353. [5 6 7 8]
  354. nullspace a1;
  355. {
  356. [ 1 ]
  357. [ ]
  358. [ 0 ]
  359. [ ]
  360. [ - 3]
  361. [ ]
  362. [ 2 ]
  363. ,
  364. [ 0 ]
  365. [ ]
  366. [ 1 ]
  367. [ ]
  368. [ - 2]
  369. [ ]
  370. [ 1 ]
  371. }
  372. b1 := {{1,2,3,4},{5,6,7,8}};
  373. B1 := {{1,2,3,4},{5,6,7,8}}
  374. nullspace b1;
  375. {{1,0,-3,2},{0,1,-2,1}}
  376. % Example taken from a bug report for another CA system.
  377. c1 :=
  378. {{(p1**2*(p1**2 + p2**2 + p3**2 - s*z - z**2))/(p1**2 + p3**2), 0,
  379. (p1*p3*(p1**2 + p2**2 + p3**2 - s*z - z**2))/(p1**2 + p3**2),
  380. -((p1**2*p2*(s + z))/(p1**2 + p3**2)), p1*(s + z),
  381. -((p1*p2*p3*(s + z))/(p1**2 + p3**2)),
  382. -((p1*p3*(p1**2 + p2**2 + p3**2))/(p1**2 + p3**2)), 0,
  383. (p1**2*(p1**2 + p2**2 + p3**2))/(p1**2 + p3**2)},
  384. {0, 0, 0, 0, 0, 0, 0, 0, 0},
  385. {(p1*p3*(p1**2 + p2**2 + p3**2 - s*z - z**2))/(p1**2 + p3**2), 0,
  386. (p3**2*(p1**2 + p2**2 + p3**2 - s*z - z**2))/(p1**2 + p3**2),
  387. -((p1*p2*p3*(s + z))/(p1**2 + p3**2)), p3*(s + z),
  388. -((p2*p3**2*(s + z))/(p1**2 + p3**2)),
  389. -((p3**2*(p1**2 + p2**2 + p3**2))/(p1**2 + p3**2)), 0,
  390. (p1*p3*(p1**2 + p2**2 + p3**2))/(p1**2 + p3**2)},
  391. {-((p1**2*p2*(s + z))/(p1**2 + p3**2)), 0,
  392. -((p1*p2*p3*(s + z))/(p1**2 + p3**2)),
  393. -((p1**2*p2**2*(s + 2*z))/((p1**2 + p3**2)*z)), (p1*p2*(s + 2*z))/z,
  394. -((p1*p2**2*p3*(s + 2*z))/((p1**2 + p3**2)*z)),
  395. -((p1*p2*p3*z)/(p1**2 + p3**2)), 0, (p1**2*p2*z)/(p1**2 + p3**2)},
  396. {p1*(s + z), 0, p3*(s + z), (p1*p2*(s + 2*z))/z,
  397. -(((p1**2+p3**2)*(s+ 2*z))/z), (p2*p3*(s + 2*z))/z, p3*z,0, -(p1*z)},
  398. {-((p1*p2*p3*(s + z))/(p1**2 + p3**2)), 0,
  399. -((p2*p3**2*(s + z))/(p1**2 + p3**2)),
  400. -((p1*p2**2*p3*(s + 2*z))/((p1**2 + p3**2)*z)), (p2*p3*(s + 2*z))/z,
  401. -((p2**2*p3**2*(s + 2*z))/((p1**2 + p3**2)*z)),
  402. -((p2*p3**2*z)/(p1**2 + p3**2)), 0, (p1*p2*p3*z)/(p1**2 + p3**2)},
  403. {-((p1*p3*(p1**2 + p2**2 + p3**2))/(p1**2 + p3**2)), 0,
  404. -((p3**2*(p1**2 + p2**2 + p3**2))/(p1**2 + p3**2)),
  405. -((p1*p2*p3*z)/(p1**2 + p3**2)),p3*z,-((p2*p3**2*z)/(p1**2 + p3**2)),
  406. -((p3**2*(p1**2 + p2**2 + p3**2)*z)/((p1**2 + p3**2)*(s + z))), 0,
  407. (p1*p3*(p1**2 + p2**2 + p3**2)*z)/((p1**2 + p3**2)*(s + z))},
  408. {0, 0, 0, 0, 0, 0, 0, 0, 0},
  409. {(p1**2*(p1**2 + p2**2 + p3**2))/(p1**2 + p3**2), 0,
  410. (p1*p3*(p1**2 + p2**2 + p3**2))/(p1**2 + p3**2),
  411. (p1**2*p2*z)/(p1**2 + p3**2), -(p1*z), (p1*p2*p3*z)/(p1**2 + p3**2),
  412. (p1*p3*(p1**2 + p2**2 + p3**2)*z)/((p1**2 + p3**2)*(s + z)), 0,
  413. -((p1**2*(p1**2 + p2**2 + p3**2)*z)/((p1**2 + p3**2)*(s + z)))}};
  414. 2 2 2 2 2
  415. P1 *( - S*Z - Z + P1 + P2 + P3 )
  416. C1 := {{-------------------------------------,
  417. 2 2
  418. P1 + P3
  419. 0,
  420. 2 2 2 2
  421. P1*P3*( - S*Z - Z + P1 + P2 + P3 )
  422. ---------------------------------------,
  423. 2 2
  424. P1 + P3
  425. 2
  426. - (P1 *P2)*(S + Z)
  427. ---------------------,
  428. 2 2
  429. P1 + P3
  430. P1*(S + Z),
  431. - (P1*P2*P3)*(S + Z)
  432. -----------------------,
  433. 2 2
  434. P1 + P3
  435. 2 2 2
  436. - (P1*P3)*(P1 + P2 + P3 )
  437. ------------------------------,
  438. 2 2
  439. P1 + P3
  440. 0,
  441. 2 2 2 2
  442. P1 *(P1 + P2 + P3 )
  443. -----------------------},
  444. 2 2
  445. P1 + P3
  446. {0,0,0,0,0,0,0,0,0},
  447. 2 2 2 2
  448. P1*P3*( - S*Z - Z + P1 + P2 + P3 )
  449. {---------------------------------------,
  450. 2 2
  451. P1 + P3
  452. 0,
  453. 2 2 2 2 2
  454. P3 *( - S*Z - Z + P1 + P2 + P3 )
  455. -------------------------------------,
  456. 2 2
  457. P1 + P3
  458. - (P1*P2*P3)*(S + Z)
  459. -----------------------,
  460. 2 2
  461. P1 + P3
  462. P3*(S + Z),
  463. 2
  464. - (P2*P3 )*(S + Z)
  465. ---------------------,
  466. 2 2
  467. P1 + P3
  468. 2 2 2 2
  469. - P3 *(P1 + P2 + P3 )
  470. --------------------------,
  471. 2 2
  472. P1 + P3
  473. 0,
  474. 2 2 2
  475. P1*P3*(P1 + P2 + P3 )
  476. -------------------------},
  477. 2 2
  478. P1 + P3
  479. 2
  480. - (P1 *P2)*(S + Z)
  481. {---------------------,
  482. 2 2
  483. P1 + P3
  484. 0,
  485. - (P1*P2*P3)*(S + Z)
  486. -----------------------,
  487. 2 2
  488. P1 + P3
  489. 2 2
  490. P1 *P2 *( - S - 2*Z)
  491. ----------------------,
  492. 2 2
  493. Z*(P1 + P3 )
  494. P1*P2*(S + 2*Z)
  495. -----------------,
  496. Z
  497. 2
  498. P1*P2 *P3*( - S - 2*Z)
  499. ------------------------,
  500. 2 2
  501. Z*(P1 + P3 )
  502. - Z*P1*P2*P3
  503. ---------------,
  504. 2 2
  505. P1 + P3
  506. 0,
  507. 2
  508. Z*P1 *P2
  509. -----------},
  510. 2 2
  511. P1 + P3
  512. {P1*(S + Z),
  513. 0,
  514. P3*(S + Z),
  515. P1*P2*(S + 2*Z)
  516. -----------------,
  517. Z
  518. 2 2 2 2
  519. - S*P1 - S*P3 - 2*Z*P1 - 2*Z*P3
  520. --------------------------------------,
  521. Z
  522. P2*P3*(S + 2*Z)
  523. -----------------,
  524. Z
  525. Z*P3,
  526. 0,
  527. - Z*P1},
  528. - (P1*P2*P3)*(S + Z)
  529. {-----------------------,
  530. 2 2
  531. P1 + P3
  532. 0,
  533. 2
  534. - (P2*P3 )*(S + Z)
  535. ---------------------,
  536. 2 2
  537. P1 + P3
  538. 2
  539. P1*P2 *P3*( - S - 2*Z)
  540. ------------------------,
  541. 2 2
  542. Z*(P1 + P3 )
  543. P2*P3*(S + 2*Z)
  544. -----------------,
  545. Z
  546. 2 2
  547. P2 *P3 *( - S - 2*Z)
  548. ----------------------,
  549. 2 2
  550. Z*(P1 + P3 )
  551. 2
  552. - Z*P2*P3
  553. -------------,
  554. 2 2
  555. P1 + P3
  556. 0,
  557. Z*P1*P2*P3
  558. ------------},
  559. 2 2
  560. P1 + P3
  561. 2 2 2
  562. - (P1*P3)*(P1 + P2 + P3 )
  563. {------------------------------,
  564. 2 2
  565. P1 + P3
  566. 0,
  567. 2 2 2 2
  568. - P3 *(P1 + P2 + P3 )
  569. --------------------------,
  570. 2 2
  571. P1 + P3
  572. - Z*P1*P2*P3
  573. ---------------,
  574. 2 2
  575. P1 + P3
  576. Z*P3,
  577. 2
  578. - Z*P2*P3
  579. -------------,
  580. 2 2
  581. P1 + P3
  582. 2 2 2 2
  583. - (Z*P3 )*(P1 + P2 + P3 )
  584. -------------------------------,
  585. 2 2 2 2
  586. S*P1 + S*P3 + Z*P1 + Z*P3
  587. 0,
  588. 2 2 2
  589. Z*P1*P3*(P1 + P2 + P3 )
  590. -------------------------------},
  591. 2 2 2 2
  592. S*P1 + S*P3 + Z*P1 + Z*P3
  593. {0,0,0,0,0,0,0,0,0},
  594. 2 2 2 2
  595. P1 *(P1 + P2 + P3 )
  596. {-----------------------,
  597. 2 2
  598. P1 + P3
  599. 0,
  600. 2 2 2
  601. P1*P3*(P1 + P2 + P3 )
  602. -------------------------,
  603. 2 2
  604. P1 + P3
  605. 2
  606. Z*P1 *P2
  607. -----------,
  608. 2 2
  609. P1 + P3
  610. - Z*P1,
  611. Z*P1*P2*P3
  612. ------------,
  613. 2 2
  614. P1 + P3
  615. 2 2 2
  616. Z*P1*P3*(P1 + P2 + P3 )
  617. -------------------------------,
  618. 2 2 2 2
  619. S*P1 + S*P3 + Z*P1 + Z*P3
  620. 0,
  621. 2 2 2 2
  622. - (Z*P1 )*(P1 + P2 + P3 )
  623. -------------------------------}}
  624. 2 2 2 2
  625. S*P1 + S*P3 + Z*P1 + Z*P3
  626. nullspace c1;
  627. - P1
  628. {{1,0,-------,0,0,0,0,0,0},
  629. P3
  630. {0,1,0,0,0,0,0,0,0},
  631. - P1
  632. {0,0,0,1,0,-------,0,0,0},
  633. P3
  634. 2 2
  635. P1 + P3
  636. {0,0,0,0,1,-----------,0,0,0},
  637. P2*P3
  638. P3
  639. {0,0,0,0,0,0,1,0,----},
  640. P1
  641. {0,0,0,0,0,0,0,1,0}}
  642. d1 := mat
  643. (((p1**2*(p1**2 + p2**2 + p3**2 - s*z - z**2))/(p1**2 + p3**2), 0,
  644. (p1*p3*(p1**2 + p2**2 + p3**2 - s*z - z**2))/(p1**2 + p3**2),
  645. -((p1**2*p2*(s + z))/(p1**2 + p3**2)), p1*(s + z),
  646. -((p1*p2*p3*(s + z))/(p1**2 + p3**2)),
  647. -((p1*p3*(p1**2 + p2**2 + p3**2))/(p1**2 + p3**2)), 0,
  648. (p1**2*(p1**2 + p2**2 + p3**2))/(p1**2 + p3**2)),
  649. (0, 0, 0, 0, 0, 0, 0, 0, 0),
  650. ((p1*p3*(p1**2 + p2**2 + p3**2 - s*z - z**2))/(p1**2 + p3**2), 0,
  651. (p3**2*(p1**2 + p2**2 + p3**2 - s*z - z**2))/(p1**2 + p3**2),
  652. -((p1*p2*p3*(s + z))/(p1**2 + p3**2)), p3*(s + z),
  653. -((p2*p3**2*(s + z))/(p1**2 + p3**2)),
  654. -((p3**2*(p1**2 + p2**2 + p3**2))/(p1**2 + p3**2)), 0,
  655. (p1*p3*(p1**2 + p2**2 + p3**2))/(p1**2 + p3**2)),
  656. ( ((p1**2*p2*(s + z))/(p1**2 + p3**2)), 0,
  657. -((p1*p2*p3*(s + z))/(p1**2 + p3**2)),
  658. -((p1**2*p2**2*(s + 2*z))/((p1**2 + p3**2)*z)), (p1*p2*(s + 2*z))/z,
  659. -((p1*p2**2*p3*(s + 2*z))/((p1**2 + p3**2)*z)),
  660. -((p1*p2*p3*z)/(p1**2 + p3**2)), 0, (p1**2*p2*z)/(p1**2 + p3**2)),
  661. (p1*(s + z), 0, p3*(s + z), (p1*p2*(s + 2*z))/z,
  662. -(((p1**2 + p3**2)*(s + 2*z))/z),(p2*p3*(s + 2*z))/z,p3*z,0,-(p1*z)),
  663. (-((p1*p2*p3*(s + z))/(p1**2 + p3**2)), 0,
  664. -((p2*p3**2*(s + z))/(p1**2 + p3**2)),
  665. -((p1*p2**2*p3*(s + 2*z))/((p1**2 + p3**2)*z)), (p2*p3*(s + 2*z))/z,
  666. -((p2**2*p3**2*(s + 2*z))/((p1**2 + p3**2)*z)),
  667. -((p2*p3**2*z)/(p1**2 + p3**2)), 0, (p1*p2*p3*z)/(p1**2 + p3**2)),
  668. (-((p1*p3*(p1**2 + p2**2 + p3**2))/(p1**2 + p3**2)), 0,
  669. -((p3**2*(p1**2 + p2**2 + p3**2))/(p1**2 + p3**2)),
  670. -((p1*p2*p3*z)/(p1**2 + p3**2)),p3*z,-((p2*p3**2*z)/(p1**2 + p3**2)),
  671. -((p3**2*(p1**2 + p2**2 + p3**2)*z)/((p1**2 + p3**2)*(s + z))), 0,
  672. (p1*p3*(p1**2 + p2**2 + p3**2)*z)/((p1**2 + p3**2)*(s + z))),
  673. (0, 0, 0, 0, 0, 0, 0, 0, 0),
  674. ((p1**2*(p1**2 + p2**2 + p3**2))/(p1**2 + p3**2), 0,
  675. (p1*p3*(p1**2 + p2**2 + p3**2))/(p1**2 + p3**2),
  676. (p1**2*p2*z)/(p1**2 + p3**2), -(p1*z), (p1*p2*p3*z)/(p1**2 + p3**2),
  677. (p1*p3*(p1**2 + p2**2 + p3**2)*z)/((p1**2 + p3**2)*(s + z)), 0,
  678. -((p1**2*(p1**2 + p2**2 + p3**2)*z)/((p1**2 + p3**2)*(s + z)))));
  679. 2 2 2 2 2
  680. P1 *( - S*Z - Z + P1 + P2 + P3 )
  681. D1 := MAT((-------------------------------------,0,
  682. 2 2
  683. P1 + P3
  684. 2 2 2 2
  685. P1*P3*( - S*Z - Z + P1 + P2 + P3 )
  686. ---------------------------------------,
  687. 2 2
  688. P1 + P3
  689. 2
  690. - (P1 *P2)*(S + Z) - (P1*P2*P3)*(S + Z)
  691. ---------------------,P1*(S + Z),-----------------------,
  692. 2 2 2 2
  693. P1 + P3 P1 + P3
  694. 2 2 2 2 2 2 2
  695. - (P1*P3)*(P1 + P2 + P3 ) P1 *(P1 + P2 + P3 )
  696. ------------------------------,0,-----------------------),
  697. 2 2 2 2
  698. P1 + P3 P1 + P3
  699. (0,0,0,0,0,0,0,0,0),
  700. 2 2 2 2
  701. P1*P3*( - S*Z - Z + P1 + P2 + P3 )
  702. (---------------------------------------,0,
  703. 2 2
  704. P1 + P3
  705. 2 2 2 2 2
  706. P3 *( - S*Z - Z + P1 + P2 + P3 )
  707. -------------------------------------,
  708. 2 2
  709. P1 + P3
  710. 2
  711. - (P1*P2*P3)*(S + Z) - (P2*P3 )*(S + Z)
  712. -----------------------,P3*(S + Z),---------------------,
  713. 2 2 2 2
  714. P1 + P3 P1 + P3
  715. 2 2 2 2 2 2 2
  716. - P3 *(P1 + P2 + P3 ) P1*P3*(P1 + P2 + P3 )
  717. --------------------------,0,-------------------------),
  718. 2 2 2 2
  719. P1 + P3 P1 + P3
  720. 2
  721. P1 *P2*(S + Z) - (P1*P2*P3)*(S + Z)
  722. (----------------,0,-----------------------,
  723. 2 2 2 2
  724. P1 + P3 P1 + P3
  725. 2 2
  726. P1 *P2 *( - S - 2*Z) P1*P2*(S + 2*Z)
  727. ----------------------,-----------------,
  728. 2 2 Z
  729. Z*(P1 + P3 )
  730. 2 2
  731. P1*P2 *P3*( - S - 2*Z) - Z*P1*P2*P3 Z*P1 *P2
  732. ------------------------,---------------,0,-----------),
  733. 2 2 2 2 2 2
  734. Z*(P1 + P3 ) P1 + P3 P1 + P3
  735. P1*P2*(S + 2*Z)
  736. (P1*(S + Z),0,P3*(S + Z),-----------------,
  737. Z
  738. 2 2 2 2
  739. - S*P1 - S*P3 - 2*Z*P1 - 2*Z*P3 P2*P3*(S + 2*Z)
  740. --------------------------------------,-----------------,
  741. Z Z
  742. Z*P3,0, - Z*P1),
  743. 2
  744. - (P1*P2*P3)*(S + Z) - (P2*P3 )*(S + Z)
  745. (-----------------------,0,---------------------,
  746. 2 2 2 2
  747. P1 + P3 P1 + P3
  748. 2
  749. P1*P2 *P3*( - S - 2*Z) P2*P3*(S + 2*Z)
  750. ------------------------,-----------------,
  751. 2 2 Z
  752. Z*(P1 + P3 )
  753. 2 2 2
  754. P2 *P3 *( - S - 2*Z) - Z*P2*P3 Z*P1*P2*P3
  755. ----------------------,-------------,0,------------),
  756. 2 2 2 2 2 2
  757. Z*(P1 + P3 ) P1 + P3 P1 + P3
  758. 2 2 2
  759. - (P1*P3)*(P1 + P2 + P3 )
  760. (------------------------------,0,
  761. 2 2
  762. P1 + P3
  763. 2 2 2 2
  764. - P3 *(P1 + P2 + P3 ) - Z*P1*P2*P3
  765. --------------------------,---------------,Z*P3,
  766. 2 2 2 2
  767. P1 + P3 P1 + P3
  768. 2 2 2 2 2
  769. - Z*P2*P3 - (Z*P3 )*(P1 + P2 + P3 )
  770. -------------,-------------------------------,0,
  771. 2 2 2 2 2 2
  772. P1 + P3 S*P1 + S*P3 + Z*P1 + Z*P3
  773. 2 2 2
  774. Z*P1*P3*(P1 + P2 + P3 )
  775. -------------------------------),
  776. 2 2 2 2
  777. S*P1 + S*P3 + Z*P1 + Z*P3
  778. (0,0,0,0,0,0,0,0,0),
  779. 2 2 2 2 2 2 2
  780. P1 *(P1 + P2 + P3 ) P1*P3*(P1 + P2 + P3 )
  781. (-----------------------,0,-------------------------,
  782. 2 2 2 2
  783. P1 + P3 P1 + P3
  784. 2
  785. Z*P1 *P2 Z*P1*P2*P3
  786. -----------, - Z*P1,------------,
  787. 2 2 2 2
  788. P1 + P3 P1 + P3
  789. 2 2 2
  790. Z*P1*P3*(P1 + P2 + P3 )
  791. -------------------------------,0,
  792. 2 2 2 2
  793. S*P1 + S*P3 + Z*P1 + Z*P3
  794. 2 2 2 2
  795. - (Z*P1 )*(P1 + P2 + P3 )
  796. -------------------------------))
  797. 2 2 2 2
  798. S*P1 + S*P3 + Z*P1 + Z*P3
  799. nullspace d1;
  800. {
  801. [0]
  802. [ ]
  803. [1]
  804. [ ]
  805. [0]
  806. [ ]
  807. [0]
  808. [ ]
  809. [0]
  810. [ ]
  811. [0]
  812. [ ]
  813. [0]
  814. [ ]
  815. [0]
  816. [ ]
  817. [0]
  818. ,
  819. [ 0 ]
  820. [ ]
  821. [ 0 ]
  822. [ ]
  823. [ 0 ]
  824. [ ]
  825. [ 1 ]
  826. [ ]
  827. [ 0 ]
  828. [ ]
  829. [ - P1 ]
  830. [-------]
  831. [ P3 ]
  832. [ ]
  833. [ 0 ]
  834. [ ]
  835. [ 0 ]
  836. [ ]
  837. [ 0 ]
  838. ,
  839. [ 0 ]
  840. [ ]
  841. [ 0 ]
  842. [ ]
  843. [ 0 ]
  844. [ ]
  845. [ 0 ]
  846. [ ]
  847. [ 1 ]
  848. [ ]
  849. [ 2 2 ]
  850. [ P1 + P3 ]
  851. [-----------]
  852. [ P2*P3 ]
  853. [ ]
  854. [ 0 ]
  855. [ ]
  856. [ 0 ]
  857. [ ]
  858. [ 0 ]
  859. ,
  860. [ 0 ]
  861. [ ]
  862. [ 0 ]
  863. [ ]
  864. [ 0 ]
  865. [ ]
  866. [ 0 ]
  867. [ ]
  868. [ 0 ]
  869. [ ]
  870. [ 0 ]
  871. [ ]
  872. [ 1 ]
  873. [ ]
  874. [ 0 ]
  875. [ ]
  876. [ P3 ]
  877. [----]
  878. [ P1 ]
  879. ,
  880. [0]
  881. [ ]
  882. [0]
  883. [ ]
  884. [0]
  885. [ ]
  886. [0]
  887. [ ]
  888. [0]
  889. [ ]
  890. [0]
  891. [ ]
  892. [0]
  893. [ ]
  894. [1]
  895. [ ]
  896. [0]
  897. }
  898. % The following example, by Kenton Yee, was discussed extensively by
  899. % the sci.math.symbolic newsgroup.
  900. m := mat((e^(-1), e^(-1), e^(-1), e^(-1), e^(-1), e^(-1), e^(-1), 0),
  901. (1, 1, 1, 1, 1, 1, 0, 1),(1, 1, 1, 1, 1, 0, 1, 1),
  902. (1, 1, 1, 1, 0, 1, 1, 1),(1, 1, 1, 0, 1, 1, 1, 1),
  903. (1, 1, 0, 1, 1, 1, 1, 1),(1, 0, 1, 1, 1, 1, 1, 1),
  904. (0, e, e, e, e, e, e, e));
  905. [ 1 1 1 1 1 1 1 ]
  906. [--- --- --- --- --- --- --- 0]
  907. [ E E E E E E E ]
  908. [ ]
  909. [ 1 1 1 1 1 1 0 1]
  910. [ ]
  911. [ 1 1 1 1 1 0 1 1]
  912. [ ]
  913. M := [ 1 1 1 1 0 1 1 1]
  914. [ ]
  915. [ 1 1 1 0 1 1 1 1]
  916. [ ]
  917. [ 1 1 0 1 1 1 1 1]
  918. [ ]
  919. [ 1 0 1 1 1 1 1 1]
  920. [ ]
  921. [ 0 E E E E E E E]
  922. eig := mateigen(m,x);
  923. EIG := {{X - 1,
  924. 3,
  925. [ 0 ]
  926. [ ]
  927. [ - ARBCOMPLEX(20)]
  928. [ ]
  929. [ - ARBCOMPLEX(19)]
  930. [ ]
  931. [ - ARBCOMPLEX(18)]
  932. [ ]
  933. [ ARBCOMPLEX(18) ]
  934. [ ]
  935. [ ARBCOMPLEX(19) ]
  936. [ ]
  937. [ ARBCOMPLEX(20) ]
  938. [ ]
  939. [ 0 ]
  940. },
  941. {X + 1,
  942. 3,
  943. ARBCOMPLEX(23)
  944. MAT((----------------),
  945. E
  946. (ARBCOMPLEX(22)),
  947. (ARBCOMPLEX(21)),
  948. (( - ARBCOMPLEX(23)*E - ARBCOMPLEX(23)
  949. - 2*ARBCOMPLEX(22)*E - 2*ARBCOMPLEX(21)*E)/(2*E)),
  950. (( - ARBCOMPLEX(23)*E - ARBCOMPLEX(23)
  951. - 2*ARBCOMPLEX(22)*E - 2*ARBCOMPLEX(21)*E)/(2*E)),
  952. (ARBCOMPLEX(21)),
  953. (ARBCOMPLEX(22)),
  954. (ARBCOMPLEX(23)))
  955. },
  956. 2 2
  957. { - E *X + E*X - 6*E*X + 7*E - X,
  958. 1,
  959. 8 7 7 6
  960. MAT(((6*ARBCOMPLEX(24)*(E *X + 23*E *X - 7*E + 179*E *X
  961. 6 5 5 4 4
  962. - 119*E + 565*E *X - 581*E + 768*E *X - 890*E
  963. 3 3 2 2
  964. + 565*E *X - 581*E + 179*E *X - 119*E + 23*E*X
  965. 3 8 7 7 6
  966. - 7*E + X))/(E *(E *X + 30*E *X - 7*E + 333*E *X
  967. 6 5 5 4
  968. - 168*E + 1692*E *X - 1365*E + 4023*E *X
  969. 4 3 3 2
  970. - 4368*E + 4470*E *X - 5145*E + 2663*E *X
  971. 2
  972. - 2520*E + 576*E*X - 251*E + 36*X))),
  973. 9 8 8 7
  974. ((ARBCOMPLEX(24)*(E *X + 29*E *X - 7*E + 310*E *X
  975. 7 6 6 5
  976. - 161*E + 1520*E *X - 1246*E + 3577*E *X
  977. 5 4 4 3
  978. - 3836*E + 4283*E *X - 4795*E + 2988*E *X
  979. 3 2 2
  980. - 3065*E + 978*E *X - 672*E + 132*E*X - 42*E
  981. 2 8 7 7 6
  982. + 6*X))/(E *(E *X + 30*E *X - 7*E + 333*E *X
  983. 6 5 5 4
  984. - 168*E + 1692*E *X - 1365*E + 4023*E *X
  985. 4 3 3 2
  986. - 4368*E + 4470*E *X - 5145*E + 2663*E *X
  987. 2
  988. - 2520*E + 576*E*X - 251*E + 36*X))),
  989. 9 8 8 7
  990. ((ARBCOMPLEX(24)*(E *X + 29*E *X - 7*E + 310*E *X
  991. 7 6 6 5
  992. - 161*E + 1520*E *X - 1246*E + 3577*E *X
  993. 5 4 4 3
  994. - 3836*E + 4283*E *X - 4795*E + 2988*E *X
  995. 3 2 2
  996. - 3065*E + 978*E *X - 672*E + 132*E*X - 42*E
  997. 2 8 7 7 6
  998. + 6*X))/(E *(E *X + 30*E *X - 7*E + 333*E *X
  999. 6 5 5 4
  1000. - 168*E + 1692*E *X - 1365*E + 4023*E *X
  1001. 4 3 3 2
  1002. - 4368*E + 4470*E *X - 5145*E + 2663*E *X
  1003. 2
  1004. - 2520*E + 576*E*X - 251*E + 36*X))),
  1005. 9 8 8 7
  1006. ((ARBCOMPLEX(24)*(E *X + 29*E *X - 7*E + 310*E *X
  1007. 7 6 6 5
  1008. - 161*E + 1520*E *X - 1246*E + 3577*E *X
  1009. 5 4 4 3
  1010. - 3836*E + 4283*E *X - 4795*E + 2988*E *X
  1011. 3 2 2
  1012. - 3065*E + 978*E *X - 672*E + 132*E*X - 42*E
  1013. 2 8 7 7 6
  1014. + 6*X))/(E *(E *X + 30*E *X - 7*E + 333*E *X
  1015. 6 5 5 4
  1016. - 168*E + 1692*E *X - 1365*E + 4023*E *X
  1017. 4 3 3 2
  1018. - 4368*E + 4470*E *X - 5145*E + 2663*E *X
  1019. 2
  1020. - 2520*E + 576*E*X - 251*E + 36*X))),
  1021. 9 8 8 7
  1022. ((ARBCOMPLEX(24)*(E *X + 29*E *X - 7*E + 310*E *X
  1023. 7 6 6 5
  1024. - 161*E + 1520*E *X - 1246*E + 3577*E *X
  1025. 5 4 4 3
  1026. - 3836*E + 4283*E *X - 4795*E + 2988*E *X
  1027. 3 2 2
  1028. - 3065*E + 978*E *X - 672*E + 132*E*X - 42*E
  1029. 2 8 7 7 6
  1030. + 6*X))/(E *(E *X + 30*E *X - 7*E + 333*E *X
  1031. 6 5 5 4
  1032. - 168*E + 1692*E *X - 1365*E + 4023*E *X
  1033. 4 3 3 2
  1034. - 4368*E + 4470*E *X - 5145*E + 2663*E *X
  1035. 2
  1036. - 2520*E + 576*E*X - 251*E + 36*X))),
  1037. 9 8 8 7
  1038. ((ARBCOMPLEX(24)*(E *X + 29*E *X - 7*E + 310*E *X
  1039. 7 6 6 5
  1040. - 161*E + 1520*E *X - 1246*E + 3577*E *X
  1041. 5 4 4 3
  1042. - 3836*E + 4283*E *X - 4795*E + 2988*E *X
  1043. 3 2 2
  1044. - 3065*E + 978*E *X - 672*E + 132*E*X - 42*E
  1045. 2 8 7 7 6
  1046. + 6*X))/(E *(E *X + 30*E *X - 7*E + 333*E *X
  1047. 6 5 5 4
  1048. - 168*E + 1692*E *X - 1365*E + 4023*E *X
  1049. 4 3 3 2
  1050. - 4368*E + 4470*E *X - 5145*E + 2663*E *X
  1051. 2
  1052. - 2520*E + 576*E*X - 251*E + 36*X))),
  1053. 9 8 8 7
  1054. ((ARBCOMPLEX(24)*(E *X + 29*E *X - 7*E + 310*E *X
  1055. 7 6 6 5
  1056. - 161*E + 1520*E *X - 1246*E + 3577*E *X
  1057. 5 4 4 3
  1058. - 3836*E + 4283*E *X - 4795*E + 2988*E *X
  1059. 3 2 2
  1060. - 3065*E + 978*E *X - 672*E + 132*E*X - 42*E
  1061. 2 8 7 7 6
  1062. + 6*X))/(E *(E *X + 30*E *X - 7*E + 333*E *X
  1063. 6 5 5 4
  1064. - 168*E + 1692*E *X - 1365*E + 4023*E *X
  1065. 4 3 3 2
  1066. - 4368*E + 4470*E *X - 5145*E + 2663*E *X
  1067. 2
  1068. - 2520*E + 576*E*X - 251*E + 36*X))),
  1069. (ARBCOMPLEX(24)))
  1070. }}
  1071. % Now check the eigenvectors and calculate the eigenvalues in the
  1072. % respective eigenspaces:
  1073. factor expt;
  1074. for each eispace in eig do
  1075. begin scalar eivaleq,eival,eivec;
  1076. eival := solve(first eispace,x);
  1077. for each soln in eival do
  1078. <<eival := rhs soln;
  1079. eivec := third eispace;
  1080. eivec := sub(soln,eivec);
  1081. write "eigenvalue = ", eival;
  1082. write "check of eigen equation: ",
  1083. m*eivec - eival*eivec>>
  1084. end;
  1085. eigenvalue = 1
  1086. check of eigen equation:
  1087. [0]
  1088. [ ]
  1089. [0]
  1090. [ ]
  1091. [0]
  1092. [ ]
  1093. [0]
  1094. [ ]
  1095. [0]
  1096. [ ]
  1097. [0]
  1098. [ ]
  1099. [0]
  1100. [ ]
  1101. [0]
  1102. eigenvalue = -1
  1103. check of eigen equation:
  1104. [0]
  1105. [ ]
  1106. [0]
  1107. [ ]
  1108. [0]
  1109. [ ]
  1110. [0]
  1111. [ ]
  1112. [0]
  1113. [ ]
  1114. [0]
  1115. [ ]
  1116. [0]
  1117. [ ]
  1118. [0]
  1119. 4 3 2 2
  1120. SQRT(E + 12*E + 10*E + 12*E + 1) + E + 6*E + 1
  1121. eigenvalue = ----------------------------------------------------
  1122. 2*E
  1123. check of eigen equation:
  1124. [0]
  1125. [ ]
  1126. [0]
  1127. [ ]
  1128. [0]
  1129. [ ]
  1130. [0]
  1131. [ ]
  1132. [0]
  1133. [ ]
  1134. [0]
  1135. [ ]
  1136. [0]
  1137. [ ]
  1138. [0]
  1139. 4 3 2 2
  1140. - SQRT(E + 12*E + 10*E + 12*E + 1) + E + 6*E + 1
  1141. eigenvalue = -------------------------------------------------------
  1142. 2*E
  1143. check of eigen equation:
  1144. [0]
  1145. [ ]
  1146. [0]
  1147. [ ]
  1148. [0]
  1149. [ ]
  1150. [0]
  1151. [ ]
  1152. [0]
  1153. [ ]
  1154. [0]
  1155. [ ]
  1156. [0]
  1157. [ ]
  1158. [0]
  1159. % For the special choice:
  1160. let e = -7 + sqrt 48;
  1161. % we get only 7 eigenvectors.
  1162. eig := mateigen(m,x);
  1163. EIG := {{X + 1,
  1164. 4,
  1165. ARBCOMPLEX(27)
  1166. MAT((----------------),
  1167. 4*SQRT(3) - 7
  1168. (ARBCOMPLEX(26)),
  1169. (ARBCOMPLEX(25)),
  1170. ((2*SQRT(3)*( - ARBCOMPLEX(27) - 2*ARBCOMPLEX(26)
  1171. - 2*ARBCOMPLEX(25)) + 3*ARBCOMPLEX(27)
  1172. + 7*ARBCOMPLEX(26) + 7*ARBCOMPLEX(25))/(4*SQRT(3) - 7
  1173. )),
  1174. ((2*SQRT(3)*( - ARBCOMPLEX(27) - 2*ARBCOMPLEX(26)
  1175. - 2*ARBCOMPLEX(25)) + 3*ARBCOMPLEX(27)
  1176. + 7*ARBCOMPLEX(26) + 7*ARBCOMPLEX(25))/(4*SQRT(3) - 7
  1177. )),
  1178. (ARBCOMPLEX(25)),
  1179. (ARBCOMPLEX(26)),
  1180. (ARBCOMPLEX(27)))
  1181. },
  1182. {X - 1,
  1183. 3,
  1184. [ 0 ]
  1185. [ ]
  1186. [ - ARBCOMPLEX(30)]
  1187. [ ]
  1188. [ - ARBCOMPLEX(29)]
  1189. [ ]
  1190. [ - ARBCOMPLEX(28)]
  1191. [ ]
  1192. [ ARBCOMPLEX(28) ]
  1193. [ ]
  1194. [ ARBCOMPLEX(29) ]
  1195. [ ]
  1196. [ ARBCOMPLEX(30) ]
  1197. [ ]
  1198. [ 0 ]
  1199. },
  1200. {X + 7,
  1201. 1,
  1202. [ ARBCOMPLEX(31) ]
  1203. [ ----------------- ]
  1204. [ 56*SQRT(3) - 97 ]
  1205. [ ]
  1206. [ - 14*SQRT(3)*ARBCOMPLEX(31) + 24*ARBCOMPLEX(31) ]
  1207. [--------------------------------------------------]
  1208. [ 168*SQRT(3) - 291 ]
  1209. [ ]
  1210. [ - 14*SQRT(3)*ARBCOMPLEX(31) + 24*ARBCOMPLEX(31) ]
  1211. [--------------------------------------------------]
  1212. [ 168*SQRT(3) - 291 ]
  1213. [ ]
  1214. [ - 14*SQRT(3)*ARBCOMPLEX(31) + 24*ARBCOMPLEX(31) ]
  1215. [--------------------------------------------------]
  1216. [ 168*SQRT(3) - 291 ]
  1217. [ ]
  1218. [ - 14*SQRT(3)*ARBCOMPLEX(31) + 24*ARBCOMPLEX(31) ]
  1219. [--------------------------------------------------]
  1220. [ 168*SQRT(3) - 291 ]
  1221. [ ]
  1222. [ - 14*SQRT(3)*ARBCOMPLEX(31) + 24*ARBCOMPLEX(31) ]
  1223. [--------------------------------------------------]
  1224. [ 168*SQRT(3) - 291 ]
  1225. [ ]
  1226. [ - 14*SQRT(3)*ARBCOMPLEX(31) + 24*ARBCOMPLEX(31) ]
  1227. [--------------------------------------------------]
  1228. [ 168*SQRT(3) - 291 ]
  1229. [ ]
  1230. [ ARBCOMPLEX(31) ]
  1231. }}
  1232. for each eispace in eig do
  1233. begin scalar eivaleq,eival,eivec;
  1234. eival := solve(first eispace,x);
  1235. for each soln in eival do
  1236. <<eival := rhs soln;
  1237. eivec := third eispace;
  1238. eivec := sub(soln,eivec);
  1239. write "eigenvalue = ", eival;
  1240. write "check of eigen equation: ",
  1241. m*eivec - eival*eivec>>
  1242. end;
  1243. eigenvalue = -1
  1244. check of eigen equation:
  1245. [0]
  1246. [ ]
  1247. [0]
  1248. [ ]
  1249. [0]
  1250. [ ]
  1251. [0]
  1252. [ ]
  1253. [0]
  1254. [ ]
  1255. [0]
  1256. [ ]
  1257. [0]
  1258. [ ]
  1259. [0]
  1260. eigenvalue = 1
  1261. check of eigen equation:
  1262. [0]
  1263. [ ]
  1264. [0]
  1265. [ ]
  1266. [0]
  1267. [ ]
  1268. [0]
  1269. [ ]
  1270. [0]
  1271. [ ]
  1272. [0]
  1273. [ ]
  1274. [0]
  1275. [ ]
  1276. [0]
  1277. eigenvalue = -7
  1278. check of eigen equation:
  1279. [0]
  1280. [ ]
  1281. [0]
  1282. [ ]
  1283. [0]
  1284. [ ]
  1285. [0]
  1286. [ ]
  1287. [0]
  1288. [ ]
  1289. [0]
  1290. [ ]
  1291. [0]
  1292. [ ]
  1293. [0]
  1294. % The same behaviour for this choice of e.
  1295. clear e;
  1296. let e = -7 - sqrt 48;
  1297. % we get only 7 eigenvectors.
  1298. eig := mateigen(m,x);
  1299. EIG := {{X + 1,
  1300. 4,
  1301. - ARBCOMPLEX(34)
  1302. MAT((-------------------),
  1303. 4*SQRT(3) + 7
  1304. (ARBCOMPLEX(33)),
  1305. (ARBCOMPLEX(32)),
  1306. ((2*SQRT(3)*( - ARBCOMPLEX(34) - 2*ARBCOMPLEX(33)
  1307. - 2*ARBCOMPLEX(32)) - 3*ARBCOMPLEX(34)
  1308. - 7*ARBCOMPLEX(33) - 7*ARBCOMPLEX(32))/(4*SQRT(3) + 7
  1309. )),
  1310. ((2*SQRT(3)*( - ARBCOMPLEX(34) - 2*ARBCOMPLEX(33)
  1311. - 2*ARBCOMPLEX(32)) - 3*ARBCOMPLEX(34)
  1312. - 7*ARBCOMPLEX(33) - 7*ARBCOMPLEX(32))/(4*SQRT(3) + 7
  1313. )),
  1314. (ARBCOMPLEX(32)),
  1315. (ARBCOMPLEX(33)),
  1316. (ARBCOMPLEX(34)))
  1317. },
  1318. {X - 1,
  1319. 3,
  1320. [ 0 ]
  1321. [ ]
  1322. [ - ARBCOMPLEX(37)]
  1323. [ ]
  1324. [ - ARBCOMPLEX(36)]
  1325. [ ]
  1326. [ - ARBCOMPLEX(35)]
  1327. [ ]
  1328. [ ARBCOMPLEX(35) ]
  1329. [ ]
  1330. [ ARBCOMPLEX(36) ]
  1331. [ ]
  1332. [ ARBCOMPLEX(37) ]
  1333. [ ]
  1334. [ 0 ]
  1335. },
  1336. {X + 7,
  1337. 1,
  1338. [ - ARBCOMPLEX(38) ]
  1339. [ ------------------- ]
  1340. [ 56*SQRT(3) + 97 ]
  1341. [ ]
  1342. [ - 14*SQRT(3)*ARBCOMPLEX(38) - 24*ARBCOMPLEX(38) ]
  1343. [--------------------------------------------------]
  1344. [ 168*SQRT(3) + 291 ]
  1345. [ ]
  1346. [ - 14*SQRT(3)*ARBCOMPLEX(38) - 24*ARBCOMPLEX(38) ]
  1347. [--------------------------------------------------]
  1348. [ 168*SQRT(3) + 291 ]
  1349. [ ]
  1350. [ - 14*SQRT(3)*ARBCOMPLEX(38) - 24*ARBCOMPLEX(38) ]
  1351. [--------------------------------------------------]
  1352. [ 168*SQRT(3) + 291 ]
  1353. [ ]
  1354. [ - 14*SQRT(3)*ARBCOMPLEX(38) - 24*ARBCOMPLEX(38) ]
  1355. [--------------------------------------------------]
  1356. [ 168*SQRT(3) + 291 ]
  1357. [ ]
  1358. [ - 14*SQRT(3)*ARBCOMPLEX(38) - 24*ARBCOMPLEX(38) ]
  1359. [--------------------------------------------------]
  1360. [ 168*SQRT(3) + 291 ]
  1361. [ ]
  1362. [ - 14*SQRT(3)*ARBCOMPLEX(38) - 24*ARBCOMPLEX(38) ]
  1363. [--------------------------------------------------]
  1364. [ 168*SQRT(3) + 291 ]
  1365. [ ]
  1366. [ ARBCOMPLEX(38) ]
  1367. }}
  1368. for each eispace in eig do
  1369. begin scalar eivaleq,eival,eivec;
  1370. eival := solve(first eispace,x);
  1371. for each soln in eival do
  1372. <<eival := rhs soln;
  1373. eivec := third eispace;
  1374. eivec := sub(soln,eivec);
  1375. write "eigenvalue = ", eival;
  1376. write "check of eigen equation: ",
  1377. m*eivec - eival*eivec>>
  1378. end;
  1379. eigenvalue = -1
  1380. check of eigen equation:
  1381. [0]
  1382. [ ]
  1383. [0]
  1384. [ ]
  1385. [0]
  1386. [ ]
  1387. [0]
  1388. [ ]
  1389. [0]
  1390. [ ]
  1391. [0]
  1392. [ ]
  1393. [0]
  1394. [ ]
  1395. [0]
  1396. eigenvalue = 1
  1397. check of eigen equation:
  1398. [0]
  1399. [ ]
  1400. [0]
  1401. [ ]
  1402. [0]
  1403. [ ]
  1404. [0]
  1405. [ ]
  1406. [0]
  1407. [ ]
  1408. [0]
  1409. [ ]
  1410. [0]
  1411. [ ]
  1412. [0]
  1413. eigenvalue = -7
  1414. check of eigen equation:
  1415. [0]
  1416. [ ]
  1417. [0]
  1418. [ ]
  1419. [0]
  1420. [ ]
  1421. [0]
  1422. [ ]
  1423. [0]
  1424. [ ]
  1425. [0]
  1426. [ ]
  1427. [0]
  1428. [ ]
  1429. [0]
  1430. % For this choice of values
  1431. clear e;
  1432. let e = 1;
  1433. % the eigenvalue 1 becomes 4-fold degenerate. However, we get a complete
  1434. % span of 8 eigenvectors.
  1435. eig := mateigen(m,x);
  1436. EIG := {{X - 1,
  1437. 4,
  1438. [ - ARBCOMPLEX(42)]
  1439. [ ]
  1440. [ - ARBCOMPLEX(41)]
  1441. [ ]
  1442. [ - ARBCOMPLEX(40)]
  1443. [ ]
  1444. [ - ARBCOMPLEX(39)]
  1445. [ ]
  1446. [ ARBCOMPLEX(39) ]
  1447. [ ]
  1448. [ ARBCOMPLEX(40) ]
  1449. [ ]
  1450. [ ARBCOMPLEX(41) ]
  1451. [ ]
  1452. [ ARBCOMPLEX(42) ]
  1453. },
  1454. {X + 1,
  1455. 3,
  1456. [ ARBCOMPLEX(45) ]
  1457. [ ]
  1458. [ ARBCOMPLEX(44) ]
  1459. [ ]
  1460. [ ARBCOMPLEX(43) ]
  1461. [ ]
  1462. [ - (ARBCOMPLEX(45) + ARBCOMPLEX(44) + ARBCOMPLEX(43))]
  1463. [ ]
  1464. [ - (ARBCOMPLEX(45) + ARBCOMPLEX(44) + ARBCOMPLEX(43))]
  1465. [ ]
  1466. [ ARBCOMPLEX(43) ]
  1467. [ ]
  1468. [ ARBCOMPLEX(44) ]
  1469. [ ]
  1470. [ ARBCOMPLEX(45) ]
  1471. },
  1472. {X - 7,
  1473. 1,
  1474. [ARBCOMPLEX(46)]
  1475. [ ]
  1476. [ARBCOMPLEX(46)]
  1477. [ ]
  1478. [ARBCOMPLEX(46)]
  1479. [ ]
  1480. [ARBCOMPLEX(46)]
  1481. [ ]
  1482. [ARBCOMPLEX(46)]
  1483. [ ]
  1484. [ARBCOMPLEX(46)]
  1485. [ ]
  1486. [ARBCOMPLEX(46)]
  1487. [ ]
  1488. [ARBCOMPLEX(46)]
  1489. }}
  1490. for each eispace in eig do
  1491. begin scalar eivaleq,eival,eivec;
  1492. eival := solve(first eispace,x);
  1493. for each soln in eival do
  1494. <<eival := rhs soln;
  1495. eivec := third eispace;
  1496. eivec := sub(soln,eivec);
  1497. write "eigenvalue = ", eival;
  1498. write "check of eigen equation: ",
  1499. m*eivec - eival*eivec>>
  1500. end;
  1501. eigenvalue = 1
  1502. check of eigen equation:
  1503. [0]
  1504. [ ]
  1505. [0]
  1506. [ ]
  1507. [0]
  1508. [ ]
  1509. [0]
  1510. [ ]
  1511. [0]
  1512. [ ]
  1513. [0]
  1514. [ ]
  1515. [0]
  1516. [ ]
  1517. [0]
  1518. eigenvalue = -1
  1519. check of eigen equation:
  1520. [0]
  1521. [ ]
  1522. [0]
  1523. [ ]
  1524. [0]
  1525. [ ]
  1526. [0]
  1527. [ ]
  1528. [0]
  1529. [ ]
  1530. [0]
  1531. [ ]
  1532. [0]
  1533. [ ]
  1534. [0]
  1535. eigenvalue = 7
  1536. check of eigen equation:
  1537. [0]
  1538. [ ]
  1539. [0]
  1540. [ ]
  1541. [0]
  1542. [ ]
  1543. [0]
  1544. [ ]
  1545. [0]
  1546. [ ]
  1547. [0]
  1548. [ ]
  1549. [0]
  1550. [ ]
  1551. [0]
  1552. ma := mat((1,a),(0,b));
  1553. [1 A]
  1554. MA := [ ]
  1555. [0 B]
  1556. % case 1:
  1557. let a = 0;
  1558. mateigen(ma,x);
  1559. {{X - 1,1,
  1560. [ARBCOMPLEX(47)]
  1561. [ ]
  1562. [ 0 ]
  1563. },
  1564. { - B + X,1,
  1565. [ 0 ]
  1566. [ ]
  1567. [ARBCOMPLEX(48)]
  1568. }}
  1569. % case 2:
  1570. clear a;
  1571. let a = 0, b = 1;
  1572. mateigen(ma,x);
  1573. {{X - 1,2,
  1574. [ARBCOMPLEX(49)]
  1575. [ ]
  1576. [ARBCOMPLEX(50)]
  1577. }}
  1578. % case 3:
  1579. clear a,b;
  1580. mateigen(ma,x);
  1581. {{ - B + X,
  1582. 1,
  1583. [ ARBCOMPLEX(51)*A ]
  1584. [------------------]
  1585. [ B - 1 ]
  1586. [ ]
  1587. [ ARBCOMPLEX(51) ]
  1588. },
  1589. {X - 1,1,
  1590. [ARBCOMPLEX(52)]
  1591. [ ]
  1592. [ 0 ]
  1593. }}
  1594. % case 4:
  1595. let b = 1;
  1596. mateigen(ma,x);
  1597. {{X - 1,2,
  1598. [ARBCOMPLEX(53)]
  1599. [ ]
  1600. [ 0 ]
  1601. }}
  1602. end;
  1603. 4: 4:
  1604. Quitting
  1605. Sat Jun 29 13:45:44 PDT 1991