Computer Algebra

18

Click here to load reader

Transcript of Computer Algebra

Page 1: Computer Algebra

Computer Algebra Symbols as well as numbers can be manipulated by a computer.

New, general-purpose algorithms can undertake a wide variety

of routine mathematical work and solve intractable problems

by Richard Pavelle, Michael Rothstein and John Fitch

Of all the tasks to which the com­puter can be applied none is more daunting than the manipu­

lation of complex mathematical expres­sions. For numerical calculations the digital computer is now thoroughly es­tablished as a device that can greatly ease the human burden of work. It is less generally appreciated that there are computer programs equally well adapt­ed to the manipulation of algebraic ex­pressions. In other words, the computer can work not only with numbers them­selves but also with more abstract sym­bols that represent numerical quantities.

Perhaps one reason the algebraic ca­pabilities of the computer have not been fully exploited is that computer pro­gramming itself is much like algebra in character. It might therefore seem there is a natural division of labor: the pro­grammer manipulates algebraic sym­bols, whereas the computer is confined to arithmetic calculations, or "number crunching." Yet the dichotomy between the programmer and the computer was recognized to be a false one as early as 1844 by Augusta Ada Byron, Countess of Lovelace, the daughter of Lord By­ron and possibly the first computer pro­grammer. Lady Lovelace was a bene­factor of Charles Babbage's and devised some of the programs for the early me­chanical computer that Babbage called the difference engine. She pointed out that the computer could "arrange and combine its numerical quantities exact­ly as if they were letters or any other general symbols; and in fact it might bring out its results in algebraic nota­tion, were provisions made according­ly." Similarly, the modern digital com­puter is a general-purpose machine that can carry out any algorithm, or precise­ly specified procedure. The algorithms of algebra can be executed by a comput­er as readily as those of arithmetic.

In 1973 one of us (Pave lie) undertook an algebraic calculation pertaining to the general theory of relativity; the cal­culation required three months of work with pencil and paper. The following year a more formidable problem arose in an attempt to define the mathematical

136

properties that might d istinguish gener­al relativity from various other theories of gravitation. Instead of attempting an­other calculation by hand, Pavelle de­cided to construct a computer program for manipulating mathematical expres­sions of the kind that commonly appear in gravitational theories. The program was then written in the computer lan­guage of a powerful system of algebraic programs called MACSYMA, then under development at the Massachusetts In­stitute of Technology. Once Pavelle's program was installed in MACSYMA, the 1973 problem was solved as a test; the computer confirmed the results of the three-month calculation in two minutes. The experience is not unusual among users of computer-algebra systems.

In order to understand the need for au­tomatic systems of algebraic manip­

ulation it must be appreciated that many concepts in science are embodied in mathematical statements where there is little point to numerical evaluation. Consider the simple expression 3TT2/TT. As any student of algebra knows, the fraction can be reduced by canceling TT from both the numerator and the de­nominator to obtain the simplified form 3TT. The numerical value of 3TT may be of interest, but it may also be sufficient, and perhaps of greater utility, to leave the expression in the symbolic, nonnu­me rica I form. With a computer pro­grammed to do only arithmetic, the expression 3TT2/TT must be evaluated; when the calculation is done with a pre­cision of 10 significant figures, the value obtained is 9.424777958. The number, besides being a rather uninformative string of digits, is not the same as the number obtained from the numerical evaluation (to 10 significant figures) of 3TT. The latter number is 9.424777962; the discrepancy in the last two decimal places results from round-off errors in­troduced by the computer. The equiva­lence of 3TT2/TT and 3TT would probably not be recognized by a computer pro­grammed in this way.

The example ill ustrates three advan­tages that algebraic programs have over

purely numerical ones. First, it is fre­quently more economical of computer time to simplify an expression algebrai­cally before evaluating it numerically. Although in this example the saving in computer time is trivial, there are many complicated problems in which the economy that results from algebraic simplification is significant. Second, un­like the numerical approximations gen­erated by a computer, algebraic answers are exact. Approximations necessarily introduce errors; if there are many suc­cessive numerical operations, the errors can accumulate and make nonsense of the final result. Only if a careful error analysis is undertaken can the final an­swer be stated with confidence, and such error analysis is one of the most com­plex problems faced in many fields.

The third and perhaps the most im­portant advantage is that the goals of scientific investigation are often better served by a result in algebraic form. As Richard W. Hamming of Bell Laborato­ries has written, "the purpose of com­puting is insight, not numbers." Insight is sometimes obtained by evaluating a mathematical expression, but in many cases the relations of the quantities are made clearer by algebraic means.

In the study of a chemical process, for example, it is possible to express alge­braically the relation between the stabil­ity of the process and the relative quan­tities of the substances present. From such a relation one can predict quite ac­curately whether a small change in one quantity will cause a violent reaction or a controlled one. Similarly, in the theory of stellar evolution one can examine al­gebraically how a number of variables determine whether a star will become a neutron star or a black hole, or how the variables interact to predict the exis­tence of a new object.

There is a fourth advantage of the au­tomatic systems we shall call computer­algebra systems, which is brought out by considering some pragmatic aspects of the accumulation of scientific knowl­edge. A scientific theory is often stated in a concise and quite general math­ematical expression that suggests the

© 1981 SCIENTIFIC AMERICAN, INC

Page 2: Computer Algebra

form the theory will take under certain assumptions. For example, a portion of the general theory of relativity, known as the Einstein field equations, can be written down in one line, given certain widely accepted notational conventions. To explore the physical implications of the theory is to explore the mathemati­cal implications of the field equations, but with some exceptions the explora­tion requires algebraic operations that are intractable if they are done by hand. Even under assumptions that simplify the problem enormously, the algebra is so taxing that few investigators will risk their health, happiness and professional well-being attempting a solution.

The results of such work, even if they are admitted to the main body of sci­entific knowledge, stand as isolated in­tellectual outposts, untested by other workers and accepted primarily on the reputation of the investigator rather than on any promise of future critical examination. Such a regretta.ble state of affairs can prevail in any scientific field at what might be called the frontiers of intractability. For many fields computer algebra has now significantly expanded· the frontiers.

In celestial mechanics there is a distin­guished tradition of long algebraic

calculations. In 1847 the French astron­omer Charles Delaunay began to cal­culate the position of the moon as a function of time. In a sense the calcula­tion is a straightforward application of Newton's theory of universal gravita­tion. In Newton's theory the orbit of a point mass around a spherical mass of uniform density is an ellipse, but the characteristics of the earth-moon sys­tem make the moon's orbit a curve con­siderably more complex than an ellipse. The plane of the moon's orbit around the earth is inclined at a small angle to the plane of the earth's orbit around the sun, and the angle varies under the per­turbing influence of the sun's gravita­tional field. The sun also causes the lu­nar perigee (the point in the moon's orbit where it is closest to the earth) to precess slowly with respect to the stars.

Because of such complications the po­sition of the moon has often been deter­mined not from some function of time, as Delaunay set out to do, but by numer­ical extrapolation from a previous lunar position. Over short periods the errors accumulated in the extrapolation are small, and a correction can be made by again determining the position of the moon by observation. Calculating fast enough to keep up with the progress of the moon is fairly difficult even for the fastest computers, and the required ob­servations are both time-consuming and costly. Delaunay's calculation avoided these difficulties, but it had one serious shortcoming: it demanded 20 years of his life to carry out and check.

The results of Delaunay's work were

a

b

c

d

e

g

2X3y4 + Oy2

zx(yx)2xzz

zxy2x2xzz

xx2xy2zzz

5y + 3x2 + 6y

- �x +;! Y 3 4

(c)

DELETE TERMS WITH ZERO COEFFICIENT )

EXPAND PARENTHESES )

ALPHABETIZE PRODUCTS )

WRITE IN EXPONENTIAL FORM )

ALPHABETIZE SUMS )

ADD COEFFICIENTS OF LIKE EXPRESSIONS )

