Use :setting-predicate to assert the vars takes strings
[maxima.git] / share / algebra / solver / solver1-en.html
blob99266944e5d8e45561582e81638ff67db1f1e5c1
1 <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
5 <meta name="Author" content="dan stanger">
6 <meta name="GENERATOR" content="Mozilla/4.51 [en] (WinNT; I) [Netscape]">
7 <title>Solver1 (translated)</title>
8 </head>
9 <body>
10 <em> Note: This file is a machine translation of solver1.pdf.</em>
11 <br>
12 <br>
13 Acknowlegments:
14 <br>Many persons and institutions contributed considerably to the success
15 of this work.
16 <p>I would like to express my thanks to:
17 <br>&nbsp;- Richard Petti and Jeffrey P. Golden of Macsyma, Inc. (USA)
18 for their interest in this work,
19 <br>&nbsp;&nbsp; for supplying Macsyma licenses and the modification of
20 the LINSOLVE function,
21 <br>&nbsp;- The Center for Microelectronics of the University of Kaiserslautern,
22 in particular
23 <br>&nbsp;&nbsp; Dr. Peter Conradi and Uwe Wassenm&uuml;ller, for the support
24 of the project,
25 <br>&nbsp;- Clemens, Frank and Michael for the first-class WG life and
26 particularly Michael for the
27 <br>&nbsp;&nbsp; temporary hiring of its computer,
28 <br>&nbsp;- My parents and grandparents for their constant support during
29 my study,
30 <br>&nbsp;- and quite particularly my friend Dr. Ralf Sommer for outstanding
31 co-operation and the
32 <br>&nbsp;&nbsp; common enterprises of the last three years.
33 <p>&nbsp;Eckhard Hennig
34 <br>&nbsp;Braunschweig, August 1994
35 <br>&nbsp;
36 <br>
37 <br>
38 Summary:
39 <br>Technical sizing functions require frequently the solution of sets
40 of equations, which describe an object mathematically, after the values
41 of the function defining element parameters. For the analytic solution
42 of smaller sizing problems the application of commercial computer algebra
43 systems offers itself such as Macsyma [ MAC 94 ], which is able, to manipulate
44 and resolve after their variables symbolically extensive equations algebraically.
45 <br>Despite their high efficiency these systems are however usually already
46 overtaxed, if linear or weakly nonlinear, parameterized sets of equations
47 are to solve after only one subset of their variables or be before-processed
48 at least symbolically. In order to be able to treat such typically with
49 design functions developing set of equations, in the context of this work,
50 a universal symbolic equation solver based on heuristic algorithms was
51 developed and implemented in Macsyma. Program module SOLVER extends the
52 functionality of the Macsyma instruction SOLVE and LINSOLVE for the symbolic
53 solution of algebraic equations or linear sets of equations by the ability
54 for the selective solution of nonlinear, parameterized systems with degrees
55 of freedom.
56 <br>The first section of the available work describes some ranges of application
57 of symbolic sizing methods, the request following from them to a symbolic
58 equation solver as well as the used heuristic algorithms for the extraction
59 of linear equations and for the complexity evaluation of algebraic functions.
60 The second section contains an overview of the structure the Solvers and
61 a guidance to its use. In the appendix is the source text of the module
62 implemented in the internal higher programming language of Macsyma SOLVER.mac.
63 <br>
64 <br>
65 Table of contents
66 <br>1 heuristic algorithms~1
67 <br>1.1 introduction~1
68 <br>1.1.1 numeric procedures in the comparison with symbolic methods~1
69 <br>1.1.2 examples of areas of application of symbolic sizing methods~2
70 <br>1.2 conventional equation solver~7
71 <br>1.3 requirements of a symbolic equation solver~8.
72 <br>1.4 extraction and solution of linear equations~10
73 <br>1.4.1 intuitive methodologies for the search of linear equations~10
74 <br>1.4.2 a heuristic algorithm for the search of linear equations~11
75 <br>1.4.3 solution of the linear equations~13.
76 <br>1.5 evaluation strategies for the solution of nonlinear equations~14
77 <br>1.5.1 substitution systems for nonlinear sets of equations~14
78 <br>1.5.2 heuristic procedures for the complexity evaluation of algebraic printouts~16
79 <br>1.5.3 list of the solution sequence~19
80 <br>2 the Solver~21
81 <br>2.1 the structure of the Solvers~21
82 <br>2.2 the modules of the Solvers~23
83 <br>2.2.1 the Solver Preprocessor~23
84 <br>2.2.2 the Immediate Assignment Solver~25
85 <br>2.2.3 the linear Solver~26
86 <br>2.2.4 the Valuation Solver~28
87 <br>2.2.5 the Solver Postprocessor~31
88 <br>2.3 application of the Solvers~32
89 <br>2.3.1 command syntax~32
90 <br>2.3.2 special features of the syntax of equations~33
91 <br>2.3.3 example calls of the Solvers~33
92 <br>2.4 the options of the Solvers~37
93 <br>2.5 user specific transformation routines~40
94 <br>2.6 modification of the operator evaluations~44
95 <br>2.7 user specific evaluation strategies~45
96 <br>i
97 <br>
98 <br>
99 <br>
100 <br>
101 ii~TABLE OF CONTENTS
102 <br>bibliography~47
103 <br>A example calculations~49
104 <br>A.1 sizing of the staff two-impact~49
105 <br>A.2 sizing of the transistor amplifier~57
106 <br>B program listing~65
107 <br>B.1 SOLVER.mac~65
108 <br>
109 <br>
110 Chapter 1
111 <br>heuristic algorithms for the symbolic solution specifications given
112 by sets of equations
113 <br>1,1 introduction
114 <br>1,1,1 numeric procedures in the comparison with symbolic methods the
115 accurate sizing of technical designs for requires frequently the solution
116 of nonlinear sets of equations after function defining element parameters.
117 Usually for the determination of the looked up variables numeric optimizing
118 procedures are used, which do not function reliably however already for
119 small design problems with a comparatively small number of unknown quantities
120 always. Problems prepare the complexity order of many usual optimizing
121 algorithms (a problem, known as the curse OF dimensionality [MIC 94] is),
122 exponentially dependent on the variable number, in first line, the selection
123 of suitable initial values, which unwanted finding locally instead of global
124 optima and the principle-conditioned behavior with the solution of sets
125 of equations with degrees of freedom, with which a clarity of the solution
126 vector missing in the reality can be pretended.
127 <br>The optimum procedure for the accomplishment of a design function would
128 basically be a complete analytic solution of the appropriate set of equations.
129 Analytic functions, which describe explicitly the looked up item values
130 as functions of the specification parameters, would have to be determined
131 only once and would be available then to the arbitrarily frequent analysis
132 with modified parameters, e.g. within design data bases of CAD systems.
133 Besides analytic sizing formulas clarify qualitatively functional connections
134 between the item values and the specifications and reveal in the cases
135 concerned the existence of degrees of freedom. Since there are however
136 no generally accepted procedures for the solution of any nonlinear sets
137 of equations and in the special cases, in which symbolic solutions can
138 be calculated, which complexity of the results exceeds by hand calculation
139 to mastering frameworks far, the analytic handling of also only small sizing
140 problems plays so far a subordinated role. With the help of modern, efficient
141 computer algebra systems, which are able to manipulate and resolve after
142 any variables symbolic sets of equations algebraically,
143 <br>1
144 <br>
145 <br>
146 2 CHAPTERS 1. HEURISTIC ALGORITHMS
147 <br>with the help of modern, efficient computer algebra systems, which
148 are able to manipulate and resolve after any variables symbolic sets of
149 equations algebraically, become some the problem categories, in particular
150 such, specified above, which require the solution of majority linear or
151 multivariate polynomialen systems, nevertheless the analytic handling accessible.
152 Examples of appropriate applications are within many fields of the engineering
153 sciences, among other things this concerns the design of similar electronic
154 circuits, regulation-technical problem definitions, the technical mechanics
155 and the robotics [ PFA 94 ].
156 <br>1,1,2 examples of areas of application of symbolic sizing methods on
157 the basis the following two examples are to be demonstrated some areas
158 of application of symbolic methods. At the same time exemplary the concrete
159 request are to be worked out at them, to which with the development of
160 a concept for a universal solution algorithm for symbolic sets of equations
161 must be considered.
162 <br>Example 1,1 with the first example concerns it a simple task out of
163 the technical mechanics. The two staff truss represented in figure 1,1
164 is given [ BRO 88, P. 112 ], at which under the angle opposite the horizontals
165 the strength F in the point C attacks. The staffs include the angles with
166 the horizontals and fi, the height of the triangle stretched by the staffs
167 are defined with c. Cross section aechen A1 and a2 of the two staffs are
168 squares with the side lengths h1 and h2. Modulus of elasticity of the used
169 material is E. Figure 1.1: Loaded two staff truss
170 <br>Due to the load by the strength F deforms the truss in such a way that
171 itself the point of the triangle in relation to the unloaded status around
172 the vector (u; w) T shifts, sees figure 1.2. On the assumption that the
173 staff length variations are small due to the load in relation to the output
174 lengths, it is to be determined now the cross section dimensions h1 and
175 h2 of the staffs in such a way that itself for given F, fi, c and E exactly
176 a prescribed shift (u; w) T adjusts, i.e. a1 a2 is looked up = f (F; fi;
177 c; E; u; w): (1.1)
178 <br>
179 <br>
180 1.1. INTRODUCTION 3
181 <br>figure 1.2: Flexibly deformed two staff truss
182 <br>solution: From the static balance conditions at the point C follows
183 after figure 1.3
184 <p>figure 1.3: Force equilibrium at the point C
185 <br>the material equations for the staff length variations read 1.
186 <br>Fxi = 0 =) follows F cos l1 = S1l1 EA1 after figure 1,3 X; (1.4)
187 <br>&nbsp;Fxi = 0 =) follows F cos l2 = S2l2 EA2 after figure 1,3 X; (1.5)
188 <br>whereby for the staff lengths l1 and l2 as well as for the cross-section
189 areas A1 and a2 applies to l1 = c cos (1.6) l2 = c cos fi (1.7) A1 = h
190 2 1; (1.8) A2 = h 2 2: (1.9)
191 <br>
192 <br>
193 4 CHAPTERS 1. HEURISTIC ALGORITHMS
194 <br>figure 1.4:
195 <br>Because of the small geometry modifications the circular arcs, on which
196 the staff ends can move, were replaced to shift plan in the shift plan
197 drawn in figure 1,4 by for original staff direction the senkrechten tangents.
198 To the side lengths dashed of the drawn in parallelogram applies
199 <br>From it the shifts u and v result to the function exist now therein
200 to resolve the symbolic set of equations from the equations (1.2) to (1.13)
201 after the unknown quantities h1 and h2 explicitly whereby all unnecessary
202 variables, i.e. S1, S2, A1, l1, l2, a and b, are to be eliminated.
203 <br>Example 1,2
204 <br>The second example originates from electro-technology and concerns
205 the sizing of similar electronic circuits. For the two-stage transistor
206 amplifier drawn in figure 1,5 [ N&Uuml;H 89 ] symbolic sizing formulas
207 are to be intended, those the values of the seven resistances g 1: R7 as
208 function of the operating voltage VCC, which Zi and the output resistance
209 Zo of the circuit for numerically determined bias points of the transistors
210 describe small signal reinforcement A, the input impedance:
211 <br>0 B @ G 1. R7 1 C A = f (VCC;a; Zi; Zo): (1.14)
212 <br>
213 <br>
214 1.1. INTRODUCTION 5
215 <br>Figure 1.5: Two-stage transistor amplifier
216 <br>Figure 1.6: Bias point alternate circuit diagram of the amplifier with
217 determined transistor bias points
218 <br>For this purpose with the help of symbolic network analysis procedures
219 [ SOM 93a] are calculated as well as symbolic approximation methods [ HEN
220 93 ] first (highly simplified) the transfer functions A, Zi and Zo in the
221 pass band of the amplifier as functions of the item parameters and the
222 bias point values.
223 <br>A = 145303681853R2/145309663773R1 (1.15)
224 <br>Zi = R7 (1.16)
225 <br>Zo = 1675719398828125 R2 R7 + 394048139880824192 R1 R2/136552890630303121408
226 R1 (1.17)
227 <br>The values of the resistances R1..R7 do not only determine the small
228 signal characteristics, but influence besides the bias point adjustment
229 of the circuit. Therefore are resistances
230 <br>
231 <br>
232 6 CHAPTERS 1. HEURISTIC ALGORITHMS
233 <br>to dimension in such a way that the small signal and bias point specifications
234 are fulfilled at the same time. The equations (1.15) - (1.17) for this
235 reason the extensive Sparse tablet set of equations is added (1.18) - (1.51),
236 which comes out from the bias point alternate circuit diagram of the amplifier
237 represented in figure 1,6.
238 <br>For the determination of the looked up sizing regulations in the form
239 (1.14) 1.51 from the set of equations (1.15) - (1.51) all branch voltages
240 are and flow V?? and I?? to eliminate
241 <br>
242 <br>
243 1.2. CONVENTIONAL EQUATION SOLVER 7
244 <br>for the determination of the looked up sizing regulations in the form
245 (1.14) is from the set of equations (1.15) - (1.51) all branch voltages
246 and flows V?? and I?? to eliminate and the remaining equations after the
247 resistances g 1: To resolve R7. 2,1,2 boundaries of the application of
248 conventional equation solver the attempt is undertaken to insert for the
249 solution of the sets of equations from the two examples the standard routines
250 of well-known commercial computer algebra systems as Macsyma [ MAC 94 ]
251 or Mathematica [ WOL 91 ] then in the case the use of Macsyma in the example
252 1,1, results of the following type result usually, like here:
253 <p>(COM1) Solve(
254 <br>[ F*cos(gamma) - S1*cos(alpha) - S2*cos(beta) = 0,
255 <br>F*sin(gamma) - S1*sin(alpha) + S2*sin(beta) = 0,
256 <br>Delta_l1 = l1*S1/(E*A1),
257 <br>Delta_l2 = l2*S2/(E*A2),
258 <br>l1 = c/cos(alpha),
259 <br>l2 = c/cos(beta),
260 <br>a = Delta_l2/sin(alpha+beta),
261 <br>b = Delta_l1/sin(alpha+beta),
262 <br>u = a*sin(alpha) + b*sin(beta),
263 <br>w = a*cos(alpha) + b*cos(beta),
264 <br>A1 = h1^2, a2 = h2^2
265 <br>],
266 <br>[ h1, h2 ]);
267 <br>(D1) [ ]
268 <p>This behavior of the computer algebra programs is to be explained with
269 the fact that the sets of equations which can be solved are regarded concerning
270 the interesting variables h1 and h2 as over-certainly, because the equation
271 solving no additional information about (after possibility) which can be
272 eliminated variables (S1, S2, A1, a2, l1, l2, a, b) cannot be transferred
273 or variables, i.e. the parameters of the system (F, over under any circumstances
274 which can be eliminated, + fi, c, E, u, w). A possible way out consists
275 of arranging the equation solver intending also solutions for the not interesting
276 variables. This is however not always feasible and usually very inefficient,
277 because it in some cases much computing time necessarily for the regulation
278 of variables, which have no uss on the looked up unknown quantities. Even
279 at all no solution is found, if there is no analytic solution for a only
280 one not interesting variable. The latter applies for example to the following
281 set of equations, if only the solutions for x and y are looked up: x +
282 y = 1 (1.52)
283 <br>
284 <br>
285 8 CHAPTERS 1. HEURISTIC ALGORITHMS
286 <br>from the two linear equations (1.52) and (1.53) leave themselves the
287 solutions untouched x = 2 and y = -1 to determine directly, not in the
288 contradiction with the remaining nonlinear equation (1.54). Macsyma detects
289 this circumstance however not and gives only error messages back | in the
290 first attempt (COM3) because of the apparent over certainty of the system,
291 in the second attempt (COM4) due to the analytically not solvable third
292 equation:
293 <br>(COM2) Eq: [ x + y = 1, 2*x - y = 5, y*z + sin(z) = 1]$
294 <br>(COM3) Solve(Eq, [ x, y ]);
295 <br>Inconsistent equations: (3)
296 <br>(COM4) Solve(Eq, [ x, y, z ]);
297 <br>ALGSYS CAN NOT solve - system too complicated.
298 <br>1.3 request of a universal symbolic equation solver
299 <br>For the symbolic solution of the equation systems it is necessary that
300 the Solve function in none of the two above cases aborts prematurely. In
301 the first case the solutions should be output on x and y after a consistency
302 check with equation (1.54). In latter case is to require that beside the
303 analytically calculated solutions additionally the remaining equations,
304 for which no such solutions could be found in implicit form are returned,
305 so that these can be solve if necessary with numeric procedures. An adequate
306 response to the command COM4 would be in this sense e.g. an output of the
307 form
308 <br>[ x = 2; y = ]
309 <br>the functions for the solution of sets of equations, provided by Macsyma,
310 are not modifiable without access to the system nucleus in the way that
311 they show the behavior required above. The target of the available work
312 is therefore conceiving and implementation of a universal symbolic equation
313 solver, which is, which is based on the Macsyma standard routines, able,
314 to resolve or not make at least by elimination as much as possible necessary
315 variables a large symbolic preprocessing of the equations sets of equations
316 of the type stated in the examples after any subset of all variables, so
317 that numeric optimizing procedures do not have to be only applied to a
318 small, analytically any longer solvable nonlinear core of the system. Apart
319 from this general objective detailed request can be derived to the program
320 which can be developed from some well-known facts and a series from observations,
321 which are to be made 1,1 and 1,2 as well as the set of equations (1.52)
322 by the examples { (1.54):
323 <br>1. Usually only the solution for some few variables is in demand, all
324 other unknown quantities is to be eliminated.
325 <br>2. The sets of equations which can be solved can be simple or several
326 times parameterized.
327 <br>3. It is not by any means guaranteed that the parameters are from each
328 other independent, i.e. it is possible that a set of equations has a solution
329 only if certain arithmetic obligation conditions between some parameters
330 are kept.
331 <br>
332 <br>
333 1.3. REQUEST OF SYMBOLIC EQUATION SOLVER 9
334 <br>4. the sets of equations contained often easy, direct allocations of
335 the form xi = const., see equations (1.6) and (1.7) or (1.42) - (1.51).
336 <br>5. A substantial proportion of the equations which can be solved is
337 linear concerning a not directly evident subset of all variables, sees
338 regarding all V?? and I?? linear equations (1.18) - (1.32).
339 <br>6. The systems can contain degrees of freedom.
340 <br>7. No generally accepted solution procedures for nonlinear equations
341 and sets of equations exist.
342 <br>8. Nonlinear equations can be unsolvable (contradictory), unique solutions
343 have or multiple solutions with finite or infinite solution varieties possess.
344 <br>9. Always all items of the solution quantity with the remaining equations
345 are not consistent in the case of multiple solutions.
346 <br>10. For many nonlinear equations no analytic solutions exist, see equation
347 (1.54).
348 <p>From these statements the following result, the appropriate points assigned
349 demands:
350 <br>1. The program is to solve sets of equations only so far, as it is
351 absolutely necessary for the determination of individual variables. Calculated
352 solutions are to be checked for possible contradictions with the remaining
353 equations.
354 <br>2. Looked up variables and parameter must be able to be processed separately
355 from each other indicated and. Parameters may not be under any circumstances
356 eliminated contrary to not interesting variables.
357 <br>3. If dependencies between parameters are detected, then the user the
358 program run under consideration and storage of the appropriate obligation
359 conditions must to be continued when desired be able.
360 <br>4. Direct allocations should be looked up and executed directly at
361 the beginning of the program run, in order to reduce the range of the remaining
362 set of equations as far as possible at small expenditure.
363 <br>5. There there for linear equations efficient, closed solution procedures
364 is to solve is appropriate it to search the set of equations repeated for
365 linear section blocks these and to use the results into the remainder of
366 the equations, until no equation linear equations are more available.
367 <br>6.&nbsp; Degrees of freedom are to be expressed automatically in variables
368 selected by the program.
369 <br>7. The solution of nonlinear equations must be controlled with the
370 help of heuristic evaluation strategies.
371 <br>8. In the case of multiple solutions with finite varieties is each
372 individual solution path separately recursively to be pursued.
373 <br>
374 <br>
375 10 CHAPTERS 1. HEURISTIC ALGORITHMS
376 <br>9. Sections of multiple solutions, inconsistent with the remaining
377 equations, must be detected and the appropriate solution path be rejected.
378 <br>10. As was already required for the start of the paragraph, analytically
379 solvable equations are not to lead not to the abort of the program. Instead
380 the set of equations is as far as possible on triangle form to be brought
381 and the not solvable remaining equations as well as the partial solutions
382 determined up to then to be output.
383 <br>1,4 extraction and solution of linear equations
384 <br>is mostly nonlinear with technical tasks the equations which can be
385 solved, but contains the systems concerned frequently large linear section
386 blocks. Since linear sets of equations can be solved very efficiently with
387 the help of the Gauss-Elimination simultaneously, it is advisable to process
388 before the solution of the nonlinear equations first the linear proportion
389 of the system separately. Even if a complete analytic dissolution of the
390 entire nonlinear system cannot be achieved after all looked up variables,
391 it is nevertheless meaningful not to reduce by elimination of the linear
392 variables and equations the system to an only small, any longer analytically
393 solvable core whose numeric solution is substantially less complex, than
394 an optimization executed on the complete system. Under point 5 required
395 iterative solution linear subsystems entire set of equations is to that
396 extent no trivial function, than that neither the equations concerned nor
397 the subset of the variable, concerning which these equations are linear
398 admits from the beginning is. Therefore a search strategy must be found,
399 (for efficiency reasons as large ones as possible) the linear equations
400 and variable blocks extracted from any nonlinear set of equations.
401 <br>1,4,1 intuitive methodologies for the search of linear equations
402 <br>For the elucidation of the task the following nonlinear set of equations
403 is consulted, which is to be solved x, y and z after the variables. At
404 first sight only the equation (1.55) is linear, regarding all three variables.
405 In the case of use of a simple search algorithm, which finds excluding
406 such completely linear equations, max. a variable can after appropriate
407 dissolution of (1.55), e.g. after x in this case, from which both remaining
408 equations are eliminated. A more exact view of the equations reveals however
409 a better alternative. After the distance of equation (1.56) and shifting
410 the terms dependent on z on the right pages of the equations (1.55) and
411 (1.57) two in the variables x and y linear equations develop:
412 <br>
413 <br>
414 1.4. EXTRACTION AND SOLUTION of LINEAR EQUATIONS 11
415 <br>their simultaneous inversion leads to the solutions parameterized in
416 z after their inserting into (1.56) only one nonlinear equation which can
417 be solved remains:
418 <br>In view of the fact that with the second version in only one iteration
419 two unknown quantity could be determined at the same time, it is to be
420 preferred latter methodology of the search for completely linear equations,
421 applied first, despite the additional shaping expenditure. This applies
422 in particular if a set of equations contains at all no equations, in which
423 all variables involved in purely linear form occurs. The procedure used
424 for the extraction of linear subsystems should interconnect therefore both
425 demonstrated operations for the removal of nonlinear equation proportions:
426 <br>1. Distance of individual nonlinear equations
427 <br>2. Shifting variables occurring in nonlinear terms to the right side
428 of the equations by a balanced combination of the two operations can be
429 achieved that the resulting linear subsystems have max. size and often
430 at least are approximately square.
431 <br>1.4.2 a heuristic algorithm for the search of linear equations
432 <br>For a computer implementation such a search for equation linear equations,
433 executed intuitively by humans, must be systematized and formulated algorithmic.
434 Since the term does not define linear section set of equations, how is
435 evident on the basis the different solution types, the desired result in
436 unique way, a heuristic strategy was developed for the imitation of the
437 intuitive methodology. This strategy is demonstrated for the comparison
438 of the results at the system,&nbsp; already regarded, (1.55)- (1.57).
439 <br>For the set of equations first a table is set up, whose lines are assigned
440 to the equations and their columns the variables. The entry at the position
441 (i; j) of the table contains for the equation i the coefficient 1 concerning
442 the linear member, i.e. the first power, of the variable xj. Is available
443 as for z in equation (1.57) no term in first power or steps these functions
444 not polynomial in argument on (e.g. sin x or sqrt x), then the appropriate
445 position with a cross () is marked. x y z
446 <br>Gl. 1)
447 <br>1 Macsyma places the instruction to the determination of the coefficients
448 of rational printouts RATCOEFF to the order.
449 <br>
450 <br>
451 12 CHAPTERS 1. HEURISTIC ALGORITHMS
452 <br>second, equal large evaluation matrix, is assigned to this table whose
453 entries are equal to zero, if the corresponding is entry in the coefficient
454 table a constant, and equal unity, if the linear coefficient concerned
455 contains looked up variables or not existed (). additionally the line and
456 column totals become noted at the edges of the matrix, as well as under
457 the sigma signs on the top right and on the left of down respectively the
458 line total of the column totals (P S) and the column total of the line
459 totals (P Z). obvious correspond to
460 <br>x y z P S 0 1 2 3 1) 0 0 0 0 2) 2 0 1 1 3) 1 0 0 1 P Z 3 (1.63)
461 <br>A linear section set of equations and the appropriate variables are
462 found if with a consequence of the operations specified at the end of paragraph
463 1,4,1 all ones were eliminated. Transferred to manipulations thereby the
464 1 corresponds to the evaluation matrix. Operation deleting the line belonging
465 to to a certain equation. The 2. Operation is equivalent column assigned
466 for the distance of some variable. The linear subsystem consists afterwards
467 of those equations and variables, whose lines and columns were not removed
468 from the matrix. The reduction of the evaluation matrix (1.63) to a zero-matrix
469 can take place in exactly three different ways:
470 <br>1. Capers of the lines 2) and 3),
471 <br>2nd capers of the columns y and z,
472 <br>3rd capers of the line 2) and the column z.
473 <br>of the demand for max. size and as square a form of the linear equation
474 blocks as possible is directly portable to the characteristics of the zero-matrix
475 which can be obtained. In this sense the latter of the three options is
476 optimal, because it supplies the system (1.58)-(1.59), already detected
477 in the previous paragraph as optimum solution. The two other possibilities
478 lead against it for the under-certain equation (1.55) or to a over-certain
479 3 1-System in x.
480 <br>The search for an optimal sequence of line and column cancellations
481 is a complex combinatorial problem. In order to avoid the associated expenditure,
482 a heuristic, local decision criterion becomes the determination of the
483 line or column which can be removed in the respective step, i.e. a Greedy
484 strategy
485 <br>[FOU 92], uses: The line or column is deleted, which contains most
486 ones, thus that with the largest line or column total. This criterion supplies
487 with however still no unique predicate,
488 <br>&nbsp; if two or more lines have the same (largest) line total,
489 <br>&nbsp; or two or more columns the same (largest) column total has,
490 <br>&nbsp; or if the totals of the maximumevaluated line and the maximumevaluated
491 column are identical.
492 <br>
493 <br>
494 In the first two cases any can be selected, usually is this for the sake
495 of simplicity first in each case the found with max. evaluation from the
496 concerned lines or columns.
497 <br>The third case occurs in the available example. In the evaluation matrix
498 (1.63) possess both the line 3) and the column z the max. total 2. At the
499 beginning from both possibilities arbitrarily the cancellation of the line
500 one select, so that in the next step the following evaluation matrix results:
501 <br>x y z P S 0 0 1 1 1) 0 0 0 0 3) 1 0 0 1 P Z 1 (1.64)
502 <br>again is now the max. line total equal to the max. column total. The
503 decision could take place according to the coincidence principle, but thereby
504 the demand after as square a form of the linear subsystems as possible
505 was not sufficiently considered also here.&nbsp;&nbsp; Is recommended either
506 to delete lines and columns with same evaluation alternately to meet or
507 the selection in favor of the possibility which brings the dimension relation
508 n/m to the n*m evaluation matrix with n =/= m more near at unity. According
509 to both criteria deleting of the column z proves as more favorable than
510 the distance of the line 3).
511 <br>x y P S 0 0 0 1) 0 0 0 3) 0 0 0 P Z 0 (1.65)
512 <br>the cancellation of column z causes the removal of the last unity in
513 the evaluation matrix. This expresses itself in disappearing P S and P
514 Z, by which the end of the algorithm is marked. From the result matrix
515 (1.65) it is to be read off now that the equations (1.55) are linear and
516 (1.57) the example set of equations concerning the variables x and y. Those
517 finally necessary shapings of the linear equations for the creation of
518 the simultaneous form (1.58) - (1.59) do not represent a problem for a
519 computer algebra system, them by Macsyma from the instruction LINSOLVE
520 for the simultaneous solution of linear equations are automatically executed.
521 <br>1,4,3 solution of the linear equations is unique solvable or under
522 the linear section sets of equations extracted using the described algorithm,
523 then their subsequent treatment is unproblematic. In the case of over-certain
524 systems obligatory inconsistencies occur which require a more detailed
525 handling. E.g. from a larger set of equations in the variables, in x and
526 y linear subsystem (1.66)-(1.68) were inferred from x, y, z and w the over-certain.
528 <br>
529 <br>
530 14 CHAPTERS 1. HEURISTIC ALGORITHMS
531 <br>after the forward of elimination ensteht the following set of equations,
532 which is inconsistent in the sense of linear algebra and thus no solution
533 has:
534 <br>In the regarded case are however z and w variable of the set of equations
535 which can be solved. The above linear subsystem has exactly solutions if
536 these two variables fulfill the equation (1.71). This condition is to be
537 only regarded therefore as a further equation of the remainder system,
538 from which x and y were eliminated.
539 <br>As consequence it results that with the occurrence of apparent inconsistencies
540 following the eliminations process generally the right sides of the consistency
541 conditions thereupon must be checked, whether they contain looked up variables
542 of the entire system. If this is the case, then the conditions concerned
543 are again added after the solution of the linear equations the initial
544 equation system. If this applies not, i.e. does not occur not fulfillable
545 obligation conditions between numeric values or parameters, then the set
546 of equations has indeed no solution, and the solution process must be aborted.
547 <br>1,5 evaluation strategies for the solution of nonlinear equations
548 <br>Apart from few special cases do not exist closed solution procedures
549 for general nonlinear sets of equations. This does not exclude however
550 that for many nonlinear systems analytic solutions or at least partial
551 solutions can be calculated, only is usually their regulation not in as
552 efficient way as by Gauss-Elimination in the case of linear equations possible.
553 <br>1,5,1 substitution systems for nonlinear sets of equations an elementary
554 solution procedure, which can be applied to any sets of equations, is the
555 well-known substitution system:
556 <br>1. Select (as simple ones as possible) an equation from the system
557 and resolve it after a variable xj. Abort, if all equations are solve,
558 or no further equation analytically to solve leaves itself.
559 <br>2. Insert the result into the remaining equations, in order to eliminate
560 xj from the system.
561 <br>3. Check the system reduced by an equation and a variable for consistency
562 and continue with step 1.
563 <br>For the demonstration of the procedure the nonlinear set of equations
564 (1.72) { (1.76) one regard, which is to be solved a, b, c and d after the
565 variables.
566 <br>ab + 2c = 0 (1.72)
567 <br>c 2 + d
568 <br>
569 <br>
570 1.5. EVALUATION STRATEGIES FOR THE SOLUTION OF NONLINEAR EQUATIONS 15
571 <br>The question, which concrete characteristics distinguish " as simple
572 " an equation as possible, arises already directly at the beginning of
573 the application of the substitution system. From know-how the among other
574 things following evaluation criteria can be derived, which must to apply
575 and be able depending upon application to be differently weighted not necessarily
576 at the same time: Simple equations
577 <br>1. contained only few the looked up variable,
578 <br>2. contain a looked up variable at exactly one position, so that the
579 unknown quantity lets itself be isolated relatively easily,
580 <br>3. indicate concerning one or several variables only small depths of
581 the operation hierarchy, i.e. the formula complexity is small,
582 <br>4. contains no transcendental or different one, functions which can
583 be inverted with difficulty.
584 <br>On the basis these criteria now the simplest equation of the example
585 system is to be determined. Regarding the first two points this could be
586 the equation (1.75), because it contains only the variable a, and this
587 occurs at exactly one position. On the other hand the evaluation does not
588 precipitate due to the criteria 3 and 4 very favorably. Regarding the points
589 2, 3 and 4 the solution of the equation (1.73) appears after the variable
590 d as the best selection, because all other equations contain either more
591 variables or more with difficulty resolvable functions.
592 <br>As relevant criterion here first the combination of the points 1 and
593 2 may be considered, so that with the solution of the equation (1.75) after
594 the variable a one begins. Only if the principal value of the arctan function
595 is considered, then a = 2 follows: (1.77)
596 <br>Begun into the remaining four equations the system results
597 <br>2b+ 2c = 0; (1.78)
598 <br>c 2 + d
599 <br>developed there no inconsistencies, with the selection of the next
600 simplest equation are continued. The valuation criteria speak now unique
601 2 for the solution of the equation (1.79) after d:
602 <br>the first equation would probably solve 2 humans simpler would consider,
603 but the beforehand necessary sections of the equation is strict by the
604 factor 2 an additionally considering expenditure.
605 <br>
606 <br>
607 16 CHAPTERS 1. HEURISTIC ALGORITHMS
608 <br>from it 2b follows
609 <br>2b + 2c = 0; (1.83)
610 <br>p b + 4
611 <br>concerning all criteria is now the equation (1.83) the most favorable
612 candidate, so that with the solution
613 <br>b =-c
614 <br>still two equations with the unknown quantities c remain.
615 <br>Equation (1.88) is analytically not solvable, therefore independently
616 equation (1.87) must supply the still which is missing solution for c of
617 the evaluation. In this case a multiple solution results for the first
618 time:
619 <br>[c=0,c=-1].
620 <br>In it the meaning so far of the not relevant consistency check shows
621 up. From the two solutions only second, c = -1, fulfills the equation (1.88).
622 The other solution leads to the contradictory predicate
623 <br>-i pi = 0 (1.90)
624 <br>and must be rejected therefore. After the back substitution the consistent
625 solutions read
626 <br>[a=2, b=1, c=-1, d=3]. (1.91)
627 <br>1.5.2 heuristic procedures for the complexity evaluation of algebraic
628 printouts
629 <br>being supposed the evaluation of algebraic equations regarding their
630 " simplicity " and the solution of a nonlinear set of equations which is
631 based on it by a computer algebra system to be thus made automatically,
632 then the criteria in algorithms, formulated linguistically in the paragraph
633 1.5.1, must be illustrated, which supply numeric complexity evaluations
634 for the controlling of the solution process. The height of an evaluation
635 number of b should be a measure for it how difficult it is to resolve an
636 equation i after a variable xj analytically. The larger b is, the more
637 complex appears 3 the function.
638 <br>If the evaluation for each equation is made regarding each variable,
639 then a solution sequence for the equations can be generated by means of
640 an assortment on the basis the yardsticks. The solution sequence is representable
641 by an arranged list of the form [ (i1; j1; b1); (i2; j2; b2); ] whereby
642 for the evaluation numbers UC applies bl to k &lt; to l. for the equations
643 more loeser implies the list the following statements: Attempts first,
644 which equation i1 after the variable xj1
645 <p>3 it here the formulation appears conscious selected, because made the
646 evaluation on the basis heuristic criteria, which cannot guarantee optimal
647 decisions.
648 <br>
649 <br>
650 1.5. EVALUATION STRATEGIES FOR the SOLUTION of NONLINEAR EQUATIONS 17
651 <br>to resolve since this appears simplest. If this does not succeed, then
652 tries instead the solution from equation i2 after xj2, etc.. If the solution
653 attempt is successful against it, then insert the solution into the remaining
654 equations and begin from the front with the list of a new solution sequence.
655 <br>The conversion of the first criterion to an algorithm does not represent
656 a serious challenge, because the number of variables contained in an equation
657 is already a numeric value. The implementation by programming is in a computer
658 algebra system just as little a problem. In Macsyma the short instruction
659 <br>Length(ListOfVars(Equation[i]))
660 <br>is sufficient for the statement of the number of the unknown quantities
661 in the ith equation. This number is however only as secondary criterion
662 in connection with other evaluations of use, because only one order of
663 rank of the equations, not however by pairs of equation/variables, is supplied.
664 <br>Out later evident reasons is here first the view of the criterion 2
665 to be reset and with the points 3 and 4 be continued. These two criteria
666 were separately listed, but them can be interconnected very easily only
667 one procedure. The heuristic evaluation algorithm used in in the following
668 section described the implementation symbolic equation loesers uses the
669 internal representation of algebraic printouts in computer algebra systems
670 for complexity calculation. Assembled ones algebraic functions are administered
671 in hierarchically organized lists by operators and operands in prefix notation,
672 can which be illustrated directly into a tree structure. The nodes of such
673 a tree contain the operators, the operands are in the pages. For example
674 the figure 1,7 shows the representation of the left sides of the equations
675 (1.75) and (1.87) as operation trees.
676 <br>Figure 1.7: Tree representation of algebraic printouts
677 <br>An evaluation of the formula complexity regarding the depth of the
678 operation hierarchy, thus the degree of the nesting of a printout, is now
679 readable at the tree structures. E.g. the complexity can be intended, as
680 the branches of tree are counted, which must be crossed by the root of
681 the operation tree on, in order to arrive for the instances of the regarded
682 variables.
683 <br>
684 <br>
685 18 CHAPTERS 1. HEURISTIC ALGORITHMS
686 <br>regarded variables to arrive. In the case of the printout in figure
687 1.7a) the complexity value is b concerning the variable a equal to the
688 length of the fat drawn in path, i.e. b = 4. In order to achieve from the
689 tree root in figure 1.7b) all instances of the variable c, altogether seven
690 branches must be crossed, therefore are the complexity b = 7.
691 <br>This methodology for the calculation of the complexity is easy so expandable
692 that also the criterion 4, which is considered evaluation of a printout
693 regarding the operators contained in it, at the same time. Instead of the
694 easy counting of the branches of tree only additionally a weighting must
695 take place, as a typical " difficulty factor " is assigned to each operator,
696 by which the evaluation of its operands to be multiplied is. The height
697 of the difficulty factor is to reflect, like complex for the computer algebra
698 system the formation of the inverse function, thus the dissolution of the
699 function after the operands, is [TRI 91].
700 <br>At the beginning each page of the tree receives the weighting 1, if
701 it contains the variable, concerning which the evaluation to be calculated
702 is. Otherwise the pages are provided with the weighting 0. During the evaluation
703 of the operators the operator serves " + " as reference with the weighting
704 1, since it is to be inverted most easily. Regarded in the comparison to
705 it the reversal of the operators will become " * " and " tan " arbitrarily
706 as four or ten times so with difficulty, accordingly therefore the weightings
707 set. The following table shows a selection of some operators and them assigned
708 weightings.
709 <br>Figure 1.8: Evaluation of the operators
710 <br>The calculation of the complexity value takes place bottom up via repeated
711 addition of the branch weights at the operator node, multiplication of
712 the total with the operator weight and transfer of the resulting value
713 onto the superordinate branch, until the tree root is achieved. For the
714 demonstration of the procedure the operation tree in figure 1.a) one regard.
715 In the squares drawn in beside the nodes the operator weights are marked,
716 the numbers at the branches mean the total weight part of the tree subordinated
717 in each case. Since the complexity of the printout is to be evaluated concerning
718 the variable a,
719 <br>
720 <br>
721 1.5. EVALUATION STRATEGIES FOR THE SOLUTION OF NONLINEAR EQUATIONS 19
722 <br>only the page with the symbol a the weight 1, all other pages obtains
723 with 0 is evaluated. At the multiplication node over-half the variables
724 add themselves the branch weights to the total 0 +1 = 1, those, in accordance
725 with which evaluation of the operator is passed on "*", with the factor
726 4 multiplied to right branch of operand of the "/" operator. There likewise
727 a multiplication with 4 takes place, so that the intermediate result is
728 now alike to 16. Subsequently, are added in the process of the calculation
729 still the factors 10 and 1 for "tan " - and the "+" operator. The final
730 result, b = 160, is over the root of the tree. For the operation tree in
731 figure 1.8b) appropriate calculations result in a complexity value of b
732 = 110 concerning the variables c.
733 <br>Here can now the provisionally reset criterion 2 again be taken up.
734 In order to determine those equations of a system, one or more variables
735 at exactly in each case one position contained, it is sufficient, to set
736 in the calculation regulation for the formula complexity, described above,
737 all operator weights to unity and store all pairs of equation/variables,
738 for which under these conditions the complexity evaluation b = 1 results.
739 The method is to be justified thereby that the search applies exactly to
740 those equations, in whose tree representation determined variable symbols
741 in only one page occurs. That means, there is only one path of the tree
742 root only in each case in these cases to the symbol concerned. With a weighting
743 of unity for all operators the complexity evaluation even corresponds to
744 the number of paths to the instances of a variable.
745 <br>The procedure can be verified easily on the basis of examples. If all
746 operator weights are set equal unity, then it results for the printouts
747 in figure 1.8a) and b) complexities of b = 1 for the variable a and b =
748 2 for the variable c. This corresponds with the fact that the variable
749 a is contained in exactly one page of the tree, while the symbol c at two
750 positions is to be found.
751 <br>1.5.3 list of the solution sequence
752 <br>By different combining and weights of the appraisal procedures discussed
753 above develops different strategies for the list of solution orders. The
754 strategy named MinVarPathsFirst, implemented in the program developed in
755 this work, represents a combination of the criterion 2 and the complexity
756 evaluation by means of operator weighting. The equations, which contain
757 looked up variables at exactly in each case one position, receive highest
758 priority in the solution order, whereby within this group according to
759 smallest weight of the operator trees one sorts. All remaining pairs of
760 equation/variables are likewise arranged, according to smallest tree weight,
761 placed to the end of the solution sequence. Therefore in the case of the
762 two printouts in figure 1,8 would be first tried to resolve the equation
763 with the tan function after the variable a although for it a higher evaluation
764 was calculated than for the accompanying printout concerning the variable
766 <br>
767 <br>
768 Chapters 2 the Solver
769 <br>2.1 the structure of the Solvers
770 <br>The request, in particular the points 4, set up in the paragraph 1,3,
771 5 and 7, put in figure 2,1 schematically represented the structuring equations
772 solvers into five to a large extent independent main modules close [TRI
773 91]. Constructing on this structure and the heuristic algorithms described
774 in the preceding section in the context of the available work the Macsyma
775 program complex SOLVER was developed for the functionality extension of
776 the Macsyma functions SOLVE and LINSOLVE.
777 <br>The function of the module Solver Preprocessor are general, preparing
778 work like the check of the command syntax and semantics and the structure
779 internal data structures, in addition, the execution of an introductory
780 consistency check. With their it is to be determined whether the set of
781 equations directly contains number = number or obligation conditions between
782 parameters of the form as contradictory awarding predicates.
783 <br>The Immediate Assignment Solver searches the set of equations before
784 the call linear of the Solvers for direct assignments of the form var =
785 const. or const. = var and executes these immediately, so that the cost
786 of computation necessary for the following Programmodule is kept as small
787 as possible.
788 <br>The linear Solver is a Pre and a post processor for the Macsyma function
789 LINSOLVE for the simultaneous solution of linear sets of equations. The
790 module extracts linear section sets of equations according to the heuristic
791 algorithm described in paragraph 1,4,2 and solves the equations by call
792 of LINSOLVE. The determined solutions are inserted before leaving linear
793 the Solvers into the remaining equations.
794 <br>The Valuation Solver is the core module of the Solvers. Its functions
795 are the use of evaluation strategies for the generation of the solution
796 sequences and the solution of the nonlinear equations with the help of
797 the Macsyma internal SOLVE function. In the case of multiple solutions
798 the Valuation Solver checks each single solution for consistency with the
799 remainder set of equations. Inconsistent solutions are rejected, while
800 valid solutions are inserted into the remainder set of equations and the
801 appropriate solution paths separately through recursive of calls of the
802 Valuation Solvers are pursued.
803 <br>All for the editing of the solutions to the output to the user necessary
804 step by the Solver Postprocessor are taken over. By this fall the expansion,
805 of the hierarchically organized solution list supplied by the Valuation
806 Solver, the back substitution of the
807 <br>21
808 <br>
809 <br>
810 22 CHAPTERS 2. The SOLVER
811 <br>symbolic solutions as well as picking out, analysing and outputting
812 the variables and assembled printouts asked by the user.
813 <br>Solver Preprocessor:
814 <br>Check of the command syntax
815 <br>preprocessing the equations
816 <br>consistency check
817 <br>Immediate Assignment Solver:
818 <br>Direct allocations look up and execute
819 <br>consistency check
820 <br>Linear Solver: Linear equations look up and solve
821 <br>consistency check
822 <br>Valuation Solver: Evaluation strategy
823 <br>nonlinear equation solve
824 <br>consistency check
825 <br>multiple solutions apply recursively pursue
826 <br>Solver Postprocessor: Back substitution
827 <br>editing and output of the results
828 <br>Figure 2.1: Structure of the Solvers
829 <br>
830 <br>
831 2.2. The MODULES OF THE SOLVERS 23
832 <br>2,2 The Modules of the Solvers
833 <br>2,2,1 the Solver Preprocessor
834 <br>SOLVER PREPROCESSOR
835 <br>Check of the command syntax and semantics
836 <br>structure of the internal equations, variable and parameter lists
837 <br>consistency check
838 <br>SolverSubstPowers = TRUE?
839 <br>Search system for multiples of basic powers and replace if necessary
840 <br>set variables
841 <br>END
842 <br>figure 2.2: Flow chart of the Solver Preprocessors
843 <br>Beside the examination of the command syntax and semantics as well
844 as the structure of the internal equations -, variable and parameter lists
845 executes the Solver Preprocessor a consistency check of the equations,
846 whose flow diagram is represented in figure 2,3. Target of the consistency
847 check is it to detect from the beginning whether the set of equations is
848 unsolvable due to direct contradictions. Such contradictions can occur
849 to e.g. 0 = 1 in form of pure number equations, in addition, in the form
850 of obligation conditions between as parameters defined symbols.
851 <br>In order to uncover direct contradictions, the routine searches the
852 set of equations to the consistency check for equations, which consist
853 exclusively of values of the number or values of the number and parameters,
854 but contain no variables.&nbsp; If a contradictory number equation is found,
855 then the Solver Preprocessor aborts immediately. If such an equation is
856 against it consistently, as for example 0 = 0, it is removed from the set
857 of equations, since it is not the solubility and solution of the system
858 influenced and thus redundant.
859 <br>The handling of parameter obligation conditions is somewhat more complex.
860 Assumed, the symbols A and B were defined as parameters of a set of equations,
861 which contains the equation A + B = 1 (2.1).
862 <br>
863 <br>
864 24 CHAPTERS 2. THE SOLVER
865 <br>CONSISTENCY CHECK
866 <br>all equations checked?
867 <br>get equation from list
868 <br>does the equation contain variables?
869 <br>Does the equation contain only and no parameters of numbers?
870 <br>Does a contradiction occur?
871 <br>Does the parameter obligation condition hurt before made acceptance?
872 <br>Remove redundant equation
873 <br>question user about validity of the obligation condition
874 <br>obligation condition of ok? ABORT
875 <br>stores condition in SolverAssumptions
876 <br>figure 2.3: Flow chart of the routine to the consistency check
877 <br>from this condition follows that A and B are not independent parameters
878 and therefore the set of equations is not solvable for any combinations
879 of their values. Since conditioned inconsistencies of this type cannot
880 be excluded with many technical problem definitions, it is not meaningful
881 to abort the solution process in such cases easily it is, the parameters
882 equation contradicts for its part again different obligation conditions
883 in the set of equations. The decision, whether a parameter obligation condition
884 is to be regarded as admissible, is delegated therefore by the consistency
885 check to the user. In the case of the equation (2.1) the system asks in
886 the following way for the validity of the condition:
887 <br>Is B + A - 1 positive, negative, or zero?
888 <br>Becomes the question with p; or n; (positive or negative) answers,
889 then the Solver aborts. The response reads against it z; (zero), then the
890 consistency check stores the obligation condition in a global list named
891 SolverAssumptions, those after the Solver run examined
892 <br>
893 <br>
894 2.2. The MODULES OF THE SOLVERS 25
895 <br>will can. Subsequently, the consistency check removes the redundant
896 equation from the system. 2,2,2 the Immediate Assignment Solver
897 <br>IMMEDIATE ASSIGNMENT SOLVER
898 <br>all equations&nbsp; searched?
899 <br>Equation out of list take
900 <br>variable list update
901 <br>has the equation the form var=const. or const.=var?
902 <br>Solutions begin
903 <br>are var already in the solution list?
904 <br>Consistency check
905 <br>adds var=const the solution list in addition removes equation from
906 the list
907 <br>figure 2.4: Flow chart of the Immediate Assignment Solvers
908 <br>the function of the Immediate Assignment Solvers consists of it, the
909 set of equations after direct allocations of the form var = const. to search
910 and to use such equations directly for the elimination of the betrenden
911 variables. With by machine set up sets of equations, as for instance in
912 the example 1,2, necessary cost of computation can be often reduced considerably
913 by such preprocessing the equations the linear equations in linear the
914 Solver, for the extraction and solution.
915 <br>The Immediate Assignment Solvers filters all direct allocations in
916 a loop first var = const. and const. = var from the system off and stores
917 it in the form var = const. in the solution list, if a solution for var
918 there is entered not already. Subsequently, the set of equations with the
919 solution list is analysed and checked again for consistency.
920 <br>
921 <br>
922 26 CHAPTERS 2. THE SOLVER
923 <br>2.2.3 The linear Solver
924 <br>The flow linear of the Solvers begins, as in paragraph 1.4.2 described,
925 with the list of the complete coefficient matrix of the symbolic set of
926 equations. On the basis this coefficient matrix the evaluation matrix is
927 created, which serves for the extraction linear section set of equations.
928 As long as the evaluation matrix contains still one elements, i.e. P S
929 6 = 0 and P Z 6 = 0, is applied the described heuristic evaluation strategy,
930 which decides on it, which nonlinear equation is removed or which in nonlinear
931 sense occurring variable on the right side of the equation is brought.
932 <br>If the evaluation matrix was reduced to a zero-matrix, then a list
933 of the remaining (linear) equations and a list of the linear variables
934 are created, which can be transferred to the Macsyma instruction LINSOLVE
935 serving for the solution of linear sets of equations as function parameters.
936 For efficiency increase before the call of LINSOLVE however still another
937 special feature is considered, which was not mentioned during the description
938 of the extraction algorithm. Occasionally it can occur that with the deleting
939 of a nonlinear equation the only instance of a linear variable is removed
940 at the same time xj from the entire evaluation matrix, without this was
941 noticed directly. Likewise equations can develop, which are no longer nonlinear
942 concerning as linear detected variables, but this variables any longer
943 do not contain, i.e. the appropriate coefficients are directly zero. Therefore
944 again all linear variables become before the solution of the linear subsystem
945 thereupon it checks whether they are contained in the linear equations
946 still, and only the subset of the extracted equations is passed on to LINSOLVE,
947 which contain actually at least one of the linear variable. That would
948 be linear Solver also able to solve the set of equations without these
949 additional measures but frequently unnecessary cost of computation can
950 be saved by it.
951 <br>In paragraph 14.3 it was demonstrated that with the solve of over-certain
952 linear sets of equations inconsistencies can occur, which mean not necessarily
953 the insolubility of the set of equations. If such contradiction equations
954 become, e.g. the right side of equation (1.71), discovers 1, then they
955 are submitted, as at the beginning of the entire set of equations, of the
956 consistency checking. If the contradiction equations prove as true inconsistencies,
957 then the total system does not have a solution, and that linear Solver
958 aborts with an appropriate error message. If the contradiction equations
959 contain against it still looked up variables, then they are removed for
960 the remainder set of equations from the linear set of equations and added
961 as new obligation conditions. Thereupon LINSOLVE with the linear independent
962 part of the equations is again called (inconsistencies to be able with
963 the second run any longer not to occur).
964 <br>If the linear equations were successfully solved, then the solutions
965 are inserted into the remainder set of equations and the list of the looked
966 up variables updates. Latter meant that all variables, for which by linear
967 the Solver a solution was found it are removed from the list, while new
968 variables, which are contained in these solutions, are added the list.
969 <br>1 That access to the contradiction equations is from the outside not
970 possible on use of the standard design LINSOLVE commands.&nbsp; Therefore
971 one was necessary on Lisp level particularly modified version of the instruction,
972 those by Jeffrey P. Golden, Macsyma, Inc. (the USA), on request kindly
973 was made available.
974 <br>
975 <br>
976 2.2. The MODULES OF THE SOLVERS 27
977 <br>LINEAR SOLVER
978 <br>complete coefficient matrix set up
979 <br>evaluation matrix set up
980 <br>sigma S = sigma Z = 0?
981 <br>Heuristic apply: Line or column of the evaluation matrix
982 <br>deletes list of the remaining equations
983 <br>and variables sets up
984 <br>line and column totals sigma S and sigma Z
985 <br>updates linear equations with LINSOLVE solves
986 <br>set of equations inconsistently?
987 <br>Consistency check to right side of the extended coefficient matrix
988 apply
989 <br>genuine contradiction found?
990 <br>Solutions into remaining equations use
991 <br>variable list update
992 <br>" inconsistent one " equations remove
993 <br>Abort
994 <br>figure 2.5: Flow chart linear of the Solvers
995 <br>
996 <br>
997 28 CHAPTERS 2. THE SOLVER
998 <br>2.2.4 The Valuation Solver
999 <br>The Valuation Solver checks first whether equations and variables still
1000 which can be solved are available. If this is the case, then for the remaining
1001 equations two evaluation stencils are set up, which serve the solution
1002 sequence as basis for the list. Both stencils have the dimensions n*m,
1003 whereby n is the number of the equations and m the number of variables
1004 at the moment looked up. The first matrix, the variable path matrix, enhaelt
1005 for each equation the number of variable paths (see paragraph 1.5.2) concerning
1006 each variable. The second matrix is the evaluation matrix. Their items
1007 are calculated by the heuristic operator tree evaluations of each equation
1008 concerning each variable.
1009 <p>To these two stencils afterwards one is applied - depending whether
1010 a internal or user-defined&nbsp; evaluation strategy is desired, which
1011 arranges the pairs of equation/variables in such a way that the first items
1012 are in this list as promising a candidates for a following solution attempt
1013 as possible by means of the SOLVE instruction.
1014 <p>As long as yet all proposals for solution in the list and no correct
1015 solution for one of the suggestions were not tried be calculated could,
1016 on the basis the determined solution order the next equation from the equation
1017 list is selected and tried to solve. This succeeds not, becomes, if available,
1018 one or more user-defined transformation functions for the shaping of the
1019 equation applied and renewed in each case solution attempts made. Even
1020 if these are without result, the next proposal for solution is tried.
1021 <p>At all none of the equations is solvable after any variable more, then
1022 the Valuation Solver returns the unresolved equations in implicit form
1023 additionally to all solutions found up to this point, so that this with
1024 a numeric procedure can be treated possibly later. With a successful solution
1025 attempt all single solutions (nonlinear equations to be able multiple solutions
1026 to have) are checked separately for consistency with the remaining equations.
1027 Those solutions, which lead to contradictory predicates, are rejected and
1028 with them the appropriate solution path.
1029 <p>If check a solution does not remain after the consistency, then the
1030 set of equations is inconsistent, and the Valuation Solver aborts. Exactly
1031 if one solution remains, then this is attached to the solution list and
1032 inserted into the remaining equations. Finally the list of the looked up
1033 variables is updated, as the variable just calculated is removed from it
1034 and in the solution contained, new variable is if necessary added. The
1035 latter variables can be, which not when parameters in addition, not when
1036 up were looked indicated. The main solution loop of the Valuation Solvers
1037 begins then again from the front.
1038 <p>With consistent multiple solutions all solution paths must be pursued
1039 separately. In addition the Valuation Solver with the remaining equations
1040 calls itself and variables for each single solution recursively and stores
1041 the gotten back results in a hierarchically structured solution list. Their
1042 expansion is function of the Solver Postprocessors described in the next
1043 paragraph.
1044 <br>
1045 <br>
1046 2.2. The MODULES OF THE SOLVERS 29
1047 <br>VALUATION SOLVER
1048 <br>Still equations remaining?
1049 <br>All variables solved?
1050 <br>evaluation stencils set up
1051 <br>evaluation strategy apply, to the solution sequence generate
1052 <br>still proposals for solution remaining?
1053 <br>Equation from list unresolved
1054 <br>equations at solution list get attach
1055 <br>attempts to solve equation
1056 <br>solution attempt successfully?
1057 <br>Shaping apply?
1058 <br>Consistency of all single solutions
1059 <br>check equation transform
1060 <br>inconsistent solutions
1061 <br>reject more than one solution?
1062 <br>Figure 2.6: Flow chart of the Valuation Solvers (part of 1)
1063 <br>
1064 <br>
1065 30 CHAPTERS 2. THE SOLVER
1066 <br>&nbsp;all solution paths pursues?
1067 <br>hierarchical solution list
1068 <br>single solution use
1069 <br>variable list update
1070 <br>Valuation Solver update recursively call
1071 <p>no solution remaining?
1072 <br>Solution list update solution
1073 <br>use variable list update
1074 <br>Figure 2.7: Flow chart of the Valuation Solvers (part of 2)
1075 <br>
1076 <br>
1077 2.2. THE MODULES OF THE SOLVERS 31
1078 <br>2.2.5 the Solver Postprocessor
1079 <br>SOLVER POSTPROCESSOR
1080 <br>hierarchical solution list expand
1081 <br>unresolved equations abfiltern
1082 <br>back substitution required?
1083 <br>Back substitution
1084 <br>back substitution partly execute
1085 <br>look-ups variables and printouts with the solutions execute analyse
1086 <br>unresolved equations add
1087 <br>Figure 2.8: Flow chart of the Solver Postprocessors
1088 <p>The Valuation Solver in the case of multiple solutions of nonlinear
1089 equations because of the recursive pursuit of the solution paths a hierarchically
1090 structured result list as function value supplies, must do the Solver Postprocessor
1091 at the beginning the list hierarchy outer eyes there, so that the back
1092 substitution can be executed.
1093 <p>If not all equations could be solved within a solution path symbolically,
1094 then the result list contains the list of the remaining, unresolved nonlinear
1095 equations additionally to the variables, for which a solution was found.
1096 This will provisionally removed from the equation list and buffered, in
1097 order to the final result to be added later.
1098 <p>Depending upon desire of the user takes place afterwards the back substitution
1099 of the set of equations, which is present up to this point in time still
1100 in upper triangle form. In addition the solution list is analysed so long
1101 iterative with itself, until no modification of the results is to be registered
1102 more. Even if the back substitution by the user, it is not required to 2
1103 nevertheless executed, but only so far, as necessary is, in order to eliminate
1104 everything in the instruction line not indicated variables from the solutions.
1105 Is e.g. a set of equations
1106 <p>2 this requires the allocation of the option variable SolverBacksubst
1107 with FALSE (see paragraph 2.4)
1108 <br>
1109 <br>
1110 32 CHAPTERS 2. THE SOLVER
1111 <br>in the variables x, y, z and w only after the variables x and y to
1112 be solve and supplies the solution process the triangle form
1113 <br>x = f1(y; z; w) (2.2)
1114 <br>y = f2(z; w) (2.3)
1115 <br>w = f3(z) (2.4)
1116 <br>z = const.; (2.5)
1117 <br>in such a way the complete back substitution leads to the result
1118 <br>x = const. (2.6)
1119 <br>y = const. (2.7)
1120 <br>With switched off complete back substitution against it the two equations
1121 <br>x = g(y) (2.8)
1122 <br>y = const. (2.9)
1123 <br>are returned, the internal variables z and w any longer do not contain,
1124 but are coupled by the variable y further among themselves.
1125 <br>After termination of the back substitution and the analysis of the
1126 assembled printouts with the solutions, indicated in the variable list
1127 of the command line, at the beginning of abge filtered, again to the solution
1128 list attached unresolved equations. The finished solution list is then
1129 transferred as function value to the user.
1130 <br>2.3 Application of the Solvers
1131 <br>2.3.1 Command syntax
1132 <br>The call of the Solvers from the Macsyma echelon of command with the
1133 syntax
1134 <br>Solver(equation list, variable list, parameter list)
1135 <br>or, if the set of equations which can be solved does not contain parameters,
1136 also with Solver(equation list, variable list).
1137 <br>The equation list is a list of Macsyma objects, for which EquationP
1138 is equal to TRUE. The set of equations (1.55)-(1.57) is thus indicated
1139 in the following way:
1140 <br>(COM5) Equations:
1141 <br>[
1142 <br>x + 2*y - z = 6,
1143 <br>2*x + y*z - z^2 = -1,
1144 <br>3*x - y + 2*z^2 = 3
1145 <br>] $
1146 <p>the unknown variables the Solver likewise indicated in form of a list,
1147 e.g. as
1148 <br>
1149 <br>
1150 2.3. APPLICATION OF THE SOLVERS 33
1151 <br>[ x, y, z ]
1152 <br>for the above-mentioned set of equations. Beside purely atomic variable
1153 symbols (SymbolP) the variable list may contain printouts also assembled
1154 in the looked up unknown quantities. For the set of equations not explicitly
1155 if the variables x, y and z, are looked but rather x and the value up sin(ssyz),
1156 then the variable list reads
1157 <br>[ x, sin(%pi*y*z) ].
1158 <br>The parameter list may against it excluding atomic symbols contain,
1159 thus only objects, for the SymbolP equal TRUE is. Assembled printouts are
1160 here neither admissible nor meaningfully.
1161 <p>2.3.2 Special features of the syntax of equations
1162 <br>Here is referred to some differences of the command syntax in the comparison
1163 with the admissible call forms of the Macsyma internal SOLVE function.
1164 The latters may be transferred the equations also to in Expression form,
1165 i.e. as printouts with EquationP = FALSE, which are understood implicitly
1166 as equations of the form Expression = 0:
1167 <br>[
1168 <br>x + 2*y - z - 6, illegally
1169 <br>2*x + y*z - z^2 + 1,
1170 <br>3*x - y + 2*z^2 - 3
1171 <br>] $
1172 <p>This form of the equation representation one uses internally, e.g. by
1173 the Valuation Solver, but is not not permitted it with the call of the
1174 Solvers in the command line. Furthermore the SOLVE function permits an
1175 omitting of the list brackets around the arguments, if only one equation
1176 and/or only one variable are to be transferred. Also this is not admissible
1177 with the use of the Solvers.
1178 <p>2.3.3 Example calls of the Solvers
1179 <p>Example 2.1
1180 <p>Of in COM5 input the set of equations a correct call of the Solvers
1181 is the instruction in the command line COM7. The specification of the calculated
1182 solutions effected in form of a list from solution lists, see output line
1184 <p>(COM6) to MsgLevel: to ' DETAIL$ / * see paragraph 2,4 * /
1185 <p>(COM7) Solver(Equations, [ x, y, z ]);
1186 <p>Outputs of the Solver Preprocessors:
1187 <p>The variables to solved for are [ X, Y, Z ]
1188 <br>Checking for inconsistencies...
1189 <br>
1190 <br>
1191 34 CHAPTERS 2. THE SOLVER
1192 <p>... none found.
1193 <p>Outputs of the Immediate Assignment Solvers:
1194 <br>Searching for immediate assignments.
1195 <br>No immediate assignments found.
1196 <p>Outputs of the Linear Solvers:
1197 <br>Searching for linear equations...
1198 <br>... with respect to: [ X, Y, Z ]
1199 <br>Found 2 linear equations in 2 variables.
1200 <br>The variables to solved for are [ X, Y ]
1201 <br>The equations are [ - Z + 2 Y + X - 6, 2 Z^2 - Y + 3 X - 3 ]
1202 <br>Solving linear equations.
1203 <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1204 4 Z^2 - Z - 12&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1205 2 Z^2 + 3 Z + 15
1206 <br>The solutions are [ X = - ---------------, Y = - -------------------]
1207 <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1208 7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1210 <br>Searching for linear equations...
1211 <br>... with respect to: [ Z ]
1212 <br>No linear equations found.
1213 <br>Outputs of the Valuation Solvers:
1214 <br>Checking for remaining equations.
1215 <br>1 equation(s) and 1 variable (s) left.
1216 <br>The variables to solved for are [ Z ]
1217 <br>Trying to solve equation 1 for Z
1218 <p>Is not needed here a complexity evaluation,
1219 <br>because there is only one equation and a variable remaining.
1220 <br>Valuation: (irrelevant)
1221 <br>The equation is 2 Z^3 - 12 Z^2 + 17 Z + 31 = 0
1222 <br>Checking if equation was solved correctly.
1223 <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1224 SQRT(13) %i - 7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SQRT(13) %i +
1226 <br>The solutions are [ Z = - -------------------, Z = ---------------------,
1227 Z = - 1 ]
1228 <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1229 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1231 <br>Solution is correct.
1232 <p>Individual consistency check with multiple solutions:
1233 <br>The solution is NOT unique. Tracing paths separately.
1234 <br>Solution 1 for Z
1235 <br>Checking for inconsistencies...
1236 <br>... none found.
1237 <br>Solution 2 for Z
1238 <br>Checking for inconsistencies...
1239 <br>... none found.
1240 <br>Solution 3 for Z
1241 <br>
1242 <br>
1243 2.3. APPLICATION OF THE SOLVERS 35<tt></tt>
1244 <p><tt>Checking for inconsistencies...</tt>
1245 <br><tt>... none found.</tt>
1246 <br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1247 SQRT(13)%i - 7&nbsp;&nbsp;&nbsp;&nbsp; SQRT(13)%i + 7</tt>
1248 <br><tt>Consistent solutions for Z: [ Z = - --------------, Z =-------------,</tt>
1249 <br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1250 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1251 2</tt>
1252 <br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1253 Z = - 1 ]</tt>
1254 <br>Recursive pursuit of all three solution paths:
1255 <br><tt>Checking for remaining equations.</tt>
1256 <br><tt>All variable solved for. No equations left.</tt>
1257 <br><tt>Checking for remaining equations.</tt>
1258 <br><tt>All variable solved for. No equations left.</tt>
1259 <br><tt>Checking for remaining equations.</tt>
1260 <br><tt>All variable solved for. No equations left.</tt><tt></tt>
1261 <p>Outputs of the Solver Postprocessors:
1262 <br><tt>Post processing results.</tt>
1263 <br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 27SQRT(13)%i-41&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1264 17SQRT(13)%i-87</tt>
1265 <br><tt>(D7) [[X = ---------------, Y = - ---------------,</tt>
1266 <br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1267 14&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1268 14</tt>
1269 <br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SQRT(13)%i-7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1270 27SQRT(13)%i+41&nbsp;&nbsp;&nbsp;&nbsp; 17SQRT(13)%i+87</tt>
1271 <br><tt>Z = - ------------], [ X = - ---------------, Y =---------------,</tt>
1272 <br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1273 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1274 14&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1275 14</tt>
1276 <br><tt>&nbsp;&nbsp;&nbsp; SQRT(13)%i+7</tt>
1277 <br><tt>Z = ------------], [ X = 1, Y = 2, Z = - 1 ]]</tt>
1278 <br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2</tt>
1279 <p>To the better outline follows the result again in the TEX-record:
1280 <p>Example 2.2
1281 <br>As the second example is the set of equations parameterized in a and
1283 <br>&nbsp;&nbsp;&nbsp; ax + y^2 = 1&nbsp; (2.13)
1284 <br>&nbsp;&nbsp;&nbsp; bx - y&nbsp;&nbsp;&nbsp; =&nbsp; -1 (2.14)
1285 <br>
1286 <br>
1287 36 CHAPTERS 2. THE SOLVER
1288 <br>after the variables x and y as well as zusamm the set printout x/y
1289 to be solve. Since the set of equations does not contain direct allocations
1290 and a repeated search for linear equations in this case is not meaningful,
1291 the Immediate Assignment Solver and the repetition loop linear of the Solvers
1292 with the instruction COM8 are switched off:
1293 <br><tt><font size=+1>(COM8) SolverImmedAssign: SolverRepeatLinear: FALSE$</font></tt>
1294 <br><tt><font size=+1>(COM9) ParEq: [ 3*a*x + y^2 = 1, b*x - y = -1 ] $</font></tt>
1295 <br><tt><font size=+1>(COM10) Solver(ParEq, [ x, y, x/y ], [ a, b ]);</font></tt><tt><font size=+1></font></tt>
1296 <p><tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1297 X</font></tt>
1298 <br><tt><font size=+1>The variable to solved for AR [ X, -, Y ]</font></tt>
1299 <br><tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1300 Y</font></tt>
1301 <br><tt><font size=+1>The parameters are [ A, B ]</font></tt>
1302 <br><tt><font size=+1>Checking for inconsistencies...</font></tt>
1303 <br><tt><font size=+1>... none found.</font></tt>
1304 <br><tt><font size=+1>Trying to solve for [ X, Y ]</font></tt>
1305 <br><tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1306 X</font></tt>
1307 <br><tt><font size=+1>in order to solve for the expression -</font></tt>
1308 <br><tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1309 Y</font></tt>
1310 <br><tt><font size=+1>Searching for linear equations...</font></tt>
1311 <br><tt><font size=+1>... with respect to: [ X, Y ]</font></tt>
1312 <br><tt><font size=+1>Found 1 linear equations in 2 variables.</font></tt>
1313 <br><tt><font size=+1>The variables to solved for are [ X, Y ]</font></tt>
1314 <br><tt><font size=+1>The equations are [ - Y + B X + 1 ]</font></tt>
1315 <br><tt><font size=+1>Solving linear equations.</font></tt>
1316 <br><tt><font size=+1>The solutions are [ Y = B X + 1 ]</font></tt><tt><font size=+1></font></tt>
1317 <p><tt><font size=+1>Checking for remaining equations.</font></tt>
1318 <br><tt><font size=+1>1 equation(s) and 1 variable (s) left.</font></tt>
1319 <br><tt><font size=+1>The variable to solved for are [ X ]</font></tt>
1320 <br><tt><font size=+1>Trying to solve equation 1 for X Valuation: (irrelevant)</font></tt>
1321 <br><tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1322 2 2</font></tt>
1323 <br><tt><font size=+1>The equation is B X + (2 B + 3 A) X = 0</font></tt>
1324 <br><tt><font size=+1>Checking if equation which solved correctly.</font></tt>
1325 <br><tt><font size=+1>2 B + 3 A</font></tt>
1326 <br><tt><font size=+1>The solutions are [ X = -, X = 0 ]</font></tt>
1327 <br><tt><font size=+1>2 B</font></tt>
1328 <br><tt><font size=+1>Solution is correct.</font></tt>
1329 <br><tt><font size=+1>The solution is not unique.</font></tt>
1330 <br><tt><font size=+1>Tracing paths separately.</font></tt>
1331 <br><tt><font size=+1>Solution 1 for X</font></tt>
1332 <br><tt><font size=+1>Checking for inconsistencies...</font></tt>
1333 <br><tt><font size=+1>... none found.</font></tt>
1334 <br><tt><font size=+1>Solution 2 for X</font></tt>
1335 <br><tt><font size=+1>Checking for inconsistencies...</font></tt>
1336 <br>
1337 <br>
1338 2.4. The OPTIONS OF THE SOLVERS 37
1339 <br><tt>... none found.</tt>
1340 <br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1341 2 B + 3 A</tt>
1342 <br><tt>Consistent solutions for X: [ X = - ---------, X = 0 ]</tt>
1343 <br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1344 2</tt>
1345 <br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1346 B</tt>
1347 <br><tt>Checking for remaining equations.</tt>
1348 <br><tt>All variable solved for. No equations left.</tt>
1349 <br><tt>Checking for remaining equations.</tt>
1350 <br><tt>All variable solved for. No equations left.</tt>
1351 <br><tt>Post processing results.</tt>
1352 <br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1353 2B+3A&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B + 3A&nbsp; X&nbsp;&nbsp;
1354 2B + 3A&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1355 X</tt>
1356 <br><tt>(D10) [[ X = - ------, Y = - ------, - = --------], [X = 0, Y =
1357 1, - = 0]]</tt>
1358 <br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1359 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B&nbsp;&nbsp;&nbsp;&nbsp;
1360 Y&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1361 Y</tt>
1362 <br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1363 B&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1364 B + 3AB</tt>
1365 <p>2.4 The options of the Solvers
1366 <br>Of the Macsyma echelon of command (Macsyma toplevel) or from program
1367 tapes the behavior of the Solvers can be usst by the non-standard allocation
1368 of a set of option variable in, which is listed and described in the following.
1369 The standard mappings designated in the program represent the values or
1370 symbols indicated behind the names of the option variables in pointed parentheses,
1371 which are set automatically accordingly on first of the module SOLVER.
1372 <p>MsgLevel &lt; SHORT > (message level) controls the range of the display
1373 messages output during the program run. The allocations OFF, SHORT and
1374 DETAIL are admissible. Becomes MsgLevel: OFF set, then all program outputs
1375 are completely suppressed. In the case of an allocation with SHORT status
1376 information is only output for the pursuit of the program run. The keyword
1377 DETAIL against it causes additionally the output of all of the Solver modules
1378 calculated intermediate results and as soon as of messages over the decisions
1379 made due to the heuristics.
1380 <p>SolverImmedAssign &lt; TRUE > switches the Immediate on Assignment Solver
1381 (TRUE) or out (FALSE). If the module is switched on, then before the call
1382 linear of the Solvers the set of equations is searched for direct allocations
1383 of the form var = const. or const. = var, which can be inserted immediately
1384 into the remaining equations.
1385 <p>SolverRepeatImmed &lt; TRUE > determines whether the Immediate Assignment
1386 Solver is called repeated (TRUE), until no more direct allocations are
1387 found, or whether only one call takes place (FALSE).
1388 <p>SolverSubstPowers &lt; FALSE > (substitute powers) controls the handling
1389 of variables, which occur to a basic power p0 2 IN n f 1 g in powers pk
1390 integral multiples pk = kp0, k 2 IN. The set of equations contains e.g.
1391 the variable x exclusively in the powers x 2, x 4, x 6,: i.e. p0 = 2, then
1392 becomes with SolverSubstPowers: TRUE x p0 = x 2 by
1393 <br>
1394 <br>
1395 38 CHAPTERS 2. THE SOLVER
1396 <br>new variable symbol X2 substitutes, that thus only in the powers X2,
1397 X2 2, X2 3,: occurs. In this way the degree of the equations which can
1398 be solved and the solution variety which can be expected reduce. Is however
1399 if necessary a rework of the solutions necessary.
1400 <p>SolverInconsParams &lt; ASK > (parameter handling inconsistent) beein
1401 usst the behavior of the routine to the consistency check. Admissible allocations
1402 are ASK, BREAK and IGNORE. During the consistency if check a dependency
1403 between parameters is discovered, then becomes with SolverInconsParams:
1404 ASK of the users in demand for the validity of the appropriate obligation
1405 condition. This is stored with positive response for later analysis in
1406 the list SolverAssumptions. If dependency is not admissible or if the option
1407 variable with BREAK is occupied, then the solution process is aborted.
1408 An allocation with IGNORE arranges the consistency check to recognize basically
1409 all obligation conditions between parameters as valid as long as these
1410 directly acceptance already made do not contradict.
1411 <p>SolverLinear &lt; TRUE > switches linear the Solver on (TRUE) or out
1412 (FALSE). Switching off is recommended if the set of equations which can
1413 be solved does not contain linear equations or their number in relation
1414 to the number of the nonlinear equations is very small. In these cases
1415 much computing time can be saved through going around linear the Solvers,
1416 since the algorithm is quite complex to the search for linear equations.
1417 <p>SolverRepeatLinear &lt; TRUE > arranges that repeated calls linear of
1418 the Solvers. If the variable is set on FALSE, then that is passed through
1419 linear Solver only once.
1420 <br>SolverFindAllLinearVars &lt; TRUE > decides whether that looks linear
1421 Solver up for max. large linear section set of equations regarding all
1422 available variables (TRUE), or whether only subsystems in the variables
1423 are to be extracted, which are presently/immediately looked up during the
1424 solution process (FALSE). The allocation of the variables plays particularly
1425 a role if under-certain sets of equations are to be solved. Here SolverFindAllLinearVars
1426 should: FALSE to be set, because otherwise no solutions for the originally
1427 interesting variables can possibly be found due to the too small number
1428 of equations. With the allocation FALSE it is guaranteed that first after
1429 these variables it is solve and the degrees of freedom in other unknown
1430 quantities are expressed.
1431 <p>SolverValuationStrategy &lt; MinVarPathsFirst > contains the name of
1432 the function, which from the variable path matrix and the evaluation matrix
1433 a solution sequence generated (see paragraph 2,7). The call of the function
1434 occurs within the Valuation Solvers with:
1435 <p><tt>SolveOrder: Apply(</tt>
1436 <br><tt>SolverValuationStrategy, [ VarPathMatrix, ValuationMatrix ]</tt>
1437 <br><tt>)</tt>
1438 <p>as function value is expected a list of the form
1439 <p><tt>[ [ i1, j1, b1 ], [ i2, j2, b2 ], ... ]</tt>
1440 <p>how it was described in paragraph 1.5.2. To consider here the option
1441 variable is SolverMaxLenValOrder.
1442 <br>
1443 <br>
1444 2.4. The OPTIONS OF THE SOLVERS 39
1445 <br>SolverDefaultValuation &lt; 10 > determines the quality factor for
1446 operators, to who explicitly such a factor with the set prop. instruction
1447 was not assigned (see paragraph 2.6).
1448 <p>SolverMaxLenValOrder &lt; 5 > (maximum length OF valuation order) determines
1449 the max. length of the solution sequence. Even if the last proposal for
1450 solution in the list does not lead to success, then the Valuation Solver
1451 aborts the solution process, even if yet all pairs of equation/variables
1452 were not tried one after the other.
1453 <p>SolverTransforms &lt; [ ] > contains a list of the names of functions,
1454 which can be applied after a unsuccessful solution attempt to the betrende
1455 equation, in order to increase the solution chances with a renewed attempt.
1456 The functions are executed thereby in the order of their occurring in the
1457 list. After each function call directly the next solution attempt takes
1458 place. Even if this fails, then the next transformation in the list is
1459 applied, as long as to the equation could be solve or no further transformation
1460 is more available. Since the manipulation possibilities with the transformations
1461 are quite extensive, is a specification of their definition and application
1462 in paragraph 2.5.
1463 <p>SolverPostprocess &lt; TRUE > switches the Solver on Postprocessor (TRUE)
1464 or out (FALSE). In switched off status the hierarchical result list of
1465 the Solvers without rework is returned, thus without expansion, back substitution
1466 and extraction of the variables inquired by the user. This control variable
1467 serves Debug purposes primarily.
1468 <p>SolverBacksubst &lt; TRUE > (back substitution) determines whether the
1469 Solver Postprocessor is to execute a back substitution of the set of equations
1470 brought on triangle form (TRUE) or not (FALSE). If the calculated symbolic
1471 solutions are very extensive, then it is often meaningful to execute no
1472 complete back substitution but some the looked up variables as functions
1473 of other calculated unknown quantities to output.
1474 <p>SolverDispAllSols &lt; FALSE > (display all solutions) points, if on
1475 TRUE set, the Solver on to output for the termination of the solution process
1476 all found solutions and not only on the variables indicated by the user.
1477 <p>SolverRatSimpSols &lt; TRUE > (by form rationally simplifications on
1478 solutions) instructs the Solver Postprocessor to simplify the results before
1479 the output again with the instruction FullRatSimp.
1480 <p>SolverDumpToFile &lt; FALSE > compelled when desired (TRUE) the Valuation
1481 Solver to write after each successful solution attempt all gefundenden
1482 solutions as well as the remaining equations and variables into a Macsyma
1483 batch file whose name is contained in the option variable SolverDumpFile.
1484 This option is intended for extensive problems, in which Macsyma is inclined
1485 with acute lack of main and Swap memory to system crashes. At least a part
1486 of the results can be saved by the storage of the intermediate results
1487 with a crash.
1488 <p>SolverDumpFile &lt; " SOLVER.dmp " > contains the name of the file,
1489 into which the intermediate results are to be written.
1490 <br>
1491 <br>
1492 40 CHAPTERS 2. THE SOLVER
1493 <br>2.5 definition and integration of user specific transformation routines
1494 <br>Encounters not rarely the Valuation Solver during the solution process
1495 equations, which it is not able to solve, although already some simple
1496 shapings or summaries could help, in order the desired result to receive.
1497 Like that the SOLVE function is e.g. not in a the position to resolve the
1498 equation
1499 <br>x + sin^2 x + cos^2 x = 1 (2.15)
1500 <br>correctly after x since it does not notice that the square sine and
1501 Cosine terms can be combined easy into 1.
1502 <p>In order to be able to execute depending upon application fitting shapings
1503 of the equations, the dynamic integration of user-defined transformation
1504 functions is intended in the Solver, which are applied if necessary to
1505 unresolved equations. The Valuation Solver transfers among other things
1506 the equation and the variable to these functions, after which the equation
1507 is to be solve. The transformation function has now the function to transform
1508 and return as its function value again to the Solver the equation, so that
1509 a renewed solution attempt can be begun.
1510 <p>The call of a transformation function from the Solver occurs in the
1511 following way:
1512 <p><tt>Transform: CopyList(SolverTransforms).</tt>
1513 <br><tt>:</tt>
1514 <br><tt>SOLVER LOOP</tt>
1515 <br><tt>:</tt>
1516 <br><tt>Trans: Pop(Transform),</tt>
1517 <br><tt>TransEq: Apply(of trans, [ Equation, variable, Solution ])</tt>
1518 <br><tt>:</tt>
1519 <br><tt>LOOP END</tt>
1520 <p>Thereby contains the additionally transferred parameter Solution the
1521 result of the failed solution attempt, on the basis whose possibly helpful
1522 conclusions can be drawn. The following instruction shows an example of
1523 the definition of a simple, user specific transformation routine, which
1524 tries, to make an equation solvable by summary of trigonometric functions:
1525 <p><tt>TransformTrig(Equation, variable, Solution): =</tt>
1526 <br><tt>TrigSimp(Equation) $</tt>
1527 <p>For the integration of the function must be entered their name into
1528 the global list SolverTransforms:<tt></tt>
1529 <p><tt>SolverTransforms: [ ' TransformTrig ] $</tt>
1530 <p>Also the application of a transformation routine there to be unsuccessful
1531 can, exists the possibility of displaying to the Solver the failure of
1532 the shaping attempt by the return of an empty list ([ ]) as function value.
1533 In this way it is prevented that a further call of the
1534 <br>
1535 <br>
1536 2.5. USER SPECIFIC TRANSFORMATION ROUTINES 41
1537 <br>SOLVE function with the same equation takes place. Instead the Solver
1538 tries directly, if available, to execute the next transformation in the
1539 list.
1540 <br>When alternative to the shaping of the equation and following solution
1541 by the internal Solver is it a transformation routine also permitted, to
1542 intend the solutions for the transferred equation and return them in the
1543 form
1544 <br>[ variable = Solution_1, variable = Solution_2... ].
1545 <br>Possible area of application for such functions would be the application
1546 of numeric procedures for the solution of nonlinear equations, which contain
1547 only one variable and no parameters. Or, as the transformation routine
1548 calls a Macsyma BREAK, the equation can be manipulated by hand.
1549 <br>The methodology for the definition and integration of transformation
1550 functions with success acknowledgement is to be demonstrated in the following
1551 by a completely calculated example. To solve the set of equations (2.16)-(2.18)
1552 after the variables x, y and z. the function is quite simple in principle,
1553 but it causes substantial difficulties nevertheless to the Solver.
1554 <br>(2.16)
1555 <br>(2.17)
1556 <br>(2.18)
1557 <p>First the set of equations as equation list as well as the variables
1558 are input:
1559 <p><tt><font size=+1>(COM11) TrigEq:</font></tt>
1560 <br><tt><font size=+1>[ z - sin(x) = 0,</font></tt>
1561 <br><tt><font size=+1>y + z^2 + cos(x)^2 = 5,</font></tt>
1562 <br><tt><font size=+1>y + x = 1</font></tt>
1563 <br><tt><font size=+1>] $</font></tt>
1564 <br><tt><font size=+1>(COM12) Var: [ x, y, z]$</font></tt>
1565 <p>The first solution attempt is to be executed without transformation
1566 functions:
1567 <p><tt><font size=+1>(COM13) SolverTransforms: [ ] $</font></tt>
1568 <br><tt><font size=+1>(COM14) Solver(TrigEq, Var);</font></tt>
1569 <br><tt><font size=+1>The variable to solved for are [ X, Y, Z ]</font></tt>
1570 <br><tt><font size=+1>Checking for inconsistencies...</font></tt>
1571 <br><tt><font size=+1>... none found.</font></tt>
1572 <br><tt><font size=+1>Searching for linear equations...</font></tt>
1573 <br><tt><font size=+1>... with respect to: [ X, Y, Z ]</font></tt>
1574 <br><tt><font size=+1>Found 2 linear equations in 2 variables.</font></tt>
1575 <br><tt><font size=+1>The variables to solved for are [ Y, Z ]</font></tt>
1576 <br><tt><font size=+1>The equations are [ Z - SIN(x), Y + X - 1 ]</font></tt>
1577 <br>
1578 <br>
1579 42 CHAPTERS 2. THE SOLVER
1580 <p><tt><font size=+1>Solving linear equations.</font></tt>
1581 <br><tt><font size=+1>The solutions are [ Y = 1 - X, Z = SIN(x) ]</font></tt><tt><font size=+1></font></tt>
1582 <p><tt><font size=+1>Checking for remaining equations.</font></tt>
1583 <br><tt><font size=+1>1 equation(s) and 1 variable (s) left.</font></tt>
1584 <br><tt><font size=+1>The variable to solved for are [ X ]</font></tt>
1585 <br><tt><font size=+1>Trying to solve equation 1 for X Valuation: (irrelevant)</font></tt>
1586 <br><tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1587 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1588 2</font></tt>
1589 <br><tt><font size=+1>The equation is SIN (x) + COS (x) - X - 4 = 0</font></tt>
1590 <br><tt><font size=+1>Checking if equation was solved correctly.</font></tt>
1591 <br><tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1592 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2</font></tt>
1593 <br><tt><font size=+1>The solutions are [ X = SIN (x) + COS (x) - 4 ]</font></tt>
1594 <br><tt><font size=+1>Solution is not correct.</font></tt>
1595 <br><tt><font size=+1>Cannot solve equation. Giving up.</font></tt><tt><font size=+1></font></tt>
1596 <p><tt><font size=+1>Post processing results.</font></tt>
1597 <br><tt><font size=+1>Cannot determine explicit on solution for X</font></tt>
1598 <br><tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1599 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2</font></tt>
1600 <br><tt><font size=+1>(D14) [[ Y = 1 - X, Z = SIN(x), [ SIN (x) + COS (x)
1601 - X - 4]]]</font></tt><tt><font size=+1></font></tt>
1602 <p>The Solver is able to resolve in the above-mentioned case the equation
1603 with the square sine and Cosine terms not after the variable x and returns
1604 therefore the unresolved equation in implicit form as last item of the
1605 solution list. For the simplification of the equations now two transformation
1606 functions are to be defined and merged. The first transformation serves
1607 the summary of logarithm terms, second for the simplification of printouts,
1608 which contain trigonometric functions. Both functions check whether their
1609 application was successful and returns an empty list, if the transformation
1610 did not cause modification of the equation.
1611 <p><tt><font size=+1>(COM15) TransformLog(Equation, variable, Solution):
1612 = BLOCK(</font></tt>
1613 <br><tt><font size=+1>[ Eq ], Eq: LogContract(Equation),</font></tt>
1614 <br><tt><font size=+1>IF Eq = Equation THEN RETURN([ ])</font></tt>
1615 <br><tt><font size=+1>ELSE RETURN(Eq)</font></tt>
1616 <br><tt><font size=+1>) $</font></tt><tt><font size=+1></font></tt>
1617 <p><tt><font size=+1>(COM16) TransformTrig(Equation, variable, Solution):
1618 = BLOCK(</font></tt>
1619 <br><tt><font size=+1>[ Eq ],</font></tt>
1620 <br><tt><font size=+1>Eq: TrigSimp(Equation),</font></tt>
1621 <br><tt><font size=+1>IF Eq = Equation THEN RETURN([ ])</font></tt>
1622 <br><tt><font size=+1>ELSE RETURN(Eq)</font></tt>
1623 <br><tt><font size=+1>) $</font></tt>
1624 <br>
1625 <br>
1626 2.5. USER SPECIFIC TRANSFORMATION ROUTINES 43
1627 <br>the transformation function TransformLog may be applied basically as
1628 first, therefore the integration of the routines takes place in the order:
1629 <br><tt><font size=+1>(COM17) SolverTransforms: [ ' TransformLog, ' TransformTrig
1630 ] $</font></tt>
1631 <br>now can be begun a new Solver run:
1632 <br><tt><font size=+1>(COM18) Solver(TrigEq, Var);</font></tt>
1633 <br><tt><font size=+1>The variable to solved for are [ X, Y, Z ]</font></tt>
1634 <br><tt><font size=+1>Checking for inconsistencies...</font></tt>
1635 <br><tt><font size=+1>... none found.</font></tt>
1636 <br><tt><font size=+1>Searching for linear equations...</font></tt>
1637 <br><tt><font size=+1>... with respect to: [ X, Y, Z ]</font></tt>
1638 <br><tt><font size=+1>Found 2 linear equations in 2 variable.</font></tt>
1639 <br><tt><font size=+1>The variable to solved for are [ Y, Z ]</font></tt>
1640 <br><tt><font size=+1>The equations are [ Z - SIN(x), Y + X - 1 ]</font></tt>
1641 <br><tt><font size=+1>Solving linear equations.</font></tt>
1642 <br><tt><font size=+1>The solutions are [ Y = 1 - X, Z = SIN(x) ]</font></tt>
1643 <br><tt><font size=+1>Checking for remaining equations.</font></tt>
1644 <br><tt><font size=+1>1 equation(s) and 1 variable (s) left.</font></tt>
1645 <br><tt><font size=+1>The variable to solved for are [ X ]</font></tt>
1646 <br><tt><font size=+1>Trying to solve equation 1 for X Valuation: (irrelevant)</font></tt>
1647 <br><tt><font size=+1>The equation is SIN (x) + COS (x) - X - 4 = 0</font></tt>
1648 <br><tt><font size=+1>Checking if equation which solved correctly.</font></tt>
1649 <br><tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1650 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2</font></tt>
1651 <br><tt><font size=+1>The solutions are [ X = SIN (x) + COS (x) - 4 ]</font></tt>
1652 <br><tt><font size=+1>Solution is not correct.</font></tt>
1653 <p>Here the Solver determines as in the preceded case the fact that it
1654 cannot solve the equation and applies the first transformation in the list
1655 to it.<tt><font size=+1></font></tt>
1656 <p><tt><font size=+1>Applying transformation TRANSFORMLOG</font></tt>
1657 <br><tt><font size=+1>transformation failed.</font></tt><tt><font size=+1></font></tt>
1658 <p>Since the equation does not contain logarithmic functions, the shaping
1659 attempt is not successful. Therefore the second transformation routine
1660 is tried.
1661 <p><tt><font size=+1>Applying transformation TRANSFORMTRIG</font></tt>
1662 <br><tt><font size=+1>The transformation yields - X - 3 = 0</font></tt>
1663 <br><tt><font size=+1>Retrying with transformed equation.</font></tt>
1664 <br><tt><font size=+1>Checking if equation which solved correctly.</font></tt>
1665 <br><tt><font size=+1>The solutions are [ X = - 3 ]</font></tt>
1666 <br><tt><font size=+1>Solution is correct.</font></tt>
1667 <br>
1668 <br>
1669 44 CHAPTERS 2. THE SOLVER
1670 <br><tt><font size=+1>Solution 1 for X</font></tt>
1671 <br><tt><font size=+1>Checking for inconsistencies...</font></tt>
1672 <br><tt><font size=+1>... none found. Consistent solutions for X: [ X =
1673 - 3 ]</font></tt>
1674 <br><tt><font size=+1>Checking for remaining equations.</font></tt>
1675 <br><tt><font size=+1>All variable solved for. No equations left. Post
1676 processing results.</font></tt>
1677 <br><tt><font size=+1>(D18) [ [ X = - 3, Y = 4, Z = - SIN(3)]]</font></tt>
1678 <p>the transformation function TransformTrig succeeds the summary to the
1679 equation, so that the Solver is following able, to intend the correct solution
1680 for the variable x.
1681 <br>2.6 Modification of the operator evaluations
1682 <br>Over the user of the Solvers the possibility for the non-standard influence
1683 of the heuristic complexity evaluation of algebraic printouts to give,
1684 is stored the evaluations of the arithmetic operators not as unchangeable
1685 constants, but as Macsyma of properties under the keyword Valuation. The
1686 definition of a quality factor takes place with the instruction<tt><font size=+1></font></tt>
1687 <p><tt><font size=+1>SetProp(operator, ' Valuation, quality factor) $.</font></tt>
1688 <p>The standard mappings of the quality factors pre-defined in the Solver
1689 became with the instruction<tt><font size=+1></font></tt>
1690 <p><tt><font size=+1>SetProp(' sin, ' Valuation, 10) $</font></tt>
1691 <br><tt><font size=+1>SetProp(' cos, ' Valuation, 10) $</font></tt>
1692 <br><tt><font size=+1>SetProp(' tan, ' Valuation, 10) $</font></tt>
1693 <br><tt><font size=+1>SetProp(' asin, ' Valuation, 12) $</font></tt>
1694 <br><tt><font size=+1>SetProp(' acos, ' Valuation, 12) $</font></tt>
1695 <br><tt><font size=+1>SetProp(' atan, ' Valuation, 12) $</font></tt>
1696 <br><tt><font size=+1>SetProp(' sinh, ' Valuation, 12) $</font></tt>
1697 <br><tt><font size=+1>SetProp(' cosh, ' Valuation, 12) $</font></tt>
1698 <br><tt><font size=+1>SetProp(' tanh, ' Valuation, 12) $</font></tt>
1699 <br><tt><font size=+1>SetProp(' asinh, ' Valuation, 12) $</font></tt>
1700 <br><tt><font size=+1>SetProp(' acosh, ' Valuation, 12) $ 10) $</font></tt>
1701 <br>
1702 <br>
1703 2.7. USER SPECIFIC EVALUATION STRATEGIES 45
1704 <br>determined. E.g. if the evaluation of the tanh operator on 20 is to
1705 be modified, then this can be achieved at any time by
1706 <br>SetProp(' tanh, ' Valuation, 20) $.
1707 <br>A quality factor with the GET command leaves itself queries:
1708 <br>Get(operator, ' Valuation);
1709 <br>Example: The evaluation " * " - operator determined through:
1710 <br>(COM19) Get("* ", ' Valuation);
1711 <br>(D19) 4
1712 <br>if the query as result the value FALSE it supplies then this means
1713 that no quality factor for the operator concerned was defined.
1714 <br>2,7 definition and integration of user specific evaluation strategies
1715 of means of a Umbelegung of the procedure variable SolverValuationStrategy
1716 the Valuation Solver is arranged to use in place of the internal function
1717 a user-defined evaluation strategy to the determination of the solution
1718 sequence. The function become by their call with
1719 <br>SolveOrder: Apply(SolverValuationStrategy, [ VarPathMatrix, ValuationMatrix
1721 <br>two evaluation stencils, which transfer variable path matrix and the
1722 complexity evaluation matrix, their line dimension equal the number of
1723 the equations and their column dimension equal the number of variables
1724 which can be determined is.
1725 <br>The entry at the position (i; j) of the variable path matrix corresponds
1726 to the number of paths to the instances the variable xj in equation i (see
1727 paragraph 1,5,2). The complexity evaluation matrix contains at the position
1728 (i; j) the complexity evaluation of the equation i regarding the variables
1729 xj. For the set of equations (1.55) - (1.57) the path matrix reads thus
1730 <br>2 6 4 x y z (1:55) 1 1 1 (1:56) 1 1 2 (1:57) 1 1 1 3 7 5;
1731 <br>and the evaluation matrix on use of the standard operator quality factors
1732 calculated to
1733 <br>2 6 4 x y z (1:55) 1 4 1 (1:56) 4 4 14 (1:57) 4 1 40 3 7 5:
1734 <br>
1735 <br>
1736 46 CHAPTERS 2. The SOLVER
1737 <br>from these stencils must generate the evaluation strategy a solution
1738 sequence (see paragraph 1,5,2) in the form
1739 <br>[ [ i1, j1, b1 ], [ i2, j2, b2 ]... ].
1740 <br>The max. length of the list should not be larger thereby than the value
1741 of the option variables SolverMaxLenValOrder.
1742 <br>The basic structure of an evaluation strategy is shown by the following
1743 pseudocode:
1744 <br>MyValuationStrategy(PathMat, ValMat): = BLOCK(generates a solution
1745 order from the evaluation strategy.
1746 <br>limits the length of the list to SolverMaxLenValOrder of items RETURN(the
1747 solution sequence)) $
1748 <p>for the integration of the function is afterwards the procedure variable
1749 SolverValuationStrategy with the function name to be occupied:
1750 <br>SolverValuationStrategy: ' MyValuationStrategy$
1751 <br>
1752 <br>
1753 BIBLIOGRAPHY [ADA 79] D. Adams, The Hitchhiker's Guide to the Galaxy, London:
1754 Pan Books, 1979
1755 <br>[BRO 88] E. Brommundt, G. Sachs, Technische Mechanik | Eine Einf&uuml;hrung,
1756 Berlin: Springer Verlag, 1988
1757 <br>[FOU 92] L. R. Foulds, Graph Theory Applications, Berlin, New York,
1758 Tokyo: Springer Verlag, 1992
1759 <br>[HEN 93] E. Hennig, \Mathematische Grundlagen und Implementation eines
1760 symbolischen Matrixapproximationsalgorithmus mit quantitativer Fehlervorhersage",
1761 Diplomar- beit am Institut f&uuml;r Netzwerktheorie und Schaltungstechnik,
1762 Technische Universit&auml;t Braunschweig, August 1993
1763 <br>[MAC 94] Macsyma Inc., Macsyma Reference Manual V14, Arlington, 1994
1764 <br>[MIC 94] Z. Michalewicz, Genetic Algorithms + Data Structures = Evolution
1765 Programs, Berlin, New York, Tokyo: Springer Verlag, 1994
1766 <br>[N&Uuml;H 89] D. N&uuml;hrmann, Professionelle Schaltungstechnik, M&uuml;nchen:
1767 Franzis Verlag, 1989
1768 <br>[PFA 94] J. Pfalzgraf, \Some Robotics Benchmarks for Computer Algebra",
1769 Vortrag auf der GAMM-Jahrestagung 1994, Braunschweig, April 1994
1770 <br>[SOM 93a] R. Sommer, \Konzepte und Verfahren zum rechnergest&uuml;tzten
1771 Entwurf analoger Schaltungen", Dissertation am Institut f&uuml;r Netzwerktheorie
1772 und Schaltungstechnik, Technische Universit&auml;t Braunschweig, Juli 1993
1773 <br>[SOM 93b] R. Sommer, E. Hennig, G. Dr&ouml;ge, E.-H. Horneber, \Equation-based
1774 Symbolic Approximation by Matrix Reduction with Quantitative Error Prediction",
1775 Alta Frequenza | Rivista di Elettronica, Vol. 5, No. 6, Dez. 1993, S. 29
1776 { 37 [TRI 91] H. Trispel, \Symbolische Schaltungsanalyse mit Macsyma",
1777 Studienarbeit am In- stitut f&uuml;r Netzwerktheorie und Schaltungstechnik,
1778 Technische Universit&auml;t Braun- schweig, Juli 1991 [WOL 91] S. Wolfram,
1779 Mathematica | A System for Doing Mathematics by Computer, Addi- son Wesley,
1780 1991 47
1781 <br>
1782 <br>
1783 48 BIBLIOGRAPHYAppendix A example calculations A.1 sizing of the staff two-impact solve for the demonstration of the efficiency of the Solvers finally the Beipiel stated in the introduction gave up 1,1 and 1,2. In the following are the complete display outputs of the two program runs. (COM1) Two-impact: [ F*cos(gamma) - S1*cos(alpha) - S2*cos(beta) = 0, F*sin(gamma) - S1*sin(alpha) + S2*sin(beta) = 0, Delta_l1 = l1*S1/(E*A1), Delta_l2 = l2*S2/(E*A2), l1 = c/cos(alpha), l2 = c/cos(beta), a = Delta_l2/sin(alpha+beta), b = Delta_l1/sin(alpha+beta), u = a*sin(alpha) + b*sin(beta), w = a*cos(alpha) + b*cos(beta), A1 = h1^2, a2 = h2^2 ] $ (COM2) staff dimensions: [ h1, h2]$ (COM3) two-impact parameter: [ alpha, beta, gamma, F, c, E, u, w]$ (COM4) SolverRepeatImmed: SolverRepeatLinear: FALSE$ (COM5) MsgLevel: ' DETAIL$ (COM6) Solver(two-impact, staff dimensions, two-impact parameters); The variable to solved for AR [ H1, H2 ] The of parameter of AR [ ALPHA, BETA, C, E, F, U, W, GAMMA ] 49
1784 50 APPENDIX A. EXAMPLE CALCULATIONS
1785 Checking for inconsistencies...
1786 ... none found.
1787 Searching for immediate assignments.
1789 Assigning L1 = ----------
1790 COS(ALPHA)
1792 Assigning L2 = ---------
1793 COS(BETA)
1794 Checking for inconsistencies...
1795 ... none found.
1796 Searching for linear equations...
1797 ...with respect to: [H1, H2, A, A1, A2, B, DELTA_L1, DELTA_L2, S1, S2]
1798 Found 7 linear equations in 7 variables.
1799 The variables to be solved for are [A, A1, B, DELTA_L1, DELTA_L2, S1, S2]
1800 The equations are [F COS(GAMMA) - COS(BETA) S2 - COS(ALPHA) S1,
1801 F SIN(GAMMA) + SIN(BETA) S2 - SIN(ALPHA) S1,
1802 A SIN(BETA + ALPHA) - DELTA_L2, B SIN(BETA + ALPHA) - DELTA_L1,
1804 U - B SIN(BETA) - A SIN(ALPHA), W - B COS(BETA) + A COS(ALPHA), A1 - H1 ]
1805 Solving linear equations.
1806 COS(BETA) U - SIN(BETA) W
1807 The solutions are [A = -------------------------------------------,
1808 COS(ALPHA) SIN(BETA) + SIN(ALPHA) COS(BETA)
1809 2 SIN(ALPHA) W + COS(ALPHA) U
1810 A1 = H1 , B = -------------------------------------------,
1811 COS(ALPHA) SIN(BETA) + SIN(ALPHA) COS(BETA)
1812 DELTA_L1 = (SIN(ALPHA) SIN(BETA + ALPHA) W
1813 + COS(ALPHA) SIN(BETA + ALPHA) U)/(COS(ALPHA) SIN(BETA)
1814 + SIN(ALPHA) COS(BETA)), DELTA_L2 =
1815 COS(BETA) SIN(BETA + ALPHA) U - SIN(BETA) SIN(BETA + ALPHA) W
1816 -------------------------------------------------------------,
1817 COS(ALPHA) SIN(BETA) + SIN(ALPHA) COS(BETA)
1818 COS(BETA) F SIN(GAMMA) + SIN(BETA) F COS(GAMMA)
1819 S1 = -----------------------------------------------,
1820 COS(ALPHA) SIN(BETA) + SIN(ALPHA) COS(BETA)
1821 SIN(ALPHA) F COS(GAMMA) - COS(ALPHA) F SIN(GAMMA)
1822 S2 = -------------------------------------------------]
1824 A.1. SIZING of the STAFF TWO-IMPACT 51
1825 COS(ALPHA) SIN(BETA) + SIN(ALPHA) COS(BETA)
1826 Checking for inconsistencies...
1827 ... none found.
1828 Checking for remaining equations.
1829 3 equation(s) and 2 variable(s) left.
1830 The variables to be solved for are [H1, H2]
1831 Applying valuation strategy.
1832 Trying to solve equation 3 for H2
1833 Valuation: 10
1835 The equation is A2 - H2 = 0
1836 Checking if equation was solved correctly.
1837 The solutions are [H2 = - SQRT(A2), H2 = SQRT(A2)]
1838 Solution is correct.
1839 The solution is not unique. Tracing paths separately.
1840 Solution 1 for H2
1841 Checking for inconsistencies...
1842 ... none found.
1843 Solution 2 for H2
1844 Checking for inconsistencies...
1845 ... none found.
1846 Consistent solutions for H2 : [H2 = - SQRT(A2), H2 = SQRT(A2)]
1847 Checking for remaining equations.
1848 2 equation(s) and 2 variable(s) left.
1849 The variables to be solved for are [A2, H1]
1850 Applying valuation strategy.
1851 Trying to solve equation 2 for A2
1852 Valuation: 8
1853 The equation is COS(ALPHA) C F SIN(GAMMA) - SIN(ALPHA) C F COS(GAMMA)
1854 - A2 COS(BETA) SIN(BETA) SIN(BETA + ALPHA) E W
1856 + A2 COS (BETA) SIN(BETA + ALPHA) E U = 0
1857 Checking if equation was solved correctly.
1858 The solutions are [A2 = (COS(ALPHA) C F SIN(GAMMA)
1859 - SIN(ALPHA) C F COS(GAMMA))/(COS(BETA) SIN(BETA) SIN(BETA + ALPHA) E W
1861 - COS (BETA) SIN(BETA + ALPHA) E U)]
1862 Solution is correct.
1863 Solution 1 for A2
1864 Checking for inconsistencies...
1865 ... none found.
1866 Consistent solutions for A2 : [A2 = (COS(ALPHA) C F SIN(GAMMA)
1867 - SIN(ALPHA) C F COS(GAMMA))/(COS(BETA) SIN(BETA) SIN(BETA + ALPHA) E W
1869 52 APPENDIX A. EXAMPLE CALCULATIONS 2 - COS (BETA) SIN(beta + ALPHA) E U) ] Checking for remaining equations. 1 equation(s) and 1 variable (s) left. The variable to solved for AR [ H1 ] Trying to solve equation 1 for H1 Valuation: (irrelevant) The equation is - COS(beta) C F SIN(gamma) - SIN(beta) C F COS(gamma) 2 + COS(alpha) SIN(alpha) SIN(beta + ALPHA) E H1 W 2 2 + COS (ALPHA) SIN(beta + ALPHA) E H1 U = 0 Checking if equation which solved correctly. The solutions AR [ H1 = - SQRT(cos(beta) C F SIN(gamma) / (COS(alpha) SIN(alpha) SIN(beta + ALPHA) E W 2 + COS (ALPHA) SIN(beta + ALPHA) E U) + SIN(beta) C F COS(gamma)/(cos(alpha) SIN(alpha) SIN(beta + ALPHA) E W 2 + COS (ALPHA) SIN(beta + ALPHA) E U)), H1 = SQRT(cos(beta) C F SIN(gamma)/(cos(alpha) SIN(alpha) SIN(beta + ALPHA) 2 E W + COS (ALPHA) SIN(beta + ALPHA) E U) + SIN(beta) C F COS(gamma)/(cos(alpha) SIN(alpha) SIN(beta + ALPHA) E W 2 + COS (ALPHA) SIN(beta + ALPHA) E U)) ] Solution is correct. The solution is NOT unique. Tracing paths separately. Solution 1 for H1 Checking for inconsistencies...... none found. Solution 2 for H1 Checking for inconsistencies...... none found. Consistent solutions for H1: [ H1 = - SQRT(cos(beta) C F SIN(gamma) / (COS(alpha) SIN(alpha) SIN(beta + ALPHA) E W
1870 A.1. SIZING of the STAFF TWO-IMPACT 53 2 + COS (ALPHA) SIN(beta + ALPHA) E U) + SIN(beta) C F COS(gamma)/(cos(alpha) SIN(alpha) SIN(beta + ALPHA) E W 2 + COS (ALPHA) SIN(beta + ALPHA) E U)), H1 = SQRT(cos(beta) C F SIN(gamma)/(cos(alpha) SIN(alpha) SIN(beta + ALPHA) 2 E W + COS (ALPHA) SIN(beta + ALPHA) E U) + SIN(beta) C F COS(gamma)/(cos(alpha) SIN(alpha) SIN(beta + ALPHA) E W 2 + COS (ALPHA) SIN(beta + ALPHA) E U)) ] Checking for remaining equations. All variable solved for. NO equations left. Checking for remaining equations. All variable solved for. NO equations left. Checking for remaining equations. 2 equation(s) and 2 variable (s) left. The variable to solved for AR [ a2, H1 ] Applying valuation strategy. Trying to solve equation 2 for a2 Valuation: 8 The equation is COS(alpha) C F SIN(gamma) - SIN(alpha) C F COS(gamma) - a2 COS(beta) SIN(beta) SIN(beta + ALPHA) E W 2 + a2 COS (BETA) SIN(beta + ALPHA) E U = 0 Checking if equation which solved correctly. The solutions AR [ a2 = (COS(alpha) C F SIN(gamma) - SIN(alpha) C F COS(gamma))/(cos(beta) SIN(beta) SIN(beta + ALPHA) E W 2 - COS (BETA) SIN(beta + ALPHA) E U) ] Solution is correct. Solution 1 for a2 Checking for inconsistencies...... none found. Consistent solutions for a2: [ A2 = (COS(alpha) C F SIN(gamma) - SIN(alpha) C F COS(gamma))/(cos(beta) SIN(beta) SIN(beta + ALPHA) E W
1871 54 APPENDIX A. EXAMPLE CALCULATIONS 2 - COS (BETA) SIN(beta + ALPHA) E U) ] Checking for remaining equations. 1 equation(s) and 1 variable (s) left. The variable to solved for AR [ H1 ] Trying to solve equation 1 for H1 Valuation: (irrelevant) The equation is - COS(beta) C F SIN(gamma) - SIN(beta) C F COS(gamma) 2 + COS(alpha) SIN(alpha) SIN(beta + ALPHA) E H1 W 2 2 + COS (ALPHA) SIN(beta + ALPHA) E H1 U = 0 Checking if equation which solved correctly. The solutions AR [ H1 = - SQRT(cos(beta) C F SIN(gamma) / (COS(alpha) SIN(alpha) SIN(beta + ALPHA) E W 2 + COS (ALPHA) SIN(beta + ALPHA) E U) + SIN(beta) C F COS(gamma)/(cos(alpha) SIN(alpha) SIN(beta + ALPHA) E W 2 + COS (ALPHA) SIN(beta + ALPHA) E U)), H1 = SQRT(cos(beta) C F SIN(gamma)/(cos(alpha) SIN(alpha) SIN(beta + ALPHA) 2 E W + COS (ALPHA) SIN(beta + ALPHA) E U) + SIN(beta) C F COS(gamma)/(cos(alpha) SIN(alpha) SIN(beta + ALPHA) E W 2 + COS (ALPHA) SIN(beta + ALPHA) E U)) ] Solution is correct. The solution is NOT unique. Tracing paths separately. Solution 1 for H1 Checking for inconsistencies...... none found. Solution 2 for H1 Checking for inconsistencies...... none found. Consistent solutions for H1: [ H1 = - SQRT(cos(beta) C F SIN(gamma) / (COS(alpha) SIN(alpha) SIN(beta + ALPHA) E W
1872 <br>
1873 <br>
1874 A.1. SIZING of the STAFF TWO-IMPACT 55 2 + COS (ALPHA) SIN(beta + ALPHA)
1875 E U) + SIN(beta) C F COS(gamma)/(cos(alpha) SIN(alpha) SIN(beta + ALPHA)
1876 E W 2 + COS (ALPHA) SIN(beta + ALPHA) E U)), H1 = SQRT(cos(beta) C F SIN(gamma)/(cos(alpha)
1877 SIN(alpha) SIN(beta + ALPHA) 2 E W + COS (ALPHA) SIN(beta + ALPHA) E U)
1878 + SIN(beta) C F COS(gamma)/(cos(alpha) SIN(alpha) SIN(beta + ALPHA) E W
1879 2 + COS (ALPHA) SIN(beta + ALPHA) E U)) ] Checking for remaining equations.
1880 All variable solved for. NO equations left. Checking for remaining equations.
1881 All variable solved for. NO equations left. Post processing results. (D6)
1882 [ [ H1 = - SQRT((cos(beta) C F SIN(gamma) + SIN(beta) C F COS(gamma)) /
1883 (COS(alpha) SIN(alpha) SIN(beta + ALPHA) E W 2 + COS (ALPHA) SIN(beta +
1884 ALPHA) E U)), H2 = - SQRT((sin(alpha) C F COS(gamma) - COS(alpha) C F SIN(gamma))
1885 2 / (COS (BETA) SIN(beta + ALPHA) E U - COS(beta) SIN(beta) SIN(beta +
1886 ALPHA) E W)) ], [ H1 = SQRT((cos(beta) C F SIN(gamma) + SIN(beta) C F COS(gamma))
1887 / (COS(alpha) SIN(alpha) SIN(beta + ALPHA) E W 2 + COS (ALPHA) SIN(beta
1888 + ALPHA) E U))
1889 <br>
1890 <br>
1891 56 APPENDIX A. EXAMPLE CALCULATIONS E W)) ], [ H1 = - SQRT((cos(beta) C
1892 F SIN(gamma) + SIN(beta) C F COS(gamma)) / (COS(alpha) SIN(alpha) SIN(beta
1893 + ALPHA) E W 2 + COS (ALPHA) SIN(beta + ALPHA) E U)), H2 = SQRT((sin(alpha)
1894 C F COS(gamma) - COS(alpha) C F SIN(gamma)) 2 / (COS (BETA) SIN(beta +
1895 ALPHA) E U - COS(beta) SIN(beta) SIN(beta + ALPHA) E W)) ], [ H1 = SQRT((cos(beta)
1896 C F SIN(gamma) + SIN(beta) C F COS(gamma)) / (COS(alpha) SIN(alpha) SIN(beta
1897 + ALPHA) E W 2 + COS (ALPHA) SIN(beta + ALPHA
1898 <br>only by the combination of their signs differentiate. Due to the physical
1899 boundary condition that the lengths
1900 <br>h1 and h2 cannot take negative values, it is only the last solution
1901 meaningful:
1902 <br>h1 = s cos fi F sin + sin fi F cos cos sin sin (fi + Ew+ cos 2 sin
1903 (fi + E u (A.1) h2 = sh2 = s sin F cos sin F cos
1904 <br>
1905 <br>
1906 A.2. SIZING of the TRANSISTOR AMPLIFIER 57 A.2 sizing of the transistor amplifier (COM7) amplifier: [ -v_v1+v_r1+v_oc_1+v_fix2_q1 = 0, -v_v1+v_r2+v_oc_1+v_i1+v_fix2_q1 = 0, -v_v1+v_oc_1+v_i1+v_fix2_q2+v_fix2_q1-v_fix1_q2-v_fix1_q1 = 0, V_v1-v_r6+v_r3-v_oc_1-v_i1-v_fix2_q1+v_fix1_q1 = 0, -v_v1+v_r7+v_r4+v_oc_1+v_i1-v_fix1_q2 = 0, -v_v1+v_r7+v_r5+v_oc_1 = 0, V_oc_2-v_i1+v_fix1_q2 = 0, v_v_cc-v_v1+v_r6+v_oc_1+v_fix2_q1-v_fix1_q1 = 0, I_v1+i_oc_1 = 0, i_r7-i_oc_1+i_fix2_q1 = 0, i_r2+i_r1-i_fix2_q1-i_fix1_q1 = 0, I_r6+i_fix2_q2+i_fix1_q1 = 0, -i_r7+i_r5+i_r4 = 0, -i_r4+i_oc_2-i_fix2_q2-i_fix1_q2 = 0, i_r3-i_r2+i_i1+i_fix1_q2 = 0, I_v_cc-i_r6-i_r3 = 0, v_v1 = 0, i_i1 = 0, i_oc_1 = 0, v_fix1_q1 = 2,72, V_fix2_q1 = 0,607, i_r1*r1-v_r1 = 0, i_r7*r7-v_r7 = 0, i_r2*r2-v_r2 = 0, I_r6*r6-v_r6 = 0, v_fix1_q2 = 6,42, v_fix2_q2 = 0,698, i_r3*r3-v_r3 = 0, I_r4*r4-v_r4 = 0, i_r5*r5-v_r5 = 0, [ g 1, R2, R3, R4, R5, R6, R7]$ (COM9) Design parameter: [ VCC, A, ZIN, ZOUT]$ (COM10) SolverRepeatImmed: SolverRepeatLinear: TRUE$ (COM11) Solver(amplifier, resistances, Design parameters); The variable to solved for AR [ g 1, R2, R3, R4, R5, R6, R7 ] The of parameter of AR [ A, VCC, ZIN, ZOUT ] Checking for inconsistencies...... none found. Searching for immediate assignments. Assigning V_v1 = 0 Assigning I_i1 = 0 Assigning I_oc_1 = 0 68 Assigning V_fix1_q1 = -- 25,607 Assigning V_fix2_q1 = --- 1000 321 Assigning V_fix1_q2 = -- 50
1907 58 APPENDIX A. EXAMPLE CALCULATIONS 349 Assigning V_fix2_q2 = -- 500 Assigning I_oc_2 = 0 Assigning V_v_cc = VCC 111 Assigning I_fix1_q1 = ------ 1000000 5 Assigning I_fix2_q1 = ------ 8695637 401 Assigning I_fix1_q2 = ----- 100000 25 Assigning I_fix2_q2 = ------ 1984127 Assigning R7 = ZIN Checking for inconsistencies...... none found. Searching for immediate assignments. Assigning I_v1 = 0 Checking for inconsistencies...... none found. Searching for immediate assignments. NO immediate assignments found. Searching for linear equations...... with respect to: [ g 1, R2, R3, R4, R5, R6, I_r1, I_r2, I_r3, I_r4, I_r5, I_r6, I_r7, I_v_cc, V_i1, V_oc_1, V_oc_2, V_r1, V_r2, V_r3, V_r4, V_r5, V_r6, V_r7 ] Found 18 linear equations in 18 variable. The variable to solved for AR [ I_r1, I_r2, I_r3, I_r4, I_r5, I_r6, I_r7, I_v_cc, V_i1, V_oc_1, V_oc_2, V_r1, V_r2, V_r3, V_r4, V_r5, V_r6, V_r7 ] The equations AR [ 1000 V_r1 + 1000 V_oc_1 + 607, 1000 V_r2 + 1000 V_oc_1 + 1000 V_i1 + 607, 200 V_oc_1 + 200 V_i1 - 1567, - 1000 V_r6 + 1000 V_r3 - 1000 V_oc_1 - 1000 V_i1 + 2113, 50 V_r7 + 50 V_r4 + 50 V_oc_1 + 50 V_i1 - 321, V_r7 + V_r5 + V_oc_1, 50 V_oc_2 - 50 V_i1 + 321, 1000 V_r6 +
1908 A.2. SIZING of the TRANSISTOR AMPLIFIER 59 8695637 I_r7 + 5, 8695637000000 I_r2 + 8695637000000 I_r1 - 970215707, 1984127000000 I_r6 + 245238097, - I_r7 + I_r5 + I_r4, - 198412700000 I_r4 - 798134927, 100000 I_r3 - 100000 I_r2 + 401, I_v_cc - I_r6 - I_r3, I_r7 ZIN - V_r7 ] Solving linear equations. 8695637000000 I_r3 + 33899288663 The solutions AR [ I_r1 = -, 8695637000000 100000 I_r3 + 401 798134927 I_r2 =, I_r4 = -, 100000 198412700000 6939299538713499 245238097 5 I_r5 =, I_r6 = -, I_r7 = -, 1725324815389900000 1984127000000 8695637 1984127000000 I_r3 - 245238097 200 V_oc_1 - 1567 I_v_cc =, V_i1 = -, 1984127000000 200,200 V_oc_1 - 283 1000 V_oc_1 + 607 4221 V_oc_2 = -, V_r1 = -, V_r2 = -, 200 1000 500,200 V_oc_1 + 200 VCC - 1567 1000 ZIN - 2460865271 V_r3 = -, V_r4 =, 200 1739127400 8695637 V_oc_1 - 5 ZIN 1000 V_oc_1 + 1000 VCC - 2113 V_r5 = -, Searching for linear equations...... with respect to: [ I_r3, g 1, R2, R3, R4, R5, R6, V_oc_1 ] Found 6 linear equations in 5 variable. The variable to solved for AR [ R2, R4, R5, R6, V_oc_1 ] The equations AR [ 8695637000000 V_oc_1 - 8695637000000 I_r3 g 1 - 33899288663 g 1 + 5278251659000, 1984127000000 V_oc_1 + 1984127000000 VCC
1909 60 APPENDIX A. EXAMPLE CALCULATIONS - 245238097 R6 - 4192460351000, 200 V_oc_1 + 200 VCC + 200 I_r3 R3 - 1567, - 992063500000 ZIN - 6940291602213499 R4 + 2441334613776708500, - 992063500000 ZIN + 1725324815389900000 V_oc_1 + 6939299538713499 R5, 145309663773 A g 1 - 145303681853 R2 ] Solving linear equations. Checking for inconsistencies...... none found. 145309663773 A g 1 The solutions AR [ R2 =, 145303681853 992063500000 ZIN - 2441334613776708500 R4 = -, 6940291602213499 R5 = - (- 9920635000000 ZIN + (17253248153899000000 I_r3 + 67260493917052201) g 1 - 10472721629416693000)/69392995387134990, R6 = (17253248153899000000 VCC + (17253248153899000000 I_r3 + 67260493917052201) g 1 - 46928834978605280000)/2132501470082789, (8695637000000 I_r3 + 33899288663) g 1 - 5278251659000 V_oc_1 = ] 8695637000000 Checking for inconsistencies...... none found. Searching for linear equations...... with respect to: [ I_r3, g 1, R3 ] NO linear equations found. Checking for remaining equations. 3 equation(s) and 3 variable (s) left. The variable to solved for AR [ I_r3, g 1, R3 ] Applying valuation strategy. Trying to solve equation 1 for I_r3 Valuation: 4 The equation is 14530966377300000 A I_r3 g 1 + 58269175172973 A g 1 + 122665368220302600 = 0 Checking if equation which solved correctly. 6474352796997 A g 1 + 13629485357811400 The solutions AR [ I_r3 = - ] 1614551819700000 A g 1
1910 A.2. SIZING of the TRANSISTOR AMPLIFIER 61 Solution is correct. Solution 1 for I_r3 Checking for inconsistencies...... none found. Consistent solutions for I_r3: [ I_r3 = 6474352796997 A g 1 + 13629485357811400 - ] 1614551819700000 A g 1 Checking for remaining equations. 2 equation(s) and 2 variable (s) left. The variable to solved for AR [ g 1, R3 ] Applying valuation strategy. Trying to solve equation 1 for R3 Valuation: 20 The equation is - g 1 (- 16062755182397110876073408478539448677201569671148 # 116383372395290156600000000 A VCC + 64411648281412414613054367998943189195 # 578294381303946697323305113527966000 A R3 + 135601779249796410015811714375 # 830025732935651163832398508429761039502017200000 A + 135596196971410595846 # 324806740533400875556129557784494104259093864172929200000) - 1355961969714 # 10595846324806740533400875556129557784494104259093864172929200000 R3 - 179 # 2201925592952751292050414582157181324535016813917972727234536207382600 A 2 g 1 = 0 Checking if equation which solved correctly. The solutions AR [ R3 = (140395565418006489000000 A g 1 VCC 2 - 15664635352383720279 A g 1 + (- 1185219363258810780138000 A - 1185170571683430488618000) R1)/(562986217326206020890 A g 1 + 1185170571683430488618000) ] Solution is correct. Solution 1 for R3 Checking for inconsistencies...... none found. Consistent solutions for R3: [ R3 = (140395565418006489000000 A G 1 VCC 2 - 15664635352383720279 A G 1 + (- 1185219363258810780138000 A
1911 62 APPENDIX A. EXAMPLE CALCULATIONS - 1185170571683430488618000) R1)/(562986217326206020890 A g 1 + 1185170571683430488618000) ] Checking for remaining equations. 1 equation(s) and 1 variable (s) left. The variable to solved for AR [ g 1 ] Trying to solve equation 1 for g 1 Valuation: (irrelevant) The equation is g 1 (19841637776253069394020865409024 ZOUT - 243498222421608533966015625 A ZIN) 2 - 57259002716458635629644396416 A g 1 = 0 Checking if equation which solved correctly. The solutions AR [ g 1 = 19841637776253069394020865409024 ZOUT - 243498222421608533966015625 A ZIN, 57259002716458635629644396416 A g 1 = 0 ] Solution is correct. The solution is NOT unique. Tracing paths separately. Solution 1 for g 1 Checking for inconsistencies...... none found. Solution 2 for g 1 Checking for inconsistencies...... none found. Consistent solutions for g 1: [ g 1 = 19841637776253069394020865409024 ZOUT - 243498222421608533966015625 A ZIN, 57259002716458635629644396416 A g 1 = 0 ] Checking for remaining equations. All variable solved for. NO equations left. Checking for remaining equations. All variable solved for. NO equations left. Post office processing results. (D11) [ [ G 1 = - (243498222421608533966015625 A ZIN - 19841637776253069394020865409024 ZOUT)
1912 A.2. SIZING OF THE TRANSISTOR AMPLIFIER 63 / (57259002716458635629644396416 A), R2 = 1493854125285941926171875 A ZIN - 121727839118116990147367272448 ZOUT -, 351267764122759016747201152 R3 = (334763184724568105702258732451550460395708593115792893559436793085952 2 ZOUT + VCC 2 (106256457337115768692100530787195899963103895496024350000000000000 A ZIN - 8658388208766832396126274743883820688291739892383476917089599488000000 A ZOUT) + A (73094113258409599088098011387867214250558868171501312134070398877696000 ZOUT + ZIN (- 8216483067762383568115091483320660991714242249851965644800000000 ZOUT - 896980085605567678321894471091892803815897329518698154700000000000)) + 73091104214643137701992515955008538217110816411520639295650692857856000 2 ZOUT + A (50416680420198682402077210492446131565566605185394287109375 2 ZIN - 897017012839931319298712680905507787488523085777437562700000000000 ZIN))/(a (- 34720136717154997908466361722974120960049876968457742437529293946880 ZOUT - 210926324831111746833250971831897544037167089192987941918299029504000) 2 + 426088393921834232455323128456655558852046620939057643500000000 A 992063500000 ZIN - 2441334613776708500 ZIN), R4 = -, 6940291602213499
1913 <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
1914 <br>
1915 <br>
1916 64 APPENDIX A. EXAMPLE CALCULATIONS R5 = (38195771383195691504052086845016246794667687936
1917 ZOUT + A (99303995957664108704965549227744192421875 ZIN + 599657596227485533261336202180916694139772288000)
1918 + 8339540409811836894068029655629814665587863808000) / (3973373711375163964000922192169533030064195840
1919 A), R6 = (- 38195771383195691504052086845016246794667687936 ZOUT + A (468741670456330507974731687410699967578125
1920 ZIN - 2687098289520198765190831087202789799110676480000) + 987903782911837781320158487942202132025984000000
1921 A VCC - 8339540409811836894068029655629814665587863808000) / (122104907468322449250303944919525361454884224
1922 A), R7 = ZIN ], 992063500000 ZIN - 2441334613776708500 [ g 1 = 0, R2 =
1923 0, R3 = 0, R4 = -, 6940291602213499 992063500000 ZIN + 1047272162941669300
1924 R5 =, 6939299538713499 1984127000000 VCC - 5396825440000 R6 =, R7 = ZIN
1925 ] ] 245238097
1926 <br>more than one solution of the system are calculated also here, but
1927 place only first a physically meaningful result
1928 </body>
1929 </html>