Synthdiv 83: Synthetic Division for the TI-83 Version 1.0 14 December, 1999 (C) 1999 Bennett S. Kalafut ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1) Abstract 2) How To Use the Program 3) About the Algorithm 4) Technical Information 5) Program History 6) Contact Information 7) License (Relax, it's shorter than you think, and you probably only need 1, 2, 6, and 7 anyway!) 1) Abstract This program uses the Synthetic Division algorithm to divide a polynomial by a binomial. 2) How To Use the Program Run it, of course! When it asks you to input the coefficients of the dividend as a list, that means to enclose the coefficients in the curly brackets {} separated by commas. If a term is missing (a power is skipped, in other words), be sure to include a 0. You're then asked to input the term A from the binomial X MINUS A--be sure you have the correct sign on it. If the terminology confuses you, here is a review, in easy to read ASCII :-) : Quotient ________ Divisor)Dividend 3) About the Algorithm The algorithm in use is the "Synthetic Division" algorithm from high-school algebra textbooks, used most often (at least before graphing calculators were commonplace :-) ) to test suspected roots of polynomials. It's pretty simple, really--it's a roundabout way of doing the classic "long division" algorithm that is learned by six-year-olds (who are unwittingly learning a special case of polynomial division, where x is replaced by 10). The first coefficient of the dividend becomes the first coefficient of the quotient. This is true because the divisor's first term is x, and the first term of the dividend divided by x is always that term/x. The first coefficient of the quotient is multiplied by A (with the divisor being x-A) and then the SUM (because its sign is reversed) of it and the next coefficient of the dividend becomes the next term of the quotient. If the final coefficient is zero, the polynomial is evenly divisible by the binomial. This all works because what you are doing, in essence, in the long division, is dividing the remainder of the first division by the divisor, and because the coefficient of the first term of the divisor is 1, the coefficient of the first term of the nth quotient is always equal to the first coefficient of the nth dividend. Put in fewer words, it works because division is recursive! (Did you realize that? Neither did I, at the time I originally wrote the program!) It's especially simple in this case because the divisor has only two terms and its first coefficient is 1. Bored already? I thought so. Anyway, here it is, drawn out, for the division of x^2+2x+1 by x+1: Long Division: x + 1 ________ x+1)x^2+2x+1 x^2+ x ______ 0 x x+1 ___ 0 Synthetic Division: |1 2 1 | -1 -1 ---------- -1|1 1 0 Those of you who program for the TI-8x Platforms may be wondering about the use of lists. In many of my 82 Progams (most of which aren't posted to the Internet, yet) they're used quite extensively. On the 80, 81, and 82/83, they're really the most convenient way to deal with coordinates and vectors. On all of the 8x calculators, list processing can be used in place of symbolic manipulation. The built-in dynamic memory allocation and list operations make them convenient and flexible. This is a programming route that I haven't seen fully explored--I can see lists being used for much more than polynomial division. 4) Technical Information Bytes on Calculator (Tokenized): 322 Variables Used: Real Numbers--A,C,Q Lists--L5, L6 5) Program History I originally coded this algorithm for the 82 way back in 1995 as a high-school freshman as part of a program "Ratroot" designed to test roots suspected from the Rational Root Theorem. The program outlived its usefulness in that form-- all it did was say whether or not the suspected root was a true root. Well, I realized that the scrap of data known as L5 was highly useful--as the quotient! I made a few mods, renamed it "synthdiv", and circulated it at my high school. When I later got an 86, I ported it to that platform. This version, strangely enough, is a port from the 86 to the 83, which is strange considering that the 82 version could have been sent straight to the 83. Well, version histories are shot to hell, but the 86 version worked a lot more efficiently than the 82 version did. This version (83 V.1) is actually the best of them--some superfluous, space-consuming code was removed as were some unnecessary parantheses. The assignment of dim(L5) to Q further cut down on space. Additionally, I corrected my terminology errors, which resulted in confusion for anyone who couldn't look at the program and tell what I REALLY meant. It's strange--the best version was produced at 4 A.M. during Finals at Tulane. 6) Contact Information My permanent e-mail address is bkalafut@bigfoot.com. Send all correspondance there, with [SYNTHDIV 83] in the header of the message. This may be the longest set of documentation in existence for a TI-BASIC program. (It's weighing in at over 6 KB!) Please, don't flame me for this--I've gotten a surprising amount of questions about how to use the program and how it works. If anybody reading this is interested in helping to develop a more general polynomial division program for the 8x calculators (preferably the 86), please, e-mail me. 7) License Word has been going around that some shady companies have been pirating TI Calculator freeware, removing identification, and selling it. Therefore, I must include this legal information. This program may be distributed free of charge, provided that the documentation (this file) is distributed with it. Code may be modified as long as a copy of the code is sent back to me. I will update the file and credit you in the documentation if you improve the program. The "protect" option may not be set. Users of the program accept it as-is; I am not responsible if an error in the program results in a reduction in your grades or a loss of your time. Furthermore, I am not to be held responsible if this program is used to cheat on coursework. Distribution of this program may be done without my explicit permission in print or archival form as long as it is done free-of-charge. Anybody distributing this program for a fee must seek my written consent. Any reference, either summarized or verbatim, to this documentation, must include a reference to the source.