WRITE OVER COMMON DENOMINATOR

)

+

+

+

+

_ 3XSy3z2 + 3xSy3z2 + X4y2z3 _ x4y2z3

4 2 3

3x2 + 5y + 6y

+

-ax + 9y 12

COMPUTER ALGORITHM for simplifying an algebraic expression by combining like

terms closely resembles the standard manual method of simplification. For the computer each

step of the procedure must be precisely specified. In the upper diagram the effect of each step

on a simple algebraic expression is illustrated. In the lower diagram the application of �he algo­

rithm to the more complicated expression shown in color is illustrated by a flow chart. The col­

ored letters that label the arrows in the flow chart correspond to the elementary operations in

the upper diagram. The simplified form of the expression generated by the algorithm is given

in color at the bottom. Simplification is one of the tasks that must be done by any set of comput­

er programs intended to solve mathematical problems expressed in symbols rather than numer­

ical quantities. Although the simplification algorithm usually yields a useful and manageable

algebraic expression, no single algorithm can reduce every expression to its simplest form.

137

© 1981 SCIENTIFIC AMERICAN, INC

Page 3: Computer Algebra

(Cl) F(J): :FACTOR (NUSUM (K' J, K ,O,N));

(01) F(J) : '" FACTOR (NUSUM(KJ, K, 0, N)

(C2) FOR J: 1 THRU 2 DO DISPLAY (SUM(KtJ ,K,O,N) f IJ ) );

(02 )

> I

!< :: 0

!II (N + 1)

:.J (N + 1) (2 N + 1) > I

K = 0

(el) {X+7)'10;

(01) (X + 7)10

(e2) EXPAND (01) i (02 ) 2205 x8 + 41160 x7 + 504210 x6 + 4235364 x5

t 24706290 X4 + 98825160 x3 + 259416045 x2 + 403536070 X + 282475249

(el) X' 3+B*X' 2+A' 2*X '2-9 *A"'X '2+A' 2*B"'X-2 "'A"'S"'X-9"'Ai 3"'X+14"'1\ i 2*X-2 *A' 3*S+14*A '4"'0 i (01) x3 + B x2 + ,..2 x2 - 9 ,.. x2 + 1\2 B X - 2 A B X

- 9 ,..3 X + 14 1\2 X - 2 1\3 B + 14 ,..4 = 0

(e2) SOLVE(Dl,X);

102 )

(01 )

(e2)

T ime=

(02 )

-

IX = 7 A - B. X '" _ A2, X • 2 Al

11 25899906842624 y40 + 9007199254740992 y39 .. 43523068273885184

+ 96686654500110336 y37 + 71892942171668480 y36 _ 203545990580404224

- 3231739551940608 y3' + 2967153761027358720 y33 + 3933037175129505792

- 10392801849559220224 y31 - 26535490294760079360 y30 + 6097" 86 7 8 4 0 76 3 5599 36

+ 124971270109665427456 y28 _ 294061554052926275584 y27 _ 377892103185282105344

+ 1043007763435371888640 y25 + 1247934126027765186560 y24 _ 4589204662544561602560

- 534479284997751570432 y22 + 13715332431765689073664 y21 - 13302644475428239835136

- 11542363148164431609856 y19 + 30184905793343524306944 y18 _ 11553929011986625003520

- 20761961484788844621824 y16 + 23716893785532021784576 y15 _ 1470688776981600935936

- 11829726550983847370752 y13 + 7047410412446462752768 y12 + 59103 64 8 3 2 4 2 72 550133760

- 2234695017399712874496 y10 + 83656057" 103 2 70 3 54 4 4 2 2 4 y9 + 383" 8661311225029504

- 113171442907550345472 y7 + 29418059499453088640 y6 + 66680783706292864

- 1434405693611092512 y' 283861281845610304 y3 20855579198349088

+ 373175331659648 V 188618697410363

fACTOR (Dl) ;

130855 msec ,

( 4096 y10 + 8192 y9 _ 3008

221360 y' 1232 y3 + 144464

'" (4096 yl0 + 8192 y9 + 1600

135934 y' 18544 y3 + 11888

1< (8192 y13 ... 12288 y9 + 66560

90496 y' 356032 y3 + 113032

� (8192 V10 + 20480 y9 + 58368

414848 y' 4160 y3 + 171816

y8 _ 30848 y 7 + 21356

y2 _ 78488 V + 11993)

y8 - 20608 y 7 + 20032

y2 - 3416 Y + 41)

y8 _ 22528 y 7 _ 138240

y2 + 23420 Y - 8179)

y8 _ 161792 Y 7 + 198656

y2 48556 Y + 469)

y6 + 146496 y�

y6 + 87360 y5

yb + 572928 1'5

y6 + 199680 y;

y38

y35

y32

y29

y26

y23

y20

y17

yl'

y11

y8

y5

y2

COMPUTER-ALGEBRA SYSTEM called MACSYMA, developed at the Massachusetts In­stitute of Technology, is a general-purpose set of programs that can solve prohlems in algehra far beyond the abilities of most mathematicians. The system communicates with the user in a conversational style. After logging in to the system the user types the algehraic expression to be manipulated on the C line, or command line, in a computer language that resembles ALGOL or FORTRA:-;. The system responds on the D line with a rewritten version of the expression that is closer to the way it would appear on a printed page. The user then types a second command, and the computer carries out the indicated operation. In the first two examples the computer finds an expression for the sum of the first n terms of a series, where each term has the form of the expression next to the letter I. (Ik2 is a way of writing 12 + 22 + 32 + ... + 1/2.) In the next two examples the computer expands.a binomial expression and solves a nonnumerical cubic equation exactly. The upward-pointing arrows indicate exponentiation and ·the llsterisks indi­cate multiplication. The final example illustrates some of the computational power of the sys­tem. The maximum area of a hexagon inscribed in a circle with a diameter of 1 is one of the roots of the enormous 40th-degree pOlynomial shown. Manual methods of finding roots are unable to cope with a polynomial of this size; it is easier to factor the polynomial and find the roots of the factors. The computer-algebra system gives the most complete factorization whose terms have integral coefficients. A computer can solve the problem in about two minutes.

138

published in two volumes in 1867, and they remained unchallenged for more than 100 years. During World War II there was interest in expressing the coor­dinates of fixed stars as a function of time in order to help in determining the positions of German U-boats, but there was no further work on the orbit of the moon or of other bodies in the solar sys­tem. With the advent of artificial earth satellites, however, Delaunay's method for determining orbits became economi­cally attractive.

In order to devise algebraic expres­sions for satellite orbits, Andre Deprit, J acq ues Henrard and Arnold Rom, who were then at the Boeing Scientific Re­search Laboratories in Seattle, began to investigate algorithms for doing the De­launay calculation with a computer. In 1970 they made the calculation in about 20 hours of computer time. Remark­ably, they found only three errors in De­launay's work, all in terms of small val­ue; moreover, two of the errors were mere consequences of the third one. Computer-algebra systems have since been developed that extend Delaunay's method by taking into account the ef­fects of atmospheric drag and the non­spherical shape of the earth on a satellite in a low-altitude orbit. The algorithms are now sometimes employed in satellite tracking.

Considering the human life span, a re­duction in the time needed for an opera­tion from 20 years to 20 hours is a quali­tative gain. Problems as complex as De­launay's problem can become the focus of research for an investigator who has far less patience than Delaunay had. Moreover, the investigator can spend a much greater proportion of his time weighing the significance of his alge­braic results. He can experiment with elaborate calc ulations without betting his career on the correctness and the util­ity of the answer. Perhaps the most tell­ing indication that computer algebra has shifted the frontier of intractability in celestial mechanics is that Delaunay's huge calculation has been undertaken as a test of new computer-algebra systems.

How can a computer be programmed to carry out algebraic manipu­

