SOLVE.LOG 77 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696
  1. REDUCE 3.6, 15-Jul-95, patched to 6 Mar 96 ...
  2. % Demonstration of the REDUCE SOLVE package.
  3. on fullroots;
  4. % To get complete solutions.
  5. % Simultaneous linear fractional equations.
  6. solve({(a*x+y)/(z-1)-3,y+b+z,x-y},{x,y,z});
  7. - 3*(b + 1)
  8. {{x=--------------,
  9. a + 4
  10. - 3*(b + 1)
  11. y=--------------,
  12. a + 4
  13. - a*b - b + 3
  14. z=----------------}}
  15. a + 4
  16. % Use of square-free factorization together with recursive use of
  17. % quadratic and binomial solutions.
  18. solve((x**6-x**3-1)*(x**5-1)**2*x**2);
  19. Unknown: x
  20. 2*sqrt( - sqrt(5) - 5) + sqrt(10) - sqrt(2)
  21. {x=---------------------------------------------,
  22. 4*sqrt(2)
  23. - 2*sqrt( - sqrt(5) - 5) + sqrt(10) - sqrt(2)
  24. x=------------------------------------------------,
  25. 4*sqrt(2)
  26. 2*sqrt(sqrt(5) - 5) - sqrt(10) - sqrt(2)
  27. x=------------------------------------------,
  28. 4*sqrt(2)
  29. - 2*sqrt(sqrt(5) - 5) - sqrt(10) - sqrt(2)
  30. x=---------------------------------------------,
  31. 4*sqrt(2)
  32. x=1,
  33. x=0,
  34. 1/3
  35. ( - sqrt(5) + 1) *(sqrt(3)*i - 1)
  36. x=-------------------------------------,
  37. 1/3
  38. 2*2
  39. 1/3
  40. - ( - sqrt(5) + 1) *(sqrt(3)*i + 1)
  41. x=----------------------------------------,
  42. 1/3
  43. 2*2
  44. 1/3
  45. ( - sqrt(5) + 1)
  46. x=---------------------,
  47. 1/3
  48. 2
  49. 1/3
  50. (sqrt(5) + 1) *(sqrt(3)*i - 1)
  51. x=----------------------------------,
  52. 1/3
  53. 2*2
  54. 1/3
  55. - (sqrt(5) + 1) *(sqrt(3)*i + 1)
  56. x=-------------------------------------,
  57. 1/3
  58. 2*2
  59. 1/3
  60. (sqrt(5) + 1)
  61. x=------------------}
  62. 1/3
  63. 2
  64. multiplicities!*;
  65. {2,2,2,2,2,2,1,1,1,1,1,1}
  66. % A singular equation without and with a consistent inhomogeneous term.
  67. solve(a,x);
  68. {}
  69. solve(0,x);
  70. {x=arbcomplex(1)}
  71. off solvesingular;
  72. solve(0,x);
  73. {}
  74. % Use of DECOMPOSE to solve high degree polynomials.
  75. solve(x**8-8*x**7+34*x**6-92*x**5+175*x**4-236*x**3+226*x**2-140*x+46);
  76. Unknown: x
  77. sqrt( - sqrt( - 4*sqrt(3) - 3) - 3)*sqrt(2) + 2
  78. {x=-------------------------------------------------,
  79. 2
  80. - sqrt( - sqrt( - 4*sqrt(3) - 3) - 3)*sqrt(2) + 2
  81. x=----------------------------------------------------,
  82. 2
  83. sqrt( - sqrt(4*sqrt(3) - 3) - 3)*sqrt(2) + 2
  84. x=----------------------------------------------,
  85. 2
  86. - sqrt( - sqrt(4*sqrt(3) - 3) - 3)*sqrt(2) + 2
  87. x=-------------------------------------------------,
  88. 2
  89. sqrt(sqrt( - 4*sqrt(3) - 3) - 3)*sqrt(2) + 2
  90. x=----------------------------------------------,
  91. 2
  92. - sqrt(sqrt( - 4*sqrt(3) - 3) - 3)*sqrt(2) + 2
  93. x=-------------------------------------------------,
  94. 2
  95. sqrt(sqrt(4*sqrt(3) - 3) - 3)*sqrt(2) + 2
  96. x=-------------------------------------------,
  97. 2
  98. - sqrt(sqrt(4*sqrt(3) - 3) - 3)*sqrt(2) + 2
  99. x=----------------------------------------------}
  100. 2
  101. solve(x**8-88*x**7+2924*x**6-43912*x**5+263431*x**4-218900*x**3+
  102. 65690*x**2-7700*x+234,x);
  103. {x=sqrt( - i + 116) + 11,
  104. x= - sqrt( - i + 116) + 11,
  105. x=sqrt(i + 116) + 11,
  106. x= - sqrt(i + 116) + 11,
  107. x=4*sqrt(7) + 11,
  108. x= - 4*sqrt(7) + 11,
  109. x=2*sqrt(30) + 11,
  110. x= - 2*sqrt(30) + 11}
  111. % Recursive use of inverses, including multiple branches of rational
  112. % fractional powers.
  113. solve(log(acos(asin(x**(2/3)-b)-1))+2,x);
  114. 1 1
  115. {x=sqrt(sin(cos(----) + 1) + b)*(sin(cos(----) + 1) + b),
  116. 2 2
  117. e e
  118. 1 1
  119. x= - sqrt(sin(cos(----) + 1) + b)*(sin(cos(----) + 1) + b)}
  120. 2 2
  121. e e
  122. % Square-free factors that are unsolvable, being of fifth degree,
  123. % transcendental, or without a defined inverse.
  124. operator f;
  125. solve((x-1)*(x+1)*(x-2)*(x+2)*(x-3)*(x*log(x)-1)*(f(x)-1),x);
  126. {f(x) - 1=0,
  127. x=root_of(log(x_)*x_ - 1,x_,tag_2),
  128. x=3,
  129. x=2,
  130. x=1,
  131. x=-1,
  132. x=-2}
  133. multiplicities!*;
  134. {1,1,1,1,1,1,1}
  135. % Factors with more than one distinct top-level kernel, the first factor
  136. % a cubic. (Cubic solution suppressed since it is too messy to be of
  137. % much use).
  138. off fullroots;
  139. solve((x**(1/2)-(x-a)**(1/3))*(acos x-acos(2*x-b))* (2*log x
  140. -log(x**2+x-c)-4),x);
  141. 2 4 4 2
  142. e *(sqrt(4*c*e - 4*c + e ) - e )
  143. {x=-----------------------------------,
  144. 4
  145. 2*(e - 1)
  146. 2 4 4 2
  147. - e *(sqrt(4*c*e - 4*c + e ) + e )
  148. x=--------------------------------------,
  149. 4
  150. 2*(e - 1)
  151. 2 3 2
  152. x=root_of(a - 2*a*x_ - x_ + x_ ,x_,tag_7),
  153. x=b}
  154. on fullroots;
  155. % Treatment of multiple-argument exponentials as polynomials.
  156. solve(a**(2*x)-3*a**x+2,x);
  157. 2*arbint(3)*i*pi + log(2)
  158. {x=---------------------------,
  159. log(a)
  160. 2*arbint(2)*i*pi
  161. x=------------------}
  162. log(a)
  163. % A 12th degree reciprocal polynomial that is irreductible over the
  164. % integers, having a reduced polynomial that is also reciprocal.
  165. % (Reciprocal polynomials are those that have symmetric or antisymmetric
  166. % coefficient patterns.) We also demonstrate suppression of automatic
  167. % integer root extraction.
  168. solve(x**12-4*x**11+12*x**10-28*x**9+45*x**8-68*x**7+69*x**6-68*x**5+
  169. 45*x**4-28*x**3+12*x**2-4*x+1);
  170. Unknown: x
  171. sqrt( - sqrt(5) - 3)
  172. {x=----------------------,
  173. sqrt(2)
  174. - sqrt( - sqrt(5) - 3)
  175. x=-------------------------,
  176. sqrt(2)
  177. 2*sqrt( - sqrt(3)*i - 9) - sqrt(6)*i + sqrt(2)
  178. x=------------------------------------------------,
  179. 4*sqrt(2)
  180. - 2*sqrt( - sqrt(3)*i - 9) - sqrt(6)*i + sqrt(2)
  181. x=---------------------------------------------------,
  182. 4*sqrt(2)
  183. 2*sqrt( - 3*sqrt(5) - 1) - sqrt(10) + 3*sqrt(2)
  184. x=-------------------------------------------------,
  185. 4*sqrt(2)
  186. - 2*sqrt( - 3*sqrt(5) - 1) - sqrt(10) + 3*sqrt(2)
  187. x=----------------------------------------------------,
  188. 4*sqrt(2)
  189. 2*sqrt(sqrt(3)*i - 9) + sqrt(6)*i + sqrt(2)
  190. x=---------------------------------------------,
  191. 4*sqrt(2)
  192. - 2*sqrt(sqrt(3)*i - 9) + sqrt(6)*i + sqrt(2)
  193. x=------------------------------------------------,
  194. 4*sqrt(2)
  195. 2*sqrt(3*sqrt(5) - 1) + sqrt(10) + 3*sqrt(2)
  196. x=----------------------------------------------,
  197. 4*sqrt(2)
  198. - 2*sqrt(3*sqrt(5) - 1) + sqrt(10) + 3*sqrt(2)
  199. x=-------------------------------------------------,
  200. 4*sqrt(2)
  201. i*(sqrt(5) - 1)
  202. x=-----------------,
  203. 2
  204. i*( - sqrt(5) + 1)
  205. x=--------------------}
  206. 2
  207. % The treatment of factors with non-unique inverses by introducing
  208. % unique new real or integer indeterminant kernels.
  209. solve((sin x-a)*(2**x-b)*(x**c-3),x);
  210. {x=2*arbint(6)*pi + asin(a),
  211. x=2*arbint(6)*pi - asin(a) + pi,
  212. 2*arbint(5)*i*pi + log(b)
  213. x=---------------------------,
  214. log(2)
  215. 1/c 2*arbint(4)*pi 2*arbint(4)*pi
  216. x=3 *(cos(----------------) + sin(----------------)*i)}
  217. c c
  218. % Automatic restriction to principal branches.
  219. off allbranch;
  220. solve((sin x-a)*(2**x-b)*(x**c-3),x);
  221. {x=asin(a),
  222. 1/c
  223. x=3 ,
  224. log(b)
  225. x=--------}
  226. log(2)
  227. % Regular system of linear equations.
  228. solve({2*x1+x2+3*x3-9,x1-2*x2+x3+2,3*x1+2*x2+2*x3-7}, {x1,x2,x3});
  229. {{x1=-1,x2=2,x3=3}}
  230. % Underdetermined system of linear equations.
  231. on solvesingular;
  232. solve({x1-4*x2+2*x3+1,2*x1-3*x2-x3-5*x4+7,3*x1-7*x2+x3-5*x4+8},
  233. {x1,x2,x3,x4});
  234. {{x1=4*arbcomplex(8) + 2*arbcomplex(7) - 5,
  235. x2=arbcomplex(8) + arbcomplex(7) - 1,
  236. x3=arbcomplex(7),
  237. x4=arbcomplex(8)}}
  238. % Inconsistent system of linear equations.
  239. solve({2*x1+3*x2-x3-2,7*x1+4*x2+2*x3-8,3*x1-2*x2+4*x3-5},
  240. {x1,x2,x3});
  241. {}
  242. % Overdetermined system of linear equations.
  243. solve({x1-x2+x3-12,2*x1+3*x2-x3-13,3*x2+4*x3-5,-3*x1+x2+4*x3+20},
  244. {x1,x2,x3});
  245. {{x1=9,x2=-1,x3=2}}
  246. % Degenerate system of linear equations.
  247. operator xx,yy;
  248. yy(1) := -a**2*b**3-3*a**2*b**2-3*a**2*b+a**2*(xx(3)-2)-a*b-a*c+a*(xx(2)
  249. -xx(5))-xx(4)-xx(5)+xx(1)-1;
  250. 2 2 3
  251. yy(1) := - xx(5)*a - xx(5) - xx(4) + xx(3)*a + xx(2)*a + xx(1) - a *b
  252. 2 2 2 2
  253. - 3*a *b - 3*a *b - 2*a - a*b - a*c - 1
  254. yy(2) := -a*b**3-b**5+b**4*(-xx(4)-xx(5)+xx(1)-5)-b**3*c+b**3*(xx(2)
  255. -xx(5)-3)+b**2*(xx(3)-1);
  256. 2 2 2 2
  257. yy(2) := b *( - xx(5)*b - xx(5)*b - xx(4)*b + xx(3) + xx(2)*b + xx(1)*b - a*b
  258. 3 2
  259. - b - 5*b - b*c - 3*b - 1)
  260. yy(3) := -a*b**3*c-3*a*b**2*c-4*a*b*c+a*b*(-xx(4)-xx(5)+xx(1)-1)
  261. +a*c*(xx(3)-1)-b**2*c-b*c**2+b*c*(xx(2)-xx(5));
  262. yy(3) := - xx(5)*a*b - xx(5)*b*c - xx(4)*a*b + xx(3)*a*c + xx(2)*b*c
  263. 3 2 2 2
  264. + xx(1)*a*b - a*b *c - 3*a*b *c - 4*a*b*c - a*b - a*c - b *c - b*c
  265. yy(4) := -a**2-a*c+a*(xx(2)-xx(4)-2*xx(5)+xx(1)-1)-b**4-b**3*c-3*b**3
  266. -3*b**2*c-2*b**2-2*b*c+b*(xx(3)-xx(2)-xx(4)+xx(1)-2)
  267. +c*(xx(3)-1);
  268. yy(4) := - 2*xx(5)*a - xx(4)*a - xx(4)*b + xx(3)*b + xx(3)*c + xx(2)*a
  269. 2 4 3 3
  270. - xx(2)*b + xx(1)*a + xx(1)*b - a - a*c - a - b - b *c - 3*b
  271. 2 2
  272. - 3*b *c - 2*b - 2*b*c - 2*b - c
  273. yy(5) := -2*a-3*b**3-9*b**2-11*b-2*c+3*xx(3)+2*xx(2)-xx(4)-3*xx(5)+xx(1)
  274. -4;
  275. 3 2
  276. yy(5) := - 3*xx(5) - xx(4) + 3*xx(3) + 2*xx(2) + xx(1) - 2*a - 3*b - 9*b
  277. - 11*b - 2*c - 4
  278. soln := solve({yy(1),yy(2),yy(3),yy(4),yy(5)},
  279. {xx(1),xx(2),xx(3),xx(4),xx(5)});
  280. soln := {{xx(1)=arbcomplex(10) + arbcomplex(9) + 1,
  281. xx(2)=arbcomplex(10) + a + b + c,
  282. 3 2
  283. xx(3)=b + 3*b + 3*b + 1,
  284. xx(4)=arbcomplex(9),
  285. xx(5)=arbcomplex(10)}}
  286. for i := 1:5 do xx(i) := part(soln,1,i,2);
  287. for i := 1:5 do write yy(i);
  288. 0
  289. 0
  290. 0
  291. 0
  292. 0
  293. % Single equations liftable to polynomial systems.
  294. solve ({a*sin x + b*cos x},{x});
  295. 2 2
  296. sqrt(a + b ) - a
  297. {x= - 2*atan(-------------------),
  298. b
  299. 2 2
  300. sqrt(a + b ) + a
  301. x=2*atan(-------------------)}
  302. b
  303. solve ({a*sin(x+1) + b*cos(x+1)},{x});
  304. 2 2
  305. sqrt(a + b ) - a
  306. {x= - 2*atan(-------------------) - 1,
  307. b
  308. 2 2
  309. sqrt(a + b ) + a
  310. x=2*atan(-------------------) - 1}
  311. b
  312. % Intersection of 2 curves: system with a free parameter.
  313. solve ({sqrt(x^2 + y^2)=r,0=sqrt(x)+ y**3-1},{x,y,r});
  314. {{y=arbcomplex(12),
  315. 6 3
  316. x=y - 2*y + 1,
  317. 12 9 6 3 2
  318. r=sqrt(y - 4*y + 6*y - 4*y + y + 1)},
  319. {y=arbcomplex(11),
  320. 6 3
  321. x=y - 2*y + 1,
  322. 12 9 6 3 2
  323. r= - sqrt(y - 4*y + 6*y - 4*y + y + 1)}}
  324. solve ({e^x - e^(1/2 * x) - 7},{x});
  325. - sqrt(29) + 1
  326. {x=2*log(-----------------),
  327. 2
  328. sqrt(29) + 1
  329. x=2*log(--------------)}
  330. 2
  331. % Generally not liftable.
  332. % variable inside and outside of sin.
  333. solve({sin x + x - 1/2},{x});
  334. {x=root_of(2*sin(x_) + 2*x_ - 1,x_,tag_12)}
  335. % Variable inside and outside of exponential.
  336. solve({e^x - x**2},{x});
  337. - 1
  338. {x= - 2*lambert_w(------)}
  339. 2
  340. % Variable inside trigonometrical functions with different forms.
  341. solve ({a*sin(x+1) + b*cos(x+2)},{x});
  342. 2 2
  343. {x=2*atan((cos(1)*a - sqrt(2*cos(2)*sin(1)*a*b - 2*cos(1)*sin(2)*a*b + a + b )
  344. - sin(2)*b)/(cos(2)*b + sin(1)*a)),
  345. 2 2
  346. x=2*atan((cos(1)*a + sqrt(2*cos(2)*sin(1)*a*b - 2*cos(1)*sin(2)*a*b + a + b )
  347. - sin(2)*b)/(cos(2)*b + sin(1)*a))}
  348. % Undetermined exponents.
  349. solve({x^a - 2},{x});
  350. 1/a
  351. {x=2 }
  352. % Example taken from M.L. Griss, ACM Trans. Math. Softw. 2 (1976) 1.
  353. e1 := x1 - l/(3*k)$
  354. e2 := x2 - 1$
  355. e3 := x3 - 35*b6/(6*l)*x4 + 33*b11/(2*l)*x6 - 715*b15/(14*l)*x8$
  356. e4 := 14*k/(3*l)*x1 - 7*b4/(2*l)*x3 + x4$
  357. e5 := x5 - 891*b11/(40*l)*x6 +3861*b15/(56*l)*x8$
  358. e6 := -88*k/(15*l)*x1 + 22*b4/(5*l)*x3 - 99*b9/(8*l)*x5 +x6$
  359. e7 := -768*k/(5005*b13)*x1 + 576*b4/(5005*b13)*x3 -
  360. 324*b9/(1001*b13)*x5 + x7 - 16*l/(715*b13)*x8$
  361. e8 := 7*l/(143*b15)*x1 + 49*b6/(429*b15)*x4 - 21*b11/(65*b15)*x6 +
  362. x8 - 7*b2/(143*b15)$
  363. solve({e1,e2,e3,e4,e5,e6,e7,e8},{x1,x2,x3,x4,x5,x6,x7,x8});
  364. l
  365. {{x1=-----,
  366. 3*k
  367. x2=1,
  368. 2
  369. 5*(3*b2*k - l )
  370. x3=-----------------,
  371. 6*k*l
  372. 2 2
  373. 7*(45*b2*b4*k - 15*b4*l - 8*k*l )
  374. x4=------------------------------------,
  375. 2
  376. 36*k*l
  377. 2 2 2 4
  378. 2205*b2*b4*b6*k - 108*b2*k*l - 735*b4*b6*l - 392*b6*k*l + 36*l
  379. x5=--------------------------------------------------------------------,
  380. 3
  381. 32*k*l
  382. 2 2
  383. x6=(11*(893025*b2*b4*b6*b9*k - 11520*b2*b4*k*l - 43740*b2*b9*k*l
  384. 2 4 2 4
  385. - 297675*b4*b6*b9*l + 3840*b4*l - 158760*b6*b9*k*l + 14580*b9*l
  386. 4 4
  387. + 2048*k*l ))/(11520*k*l ),
  388. 2
  389. x7=(47652707025*b11*b2*b4*b6*b9*k - 614718720*b11*b2*b4*k*l
  390. 2 2
  391. - 2334010140*b11*b2*b9*k*l - 15884235675*b11*b4*b6*b9*l
  392. 4 2 4
  393. + 204906240*b11*b4*l - 8471592360*b11*b6*b9*k*l + 778003380*b11*b9*l
  394. 4
  395. + 109283328*b11*k*l + 172398476250*b15*b2*b4*b6*b9*k
  396. 2 2
  397. - 2223936000*b15*b2*b4*k*l - 8444007000*b15*b2*b9*k*l
  398. 2 4
  399. - 57466158750*b15*b4*b6*b9*l + 741312000*b15*b4*l
  400. 2 4 4
  401. - 30648618000*b15*b6*b9*k*l + 2814669000*b15*b9*l + 395366400*b15*k*l
  402. 2 4 4
  403. - 172872000*b2*b4*b6*k*l + 8467200*b2*k*l + 57624000*b4*b6*l
  404. 4 6 3
  405. + 30732800*b6*k*l - 2822400*l )/(7729722000*b13*b15*k*l ),
  406. 2
  407. x8=(7*(972504225*b11*b2*b4*b6*b9*k - 12545280*b11*b2*b4*k*l
  408. 2 2
  409. - 47632860*b11*b2*b9*k*l - 324168075*b11*b4*b6*b9*l
  410. 4 2 4
  411. + 4181760*b11*b4*l - 172889640*b11*b6*b9*k*l + 15877620*b11*b9*l
  412. 4 2 4
  413. + 2230272*b11*k*l - 3528000*b2*b4*b6*k*l + 172800*b2*k*l
  414. 4 4 6 4
  415. + 1176000*b4*b6*l + 627200*b6*k*l - 57600*l ))/(24710400*b15*k*l )}}
  416. f1 := x1 - x*x2 - y*x3 + 1/2*x**2*x4 + x*y*x5 + 1/2*y**2*x6 +
  417. 1/6*x**3*x7 + 1/2*x*y*(x - y)*x8 - 1/6*y**3*x9$
  418. f2 := x1 - y*x3 + 1/2*y**2*x6 - 1/6*y**3*x9$
  419. f3 := x1 + y*x2 - y*x3 + 1/2*y**2*x4 - y**2*x5 + 1/2*y**2*x6 +
  420. 1/6*y**3*x7 + 1/2*y**3*x8 - 1/6*y**3*x9$
  421. f4 := x1 + (1 - x)*x2 - x*x3 + 1/2*(1 - x)**2*x4 - y*(1 - x)*x5 +
  422. 1/2*y**2*x6 + 1/6*(1 - x)**3*x7 + 1/2*y*(1 - x - y)*(1 - x)*x8
  423. - 1/6*y**3*x9$
  424. f5 := x1 + (1 - x - y)*x2 + 1/2*(1 - x - y)**2*x4 +
  425. 1/6*(1 - x - y)**3*x7$
  426. f6 := x1 + (1 - x - y)*x3 + 1/2*(1 - x - y)*x6 +
  427. 1/6*(1 - x - y)**3*x9$
  428. f7 := x1 - x*x2 + (1 - y)*x3 + 1/2*x*x4 - x*(1 - y)*x5 +
  429. 1/2*(1 - y)**2*x6 - 1/6*x**3*x7 + 1/2*x*(1 - y)*(1 - y + x)*x8
  430. + 1/6*(1-y)**3*x9$
  431. f8 := x1 - x*x2 + x*x3 + 1/2*x**2*x4 - x**2*x5 + 1/2*x**2*x6 +
  432. 1/6*x**3*x7 - 1/2*x**3*x8 + 1/6*x**3*x9$
  433. f9 := x1 - x*x2 + 1/2*x**2*x4 + 1/6*x**3*x7$
  434. solve({f1,f2,f3,f4,f5,f6,f7,f8,f9},{x1,x2,x3,x4,x5,x6,x7,x8,x9});
  435. {{x1=0,x2=0,x3=0,x4=0,x5=0,x6=0,x7=0,x8=0,x9=0}}
  436. solve({f1 - 1,f2,f3,f4,f5,f6,f7,f8,f9},{x1,x2,x3,x4,x5,x6,x7,x8,x9});
  437. 8 8 7 3 7 2 7 7 6 4
  438. {{x1=(y*( - 8*x *y + 10*x + 9*x *y - 49*x *y + 85*x *y - 43*x + 23*x *y
  439. 6 3 6 2 6 6 5 5 5 4
  440. - 128*x *y + 266*x *y - 246*x *y + 77*x + 20*x *y - 145*x *y
  441. 5 3 5 2 5 5 4 6 4 5
  442. + 383*x *y - 512*x *y + 329*x *y - 75*x + 9*x *y - 84*x *y
  443. 4 4 4 3 4 2 4 4 3 7
  444. + 276*x *y - 469*x *y + 464*x *y - 233*x *y + 43*x + 3*x *y
  445. 3 6 3 5 3 4 3 3 3 2 3
  446. - 23*x *y + 97*x *y - 196*x *y + 245*x *y - 201*x *y + 87*x *y
  447. 3 2 8 2 7 2 6 2 5 2 4
  448. - 14*x - 2*x *y + 13*x *y - 25*x *y + 23*x *y - 10*x *y
  449. 2 3 2 2 2 2 9 8 7
  450. - 17*x *y + 31*x *y - 15*x *y + 2*x - 2*x*y + 10*x*y - 24*x*y
  451. 6 5 4 3 2 6 5
  452. + 41*x*y - 57*x*y + 53*x*y - 24*x*y + 2*x*y + x*y - 2*y + 7*y
  453. 4 3 2 10 10 9 2 9 9
  454. - 9*y + 5*y - y ))/(2*x *y - 4*x + 8*x *y - 24*x *y + 20*x
  455. 8 3 8 2 8 8 7 4 7 3 7 2
  456. + x *y - 17*x *y + 47*x *y - 31*x - 24*x *y + 92*x *y - 105*x *y
  457. 7 7 6 5 6 4 6 3 6 2
  458. + 18*x *y + 15*x - 28*x *y + 172*x *y - 350*x *y + 308*x *y
  459. 6 6 5 6 5 5 5 4 5 3
  460. - 104*x *y + 4*x - 14*x *y + 103*x *y - 290*x *y + 401*x *y
  461. 5 2 5 5 4 7 4 6 4 5 4 4
  462. - 278*x *y + 83*x *y - 5*x + 6*x *y - 35*x *y + 14*x *y + 90*x *y
  463. 4 3 4 2 4 4 3 8 3 7
  464. - 149*x *y + 97*x *y - 24*x *y + x + 20*x *y - 118*x *y
  465. 3 6 3 5 3 4 3 3 3 2 3
  466. + 244*x *y - 237*x *y + 117*x *y - 21*x *y - 7*x *y + 2*x *y
  467. 2 9 2 8 2 7 2 6 2 5 2 4
  468. + 13*x *y - 86*x *y + 228*x *y - 294*x *y + 204*x *y - 86*x *y
  469. 2 3 2 2 10 9 8 7
  470. + 23*x *y - 2*x *y + 4*x*y - 31*x*y + 84*x*y - 121*x*y
  471. 6 5 4 3 9 8 7 6
  472. + 100*x*y - 48*x*y + 15*x*y - 3*x*y + 4*y - 12*y + 15*y - 9*y
  473. 5
  474. + 2*y ),
  475. 10 10 9 2 9 9 8 3 8 2 8
  476. x2=(2*x *y - 2*x + 5*x *y - 12*x *y + 7*x - 8*x *y + 9*x *y + 2*x *y
  477. 8 7 4 7 3 7 2 7 7 6 5
  478. - x - 15*x *y + 65*x *y - 83*x *y + 52*x *y - 17*x + 5*x *y
  479. 6 4 6 3 6 2 6 6 5 6 5 5
  480. - 5*x *y - 20*x *y + 46*x *y - 54*x *y + 20*x + 23*x *y - 151*x *y
  481. 5 4 5 3 5 2 5 5 4 7
  482. + 321*x *y - 338*x *y + 166*x *y - 13*x *y - 8*x + 29*x *y
  483. 4 6 4 5 4 4 4 3 4 2 4
  484. - 207*x *y + 523*x *y - 676*x *y + 522*x *y - 222*x *y + 36*x *y
  485. 4 3 8 3 7 3 6 3 5 3 4
  486. + x + 16*x *y - 103*x *y + 300*x *y - 463*x *y + 433*x *y
  487. 3 3 3 2 3 2 9 2 7 2 6 2 5
  488. - 268*x *y + 98*x *y - 15*x *y - x *y + 22*x *y - 54*x *y + 60*x *y
  489. 2 4 2 3 2 2 2 10 9 8
  490. - 56*x *y + 44*x *y - 17*x *y + 2*x *y - 2*x*y + 10*x*y - 22*x*y
  491. 7 6 5 4 3 2 7 6
  492. + 34*x*y - 48*x*y + 48*x*y - 23*x*y + 2*x*y + x*y - 2*y + 7*y
  493. 5 4 3 10 10 9 2 9 9
  494. - 9*y + 5*y - y )/(x*(2*x *y - 4*x + 8*x *y - 24*x *y + 20*x
  495. 8 3 8 2 8 8 7 4 7 3
  496. + x *y - 17*x *y + 47*x *y - 31*x - 24*x *y + 92*x *y
  497. 7 2 7 7 6 5 6 4 6 3
  498. - 105*x *y + 18*x *y + 15*x - 28*x *y + 172*x *y - 350*x *y
  499. 6 2 6 6 5 6 5 5 5 4
  500. + 308*x *y - 104*x *y + 4*x - 14*x *y + 103*x *y - 290*x *y
  501. 5 3 5 2 5 5 4 7 4 6
  502. + 401*x *y - 278*x *y + 83*x *y - 5*x + 6*x *y - 35*x *y
  503. 4 5 4 4 4 3 4 2 4 4
  504. + 14*x *y + 90*x *y - 149*x *y + 97*x *y - 24*x *y + x
  505. 3 8 3 7 3 6 3 5 3 4
  506. + 20*x *y - 118*x *y + 244*x *y - 237*x *y + 117*x *y
  507. 3 3 3 2 3 2 9 2 8 2 7
  508. - 21*x *y - 7*x *y + 2*x *y + 13*x *y - 86*x *y + 228*x *y
  509. 2 6 2 5 2 4 2 3 2 2 10
  510. - 294*x *y + 204*x *y - 86*x *y + 23*x *y - 2*x *y + 4*x*y
  511. 9 8 7 6 5 4
  512. - 31*x*y + 84*x*y - 121*x*y + 100*x*y - 48*x*y + 15*x*y
  513. 3 9 8 7 6 5
  514. - 3*x*y + 4*y - 12*y + 15*y - 9*y + 2*y )),
  515. 9 9 8 2 8 8 7 3 7 2 7
  516. x3=(2*x *y - 4*x + 8*x *y - 32*x *y + 26*x + 9*x *y - 70*x *y + 131*x *y
  517. 7 6 4 6 3 6 2 6 6 5 5
  518. - 66*x + 7*x *y - 73*x *y + 226*x *y - 253*x *y + 89*x + 11*x *y
  519. 5 4 5 3 5 2 5 5 4 6
  520. - 81*x *y + 244*x *y - 383*x *y + 280*x *y - 73*x + 13*x *y
  521. 4 5 4 4 4 3 4 2 4 4
  522. - 89*x *y + 235*x *y - 367*x *y + 360*x *y - 189*x *y + 39*x
  523. 3 7 3 6 3 5 3 4 3 3 3 2
  524. + 9*x *y - 59*x *y + 156*x *y - 227*x *y + 231*x *y - 171*x *y
  525. 3 3 2 8 2 7 2 6 2 5 2 4
  526. + 74*x *y - 13*x + 3*x *y - 21*x *y + 62*x *y - 78*x *y + 51*x *y
  527. 2 3 2 2 2 2 8 7 6
  528. - 35*x *y + 30*x *y - 14*x *y + 2*x - 5*x*y + 18*x*y - 22*x*y
  529. 5 4 3 2 8 7 6 5 4
  530. - x*y + 21*x*y - 13*x*y + x*y + x*y + 2*y - 6*y + 6*y + y - 6*y
  531. 3 2 10 10 9 2 9 9 8 3
  532. + 4*y - y )/(2*x *y - 4*x + 8*x *y - 24*x *y + 20*x + x *y
  533. 8 2 8 8 7 4 7 3 7 2
  534. - 17*x *y + 47*x *y - 31*x - 24*x *y + 92*x *y - 105*x *y
  535. 7 7 6 5 6 4 6 3 6 2
  536. + 18*x *y + 15*x - 28*x *y + 172*x *y - 350*x *y + 308*x *y
  537. 6 6 5 6 5 5 5 4 5 3
  538. - 104*x *y + 4*x - 14*x *y + 103*x *y - 290*x *y + 401*x *y
  539. 5 2 5 5 4 7 4 6 4 5 4 4
  540. - 278*x *y + 83*x *y - 5*x + 6*x *y - 35*x *y + 14*x *y + 90*x *y
  541. 4 3 4 2 4 4 3 8 3 7
  542. - 149*x *y + 97*x *y - 24*x *y + x + 20*x *y - 118*x *y
  543. 3 6 3 5 3 4 3 3 3 2 3
  544. + 244*x *y - 237*x *y + 117*x *y - 21*x *y - 7*x *y + 2*x *y
  545. 2 9 2 8 2 7 2 6 2 5 2 4
  546. + 13*x *y - 86*x *y + 228*x *y - 294*x *y + 204*x *y - 86*x *y
  547. 2 3 2 2 10 9 8 7
  548. + 23*x *y - 2*x *y + 4*x*y - 31*x*y + 84*x*y - 121*x*y
  549. 6 5 4 3 9 8 7 6
  550. + 100*x*y - 48*x*y + 15*x*y - 3*x*y + 4*y - 12*y + 15*y - 9*y
  551. 5
  552. + 2*y ),
  553. 9 9 8 2 8 8 7 3 7 2 7
  554. x4=(2*(2*x *y - 2*x + 4*x *y - 10*x *y + 6*x - 9*x *y + 21*x *y - 13*x *y
  555. 7 6 4 6 3 6 2 6 6 5 5
  556. + x - 18*x *y + 88*x *y - 130*x *y + 74*x *y - 14*x - 10*x *y
  557. 5 4 5 3 5 2 5 5 4 6
  558. + 74*x *y - 180*x *y + 191*x *y - 90*x *y + 15*x + 4*x *y
  559. 4 5 4 4 4 3 4 2 4 4
  560. - 18*x *y - 20*x *y + 105*x *y - 111*x *y + 47*x *y - 7*x
  561. 3 7 3 6 3 5 3 4 3 3 3 2
  562. + 16*x *y - 96*x *y + 188*x *y - 155*x *y + 44*x *y + 8*x *y
  563. 3 3 2 8 2 7 2 6 2 5
  564. - 6*x *y + x + 10*x *y - 62*x *y + 164*x *y - 219*x *y
  565. 2 4 2 3 2 2 2 9 8 7
  566. + 154*x *y - 56*x *y + 10*x *y - x *y + x*y - 13*x*y + 45*x*y
  567. 6 5 4 3 2 8 7 6
  568. - 72*x*y + 64*x*y - 35*x*y + 12*x*y - 2*x*y + 2*y - 7*y + 9*y
  569. 5 4 10 10 9 2 9 9 8 3
  570. - 5*y + y ))/(x*(2*x *y - 4*x + 8*x *y - 24*x *y + 20*x + x *y
  571. 8 2 8 8 7 4 7 3 7 2
  572. - 17*x *y + 47*x *y - 31*x - 24*x *y + 92*x *y - 105*x *y
  573. 7 7 6 5 6 4 6 3 6 2
  574. + 18*x *y + 15*x - 28*x *y + 172*x *y - 350*x *y + 308*x *y
  575. 6 6 5 6 5 5 5 4 5 3
  576. - 104*x *y + 4*x - 14*x *y + 103*x *y - 290*x *y + 401*x *y
  577. 5 2 5 5 4 7 4 6 4 5
  578. - 278*x *y + 83*x *y - 5*x + 6*x *y - 35*x *y + 14*x *y
  579. 4 4 4 3 4 2 4 4 3 8
  580. + 90*x *y - 149*x *y + 97*x *y - 24*x *y + x + 20*x *y
  581. 3 7 3 6 3 5 3 4 3 3 3 2
  582. - 118*x *y + 244*x *y - 237*x *y + 117*x *y - 21*x *y - 7*x *y
  583. 3 2 9 2 8 2 7 2 6 2 5
  584. + 2*x *y + 13*x *y - 86*x *y + 228*x *y - 294*x *y + 204*x *y
  585. 2 4 2 3 2 2 10 9 8
  586. - 86*x *y + 23*x *y - 2*x *y + 4*x*y - 31*x*y + 84*x*y
  587. 7 6 5 4 3 9 8
  588. - 121*x*y + 100*x*y - 48*x*y + 15*x*y - 3*x*y + 4*y - 12*y
  589. 7 6 5
  590. + 15*y - 9*y + 2*y )),
  591. 10 10 9 2 9 9 8 3 8 2 8
  592. x5=(2*x *y - 2*x + 7*x *y - 16*x *y + 7*x - 3*x *y - 11*x *y + 21*x *y
  593. 8 7 4 7 3 7 2 7 7 6 5
  594. - x - 18*x *y + 60*x *y - 46*x *y + 23*x *y - 17*x - 4*x *y
  595. 6 4 6 3 6 2 6 6 5 6 5 5
  596. + 38*x *y - 70*x *y + 40*x *y - 36*x *y + 20*x + 14*x *y - 86*x *y
  597. 5 4 5 3 5 2 5 5 4 7
  598. + 164*x *y - 182*x *y + 114*x *y - 14*x *y - 8*x + 24*x *y
  599. 4 6 4 5 4 4 4 3 4 2 4
  600. - 167*x *y + 387*x *y - 455*x *y + 348*x *y - 164*x *y + 32*x *y
  601. 4 3 8 3 7 3 6 3 5 3 4
  602. + x + 21*x *y - 130*x *y + 339*x *y - 458*x *y + 370*x *y
  603. 3 3 3 2 3 2 9 2 8 2 7
  604. - 211*x *y + 81*x *y - 14*x *y + 5*x *y - 43*x *y + 140*x *y
  605. 2 6 2 5 2 4 2 3 2 2 2
  606. - 209*x *y + 165*x *y - 86*x *y + 42*x *y - 16*x *y + 2*x *y
  607. 9 8 7 6 5 4 3 2
  608. - 5*x*y + 20*x*y - 32*x*y + 16*x*y + 8*x*y - 9*x*y + x*y + x*y
  609. 9 8 7 6 5 4 3 10 10
  610. + 2*y - 6*y + 6*y + y - 6*y + 4*y - y )/(x*y*(2*x *y - 4*x
  611. 9 2 9 9 8 3 8 2 8 8
  612. + 8*x *y - 24*x *y + 20*x + x *y - 17*x *y + 47*x *y - 31*x
  613. 7 4 7 3 7 2 7 7 6 5
  614. - 24*x *y + 92*x *y - 105*x *y + 18*x *y + 15*x - 28*x *y
  615. 6 4 6 3 6 2 6 6 5 6
  616. + 172*x *y - 350*x *y + 308*x *y - 104*x *y + 4*x - 14*x *y
  617. 5 5 5 4 5 3 5 2 5 5
  618. + 103*x *y - 290*x *y + 401*x *y - 278*x *y + 83*x *y - 5*x
  619. 4 7 4 6 4 5 4 4 4 3 4 2
  620. + 6*x *y - 35*x *y + 14*x *y + 90*x *y - 149*x *y + 97*x *y
  621. 4 4 3 8 3 7 3 6 3 5
  622. - 24*x *y + x + 20*x *y - 118*x *y + 244*x *y - 237*x *y
  623. 3 4 3 3 3 2 3 2 9 2 8
  624. + 117*x *y - 21*x *y - 7*x *y + 2*x *y + 13*x *y - 86*x *y
  625. 2 7 2 6 2 5 2 4 2 3 2 2
  626. + 228*x *y - 294*x *y + 204*x *y - 86*x *y + 23*x *y - 2*x *y
  627. 10 9 8 7 6 5
  628. + 4*x*y - 31*x*y + 84*x*y - 121*x*y + 100*x*y - 48*x*y
  629. 4 3 9 8 7 6 5
  630. + 15*x*y - 3*x*y + 4*y - 12*y + 15*y - 9*y + 2*y )),
  631. 9 9 8 2 8 8 7 3 7 2
  632. x6=(2*(2*x *y - 4*x + 8*x *y - 24*x *y + 16*x - 2*x *y - 19*x *y
  633. 7 7 6 4 6 3 6 2 6 6
  634. + 50*x *y - 23*x - 20*x *y + 71*x *y - 46*x *y - 15*x *y + 12*x
  635. 5 5 5 4 5 3 5 2 5 5
  636. - 8*x *y + 82*x *y - 195*x *y + 155*x *y - 46*x *y + 2*x
  637. 4 6 4 5 4 4 4 3 4 2 4
  638. + 8*x *y - 11*x *y - 81*x *y + 184*x *y - 142*x *y + 46*x *y
  639. 4 3 6 3 5 3 4 3 3 3 2 3
  640. - 4*x - 21*x *y + 50*x *y + x *y - 60*x *y + 49*x *y - 14*x *y
  641. 3 2 8 2 7 2 6 2 5 2 4 2 3
  642. + x + 6*x *y - 34*x *y + 82*x *y - 99*x *y + 54*x *y - 8*x *y
  643. 2 2 2 8 7 6 5 4
  644. - 4*x *y + x *y - 6*x*y + 38*x*y - 79*x*y + 78*x*y - 41*x*y
  645. 3 2 7 6 5 4 3 10
  646. + 11*x*y - x*y - 4*y + 10*y - 10*y + 5*y - y ))/(y*(2*x *y
  647. 10 9 2 9 9 8 3 8 2 8
  648. - 4*x + 8*x *y - 24*x *y + 20*x + x *y - 17*x *y + 47*x *y
  649. 8 7 4 7 3 7 2 7 7
  650. - 31*x - 24*x *y + 92*x *y - 105*x *y + 18*x *y + 15*x
  651. 6 5 6 4 6 3 6 2 6 6
  652. - 28*x *y + 172*x *y - 350*x *y + 308*x *y - 104*x *y + 4*x
  653. 5 6 5 5 5 4 5 3 5 2 5
  654. - 14*x *y + 103*x *y - 290*x *y + 401*x *y - 278*x *y + 83*x *y
  655. 5 4 7 4 6 4 5 4 4 4 3
  656. - 5*x + 6*x *y - 35*x *y + 14*x *y + 90*x *y - 149*x *y
  657. 4 2 4 4 3 8 3 7 3 6
  658. + 97*x *y - 24*x *y + x + 20*x *y - 118*x *y + 244*x *y
  659. 3 5 3 4 3 3 3 2 3 2 9
  660. - 237*x *y + 117*x *y - 21*x *y - 7*x *y + 2*x *y + 13*x *y
  661. 2 8 2 7 2 6 2 5 2 4 2 3
  662. - 86*x *y + 228*x *y - 294*x *y + 204*x *y - 86*x *y + 23*x *y
  663. 2 2 10 9 8 7 6
  664. - 2*x *y + 4*x*y - 31*x*y + 84*x*y - 121*x*y + 100*x*y
  665. 5 4 3 9 8 7 6 5
  666. - 48*x*y + 15*x*y - 3*x*y + 4*y - 12*y + 15*y - 9*y + 2*y )),
  667. 7 2 7 7 6 3 6 2 6 6 5 4
  668. x7=(6*(x *y - 2*x *y + x + x *y - 4*x *y + 5*x *y - 2*x - 6*x *y
  669. 5 3 5 2 5 5 4 5 4 4
  670. + 26*x *y - 38*x *y + 21*x *y - 3*x - 8*x *y + 49*x *y
  671. 4 3 4 2 4 4 3 6 3 5 3 4
  672. - 106*x *y + 101*x *y - 41*x *y + 5*x - x *y + 12*x *y - 42*x *y
  673. 3 3 3 2 3 3 2 7 2 6 2 5
  674. + 69*x *y - 52*x *y + 15*x *y - x + 4*x *y - 27*x *y + 59*x *y
  675. 2 4 2 3 2 2 2 8 7 6
  676. - 52*x *y + 14*x *y + 3*x *y - x *y + 3*x*y - 18*x*y + 39*x*y
  677. 5 4 3 2 7 6 5 4 3
  678. - 48*x*y + 34*x*y - 11*x*y + x*y + 2*y - 5*y + 6*y - 4*y + y )
  679. 10 10 9 2 9 9 8 3 8 2
  680. )/(x*(2*x *y - 4*x + 8*x *y - 24*x *y + 20*x + x *y - 17*x *y
  681. 8 8 7 4 7 3 7 2 7
  682. + 47*x *y - 31*x - 24*x *y + 92*x *y - 105*x *y + 18*x *y
  683. 7 6 5 6 4 6 3 6 2 6
  684. + 15*x - 28*x *y + 172*x *y - 350*x *y + 308*x *y - 104*x *y
  685. 6 5 6 5 5 5 4 5 3 5 2
  686. + 4*x - 14*x *y + 103*x *y - 290*x *y + 401*x *y - 278*x *y
  687. 5 5 4 7 4 6 4 5 4 4
  688. + 83*x *y - 5*x + 6*x *y - 35*x *y + 14*x *y + 90*x *y
  689. 4 3 4 2 4 4 3 8 3 7
  690. - 149*x *y + 97*x *y - 24*x *y + x + 20*x *y - 118*x *y
  691. 3 6 3 5 3 4 3 3 3 2 3
  692. + 244*x *y - 237*x *y + 117*x *y - 21*x *y - 7*x *y + 2*x *y
  693. 2 9 2 8 2 7 2 6 2 5
  694. + 13*x *y - 86*x *y + 228*x *y - 294*x *y + 204*x *y
  695. 2 4 2 3 2 2 10 9 8
  696. - 86*x *y + 23*x *y - 2*x *y + 4*x*y - 31*x*y + 84*x*y
  697. 7 6 5 4 3 9 8
  698. - 121*x*y + 100*x*y - 48*x*y + 15*x*y - 3*x*y + 4*y - 12*y
  699. 7 6 5
  700. + 15*y - 9*y + 2*y )),
  701. 9 8 2 8 8 7 3 7 2 7
  702. x8=(2*( - 2*x + x *y - 10*x *y + 13*x + 5*x *y - 24*x *y + 49*x *y
  703. 7 6 4 6 3 6 2 6 6 5 5
  704. - 30*x + 8*x *y - 41*x *y + 75*x *y - 78*x *y + 32*x + 7*x *y
  705. 5 4 5 3 5 2 5 5 4 6 4 5
  706. - 35*x *y + 61*x *y - 56*x *y + 41*x *y - 16*x - x *y + 9*x *y
  707. 4 4 4 3 4 2 4 4 3 7 3 6
  708. - 10*x *y + 15*x *y - 22*x *y + 6*x *y + 3*x - 10*x *y + 57*x *y
  709. 3 5 3 4 3 3 3 2 3 2 8
  710. - 107*x *y + 91*x *y - 55*x *y + 34*x *y - 10*x *y - 8*x *y
  711. 2 7 2 6 2 5 2 4 2 3 2 2
  712. + 46*x *y - 105*x *y + 116*x *y - 63*x *y + 23*x *y - 11*x *y
  713. 2 9 8 7 6 5 4
  714. + 2*x *y - 2*x*y + 16*x*y - 42*x*y + 54*x*y - 34*x*y + 6*x*y
  715. 3 2 8 7 6 5 4 3 10
  716. + x*y + x*y - 2*y + 6*y - 7*y + 3*y + y - y ))/(x*y*(2*x *y
  717. 10 9 2 9 9 8 3 8 2 8
  718. - 4*x + 8*x *y - 24*x *y + 20*x + x *y - 17*x *y + 47*x *y
  719. 8 7 4 7 3 7 2 7 7
  720. - 31*x - 24*x *y + 92*x *y - 105*x *y + 18*x *y + 15*x
  721. 6 5 6 4 6 3 6 2 6 6
  722. - 28*x *y + 172*x *y - 350*x *y + 308*x *y - 104*x *y + 4*x
  723. 5 6 5 5 5 4 5 3 5 2 5
  724. - 14*x *y + 103*x *y - 290*x *y + 401*x *y - 278*x *y + 83*x *y
  725. 5 4 7 4 6 4 5 4 4 4 3
  726. - 5*x + 6*x *y - 35*x *y + 14*x *y + 90*x *y - 149*x *y
  727. 4 2 4 4 3 8 3 7 3 6
  728. + 97*x *y - 24*x *y + x + 20*x *y - 118*x *y + 244*x *y
  729. 3 5 3 4 3 3 3 2 3 2 9
  730. - 237*x *y + 117*x *y - 21*x *y - 7*x *y + 2*x *y + 13*x *y
  731. 2 8 2 7 2 6 2 5 2 4 2 3
  732. - 86*x *y + 228*x *y - 294*x *y + 204*x *y - 86*x *y + 23*x *y
  733. 2 2 10 9 8 7 6
  734. - 2*x *y + 4*x*y - 31*x*y + 84*x*y - 121*x*y + 100*x*y
  735. 5 4 3 9 8 7 6 5
  736. - 48*x*y + 15*x*y - 3*x*y + 4*y - 12*y + 15*y - 9*y + 2*y )),
  737. 7 2 7 7 6 3 6 2 6 6 5 4
  738. x9=(6*( - 2*x *y + 2*x *y + 4*x - 4*x *y + 16*x *y - 6*x *y - 8*x + x *y
  739. 5 3 5 2 5 5 4 5 4 4 4 3
  740. + 18*x *y - 56*x *y + 26*x *y + 3*x + 4*x *y - 6*x *y - 40*x *y
  741. 4 2 4 4 3 6 3 5 3 4 3 3
  742. + 82*x *y - 38*x *y + 2*x - 6*x *y + 15*x *y - 9*x *y + 32*x *y
  743. 3 2 3 3 2 7 2 5 2 4 2 3
  744. - 46*x *y + 19*x *y - x + x *y - 5*x *y + 2*x *y - 7*x *y
  745. 2 2 2 8 7 6 5 4
  746. + 10*x *y - 3*x *y - 2*x*y + 9*x*y - 4*x*y - 16*x*y + 22*x*y
  747. 3 7 6 5 4 3 10 10
  748. - 9*x*y - 2*y + 2*y + 2*y - 4*y + 2*y ))/(y*(2*x *y - 4*x
  749. 9 2 9 9 8 3 8 2 8 8
  750. + 8*x *y - 24*x *y + 20*x + x *y - 17*x *y + 47*x *y - 31*x
  751. 7 4 7 3 7 2 7 7 6 5
  752. - 24*x *y + 92*x *y - 105*x *y + 18*x *y + 15*x - 28*x *y
  753. 6 4 6 3 6 2 6 6 5 6
  754. + 172*x *y - 350*x *y + 308*x *y - 104*x *y + 4*x - 14*x *y
  755. 5 5 5 4 5 3 5 2 5 5
  756. + 103*x *y - 290*x *y + 401*x *y - 278*x *y + 83*x *y - 5*x
  757. 4 7 4 6 4 5 4 4 4 3 4 2
  758. + 6*x *y - 35*x *y + 14*x *y + 90*x *y - 149*x *y + 97*x *y
  759. 4 4 3 8 3 7 3 6 3 5
  760. - 24*x *y + x + 20*x *y - 118*x *y + 244*x *y - 237*x *y
  761. 3 4 3 3 3 2 3 2 9 2 8
  762. + 117*x *y - 21*x *y - 7*x *y + 2*x *y + 13*x *y - 86*x *y
  763. 2 7 2 6 2 5 2 4 2 3 2 2
  764. + 228*x *y - 294*x *y + 204*x *y - 86*x *y + 23*x *y - 2*x *y
  765. 10 9 8 7 6 5
  766. + 4*x*y - 31*x*y + 84*x*y - 121*x*y + 100*x*y - 48*x*y
  767. 4 3 9 8 7 6 5
  768. + 15*x*y - 3*x*y + 4*y - 12*y + 15*y - 9*y + 2*y ))}}
  769. % The following examples were discussed in Char, B.W., Fee, G.J.,
  770. % Geddes, K.O., Gonnet, G.H., Monagan, M.B., Watt, S.M., "On the
  771. % Design and Performance of the Maple System", Proc. 1984 Macsyma
  772. % Users' Conference, G.E., Schenectady, NY, 1984, 199-219.
  773. % Problem 1.
  774. solve({ -22319*x0+25032*x1-83247*x2+67973*x3+54189*x4
  775. -67793*x5+81135*x6+22293*x7+27327*x8+96599*x9-15144,
  776. 79815*x0+37299*x1-28495*x2-52463*x3+25708*x4 -55333*x5-
  777. 2742*x6+83127*x7-29417*x8-43202*x9+93314, -29065*x0-77803*x1-
  778. 49717*x2-64748*x3-68324*x4 -50162*x5-64222*x6-
  779. 4716*x7+30737*x8+22971*x9+90348, 62470*x0+59658*x1-
  780. 46120*x2+58376*x3-28208*x4 -74506*x5+28491*x6+21099*x7+29149*x8-
  781. 20387*x9+36254, -98233*x0-26263*x1-63227*x2+34307*x3+92294*x4
  782. +10148*x5+3192*x6+24044*x7-83764*x8-1121*x9+13871,
  783. -20427*x0+62666*x1+27330*x2-78670*x3+9036*x4 +56024*x5-4525*x6-
  784. 50589*x7-62127*x8-32846*x9+38466,
  785. -85609*x0+5424*x1+86992*x2+59651*x3-60859*x4 -55984*x5-
  786. 6061*x6+44417*x7+92421*x8+6701*x9-9459,
  787. -68255*x0+19652*x1+92650*x2-93032*x3-30191*x4 -31075*x5-
  788. 89060*x6+12150*x7-78089*x8-12462*x9+1027, 55526*x0-
  789. 91202*x1+91329*x2-25919*x3-98215*x4 +30554*x5+913*x6-
  790. 35751*x7+17948*x8-58850*x9+66583, 40612*x0+84364*x1-
  791. 83317*x2+10658*x3+37213*x4 +50489*x5+72040*x6-
  792. 21227*x7+60772*x8+95114*x9-68533});
  793. Unknowns: {x0,x1,x2,x3,x4,x5,x6,x7,x8,x9}
  794. 4352444991703786550093529782474564455970663240687
  795. {{x0=---------------------------------------------------,
  796. 8420785423059099972039395927798127489505890997055
  797. 459141297061698284317621371232198410031030658042
  798. x1=---------------------------------------------------,
  799. 1684157084611819994407879185559625497901178199411
  800. 1068462443128238131632235196977352568525519548284
  801. x2=---------------------------------------------------,
  802. 1684157084611819994407879185559625497901178199411
  803. 1645748379263608982132912334741766606871657041427
  804. x3=---------------------------------------------------,
  805. 1684157084611819994407879185559625497901178199411
  806. 25308331428404990886292916036626876985377936966579
  807. x4=----------------------------------------------------,
  808. 42103927115295499860196979638990637447529454985275
  809. 17958909252564152456194678743404876001526265937527
  810. x5=----------------------------------------------------,
  811. 42103927115295499860196979638990637447529454985275
  812. - 50670056205024448621117426699348037457452368820774
  813. x6=-------------------------------------------------------,
  814. 42103927115295499860196979638990637447529454985275
  815. - 11882862555847887107599498171234654114612212813799
  816. x7=-------------------------------------------------------,
  817. 42103927115295499860196979638990637447529454985275
  818. - 273286267131634194631661772113331181980867938658
  819. x8=-----------------------------------------------------,
  820. 8420785423059099972039395927798127489505890997055
  821. 46816360472823082478331070276129336252954604132203
  822. x9=----------------------------------------------------}}
  823. 42103927115295499860196979638990637447529454985275
  824. solve({ -22319*x0+25032*x1-83247*x2+67973*x3+54189*x4
  825. -67793*x5+81135*x6+22293*x7+27327*x8+96599*x9-15144,
  826. 79815*x0+37299*x1-28495*x2-52463*x3+25708*x4 -55333*x5-
  827. 2742*x6+83127*x7-29417*x8-43202*x9+93314, -29065*x0-77803*x1-
  828. 49717*x2-64748*x3-68324*x4 -50162*x5-64222*x6-
  829. 4716*x7+30737*x8+22971*x9+90348, 62470*x0+59658*x1-
  830. 46120*x2+58376*x3-28208*x4-74506*x5+28491*x6+21099*x7+29149*x8-
  831. 20387*x9+36254,-98233*x0-26263*x1-63227*x2+34307*x3+92294*x4
  832. +10148*x5+3192*x6+24044*x7-83764*x8-1121*x9+13871,
  833. -20427*x0+62666*x1+27330*x2-78670*x3+9036*x4 +56024*x5-4525*x6-
  834. 50589*x7-62127*x8-32846*x9+38466,
  835. -85609*x0+5424*x1+86992*x2+59651*x3-60859*x4 -55984*x5-
  836. 6061*x6+44417*x7+92421*x8+6701*x9-9459,
  837. -68255*x0+19652*x1+92650*x2-93032*x3-30191*x4 -31075*x5-
  838. 89060*x6+12150*x7-78089*x8-12462*x9+1027, 55526*x0-
  839. 91202*x1+91329*x2-25919*x3-98215*x4 +30554*x5+913*x6-
  840. 35751*x7+17948*x8-58850*x9+66583, 40612*x0+84364*x1-
  841. 83317*x2+10658*x3+37213*x4 +50489*x5+72040*x6-
  842. 21227*x7+60772*x8+95114*x9-68533});
  843. Unknowns: {x0,x1,x2,x3,x4,x5,x6,x7,x8,x9}
  844. 4352444991703786550093529782474564455970663240687
  845. {{x0=---------------------------------------------------,
  846. 8420785423059099972039395927798127489505890997055
  847. 459141297061698284317621371232198410031030658042
  848. x1=---------------------------------------------------,
  849. 1684157084611819994407879185559625497901178199411
  850. 1068462443128238131632235196977352568525519548284
  851. x2=---------------------------------------------------,
  852. 1684157084611819994407879185559625497901178199411
  853. 1645748379263608982132912334741766606871657041427
  854. x3=---------------------------------------------------,
  855. 1684157084611819994407879185559625497901178199411
  856. 25308331428404990886292916036626876985377936966579
  857. x4=----------------------------------------------------,
  858. 42103927115295499860196979638990637447529454985275
  859. 17958909252564152456194678743404876001526265937527
  860. x5=----------------------------------------------------,
  861. 42103927115295499860196979638990637447529454985275
  862. - 50670056205024448621117426699348037457452368820774
  863. x6=-------------------------------------------------------,
  864. 42103927115295499860196979638990637447529454985275
  865. - 11882862555847887107599498171234654114612212813799
  866. x7=-------------------------------------------------------,
  867. 42103927115295499860196979638990637447529454985275
  868. - 273286267131634194631661772113331181980867938658
  869. x8=-----------------------------------------------------,
  870. 8420785423059099972039395927798127489505890997055
  871. 46816360472823082478331070276129336252954604132203
  872. x9=----------------------------------------------------}}
  873. 42103927115295499860196979638990637447529454985275
  874. % The next two problems give the current routines some trouble and
  875. % have therefore been commented out.
  876. % Problem 2.
  877. comment
  878. solve({ 81*x30-96*x21-45, -36*x4+59*x29+26,
  879. -59*x26+5*x3-33, -81*x19-92*x23-21*x17-9, -46*x29-
  880. 13*x22+22*x24+83, 47*x4-47*x14-15*x26-40, 83*x30+70*x17+56*x10-
  881. 31, 10*x27-90*x9+52*x21+52, -33*x20-97*x26+20*x6-76,
  882. 97*x16+41*x8-13*x12+66, 16*x16-52*x10-73*x28+49, -28*x1-53*x24-
  883. x27-67, -22*x26-29*x24+73*x10+8, 88*x18+61*x19-98*x9-55, 99*x28-
  884. 91*x26+26*x21-95, -6*x18+25*x7-77*x2+99, 28*x13-50*x17-52*x14-64,
  885. -50*x20+26*x11+93*x2+77, -70*x8+74*x19-94*x26+86, -18*x18-2*x16-
  886. 79*x23+91, 36*x26-13*x11-53*x25-5, 10*x7+57*x16-85*x10-14,
  887. -3*x27+44*x4+52*x22-1, 21*x11+20*x25-30*x4-83, 70*x2-97*x19-
  888. 41*x26-50, -51*x8+95*x12-85*x26+45, 83*x30+41*x12+50*x2+53,
  889. -4*x26+69*x8-58*x5-95, 59*x27-78*x30-66*x23+16, -10*x20-36*x11-
  890. 60*x1-59});
  891. % Problem 3.
  892. comment
  893. solve({ 115*x40+566*x41-378*x42+11401086415/6899901,
  894. 560*x0-45*x1-506*x2-11143386403/8309444, -621*x1-
  895. 328*x2+384*x3+1041841/64675, -856*x2+54*x3+869*x4-41430291/24700,
  896. 596*x3-608*x4-560*x5-10773384/11075,
  897. -61*x4+444*x5+924*x6+4185100079/11278780, 67*x5-95*x6-
  898. 682*x7+903866812/6618863, 196*x6+926*x7-930*x8-
  899. 2051864151/2031976, -302*x7-311*x8-890*x9-14210414139/27719792,
  900. 121*x8-781*x9-125*x10-4747129093/39901584, 10*x9+555*x10-
  901. 912*x11+32476047/3471829, -151*x38+732*x39-
  902. 397*x40+327281689/173242, 913*x10-259*x11-982*x12-
  903. 18080663/5014020, 305*x11+9*x12-357*x13+1500752933/1780680,
  904. 179*x12-588*x13+665*x14+8128189/51832, 406*x13+843*x14-
  905. 833*x15+201925713/97774, 107*x14+372*x15+505*x16-
  906. 5161192791/3486415, 720*x15-212*x16+607*x17-31529295571/7197760,
  907. 951*x16-685*x17+148*x18+1034546543/711104, -654*x17-
  908. 899*x18+543*x19+1942961717/1646560,
  909. -448*x18+673*x19+702*x20+856422818/1286375, 396*x19-
  910. 196*x20+218*x21-4386267866/21303625, -233*x20-796*x21-373*x22-
  911. 85246365829/57545250, 921*x21-368*x22+730*x23-
  912. 93446707622/51330363, -424*x22+378*x23+727*x24-
  913. 6673617931/3477462, -633*x23+565*x24-208*x25+8607636805/4092942,
  914. 971*x24+170*x25-865*x26-25224505/18354, 937*x25+333*x26-463*x27-
  915. 339307103/1025430, 494*x26-8*x27-50*x28+57395804/34695,
  916. 530*x27+631*x28-193*x29-8424597157/680022,
  917. -435*x28+252*x29+916*x30+196828511/19593, 327*x29+403*x30-
  918. 845*x31+8458823325/5927971, 246*x30+881*x31-
  919. 394*x32+13624765321/156546826, 946*x31+169*x32-43*x33-
  920. 53594199271/126093183, -146*x32+503*x33-
  921. 363*x34+66802797635/15234909, -132*x33-
  922. 686*x34+376*x35+8167530636/902635, -38*x34-188*x35-
  923. 583*x36+1814153743/1124240, 389*x35+562*x36-688*x37-
  924. 12251043951/5513560, -769*x37-474*x38-89*x39-2725415872/1235019,
  925. -625*x36-122*x37+468*x38+7725682775/4506736,
  926. 839*x39+936*x40+703*x41+1912091857/1000749,
  927. -314*x41+102*x42+790*x43+7290073150/8132873, -905*x42-
  928. 454*x43+524*x44-10110944527/4538233, 379*x43+518*x44-328*x45-
  929. 2071620692/519645, 284*x44-979*x45+690*x46-915987532/16665,
  930. 198*x45-650*x46-763*x47+548801657/11220, 974*x46+12*x47+410*x48-
  931. 3831097561/51051, -498*x47-135*x48-230*x49-18920705/9282,
  932. 665*x48+156*x49+34*x0-27714736/156585, -519*x49-366*x0-730*x1-
  933. 2958446681/798985});
  934. % Problem 4.
  935. % This one needs the Cramer code --- it takes forever otherwise.
  936. on cramer;
  937. solve({ -b*k8/a+c*k8/a, -b*k11/a+c*k11/a,
  938. -b*k10/a+c*k10/a+k2,
  939. -k3-b*k9/a+c*k9/a, -b*k14/a+c*k14/a, -b*k15/a+c*k15/a,
  940. -b*k18/a+c*k18/a-k2, -b*k17/a+c*k17/a, -b*k16/a+c*k16/a+k4,
  941. -b*k13/a+c*k13/a-b*k21/a+c*k21/a+b*k5/a-c*k5/a,
  942. b*k44/a-c*k44/a, -b*k45/a+c*k45/a, -b*k20/a+c*k20/a,
  943. -b*k44/a+c*k44/a, b*k46/a-c*k46/a,
  944. b**2*k47/a**2-2*b*c*k47/a**2+c**2*k47/a**2,
  945. k3, -k4, -b*k12/a+c*k12/a-a*k6/b+c*k6/b,
  946. -b*k19/a+c*k19/a+a*k7/c-b*k7/c, b*k45/a-c*k45/a,
  947. -b*k46/a+c*k46/a, -k48+c*k48/a+c*k48/b-c**2*k48/(a*b),
  948. -k49+b*k49/a+b*k49/c-b**2*k49/(a*c), a*k1/b-c*k1/b,
  949. a*k4/b-c*k4/b, a*k3/b-c*k3/b+k9, -k10+a*k2/b-c*k2/b,
  950. a*k7/b-c*k7/b, -k9, k11, b*k12/a-c*k12/a+a*k6/b-c*k6/b,
  951. a*k15/b-c*k15/b, k10+a*k18/b-c*k18/b,
  952. -k11+a*k17/b-c*k17/b, a*k16/b-c*k16/b,
  953. -a*k13/b+c*k13/b+a*k21/b-c*k21/b+a*k5/b-c*k5/b,
  954. -a*k44/b+c*k44/b, a*k45/b-c*k45/b,
  955. a*k14/c-b*k14/c+a*k20/b-c*k20/b, a*k44/b-c*k44/b,
  956. -a*k46/b+c*k46/b, -k47+c*k47/a+c*k47/b-c**2*k47/(a*b),
  957. a*k19/b-c*k19/b, -a*k45/b+c*k45/b, a*k46/b-c*k46/b,
  958. a**2*k48/b**2-2*a*c*k48/b**2+c**2*k48/b**2,
  959. -k49+a*k49/b+a*k49/c-a**2*k49/(b*c), k16, -k17,
  960. -a*k1/c+b*k1/c, -k16-a*k4/c+b*k4/c, -a*k3/c+b*k3/c,
  961. k18-a*k2/c+b*k2/c, b*k19/a-c*k19/a-a*k7/c+b*k7/c,
  962. -a*k6/c+b*k6/c, -a*k8/c+b*k8/c, -a*k11/c+b*k11/c+k17,
  963. -a*k10/c+b*k10/c-k18, -a*k9/c+b*k9/c,
  964. -a*k14/c+b*k14/c-a*k20/b+c*k20/b,
  965. -a*k13/c+b*k13/c+a*k21/c-b*k21/c-a*k5/c+b*k5/c,
  966. a*k44/c-b*k44/c, -a*k45/c+b*k45/c, -a*k44/c+b*k44/c,
  967. a*k46/c-b*k46/c, -k47+b*k47/a+b*k47/c-b**2*k47/(a*c),
  968. -a*k12/c+b*k12/c, a*k45/c-b*k45/c, -a*k46/c+b*k46/c,
  969. -k48+a*k48/b+a*k48/c-a**2*k48/(b*c),
  970. a**2*k49/c**2-2*a*b*k49/c**2+b**2*k49/c**2, k8, k11, -k15,
  971. k10-k18, -k17, k9, -k16, -k29, k14-k32, -k21+k23-k31,
  972. -k24-k30, -k35, k44, -k45, k36, k13-k23+k39, -k20+k38,
  973. k25+k37, b*k26/a-c*k26/a-k34+k42, -2*k44, k45, k46,
  974. b*k47/a-c*k47/a, k41, k44, -k46, -b*k47/a+c*k47/a,
  975. k12+k24, -k19-k25, -a*k27/b+c*k27/b-k33, k45, -k46,
  976. -a*k48/b+c*k48/b, a*k28/c-b*k28/c+k40, -k45, k46,
  977. a*k48/b-c*k48/b, a*k49/c-b*k49/c, -a*k49/c+b*k49/c,
  978. -k1, -k4, -k3, k15, k18-k2, k17, k16, k22, k25-k7,
  979. k24+k30, k21+k23-k31, k28, -k44, k45, -k30-k6, k20+k32,
  980. k27+b*k33/a-c*k33/a, k44, -k46, -b*k47/a+c*k47/a, -k36,
  981. k31-k39-k5, -k32-k38, k19-k37, k26-a*k34/b+c*k34/b-k42,
  982. k44, -2*k45, k46, a*k48/b-c*k48/b, a*k35/c-b*k35/c-k41,
  983. -k44, k46, b*k47/a-c*k47/a, -a*k49/c+b*k49/c, -k40, k45,
  984. -k46, -a*k48/b+c*k48/b, a*k49/c-b*k49/c, k1, k4, k3, -k8,
  985. -k11, -k10+k2, -k9, k37+k7, -k14-k38, -k22, -k25-k37, -k24+k6,
  986. -k13-k23+k39, -k28+b*k40/a-c*k40/a, k44, -k45, -k27, -k44,
  987. k46, b*k47/a-c*k47/a, k29, k32+k38, k31-k39+k5, -k12+k30,
  988. k35-a*k41/b+c*k41/b, -k44, k45, -k26+k34+a*k42/c-b*k42/c,
  989. k44, k45, -2*k46, -b*k47/a+c*k47/a, -a*k48/b+c*k48/b,
  990. a*k49/c-b*k49/c, k33, -k45, k46, a*k48/b-c*k48/b,
  991. -a*k49/c+b*k49/c },
  992. {k1, k2, k3, k4, k5, k6, k7, k8, k9, k10, k11, k12, k13, k14,
  993. k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26,
  994. k27, k28, k29, k30, k31, k32, k33, k34, k35, k36, k37, k38,
  995. k39, k40, k41, k42, k43, k44, k45, k46, k47, k48, k49});
  996. {{k1=0,
  997. k2=0,
  998. k3=0,
  999. k4=0,
  1000. k5=0,
  1001. k6=0,
  1002. k7=0,
  1003. k8=0,
  1004. k9=0,
  1005. k10=0,
  1006. k11=0,
  1007. k12=0,
  1008. k13=0,
  1009. k14=0,
  1010. k15=0,
  1011. k16=0,
  1012. k17=0,
  1013. k18=0,
  1014. k19=0,
  1015. k20=0,
  1016. k21=0,
  1017. k22=0,
  1018. k23=arbcomplex(14),
  1019. k24=0,
  1020. k25=0,
  1021. arbcomplex(15)*a
  1022. k26=------------------,
  1023. c
  1024. k27=0,
  1025. k28=0,
  1026. k29=0,
  1027. k30=0,
  1028. k31=arbcomplex(14),
  1029. k32=0,
  1030. k33=0,
  1031. arbcomplex(15)*b
  1032. k34=------------------,
  1033. c
  1034. k35=0,
  1035. k36=0,
  1036. k37=0,
  1037. k38=0,
  1038. k39=arbcomplex(14),
  1039. k40=0,
  1040. k41=0,
  1041. k42=arbcomplex(15),
  1042. k43=arbcomplex(16),
  1043. k44=0,
  1044. k45=0,
  1045. k46=0,
  1046. k47=0,
  1047. k48=0,
  1048. k49=0}}
  1049. off cramer;
  1050. % Problem 5.
  1051. solve ({2*a3*b3+a5*b3+a3*b5, a5*b3+2*a5*b5+a3*b5,
  1052. a5*b5, a2*b2, a4*b4, a5*b1+b5+a4*b3+a3*b4,
  1053. a5*b3+a5*b5+a3*b5+a3*b3, a0*b2+b2+a4*b2+a2*b4+c2+a2*b0+a2*b1,
  1054. a0*b0+a0*b1+a0*b4+a3*b2+b0+b1+b4+a4*b0+a4*b1+a2*b5+a4*b4+c1+c4
  1055. +a5*b2+a2*b3+c0,
  1056. -1+a3*b0+a0*b3+a0*b5+a5*b0+b3+b5+a5*b4+a4*b3+a4*b5+a3*b4+a5*b1
  1057. +a3*b1+c3+c5,
  1058. b4+a4*b1, a5*b3+a3*b5, a2*b1+b2, a4*b5+a5*b4, a2*b4+a4*b2,
  1059. a0*b5+a5*b0+a3*b4+2*a5*b4+a5*b1+b5+a4*b3+2*a4*b5+c5,
  1060. a4*b0+2*a4*b4+a2*b5+b4+a4*b1+a5*b2+a0*b4+c4,
  1061. c3+a0*b3+2*b3+b5+a4*b3+a3*b0+2*a3*b1+a5*b1+a3*b4,
  1062. c1+a0*b1+2*b1+a4*b1+a2*b3+b0+a3*b2+b4});
  1063. Unknowns: {a0,a2,a3,a4,a5,b0,b1,b2,b3,b4,b5,c0,c1,c2,c3,c4,c5}
  1064. {{b5=0,
  1065. b4=0,
  1066. a5=0,
  1067. a4=0,
  1068. b3=0,
  1069. b1=arbcomplex(23),
  1070. - 1
  1071. a3=------,
  1072. b1
  1073. b2=0,
  1074. a2=0,
  1075. c5=0,
  1076. c4=0,
  1077. b0=arbcomplex(24),
  1078. b0 + 2*b1
  1079. c3=-----------,
  1080. b1
  1081. a0=arbcomplex(25),
  1082. c1= - a0*b1 - b0 - 2*b1,
  1083. c2=0,
  1084. c0= - a0*b0 + b1},
  1085. {b5=0,
  1086. b4=0,
  1087. a5=0,
  1088. a4=0,
  1089. b3=-1,
  1090. a3=0,
  1091. b2=0,
  1092. a2=0,
  1093. c5=0,
  1094. c4=0,
  1095. a0=arbcomplex(17),
  1096. c3=a0 + 2,
  1097. b0=arbcomplex(18),
  1098. b1=arbcomplex(19),
  1099. c1= - a0*b1 - b0 - 2*b1,
  1100. c2=0,
  1101. c0= - a0*b0 + b1},
  1102. {b5=0,
  1103. b4=0,
  1104. a5=0,
  1105. a4=0,
  1106. b3=-1,
  1107. b1=0,
  1108. a3=0,
  1109. b2=0,
  1110. c5=0,
  1111. c4=0,
  1112. a0=arbcomplex(20),
  1113. c3=a0 + 2,
  1114. a2=arbcomplex(21),
  1115. b0=arbcomplex(22),
  1116. c1=a2 - b0,
  1117. c2= - a2*b0,
  1118. c0= - a0*b0}}
  1119. % Problem 6.
  1120. solve({2*a3*b3+a5*b3+a3*b5, a5*b3+2*a5*b5+a3*b5,
  1121. a4*b4, a5*b3+a5*b5+a3*b5+a3*b3, b1, a3*b3, a2*b2, a5*b5,
  1122. a5*b1+b5+a4*b3+a3*b4, a0*b2+b2+a4*b2+a2*b4+c2+a2*b0+a2*b1,
  1123. b4+a4*b1, b3+a3*b1, a5*b3+a3*b5, a2*b1+b2, a4*b5+a5*b4,
  1124. a2*b4+a4*b2, a0*b0+a0*b1+a0*b4+a3*b2+b0+b1+b4+a4*b0+a4*b1
  1125. +a2*b5+a4*b4+c1+c4+a5*b2+a2*b3+c0,-1+a3*b0+a0*b3+a0*b5+a5*b0
  1126. +b3+b5+a5*b4+a4*b3+a4*b5+a3*b4+a5*b1+a3*b1+c3+c5,
  1127. a0*b5+a5*b0+a3*b4+2*a5*b4+a5*b1+b5+a4*b3+2*a4*b5+c5,
  1128. a4*b0+2*a4*b4+a2*b5+b4+a4*b1+a5*b2+a0*b4+c4,
  1129. c3+a0*b3+2*b3+b5+a4*b3+a3*b0+2*a3*b1+a5*b1+a3*b4,
  1130. c1+a0*b1+2*b1+a4*b1+a2*b3+b0+a3*b2+b4});
  1131. Unknowns: {a0,a2,a3,a4,a5,b0,b1,b2,b3,b4,b5,c0,c1,c2,c3,c4,c5}
  1132. {}
  1133. % Example cited by Bruno Buchberger
  1134. % in R.Janssen: Trends in Computer Algebra,
  1135. % Springer, 1987
  1136. % Geometry of a simple robot,
  1137. % l1,l2 length of arms
  1138. % ci,si cos and sin of rotation angles
  1139. solve( { c1*c2 -cf*ct*cp + sf*sp,
  1140. s1*c2 - sf*ct*cp - cf*sp,
  1141. s2 + st*cp,
  1142. -c1*s2 - cf*ct*sp + sf*cp,
  1143. -s1*s2 + sf*ct*sp - cf*cp,
  1144. c2 - st*sp,
  1145. s1 - cf*st,
  1146. -c1 - sf*st,
  1147. ct,
  1148. l2*c1*c2 - px,
  1149. l2*s1*c2 - py,
  1150. l2*s2 + l1 - pz,
  1151. c1**2 + s1**2 -1,
  1152. c2**2 + s2**2 -1,
  1153. cf**2 + sf**2 -1,
  1154. ct**2 + st**2 -1,
  1155. cp**2 + sp**2 -1},
  1156. {c1,c2,s1,s2,py,cf,ct,cp,sf,st,sp});
  1157. 2 2 2
  1158. sqrt( - l1 + 2*l1*pz + l2 - pz )
  1159. {{sp=------------------------------------,
  1160. l2
  1161. st=1,
  1162. 2 2 2
  1163. sqrt( - l1 + 2*l1*pz + l2 - pz )*px
  1164. sf=---------------------------------------,
  1165. 2 2 2
  1166. l1 - 2*l1*pz - l2 + pz
  1167. l1 - pz
  1168. cp=---------,
  1169. l2
  1170. 2 2 2 2
  1171. sqrt(l1 - 2*l1*pz - l2 + px + pz )
  1172. cf=---------------------------------------,
  1173. 2 2 2
  1174. sqrt(l1 - 2*l1*pz - l2 + pz )
  1175. 2 2 2 2
  1176. sqrt(l1 - 2*l1*pz - l2 + px + pz )
  1177. s1=---------------------------------------,
  1178. 2 2 2
  1179. sqrt(l1 - 2*l1*pz - l2 + pz )
  1180. 2 2 2
  1181. sqrt( - l1 + 2*l1*pz + l2 - pz )
  1182. c2=------------------------------------,
  1183. l2
  1184. 2 2 2
  1185. - sqrt( - l1 + 2*l1*pz + l2 - pz )*px
  1186. c1=------------------------------------------,
  1187. 2 2 2
  1188. l1 - 2*l1*pz - l2 + pz
  1189. 2 2 2 2 2 2 2
  1190. sqrt( - l1 + 2*l1*pz + l2 - pz )*sqrt(l1 - 2*l1*pz - l2 + px + pz )
  1191. py=--------------------------------------------------------------------------,
  1192. 2 2 2
  1193. sqrt(l1 - 2*l1*pz - l2 + pz )
  1194. - l1 + pz
  1195. s2=------------,
  1196. l2
  1197. ct=0},
  1198. 2 2 2
  1199. sqrt( - l1 + 2*l1*pz + l2 - pz )
  1200. {sp=------------------------------------,
  1201. l2
  1202. st=1,
  1203. 2 2 2
  1204. sqrt( - l1 + 2*l1*pz + l2 - pz )*px
  1205. sf=---------------------------------------,
  1206. 2 2 2
  1207. l1 - 2*l1*pz - l2 + pz
  1208. l1 - pz
  1209. cp=---------,
  1210. l2
  1211. 2 2 2 2
  1212. - sqrt(l1 - 2*l1*pz - l2 + px + pz )
  1213. cf=------------------------------------------,
  1214. 2 2 2
  1215. sqrt(l1 - 2*l1*pz - l2 + pz )
  1216. 2 2 2 2
  1217. - sqrt(l1 - 2*l1*pz - l2 + px + pz )
  1218. s1=------------------------------------------,
  1219. 2 2 2
  1220. sqrt(l1 - 2*l1*pz - l2 + pz )
  1221. 2 2 2
  1222. sqrt( - l1 + 2*l1*pz + l2 - pz )
  1223. c2=------------------------------------,
  1224. l2
  1225. 2 2 2
  1226. - sqrt( - l1 + 2*l1*pz + l2 - pz )*px
  1227. c1=------------------------------------------,
  1228. 2 2 2
  1229. l1 - 2*l1*pz - l2 + pz
  1230. py
  1231. 2 2 2 2 2 2 2
  1232. - sqrt( - l1 + 2*l1*pz + l2 - pz )*sqrt(l1 - 2*l1*pz - l2 + px + pz )
  1233. =-----------------------------------------------------------------------------
  1234. 2 2 2
  1235. sqrt(l1 - 2*l1*pz - l2 + pz )
  1236. ,
  1237. - l1 + pz
  1238. s2=------------,
  1239. l2
  1240. ct=0},
  1241. 2 2 2
  1242. sqrt( - l1 + 2*l1*pz + l2 - pz )
  1243. {sp=------------------------------------,
  1244. l2
  1245. st=-1,
  1246. 2 2 2
  1247. sqrt( - l1 + 2*l1*pz + l2 - pz )*px
  1248. sf=---------------------------------------,
  1249. 2 2 2
  1250. l1 - 2*l1*pz - l2 + pz
  1251. - l1 + pz
  1252. cp=------------,
  1253. l2
  1254. 2 2 2 2
  1255. sqrt(l1 - 2*l1*pz - l2 + px + pz )
  1256. cf=---------------------------------------,
  1257. 2 2 2
  1258. sqrt(l1 - 2*l1*pz - l2 + pz )
  1259. 2 2 2 2
  1260. - sqrt(l1 - 2*l1*pz - l2 + px + pz )
  1261. s1=------------------------------------------,
  1262. 2 2 2
  1263. sqrt(l1 - 2*l1*pz - l2 + pz )
  1264. 2 2 2
  1265. - sqrt( - l1 + 2*l1*pz + l2 - pz )
  1266. c2=---------------------------------------,
  1267. l2
  1268. 2 2 2
  1269. sqrt( - l1 + 2*l1*pz + l2 - pz )*px
  1270. c1=---------------------------------------,
  1271. 2 2 2
  1272. l1 - 2*l1*pz - l2 + pz
  1273. 2 2 2 2 2 2 2
  1274. sqrt( - l1 + 2*l1*pz + l2 - pz )*sqrt(l1 - 2*l1*pz - l2 + px + pz )
  1275. py=--------------------------------------------------------------------------,
  1276. 2 2 2
  1277. sqrt(l1 - 2*l1*pz - l2 + pz )
  1278. - l1 + pz
  1279. s2=------------,
  1280. l2
  1281. ct=0},
  1282. 2 2 2
  1283. sqrt( - l1 + 2*l1*pz + l2 - pz )
  1284. {sp=------------------------------------,
  1285. l2
  1286. st=-1,
  1287. 2 2 2
  1288. sqrt( - l1 + 2*l1*pz + l2 - pz )*px
  1289. sf=---------------------------------------,
  1290. 2 2 2
  1291. l1 - 2*l1*pz - l2 + pz
  1292. - l1 + pz
  1293. cp=------------,
  1294. l2
  1295. 2 2 2 2
  1296. - sqrt(l1 - 2*l1*pz - l2 + px + pz )
  1297. cf=------------------------------------------,
  1298. 2 2 2
  1299. sqrt(l1 - 2*l1*pz - l2 + pz )
  1300. 2 2 2 2
  1301. sqrt(l1 - 2*l1*pz - l2 + px + pz )
  1302. s1=---------------------------------------,
  1303. 2 2 2
  1304. sqrt(l1 - 2*l1*pz - l2 + pz )
  1305. 2 2 2
  1306. - sqrt( - l1 + 2*l1*pz + l2 - pz )
  1307. c2=---------------------------------------,
  1308. l2
  1309. 2 2 2
  1310. sqrt( - l1 + 2*l1*pz + l2 - pz )*px
  1311. c1=---------------------------------------,
  1312. 2 2 2
  1313. l1 - 2*l1*pz - l2 + pz
  1314. py
  1315. 2 2 2 2 2 2 2
  1316. - sqrt( - l1 + 2*l1*pz + l2 - pz )*sqrt(l1 - 2*l1*pz - l2 + px + pz )
  1317. =-----------------------------------------------------------------------------
  1318. 2 2 2
  1319. sqrt(l1 - 2*l1*pz - l2 + pz )
  1320. ,
  1321. - l1 + pz
  1322. s2=------------,
  1323. l2
  1324. ct=0},
  1325. 2 2 2
  1326. - sqrt( - l1 + 2*l1*pz + l2 - pz )
  1327. {sp=---------------------------------------,
  1328. l2
  1329. st=1,
  1330. 2 2 2
  1331. - sqrt( - l1 + 2*l1*pz + l2 - pz )*px
  1332. sf=------------------------------------------,
  1333. 2 2 2
  1334. l1 - 2*l1*pz - l2 + pz
  1335. l1 - pz
  1336. cp=---------,
  1337. l2
  1338. 2 2 2 2
  1339. sqrt(l1 - 2*l1*pz - l2 + px + pz )
  1340. cf=---------------------------------------,
  1341. 2 2 2
  1342. sqrt(l1 - 2*l1*pz - l2 + pz )
  1343. 2 2 2 2
  1344. sqrt(l1 - 2*l1*pz - l2 + px + pz )
  1345. s1=---------------------------------------,
  1346. 2 2 2
  1347. sqrt(l1 - 2*l1*pz - l2 + pz )
  1348. 2 2 2
  1349. - sqrt( - l1 + 2*l1*pz + l2 - pz )
  1350. c2=---------------------------------------,
  1351. l2
  1352. 2 2 2
  1353. sqrt( - l1 + 2*l1*pz + l2 - pz )*px
  1354. c1=---------------------------------------,
  1355. 2 2 2
  1356. l1 - 2*l1*pz - l2 + pz
  1357. py
  1358. 2 2 2 2 2 2 2
  1359. - sqrt( - l1 + 2*l1*pz + l2 - pz )*sqrt(l1 - 2*l1*pz - l2 + px + pz )
  1360. =-----------------------------------------------------------------------------
  1361. 2 2 2
  1362. sqrt(l1 - 2*l1*pz - l2 + pz )
  1363. ,
  1364. - l1 + pz
  1365. s2=------------,
  1366. l2
  1367. ct=0},
  1368. 2 2 2
  1369. - sqrt( - l1 + 2*l1*pz + l2 - pz )
  1370. {sp=---------------------------------------,
  1371. l2
  1372. st=1,
  1373. 2 2 2
  1374. - sqrt( - l1 + 2*l1*pz + l2 - pz )*px
  1375. sf=------------------------------------------,
  1376. 2 2 2
  1377. l1 - 2*l1*pz - l2 + pz
  1378. l1 - pz
  1379. cp=---------,
  1380. l2
  1381. 2 2 2 2
  1382. - sqrt(l1 - 2*l1*pz - l2 + px + pz )
  1383. cf=------------------------------------------,
  1384. 2 2 2
  1385. sqrt(l1 - 2*l1*pz - l2 + pz )
  1386. 2 2 2 2
  1387. - sqrt(l1 - 2*l1*pz - l2 + px + pz )
  1388. s1=------------------------------------------,
  1389. 2 2 2
  1390. sqrt(l1 - 2*l1*pz - l2 + pz )
  1391. 2 2 2
  1392. - sqrt( - l1 + 2*l1*pz + l2 - pz )
  1393. c2=---------------------------------------,
  1394. l2
  1395. 2 2 2
  1396. sqrt( - l1 + 2*l1*pz + l2 - pz )*px
  1397. c1=---------------------------------------,
  1398. 2 2 2
  1399. l1 - 2*l1*pz - l2 + pz
  1400. 2 2 2 2 2 2 2
  1401. sqrt( - l1 + 2*l1*pz + l2 - pz )*sqrt(l1 - 2*l1*pz - l2 + px + pz )
  1402. py=--------------------------------------------------------------------------,
  1403. 2 2 2
  1404. sqrt(l1 - 2*l1*pz - l2 + pz )
  1405. - l1 + pz
  1406. s2=------------,
  1407. l2
  1408. ct=0},
  1409. 2 2 2
  1410. - sqrt( - l1 + 2*l1*pz + l2 - pz )
  1411. {sp=---------------------------------------,
  1412. l2
  1413. st=-1,
  1414. 2 2 2
  1415. - sqrt( - l1 + 2*l1*pz + l2 - pz )*px
  1416. sf=------------------------------------------,
  1417. 2 2 2
  1418. l1 - 2*l1*pz - l2 + pz
  1419. - l1 + pz
  1420. cp=------------,
  1421. l2
  1422. 2 2 2 2
  1423. sqrt(l1 - 2*l1*pz - l2 + px + pz )
  1424. cf=---------------------------------------,
  1425. 2 2 2
  1426. sqrt(l1 - 2*l1*pz - l2 + pz )
  1427. 2 2 2 2
  1428. - sqrt(l1 - 2*l1*pz - l2 + px + pz )
  1429. s1=------------------------------------------,
  1430. 2 2 2
  1431. sqrt(l1 - 2*l1*pz - l2 + pz )
  1432. 2 2 2
  1433. sqrt( - l1 + 2*l1*pz + l2 - pz )
  1434. c2=------------------------------------,
  1435. l2
  1436. 2 2 2
  1437. - sqrt( - l1 + 2*l1*pz + l2 - pz )*px
  1438. c1=------------------------------------------,
  1439. 2 2 2
  1440. l1 - 2*l1*pz - l2 + pz
  1441. py
  1442. 2 2 2 2 2 2 2
  1443. - sqrt( - l1 + 2*l1*pz + l2 - pz )*sqrt(l1 - 2*l1*pz - l2 + px + pz )
  1444. =-----------------------------------------------------------------------------
  1445. 2 2 2
  1446. sqrt(l1 - 2*l1*pz - l2 + pz )
  1447. ,
  1448. - l1 + pz
  1449. s2=------------,
  1450. l2
  1451. ct=0},
  1452. 2 2 2
  1453. - sqrt( - l1 + 2*l1*pz + l2 - pz )
  1454. {sp=---------------------------------------,
  1455. l2
  1456. st=-1,
  1457. 2 2 2
  1458. - sqrt( - l1 + 2*l1*pz + l2 - pz )*px
  1459. sf=------------------------------------------,
  1460. 2 2 2
  1461. l1 - 2*l1*pz - l2 + pz
  1462. - l1 + pz
  1463. cp=------------,
  1464. l2
  1465. 2 2 2 2
  1466. - sqrt(l1 - 2*l1*pz - l2 + px + pz )
  1467. cf=------------------------------------------,
  1468. 2 2 2
  1469. sqrt(l1 - 2*l1*pz - l2 + pz )
  1470. 2 2 2 2
  1471. sqrt(l1 - 2*l1*pz - l2 + px + pz )
  1472. s1=---------------------------------------,
  1473. 2 2 2
  1474. sqrt(l1 - 2*l1*pz - l2 + pz )
  1475. 2 2 2
  1476. sqrt( - l1 + 2*l1*pz + l2 - pz )
  1477. c2=------------------------------------,
  1478. l2
  1479. 2 2 2
  1480. - sqrt( - l1 + 2*l1*pz + l2 - pz )*px
  1481. c1=------------------------------------------,
  1482. 2 2 2
  1483. l1 - 2*l1*pz - l2 + pz
  1484. 2 2 2 2 2 2 2
  1485. sqrt( - l1 + 2*l1*pz + l2 - pz )*sqrt(l1 - 2*l1*pz - l2 + px + pz )
  1486. py=--------------------------------------------------------------------------,
  1487. 2 2 2
  1488. sqrt(l1 - 2*l1*pz - l2 + pz )
  1489. - l1 + pz
  1490. s2=------------,
  1491. l2
  1492. ct=0}}
  1493. % Steady state computation of a prototypical chemical
  1494. % reaction network (the "Edelstein" network)
  1495. solve(
  1496. { alpha * c1 - beta * c1**2 - gamma*c1*c2 + epsilon*c3,
  1497. -gamma*c1*c2 + (epsilon+theta)*c3 -eta *c2,
  1498. gamma*c1*c2 + eta*c2 - (epsilon+theta) * c3},
  1499. {c3,c2,c1});
  1500. {{c1=arbcomplex(26),
  1501. c1*( - c1*beta*epsilon - c1*beta*theta + alpha*epsilon + alpha*theta)
  1502. c2=-----------------------------------------------------------------------,
  1503. c1*gamma*theta - epsilon*eta
  1504. 2
  1505. c1*( - c1 *beta*gamma + c1*alpha*gamma - c1*beta*eta + alpha*eta)
  1506. c3=-------------------------------------------------------------------}}
  1507. c1*gamma*theta - epsilon*eta
  1508. solve(
  1509. {( - 81*y1**2*y2**2 + 594*y1**2*y2 - 225*y1**2 + 594*y1*y2**2 - 3492*
  1510. y1*y2 - 750*y1 - 225*y2**2 - 750*y2 + 14575)/81,
  1511. ( - 81*y2**2*y3**2 + 594*y2**2*y3 - 225*y2**2 + 594*y2*y3**2 - 3492*
  1512. y2*y3 - 750*y2 - 225*y3**2 - 750*y3 + 14575)/81,
  1513. ( - 81*y1**2*y3**2 + 594*y1**2*y3 - 225*y1**2 + 594*y1*y3**2 - 3492*
  1514. y1*y3 - 750*y1 - 225*y3**2 - 750*y3 + 14575)/81,
  1515. (2*(81*y1**2*y2**2*y3 + 81*y1**2*y2*y3**2 - 594*y1**2*y2*y3 - 225*y1
  1516. **2*y2 - 225*y1**2*y3 + 1650*y1**2 + 81*y1*y2**2*y3**2 - 594*y1*
  1517. y2**2*y3 - 225*y1*y2**2 - 594*y1*y2*y3**2 + 2592*y1*y2*y3 + 2550
  1518. *y1*y2 - 225*y1*y3**2 + 2550*y1*y3 - 3575*y1 - 225*y2**2*y3 +
  1519. 1650*y2**2 - 225*y2*y3**2 + 2550*y2*y3 - 3575*y2 + 1650*y3**2 -
  1520. 3575*y3 - 30250))/81}, {y1,y2,y3,y4});
  1521. {{y3=arbcomplex(28),
  1522. 2
  1523. y2=(99*y3 - 582*y3
  1524. 4 3 2
  1525. + 4*sqrt(243*y3 - 3348*y3 + 15282*y3 - 26100*y3 + 11875)*sqrt(2) - 125
  1526. 2
  1527. )/(3*(9*y3 - 66*y3 + 25)),
  1528. 2
  1529. y1=(99*y3 - 582*y3
  1530. 4 3 2
  1531. - 4*sqrt(243*y3 - 3348*y3 + 15282*y3 - 26100*y3 + 11875)*sqrt(2) - 125
  1532. 2
  1533. )/(3*(9*y3 - 66*y3 + 25))},
  1534. {y3=arbcomplex(27),
  1535. 2
  1536. y2=(99*y3 - 582*y3
  1537. 4 3 2
  1538. - 4*sqrt(243*y3 - 3348*y3 + 15282*y3 - 26100*y3 + 11875)*sqrt(2) - 125
  1539. 2
  1540. )/(3*(9*y3 - 66*y3 + 25)),
  1541. 2
  1542. y1=(99*y3 - 582*y3
  1543. 4 3 2
  1544. + 4*sqrt(243*y3 - 3348*y3 + 15282*y3 - 26100*y3 + 11875)*sqrt(2) - 125
  1545. 2
  1546. )/(3*(9*y3 - 66*y3 + 25))},
  1547. 11 11 11
  1548. {y3=----,y2=----,y1=----},
  1549. 3 3 3
  1550. - 5 - 5 - 5
  1551. {y3=------,y2=------,y1=------}}
  1552. 3 3 3
  1553. % Another nice nonlinear system.
  1554. solve({y=x+t^2,x=y+u^2},{x,y,u,t});
  1555. {{t=arbcomplex(31),
  1556. u=t*i,
  1557. y=arbcomplex(32),
  1558. 2
  1559. x=y - t },
  1560. {t=arbcomplex(29),
  1561. u= - t*i,
  1562. y=arbcomplex(30),
  1563. 2
  1564. x=y - t }}
  1565. % Example from Stan Kameny (relation between Gamma function values)
  1566. % containing surds in the coefficients.
  1567. solve({x54=x14/4,x54*x34=sqrt pi/sqrt 2*x32,x32=x12/2,
  1568. x12=sqrt pi, x14*x34=pi*sqrt 2});
  1569. Unknowns: {x12,x14,x32,x34,x54}
  1570. {{x54=arbcomplex(33),
  1571. sqrt(2)*pi
  1572. x34=------------,
  1573. 4*x54
  1574. x12=sqrt(pi),
  1575. x14=4*arbcomplex(33),
  1576. sqrt(pi)
  1577. x32=----------}}
  1578. 2
  1579. % A system given by J. Hietarinta with complex coefficients.
  1580. on complex;
  1581. apu := {2*a - a6,2*b*c3 - 1,i - 2*x + 1,2*x**2 - 2*x + 1,n1 + 1}$
  1582. solve apu;
  1583. Unknowns: {a,a6,b,c3,n1,x}
  1584. {{c3=arbcomplex(34),
  1585. 1
  1586. b=------,
  1587. 2*c3
  1588. a6
  1589. a=----,
  1590. 2
  1591. n1=-1,
  1592. 1
  1593. x=-------}}
  1594. 1 - i
  1595. clear apu;
  1596. off complex;
  1597. % More examples that can now be solved.
  1598. solve({e^(x+y)-1,x-y},{x,y});
  1599. {{y=log(-1),x=log(-1)},{y=0,x=0}}
  1600. solve({e^(x+y)+sin x,x-y},{x,y});
  1601. 2*y_
  1602. {{y=root_of(e + sin(y_),y_,tag_14),x=y}}
  1603. % no algebraic solution exists.
  1604. solve({e^(x+y)-1,x-y**2},{x,y});
  1605. 2 2
  1606. {{y=0,x=y },{y=-1,x=y }}
  1607. solve(e^(y^2) * e^y -1,y);
  1608. {y=0}
  1609. solve(e^(y^2 +y)-1,y);
  1610. {y=0}
  1611. solve(e^(y^2)-1,y);
  1612. {y=0}
  1613. solve(e^(y^2+1)-1,y);
  1614. 1
  1615. {y=sqrt(log(---)),
  1616. e
  1617. 1
  1618. y= - sqrt(log(---))}
  1619. e
  1620. solve({e^(x+y+z)-1,x-y**2=1,x**2-z=2},{x,y,z});
  1621. atanh(sqrt(5))
  1622. {{y=2*cosh(----------------)*i,
  1623. 3
  1624. 4 2
  1625. z=y + 2*y - 1,
  1626. 2
  1627. x=y + 1},
  1628. atanh(sqrt(5)) atanh(sqrt(5))
  1629. {y= - cosh(----------------)*i + sqrt(3)*sinh(----------------),
  1630. 3 3
  1631. 4 2
  1632. z=y + 2*y - 1,
  1633. 2
  1634. x=y + 1},
  1635. atanh(sqrt(5)) atanh(sqrt(5))
  1636. {y= - (cosh(----------------)*i + sqrt(3)*sinh(----------------)),
  1637. 3 3
  1638. 4 2
  1639. z=y + 2*y - 1,
  1640. 2
  1641. x=y + 1},
  1642. 4 2 2
  1643. {y=0,z=y + 2*y - 1,x=y + 1}}
  1644. solve(e^(y^4+3y^2+y)-1,y);
  1645. 2/3 1/3 1/3
  1646. {y=(sqrt( - 3*(sqrt(5) + 3) - 12*(sqrt(5) + 3) *2 + 2*sqrt(
  1647. 2/3 2/3 1/3 1/3 1/6
  1648. 9*(sqrt(5) + 3) *2 + (sqrt(5) + 3) *sqrt(15)*3 *3
  1649. 1/3 1/3 1/6 1/3
  1650. + 3*(sqrt(5) + 3) *sqrt(3)*3 *3 + 12*(sqrt(5) + 3)
  1651. 1/3 1/6 1/3 1/6 1/3 1/3 1/6
  1652. + 2*6 *sqrt(15)*3 + 6*6 *sqrt(3)*3 + 6*2 )*3 *3
  1653. 2/3 1/3 1/3
  1654. - 3*2 ) + (sqrt(5) + 3) *sqrt(3) - 2 *sqrt(3))/(2
  1655. 1/6 1/6
  1656. *(sqrt(5) + 3) *2 *sqrt(3))}
  1657. % Transcendental equations proposed by Roger Germundsson
  1658. % <roger@isy.liu.se>
  1659. eq1 := 2*asin(x) + asin(2*x) - PI/2;
  1660. 2*asin(2*x) + 4*asin(x) - pi
  1661. eq1 := ------------------------------
  1662. 2
  1663. eq2 := 2*asin(x) - acos(3*x);
  1664. eq2 := - acos(3*x) + 2*asin(x)
  1665. eq3 := acos(x) - atan(x);
  1666. eq3 := acos(x) - atan(x)
  1667. eq4 := acos(2*x**2 - 4*x -x) - 2*asin(x);
  1668. 2
  1669. eq4 := acos(2*x - 5*x) - 2*asin(x)
  1670. eq5 := 2*atan(x) - atan( 2*x/(1-x**2) );
  1671. 2*x
  1672. eq5 := atan(--------) + 2*atan(x)
  1673. 2
  1674. x - 1
  1675. sol1 := solve(eq1,x);
  1676. sqrt(3) - 1
  1677. sol1 := {x=-------------}
  1678. 2
  1679. sol2 := solve(eq2,x);
  1680. sqrt(17) - 3
  1681. sol2 := {x=--------------}
  1682. 4
  1683. sol3 := solve(eq3,x);
  1684. sqrt(sqrt(5) - 1)
  1685. sol3 := {x=-------------------}
  1686. sqrt(2)
  1687. sol4 := solve(eq4,x);
  1688. sol4 := {}
  1689. sol5 := solve(eq5,x);
  1690. sol5 := {x=arbcomplex(36)}
  1691. % This solution should be the open interval
  1692. % (-1,1).
  1693. % Example 52 of M. Wester: the function has no real zero although
  1694. % REDUCE 3.5 and Maple tend to return 3/4.
  1695. if solve(sqrt(x^2 +1) - x +2,x) neq {} then rederr "Illegal result";
  1696. % Using a root_of expression as an algebraic number.
  1697. solve(x^5 - x - 1,x);
  1698. 5
  1699. {x=root_of(x_ - x_ - 1,x_,tag_20)}
  1700. w:=rhs first ws;
  1701. 5
  1702. w := root_of(x_ - x_ - 1,x_,tag_20)
  1703. w^5;
  1704. 5
  1705. root_of(x_ - x_ - 1,x_,tag_20) + 1
  1706. w^5-w;
  1707. 1
  1708. clear w;
  1709. end;
  1710. (TIME: solve 66960 73789)