lations? Many of the algorithms em­ployed in computer algebra began as the basic procedures devised by earlier gen­erations of mathematicians that are now taught to algebra students in high school and college. For example, the methods for solving equations in which a single unknown quantity is raised to the first or the second power have been known since the time of Hammurabi, about 1750 B.C. Unlike the student who may develop an intuitive but vague sense of how to proceed through such a solution, however, the computer must follow a rigorous procedure that sp�cifies at ev­ery point what the computer is to do.

Consider how a student with a mod-

© 1981 SCIENTIFIC AMERICAN, INC

Page 4: Computer Algebra

NUMBER CRUNCHING INSIGHT ALGEBRAIC ALGORITHM

1 + 2 = 3 1 ,275 + 51 = 1,326 1,326 + 52 = 1 ,378 1 ,378 + 53 = 1,431

1 ,431 + 54 = 1 ,485 1 ,485 + 55 = 1,540

1 ,540 + 56 = 1 ,596 1 ,596 + 57 = 1 ,653 1 ,653 + 58 = 1 ,711 1,71 1 + 59 = 1,770 1,770 + 60 = 1 ,830 1 ,830 + 61 = 1 ,891 1 ,891 + 62 = 1 ,953 1,953 + 63 = 2,01 6 2,01 6 + 64 = 2,080 2,080 + 65 = 2,145 2,1 45 + 66 = 2,21 1 2,211 + 67 = 2,278 2,278 + 68 = 2,346 2,346 + 69 = 2,41 5 2,415 + 70 = 2,485 2,485 + 71 = 2,556 2,556 + 72 = 2,628 2,628 + 73 = 2,701 2,701 + 74 = 2,775 2,775 + 75 = 2,850 2,850 + 76 = 2,926 2,926 + 77 = 3,003 3,003 + 78 = 3,081 3,081 + 79 = 3,1 60 3,160 + 80 = 3,240 3,240 + 81 = 3,321 3,321 + 82 = 3,403 3,403 + 83 = 3,486 3,486 + 84 = 3,570 3,570 + 85 = 3,655 3,655 + 86 = 3,741 3,741 + 87 = 3,828 3,828 + 88 = 3,916 3,916 + 89 = 4,005 4,005 + 90 = 4,095 4,095 + 91 = 4,186 4,1 86 + 92 = 4,278 4,278 + 93 = 4,371 4,371 + 94 = 4,465 4,465 + 95 = 4,560 4,560 + 96 = 4,656 4,656 + 97 = 4,753 4,753 + 98 = 4,851 4,851 + 99 = 4,950

4.950 +100 = 5,050

1 +2+3 48+49+50+51+52+53 98+99+1 00

3 + 3 = 6 6 + 4 = 10

10 + 5 = 15 15 + 6 = 21 21 + 7 = 28

LSW I WRITE GENERAL FORM OF EQUATION

I 1 +2+3+ ... + N = AN2 + 8N + C I 28 + 8 = 36 36 + 9 = 45 45 + 10 = 55 55 + 1 1 = 66 66 + 12 = 78 78 + 13 = 91 91 + 1 4 = 1 05

1 05 + 15 = 1 20 1 20 + 1 6 = 1 36 1 36 + 1 7 = 153

1 53 + 18 = 171 1 71 + 1 9 = 1 90 1 90 + 20 = 21 0 21 0 + 21 = 231 231 + 22 = 253 253 + 23 = 276

276 + 24 = 300 300 + 25 = 325 325 + 26 = 351 351 + 27 = 378 378 + 28 = 406

406 + 29 = 435 435 + 30 = 465 465 + 31 = 496

496 + 32 = 528 528 + 33 = 561 561 + 34 = 595 595 + 35 = 630 630 + 36 = 666 666 + 37 = 703 703 + 38 = 741

741 + 39 = 780 780 + 40 = 820 820 + 41 = 861 861 + 42 = 903 903 + 43 = 946 946 + 44 = 990 990 + 45 = 1,035

1,035 + 46 = 1,081 1,081 + 47 = 1,128 1 ,128 + 48 = 1,176 1 ,176 + 49 = 1 ,225

1 ,225 + 50 = 1,275

1 01

1 01

101

1 EVALUATE GENERAL EQUATION

FOR THREE VALUES OF N

IFN = 1, 1 = A(1 )2 +8(1) +C

IFN = 2, 1 + 2 = A(2)2 + 8(2) + C

IF N = 3, 1 + 2 + 3 = A(3)2 + 8(3) + C

1 SOLV E THREE EQUATIONS

IN THREE UNKNOWNS

H BHe,} A = V2 4A+28+C= 3 8 = V2 9A+38+C= 6 c=o

1 SUBSTITUTE IN GENERAL

EQUATION FOR A, 8 AND C

1+2+3+ ... + N =

'i2N2 + '/2N + 0 =

V2N(N + 1)

1 SOLVE EQUATION

FUR N = 100

1 +2+3+ ... + 1 00 =

'/2 X 1 00 x 101 =

5,050 1 01

50 x 101

~ 1 I 5,050 I

APPLICATION OF COMPUTER ALGEBRA to a numerical cal­culation can save computer-processing time by simplifying an alge­braic expression before it is evaluated numerically. To find the sum of the first 100 integers a numerical calculation requires 99 separate additions. A simpler algorithm employed by the computer-algebra program solves the problem by taking advantage of a general mathe­matical result showing that the sum of the first II integers is a quadrat­ic, or second-degree, polynomial function of II. Similarly, the algo­rithm would find the sum of the squares of the first II integers by constructing a third-degree polynomial function of II. Although the

algorithm is effective, it is not necessarily the fastest way to solve the problem or the one that leads to the clearest understanding of it. Ac­cording to legend, the German mathematician Carl Friedrich Gauss noticed at the age of seven that the integers from 1 to 100 can be grouped in pairs so that all the pairs add to the same number, namely 101. The sum of the first 100 integers is therefore equal to 101 multi­plied by SO, which is the number of pairs. Computer-algebra systems usually cannot recognize such patterns; on the other hand, Gauss's method cannot be applied to finding the sums of squares, cubes or higher powers of integers, as the computer-algebra algorithm can.

139

© 1981 SCIENTIFIC AMERICAN, INC

Page 5: Computer Algebra

A CAR FOR THE LEFT SIDE OF YOUR B RAIN.

The left side of your brain, recent investigations tell us, is the logical side.

It figures out that 1 + 1 = 2. And, in a few cases, that E=mc�

On a more mundane level, it chooses the socks you wear, the cereal you eat, and the car you drive. All by means of rigorous Aristotelian logic.

However, and a big however it is, for real satis­faction, you must achieve harmony with the other side of your brain.

The right side, the poetic side, that says, "Yeah, Car X has a reputation for lasting a long time but it's so dull, who' d want to drive it that long anyway?"

The Saab Turbo looked at from all sides.

To the left side of your brain, Saab turbo charging is a technological feat that retains good gas mileage while also increasing performance.

To the right side of your brain, Saab turbo charging is what makes a Saab go like a bat out of hell.

The left side sees the safety in high performance. (Passing on a two-lane high­way. Entering a freeway in the midst of high-speed traffic.)

The right side lives only for the thrills.

The left side considers that Road & Track magazine just named Saab "The Sports Sedan for the Eighties:' By unanimous choice of its editors.

The right side eschews informed endorsements by editors who have spent a life­time comparing cars. The right side doesn' t know much about cars, but knows what it likes.

The left side scans this chart.

Wheelbase . . . . . . . . . . . .. 99.1 inches Length ................ 187.6 inches Width . . . . . . . . . . . . . . .. 66.5 inches Height . . . . . . . . . . . . . . .. 55.9 inches Fuel-tank capacity. . . . . .. 16.6 gallons EPA City .............. 19 mpg* EPA Highway . . . . . . . . .. 31 mpg *

The right side looks at the picture on the opposite page.

The left side compares a Saab's comfort with that of a Mercedes. Its performance with that of a BMW. Its brak­ing with that of an Audi.

The right side looks at the picture.

The left side looks ahead to the winter when a Saab's front-wheel drive will keep a Saab in front of traffic.

The right side looks at the picture.

The left side also consid­ers the other seasons of the year when a Saab's front­wheel drive gives it the cor­nering ability of a sports car.

The right side looks again at the picture.

Getting what you need vs. getting what you want. Needs are boring; desires

are what make life worth living.

The left side of your brain is your mother telling you that a Saab is good for you. "Eat your vegetables:' (In today's world, you need a car engineered like a Saab.) "Put on your raincoat:' (The Saab is economical. Look at the price-value relationship.) "Do your homework:' (The passive safety of the con­struction. The active safety of the handling.)

1982SAAB PRICE** LIST

9003-Door 5-Speed $10,400 Automatic 10, 750

900 4-Door 5- Speed $10,700 Automatic 11 ,050

900S3-Door 5-Speed $12,100 Automatic 12,450

900S 4-Door 5-SPeed $12,700 Automatic 13,050

900 Turb03-Door 5-Speed $15,600 Automatic 15,950

900 Turbo 4-Door 5-Speed $16,260 Automatic 16,610

All turbo models include a Sony XR 70, 4-Speaker Stereo Sound System as standard equipment. T he stereo can be, of course, perfectly balanced: left and right.

The right side of your brain guides your foot to the clutch, your hand to the gears, and listens for the "zzzooommm:'

Together, they see the 1982 Saab Turbo as the responsible car the times demand you get. And the performance car you' ve al­ways, deep down, wanted with half your mind.

* Saab 900 Turbo. Remember; use estimated mpg for comparison only. Mileage varies with speed, trip length, and weather: Actual highway mileage will probably be less. * * Manufacturer's suggested retail price. Not including taxes, license, freight, dealer charges or options desired by either side of your brain.

© 1981 SCIENTIFIC AMERICAN, INC

Page 6: Computer Algebra

A CAR FOR THE RIGHT SIDE OF YOUR B RAIN.

SAAB The most intelligent car ever built.

© 1981 SCIENTIFIC AMERICAN, INC

Page 7: Computer Algebra

© 1981 SCIENTIFIC AMERICAN, INC

Page 8: Computer Algebra

erate facility for simple algebra might solve the equation 3x - 1 = 2(x + 5). First he would "clear parentheses" by multiplying both terms within the pa­rentheses, x and 5, by 2, obtaining 3x - 1 = 2x + 10. He would then trans­fer the term 2x to the left side of the equation and the term - 1 to the right, changing signs as he goes and adding or subtracting terms as necessary. Thus in a single additional step he would obtain the answer x = 1 1.

In a computer-algebra program the steps to the solution of the problem have to be specified in somewhat tedious detail, and the shortcuts that might be recognized by a student during work on a particular problem must be spelled out. The first step in solving the equa­tion in our example wo uld probably not d iffer in the program from the stu­dent's method: the program would clear parentheses and obtain the expression 3x - 1 = 2x + 10. In order to reach the last line, however, the program would have to transfer the terms of the equa­tion one by one to a convenient side of the equal sign. One way to do this would be to program the computer to add an expression called the additive inverse to all the numerical constants appearing on the left side of the equal sign and to all terms that include variables appear­ing on the right side of the equal sign. Since - 1 is the only constant to appear on the left of the equal sign, the comput­er would add its additive inverse, + 1, to both sides of the equation, obtain­ing 3x - 1 + 1 = 2x + 10 + 1. The pro­gram would then rearrange the terms, if necessary, and add or subtract where possible, obtaining 3x = 2x + 1 1.

Next, the program would search the expressions on the right of the eq ual

sign for terms including variables and find the additive inverse of the first such term it encountered. In the example the computer would construct the additive inverse of 2x (namely -2x) and add it to both sides of the equation, thereby obtaining 3x - 2x = 2x + 1 1 - 2x. Once again the terms would be rearranged so that like terms could be combined: 3x - 2x = 2x - 2x + 1 1. Finally, the program would combine the terms hav­ing the same variable names and stop when a single variable appeared on the left side of the equation and a numerical constant appeared on the right: x = 11. Such an algorithm is neither the simplest nor the most efficient method one can devise for programming a computer to solve equations that have one unknown quantity, but it is not sufficiently com­plex either. There are many possibilities, such as the appearance of the expression 2x = 22 at some step in the solution of the problem, that the algorithm as we have described it is not equipped to deal with.

In developing an algorithm for com­puter algebra it is not necessary to fol-

low the procedure that is most efficient in manual calculation. Delaunay proved several theorems that he then employed to simplify intermediate calculations. Although the theorems could be incor­porated into a program, the effort nec­essary to express them in algorithmic form encouraged Deprit and his col­leagues to search for a method more compatible with mechanized execution. The one they invented requires transfor­mations that would have exceeded the abilities even of Delaunay, but the al­gorithm is easy to program and can be exec uted quickly with a computer. The development of new algorithms is one of the most active areas of investigation in computer algebra; it is largely be­cause of such work that computer-alge­bra systems have been improved signifi­cantly in the past few years.

In order to represent an algebraic expression in a computer program,

most systems store the minimum infor­mation needed to specify the expres­sion uniquely. Current representation­al schemes employ one of two basic ap­proaches or a combination of'the two. In one approach an expression is repre­sented as an inverted treelike structure in which the leaves are the operands. For example, suppose one wished to represent the expression 2(x + 4) in a computer. The leaves of the tree would be the terms 2, x and 4, although they would appear at d ifferent levels. Both the x and the 4 would be connected by upward-moving branches to a plus sign. The symbol 2, however, would not be linked to the plus sign. Instead branches from the 2 and from the plus sign would

a

j+\ b

c

/y�;/\

In [Ian (x + i)] - sin h-1 [Ian (2x)1

SIMPLIFICATION of an expression pre­sents a problem of choice for a corn puter-al­gebra system: given several equivalent forms of an expression, such as those in the upper part of the illustration, which is to be consid­ered the simplest? Many systems now being designed leave the choice partly to the person working with the system. The complex ex­pression in the lower part of the illustration is equal to zero for all values of x for which the tangents are positive real numbers. The ex­pression does not vanish for all values of x, however. If a computer-algebra system were to substitute zero for the expression, the rela­tion of the final answer to the original prob­lem could become quite obscure. The expres­sions In, tan and sinh -1 are the standard nota­tions respectively for the natural logarithm, the tangent and the inverse hyperbolic sine.

meet at the top, or root, of the tree, which would be labeled with a multipli­cation sign. The representation makes more efficient the search for subordinate expressions of predetermined form.

In the second scheme "slots" are as­signed in some definite order to repre­sent the information carried by an ex­pression. To represent a polynomial in one variable, for instance, one slot is as­signed to the name of the variable, the next slot to the degree of the polynomial (the largest power of the variable that appears in the polynomial) and the fol-

x 3 2 3 II -I 2x3 + 3x2 + Ilx - I

y y y

2

3 11 -I

4 /+,\ LEAVES /X\ 8 C �3 E

2 0

3y2 + 2y

2 -I

Ily + 2 -y -I

4(8 + C) + (A - 3E) 2x3 + (3y2 + 2y)x2 + (Ily + 2)x + (-y - 1) � 2x3 + 3X2y2 + 2x2y + llxy + 2x - Y - 1

REPRESENTING AN ALGEBRAIC FUNCTION in a computer may require several strat­egies. -The inverted tree diagram (a) is a simple and convenient means of representing the se­quence of operations that apply to the variables and constants in an expression. A polynomial function of one variable can be represented by a sequence (b) that consists of the name of the variable, the degree of the polynomial (equal to the largest power of the variable that appears in the polynomial) and the numerical values of the coefficients of descending powers of the variable. To represent a polynomial function of two variables (c) a generalization of the poly­nomial representation for one variable can be employed. Here the horizontal group of slots rep­resents a third-degree polynomial function of the variable x, whereas the vertical groups of slots represent polynomial functions of the variable y. The three polynomials in y are under­stood to be coefficients, or multipliers, of the terms of the polynomial in x that correspond to the three slots left blank. Hence the coefficient of the term x2 is 3y2 + 2y, the coefficient of the term x is 1 1y + 2 and the coefficient of the constant term of the pOlynomial in x is - y - 1.

143

© 1981 SCIENTIFIC AMERICAN, INC

Page 9: Computer Algebra

QUESTAR: 12 on the QUESTAR MOUNT

The Questar 12, latest addition to the Questar family of fine optical instruments, now has its own Questar-designed mount. A German equatorial type, it is notable for its 3600 continuous tracking in A.A. with precision tracking to better than 4 arc seconds. The Questar Mount is designed with over-sized components so that it can accommodate any Questar up to 18 inches. The standard mount shown is straightforward in design but can be modified so as to be compatible with more sophisticated tracking devices or other special equipment.

The Questar 12 is a superb instrument for the serious astronomer, for the university astronomy department or the engineer seeking sophisticated tracking and surveillance equipment for which Questar Corporation has a noted reputation.

Questar Corporation Box C, Dept. 20, New Hope, Pa. 18938 (215) 862-5277

Observing domes suitable for housing the Questar 12 or larger telescopes are also available at Questar.

C Questar Corporation 1981

144

lowing slots to the coefficients of de­scending powers of the variable. The set of information slots can be made a part of a tree-structure representa­tion when more complicated expres­sions must be stored.

Although every representation in a I\. computer must be unambiguous, any given algebraic expression can be represented in a variety of equivalent ways. One might want to construct an algorithm that would always represent an expression in the simplest form possi­ble; in such an algorithm, for instance, x + x + x might always be represented as 3x. People disagree, however, over what constitutes the simplest form of an expression. Stylistic preferences differ in much the same way as political ideolo­gies do: programs designed by conserva­tives make no transformations on an ex­pression unless they are specifically in­structed by the user to do so, whereas programs designed by radicals always change the user's expression to their own preferred form. Many people like to retain some control over the simplifi­cation of an expression because the utili­ty of a particular form may depend on the circumstances in which it is encoun­tered. In any event, even if people could agree on what is the simplest form of every expression, it is known that the construction of a general algorithm for simplification is impossible.

Computer-algebra systems can sim­plify expressions that are exceedingly large and complex. Such expressions may incorporate not only the elementa­ry polynomial, trigonometric and log­arithmic functions but also the more complex functions that can arise in sci­entific work. The user of a computer-al­gebra system can also define his own functions, specify their properties and

COMPUTE REMAINDER Rl WHENy + x

PRINT

GCO(x;y) = x

GCO( 102.131 ;251.591)

2 102,131 ) 251,591

204,262

Rl = I 47,329

Rl = O?

NO

FLOW CHART diagrams the operation of the Euclidean algorithm, a rigorous proce­dure for determining the greatest common di­visor (GCD) of two integers. (The greatest

© 1981 SCIENTIFIC AMERICAN, INC

Page 10: Computer Algebra

supply the rules of simplification appro­priate to them; indeed, the computer can sometimes be employed to find such rules. In most cases little is known in advance about how an expression will simplify. The most practical method is to retrieve from the computer's memory all the kinds of algebraic expression the program can already simplify, supply whatever additional algebraic identities the programmer can think of and allow the computer to proceed on its own. The method works surprisingly well: it can often simplify as effectively as an expert mathematician.

Because of the need in algebraic cal­culations for exact rather than approxi­mate answers, a computer-algebra sys­tem must be able to manipulate huge numbers with unlimited precision. In most computers numbers are ordinarily represented with a fixed number of sig­nificant digits, although the precision of the arithmetic operations can some­times be doubled or even increased sev­eralfold. For the purposes of computer algebra, however, no limits on preci­sion can be set in advance.

Consider one algorithm that can be employed to simplify a rational polyno­mial expression (one in which one poly­nomial is divided by another). The algo­rithm is a generalization and modifica­tion of a method called the Euclidean algorithm for determining the greatest common divisor (OCD) of two num­bers, which has been known for 2,200 years. The OCD of two numbers, such as 6 and 8, is found by a fixed sequence of repeated divisions; once the OCD is found, a fraction can be reduced to its lowest terms by dividing both the nu­merator and the denominator by the OCD. For the fraction 6/8 the OCD is 2 and the reduced form is 3/4.

When the Euclidean algorithm is ap-

COMPUTE REMAINDER R2 WHEN x + R1

PRINT

GCD(x;y) = R1

� 47,329

plied to a polynomial, however, the quo­tients and remainders in the repeated divisions can rapidly develop terms in which the fractional coefficients are ra­tios of enormous numbers. To avoid computing with enormous numbers, certain techniques have been devised for reducing the size of the numbers car­ried along in the computation. For ex­ample, a constant numerical factor can be eliminated from a polynomial in the Euclidean algorithm. Rounding any of the coefficients before the calculation is complete, however, would make non­sense of the final answer.

One of the most important algorithms developed in the past 15 years for

computer-algebra systems is an algo­rithm that can solve problems in indefi­nite integration. Integration is a basic method of calculus, first invented in­dependently by Newton and Leibniz, whereby an unlimited number of arbi­trarily small quantities can be combined to yield some specific quantity . In what is called indefinite integration, the meth­od is generalized : the outcome of the integration is expressed as a function of at least one variable instead of as some definite quantity. Such problems are en­countered often in the physical and bio­logical sciences, but their difficulty has bedeviled mathematicians for hundreds of years. It was once thought that no general algorithm for the solution of such problems could be constructed; the standard approach to their solution calls both for guesswork and for con­sulting published tables of integrals.

The algorithm that was successfully constructed for indefinite integration is similar to an algorithm subsequently de­veloped to determine an algebraic ex­pression for a finite sum of expressions that all have the same form [see illustra-

COMPUTE REMAINDER R3 WHEN R1 + R2

tion on page 139]. If an integral can be solved at all in closed form (rather than as the sum of an infinite series of terms), it is possible to predict the general alge­braic form of the solution and then work backward by differentiation (the reverse of integration) to determine the exact formula. The algorithm has been incor­porated into several computer-algebra systems. A numerical computer study of e ight widely employed tables of indefi­nite integrals discovered that about 10 percent of the formulas are in error; one of the tables was found to have an error rate of 25 percent.

The funds spent on the development of computer-algebra systems probably do not exceed $3 million per year in the U.S. Nevertheless, the systems al­ready exhibit great sophistication and diversity of design. There are about 60 such systems today, and they can be classified into three main groups that re­flect their historical development. The systems in the first group are the de­scendants of the earliest attempts to write programs in computer algebra; they were designed to solve specific problems in fields such as mathematical physics and theoretical chemistry. Be­cause a special-purpose program can be finely tuned for the kind of inp ut expect­ed, it can operate at great speed. Cur­rently such programs exist for solving problems in quantum electrodynamics (ASHMEDAI), lunar theory and general relativity (CAMAL), high-energy physics (SCHOONSCHIP), indicial tensor manipu­lation (SHEEP) and celestial mechanics (TRIGMAN) and for solving equations limited to polynomials and rational functions (ALTRAN). There is even a special-purpose program called ALDES­sAc/2 that can assist in developing new computer-algebra programs.

The systems in the second major

COMPUTE REMAINDER R4 WHEN R2 + R3

�L- _

R_4

_=

_0_

? __ �

I PRINT L.J:::\ L

__ G_

C_D

_�

_; y

_)

_=

_R

_3

_ --J1 �� PRINT

GCD(x;y) = R2

3

7,473 7,473

R4= G

R4 = O?

YES

GCD(102, 131;

2 51.591) = 2 ,491

STOP

common divisor is the largest integer that will divide both given inte­gers without leaving a remainder.) The algorithm was discovered at least 2,200 years ago; except for the four elementary operations of arithmetic it is the oldest algorithm known. Colored arrows in the

flow chart indicate the transitional states of the algorithm for the numerical example in the lower part of the diagram. The Euclide­an algorithm is not limited to integers; a slightly modified proce­dure can determine the greatest common divisor of two polynomials.

145

© 1981 SCIENTIFIC AMERICAN, INC

Page 11: Computer Algebra

group are the general-purpose ones, which provide the investigator with as many mathematical capabilities as pos­sible. Such systems can carry out the four basic arithmetic operations, per­form definite and indefinite integration and solve equations, including ordinary differential equations that express alge­braically how the change in one variable

depends on changes in other variables. The programs can also solve systems of linear or nonlinear algebraic equations, differentiate, simplify, factor, compute with finite or infinite sums of expres­sions called Taylor series and perform all the functions of the special-purpose systems, although not with as much speed and power. The four best-known

P = XS + 15x' + 85x3 + 225x2 + 274x + 120

o = 6x' + 77x3 + 304x2 + 363x + 90

GCO(P;O)

P+O

6x' + 77x3 + 304x2 + 363x + 90) XS + 15x' + 85x3 +

R1 = O?

NO

0+ R1

XS + 15x' + 2.825x3 +

Rl= 235x3 +

10 152x + 45 180 11,045

235x3 + 1,970x2 + 4,605x + 3,150 )8x' + 77x3 + 36

225x2 +

6 130x2 +

1.970x2 +

304x2 +

6x4 + 77x3 + 754, 192 x2 +

R2 = O?

NO

R1 + R2 R2 = _ 82.656x2 +

274x +

5,259x + 36

4.605x +

36

363x +

1 ,333,515x + 2,209

531.648x + 2,209

_ 148 986 005x + 290 660 220 854,001,792 ) 235x3 + 1 970x2 + 4,605x

36

120

1,170

3,150

90

790,650

591,840

+ 3,150

235x3 + 1.970x2 762.992,310x + 540,793,800 36

+ 5,930.568 R3 = O?

NO

R2 + R3

_ 121,495 (x + 5) 164,738

R4 = O?

YES

GCO(P;O) = x + 5

R3 = 121,495

- 164,738 (x + 5)

13.616.584,128x + 19,499.707.584 268,382,455 ) _ 82,656x2 + 531.648x + 591,840

2,209

82,656x2 + 531.648x + 591,840 2,209

R4= G EUCLIDEAN ALGORITHM applied to polynomials determines their greatest common divi­sor by repeated divisions, in the same way as it determines the greatest common divisor of two integers. The algorithm can give rise to huge intermediate numerical results that cannot be rounded off. For this reason the arithmetic operations in a computer-algebra system must have unlimited precision. Ordinarily a number stored in a computer is allotted a fixed amount of space in the computer memory, but in a computer-algebra system no fixed allocation can be made. Mathematicians who study the properties of large numbers have been attracted to this feature of computer-algebra systems. Colored arrows and the statements printed in color cor­respond to the steps of the algorithm diagrammed in the illustration on pages 144 and 145.

146

general-purpose systems are MACSYMA; REDUCE, a system developed at Stanford University, the University of Utah and the Rand Corporation; SCRATCH PAD, de­veloped by the International Business Machines Corporation, and SMP, de­veloped at the California Institute of Technology. They represent the most advanced achievements in computer al­gebra so far.

Computer-algebra systems designed to operate with microcomputers have now begun to appear. They are slower and less comprehensive than the general systems designed for large computers, but they can still perform far more com­plex calculations more accurately than many mathematicians can. The most so­phisticated and widely available such system is called mUMATH; it was devel­oped at the Soft Warehouse in Honolu­lu. MUMATH provides some of the capa­bilities of the general systems, although the size, memory and speed of the mi­crocomputer do not allow mUMATH to attack very complex problems. Never­theless, such systems (or their more powerful descendants) may find their way into personal microcomputers and perhaps even notebook-size calculators before the end of the decade.

Computer-algebra systems tend in­creasingly to be written in simple,

high-level programming languages that resemble ordinary mathematical ex­pressions. The systems are also general­ly designed to interact with the pro­grammer in a conversational manner. The beginner can often learn in a few minutes to solve many kinds of nontrivi­al problem beyond his power to solve by hand. With most general systems the user types in a command in a language similar to the computer languages AL­GOL or FORTRAN. If the command in­cludes fractions, exponents or other symbols that do not normally appear on the same line in print, the computer re­plies with a rewritten version of the ex­pression that d isplays it in more natural form. The user can then specify certain operations to be carried out on the ex­pression, such as adding it to itself, rais­ing it to a power, differentiating it or integrating it. The computer executes the operation, simplifies the resulting expression and prints it or displays it on a video terminal. If the operation de­pends on, say, whether the positive or the negative square root of an expres­sion is to be extracted, the computer queries the user before the calculation is finished.

Computer algebra has been applied in a variety of disciplines, including acous­tics, algebraic geometry, economics, flu­id mechanics, structural mechanics and number theory, and in the design of pro­pellers, ship hulls, helicopter blades, electron microscopes and large-scale in­tegrated circuits. We shall describe three additional applications in which com-

© 1981 SCIENTIFIC AMERICAN, INC

Page 12: Computer Algebra

© 1981 SCIENTIFIC AMERICAN, INC

Page 13: Computer Algebra

© 1981 SCIENTIFIC AMERICAN, INC

Page 14: Computer Algebra

ffWe're taking gteat color photos of Oldahoma-16,000 feet down':

C.). Waidelich. President and Chief Executive Officer. Cities Service Company. Tulsa. Oklahoma

A major breakthrough in seismology is increasing our success ratio in finding new energy reserves.

Mapping underground terrain - like we're doing here in Oklahoma - is nothing new. But Cities Service geophysicists are taking basic seismic data and adding a significant twist- the ability to isolate and recognize geophysical findings and attributes through a unique color process.

We call this development Cit·Chrome� Now when we look at seismic sections, we're able to see things we might have missed before.

Color seismic is helping us do a better job of finding new deposits - before a wildcat is even drilled. So when we do drill, our ratio of successful wells goes up.

This is just one of many advanced technological tools Cities Service is using. We're also using computers that process seismic data so that the subsurface can be visualized in three dimension, and satellite telemetry photos to help pinpoint untapped energy resources.

Cities Service geophysical information from all over the world is fed into our Technology Center in Tulsa for in·depth analysis. It's the newest, and one of the most advanced centers of its kind. This multimillion dollar complex symbolizes the commitment we've made to change America's energy future for the better.

CITIES SERVICE COMPANY

On top of the problem, part of the solution.

© 1981 SCIENTIFIC AMERICAN, INC

Page 15: Computer Algebra

Everything about David Plastowrepresents his companys philosophy. Which is why he wears a Rolex.

David Plastow is the cus­todian of a long and famous engineering tradition.

He is the Chief Execu­tive of Rolls-Royce Motors , and indeed, his manner and personal appearance exact-1y reflect the ethos of that company. That of the skilled engmeer.

Plastow takes a personal interest in any modification, however small .

"All our developments at Rolls-Royce are always evolutionary rather than revolutionary," he says .

"We are a highly personal business , and both our craftsmen and our customers have clearly defined ideas about what a Rolls­Royce should be. But while we don't tamper with those fundamental ideas , we are , of course , constantly searching for improve­ment. For instance, years ago, the gear selection on a Rolls-Royce car became com­pletely electronic. But, a driver likes to 'feel'

that the gear selection lever is doihg something . . . so we engineered the 'feel' back into it - so it's satisfying to use ."

David Plastow recog­nizes the similar philosophy behind the watch he wears .

"It's a Rolex Oyster Datejust. I'm told that the engineering concept of the Oyster case first appeared in 1926.

"Obviously this watch has changed and improved over the years but Rolex has stayed with the basic

idea because it was a very good one. It's ex­tremely tough, very reliable , and superbly engineered. After 50 years of development it's almost perfect':

Which, from the man who makes the finest cars in the world, is quite a compliment.

� ROLE X

Write /or broch u re. Rolex Walch, U. S.A . , Inc. , Dept. 298, Rolex B uilding, 665 Fifth Aven ue, New York, N. Y 10022. World headquarters in Geneva. Other offices in Canada and major countries around the world.

© 1981 SCIENTIFIC AMERICAN, INC

Page 16: Computer Algebra

puter algebra is making contributions. For investigations in plasma physics

and the development of fusion-energy sources some calculations require nu­merical and algebraic computer tech­niques to be combined. The algebraic formulas that describe the properties of a plasma in a magnetic field can become quite complex, and they tend to impede physical understanding. What has been lacking is a means for obtaining approx­imate rather than exact analytic expres­sions for such phenome'na. To solve the problem the Plasma Theory Group at

M. I.T. has devised a computer-algebra technique capable of partitioning the terms in the computation according to the physical processes thal generate them. By numerical methods one can then eliminate from the series of terms describing each process those that are relatively small. The result is an alge­braic expression that describes the dom­inant properties and remains sufficiently simple for the physical significance of each term to be perceived.

In order to derive testable predictions from theories of the interactions of ele-

Ja fonction R ne contient plus alleun terme periQdique ; e1le se trouve dont: reduite it son temle non periodique selll , tel'me qni, en tenant ('ompte des parties fOllrnics par Ies operations I �91 �6o l 349 et 4 1 5, a pour valeul"

- (t;

MASSIVE ALGEBRAIC CALCULATION completed by hand in 1867 was recomputed for the first time in 1970 with a computer-algebra system. The original calculation was undertak. en by the French astronomer Charles Delaunay and was published in two volumes; a page of the second volume is reproduced here. Delaunay's calculation, which took 10 years to fin. ish and another 10 years to check, gave the position of the moon as a function of time to a preci.

sion never before attained. Three errors were detected when the calculation was checked by

Andre Deprit, Jacques Henrard and Arnold Rom of the Boeing Scientific Research Laborato­

ries in Seattle. The major error, which gave rise to the other two errors, is outlined in color; the

expression should be 3 3 / 1 6 y2e'2. The checking required about 20 hours of running time on a

computer. Although computer algebra was responsible for exposing Delaunay's errors, the tao bles have since been turned: the remarkable precision of the calculation has been employed

to test a few new computer-algebra systems for accuracy before they were put into service.

No more cold coHee

with MUG·MATE Your personal cup heater.

Keep you r coffee/tea/so u p hot to the last d rop on this m i n iatu re hot p l ate. Pe rfect for off ice , home or school ! M oney back guarantee. S pecial Christmas Gift Oller! 10% d i scount on o rd e rs of 12 or more. Send us you r g ift J i st; we ' l l s h i p w i t h g i ft card i n yo u r name.

Ch ristmas del ivery guaranteed .

R U S H me __ MUG·MATE s @ $ 12 .95 + $1 .50 shipping each ( i n Calif. add 78¢ ST.). Enclosed is 0 check/M .D. or charge to 0 Visa or 0 M asterCard . Card # Exp.

Name

Address

City State

HO� I.

Apt

Zip

1 485 Bayshore Blvd., San Francisco, CA 94124

Garden Camera ! CALCU LATORS

Hewlett Packard HP 67 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . $ 288.50 HP 97 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 568.50 HP 3 1 E . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34.50 HP 32E . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42.50 HP 37E . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57.95 HP 33C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68.50 HP 34C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1 4.50 HP 38C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1 4.50 H P 4 1 C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 88.50 H P 4 1 CV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C.1I Syslem I . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Call Accessories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . , . Call

Texas Instruments TI 5 8 C . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79.95 TI 59 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 88.50 PC 1 00C . . . . . . . . .. . . . 1 5 5.00 TI M8A . . . . . . . . . . . . . 52.50

Chess Challenger Level 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78.50 Level 8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 04.95 Level 1 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1 9.50 Voice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . , . . 229.50 Bridge . . . . . . . . . . . . . . . . . . . 229.50

• VISA'

P rice. subject to chlnu, w ithout notici

Speed your order TOll F R E E !

r------., I C I I I t o r l o w price. I I on N l k o n , M l n o l t a . I O l y m p u l e n d . 1 I I M ajor B ro n d I I C a m er . . I �- - - -- - .

Call 1 (800) 223-0595 Or Send postlgl . nd h a n d l i n g to

GARDE" CAMERA 345 Se.ent h A.enue, N . Y . , N . Y. t OOOI

N ew York, AI • • k. & H l w l l i C a l l :

Tel : (21 2) 868·1 420 O p e n Weekd a y s 8:30-6:00 OPEN SU N D AYS 1 0-4 p.m, C l o s ed Saturdays

1 5 1

© 1981 SCIENTIFIC AMERICAN, INC

Page 17: Computer Algebra

computique computique computique ti·.,.. axnputar

S�·t . ..

4 - }. . .. �\ '

• APPLE II. I I PLUS • APPLE WRITER • MICRO·COURIER

• �W�l�I�' 48KI : ��APHICS TABLET : �����NICS

: ���LPPLOT • �Im�� I PAYROILI : ��L��TYPE • APPLE PASCAL l64KI • ODW JONES NEWS • ANAOEX

: �rs"i�(��J RtE� • gE���J�S • ml�s�MOLOR

• VISIPLDT EVALUATOR ' EXTENDED • VISIT RENO • CONTROLLER WARRANTY

AUTHORIZED DEALER AND SER VICE CENTER G E6� ������:TE Texas Instruments PROGRAM MABLE.

TI ·59 960 PROG . . . . . . 1 79.9S PC-l00C . . . . . . . . . . . . 1 69.9S LCD-PROG NEW . S9.9S TI-30 1 1 NEW . 1 8.9S TI-35SP SCI . . . . . 22.50 TI-40 SCI NEW . . 28.9S BUS A N A L I . . . 1 9.9S "SPEAK & SPELL. READ S9.9S BUS ANAL I I . 44.9S SPEAK & MATH . . . . . ' S9.9S BUS CARD . 39.9S TOU C H & TELL NEW . S4.9S MBA . . . . . . . . . . . . . S4.9S TI-5100 D iSPLAy . . . . . 39.9S INVEST A N A LYST . 48.9S TI-5010 H A N D / PR INT . 49.9S TI-54 SCI NEW . 39.9S TI-5120 PR INTER . . . . . 59.95 TI-551 1 NEW . . . . 44.95 TI-5130 PR INT/D ISP . 79.95 TI-57 PROG SCi . . . . . 39.9S TI-5135 PRINT/ D ISP . . 79.9S TI-58C PROG CALC . 89.9S TI-5142 PR INT/ D I S P . 99.95

F/3 HEWLETT Your �n� PACKARD Headquarters

THE HP·85 ! Complete Enhancements,

Peripherals and Accessories

H P -61 . . . 289.95 HP-91 . . . . . . . . 584.95

HP-33C S C I 19.95

HP':34C SCI . . . 1 14.95

HP-38C BUS/RE . 1 1 9.9 5

HP-32c SC I 49.95

HP-37E BUS . . . . . . . 59.95

HP-l I C NEW . . . . . CALL HP-12C NEW . . . CALL

HP-43. 4 1 C V . CALL HP-85 . CALL

HP-125 NEW . . . . . CALL

• T O U C H T H E FUTU R E

"'." ATA R I 400 ( 1 6 K ) . . . . . . . . . . . . . . . . . 349.95 ATARr V I S I CA L C AVA I LA B L E . . . . . CALL

.1:: C H E S S CHAL L E N G E R 1 . . ..",. S E N S O R Y C H E S S . . . . . . . 89.95

. 1 29.95

_ 5813 S C I P R O G R A M M A B L E . . . . . 34.95 1 1 82A P R I N T/ D i S P LAy . . . . . . . . . . 74.95

SHARP TAL K I N G CLOCK . . . . . . . . . . . . . . 79.95 _ EL-6200 DIG EXEC SEC . . . . . . . . . 89.95

CASIO AA-81 D I G/ANALOG A L A R M . 69.95 VL-T O N E M U S I CAL I N S T R U M EN T/ CA L C . . . . 69.95

Wl00 D E P T H T E S T E D A L A R M C H R O N O . . . 39.95 FX7 1 00 SCI C H R O N O ALARM CALC . . . 49.95 FX3500 SCI P R O G R A M M A B L E CALC . . . . . . 39.95

(71 4) 549-7373 (800) 432-7066 (800) 854-0523 INFORMATION LINE TOLL FREE (Within CAl TOLL FREE I Oul,lde CAl

WE W I L L MEET OR BEAT ANY COMPETITOR'S ADVE RTISED PRICE ON MOST ITEMS I F HE HAS THE M O S E . ON HAND. V I SA , MAST E R C A R D . M O N E Y O R D E R , P E A S . C K . ( 1 4 WA KG . DAYS TO C L A J . COO ACC E P T E D : M IN . $4 .95 S H I P P I N G U .S .A . ; A I R ON R E QST. · C A L R ES A DR 6% SALES T X ' A L L MRSE SUBJ TO A V A i l . ' P R I C E S S U B J . TO C H A N G E : S A·p

32 1 1 so. HARBOR BLVD.

SANTA A N A , CA 92704 N EWPORT

1 7 1 4 1 549-7313

W R I T E OR CA L L

F O R F R E E

CATA LOG

PASAD E N A M I D-W I LSH I R E

(2 1 3 1 795-3007 1 2 1 3 1 385-77 7 7

T A R Z A N A LAWN D A L E

1 2 1 3 1 705-7507 (2 1 3 ) 370-5795

WEST LOS A N G E L E S B R E A

(2 1 3 ) 82 00423 ( 7 1 4 1 990-6600

PROFESSIONAL D ISC O U NTS

"Ph,sieist's rire" with the Texas Fireframe® Grate

.. Amazing amount of heat'"

AND GARDENS; "Easy to start" TIME; "slow­burning" NEW YORK TIMES; "No rotation or stirring of the logs" SCIENTIFIC AMERICAN; "2 .6 x more efficient" POPULAR SCIENCE. " Easy to maintain" D. J. Ticko, New Fairfield , cr. "Does a fantastic job" Frank Stanton NYC.

For full scientific description , see L. Cranberg, Am. Jour. Physics , June ' S I . Reprints on request.

Grate Model 5-25: 25" front width, 2 1 " back width , 1 3 " deep . Model KS-25: same, heavy-duty , gill-boxed. Model U-25: 25 x 2 1 x 1 5 . Model U - I 7 : 1 7 x 1 4 x 1 3 . Model U-33 : 33 x 29 x 1 5 . Copyrighted instruction s .

--,>-25 @ $44 . 95 (26 #); ---11-25 @ $44.95 (28 #) ---11- 17 @ $ 3 6 . 95 (20 #) ; ...:.JJ-33 @ $56.95 (35 #)

---1<5-25 @$5 1 . 95 (3 1 #) ; --.Reprint ( s-a envelope) Add 1 0% for shippi ng in U . S .; Endose check or Visa, MC # Exp. Date __ Name

Address

City State __ Zip ____ _ TEXAS FIREFRAME CO.

P.O. Box 3435 Austin, Texas 78764

152

cAnyo1\.e for Te1\.ons? __

If your racket is tenons, doubles or s i ngles, and you want a perfect match every t ime, you can l e a rn from t h e profe s s i o n a l s . They know a classic way to join two pieces of wood toge ther i s w i th a tenon t h a t f i l s i n t o a mort i se .

Fine Woodwork ing maga z i n e s p e a k s t h i s l a nguage to more t h a n 200,000 readers-people se riou sly i n t e rested i n making beau t i fu l things out of wood. Whether you a re an asp i r i n g novice o r an accompl i shed expert, you ' l l f ind i t an e spe­c i a l l y i n furmative magazi ne, with fi nely detai led a r t i c l e s abuu t techniques and tuuls , materials and design. I t ' s wri t ten by master c raftsmen whu sha re the i r many years of woodwurking expe r­ience. A n d i t ' s pr inted on heavy paper to with­stand years of refe rence. A l l back issues a re in print and i n dexed periodic a l l y .

I f y o u wan t to become a be t t e r woodwo rke r, send $ 14.00 fur a une-year subscri ptiun (6 i ssues). Or c a l l us tol l -free, 1 -800-243-7252 . to cha rge your order to V i sa or MasterCard (Connec t i c u t res idents c a l l 1 -426-8 1 7 1 ).

Fine wrn\\brking®

The Taunlon Press 52 Church Hill Rd. P.O. Box 355KC Newtown Connecticut 06470

mentary particles it has been necessary to evaluate expressions that can include thousands of integrals, many of which have unusual and deceptive mathemati­cal properties. The numerical evalua­tion is open to two of the criticisms of numerical methods we have already mentioned: it is not as useful as an alge­braic result for showing how contribu­tions from various physical phenomena affect the interaction, and it introduces errors of approximation_ As experimen­tal techniques are refined the uncertain­ties introduced by approximation can become so large that the predictions of the theories cannot be distinguished. It is likely the application of computer-alge­bra methods will be of great help in gen­erating theoretical predictions of the re­quired precision.

In the study of theoretical alternatives to general relativity a test called Bir k ­hoff's theorem has recently become popular . The mathematician George David Birkhoff of Harvard University showed in 1923 that the general theory of relativity excludes the propagation through space of gravitational p ulses that might conceivably be generated by radial pulsations of matter in a star. Be ­cause no such pulses have been detected . and because they are impossible accord­ing to both Einstein's and Newton's the ­ories of gravity, the exclusion of the pul ­ses has come to be expected of any po­tential gravitational theory. The calcu­lation req uired to determine whether or not a theory of gravity satisfies Birk­hoff's theorem is lengthy, but it has now become straightforward with computer­algebra systems. A gravitational theory formulated by C. N. Yang of the State University of New York at Stony Brook was recently shown by the use of a com­puter-algebra system to violate Birk­hoff's theorem. The calculation correct­ed a hand calculation that had been be­lieved and cited for many years.

I t is important to recognize that com­puter-algebra systems need not be

employed solely for large calculations. Relatively simple problems often arise for which algebraic manipulation can contribute to understanding or make nu­merical calculation more efficient. One can sometimes reduce numerical com­puter-processing time by a factor of 100 or more by the j udicious application of algebraic processing. Moreover, com­puter-algebra programs can substitute for an entire library of mathematical reference works. "Knowledge-based" programs that include integration meth­ods, methods for solving differential equations and the like may make such reference works as obsolete as a table of logarithms. As inexpensive comput­ers are improved, computer algebra will become available for teaching, study, research and perhaps unthought-of ap­plications to all interested people in their own offices and homes.

© 1981 SCIENTIFIC AMERICAN, INC

Page 18: Computer Algebra

'!' ..

,,,., .<1

SUBSCRI PTION DEPT. BOX H 1 172 COMMONWEALTH AVENUE BOSTON, MASSACHUSETTS 021 34 Ple.se m.ke checks p.y.ble to Woods Hole Oce.nographic Institution, Woods Hole, Massachusetts 02543.

Please enter my subscription to OCEANUS for one ye.r .t $15.00 (four issues). o p.yment enclosed 0 bill me

N.me ..•......•.••••••••••..•.•.•..•..••..•..•••••.•... Address •......•••••......•.......••.... ... . . . . . . . .. . . . . . . . . .•••

City .••. •...••. ....•••••..•.••.••••.••.•••.•.•..•.• State ......................... ............... Zip . . . . . . . . . . . . . . . . . . . . ..

© 1981 SCIENTIFIC AMERICAN, INC