Old Newsletter Archive


THE MATHWRIGHT LIBRARY NEWSLETTER, Dec1999, VOL 1, #9

A publication of Bluejay Lispware
James E. White, Editor
The monthly publication of the Mathwright Library: http://www.mathwright.com


IN THIS ISSUE:
1] Some tips for using Lava
2] Taylor Polynomial Exploration in Lava

1] Some tips for using Lava

    We would like to extend a hearty Welcome! to our new visitors, and to everyone, Season’s Greetings and Best Wishes for a joyful and productive New Year (Century? Millenium?) All of those.

    Many of you came to our site, having read about us in the November, 1999 issue of the College Mathematics Journal or in the December, 1999 issue of the Mathematics Association of America Publication, Focus. However you came to find us, you are welcome, and your feedback, comments, criticism and suggestions are always welcome.

1] Some tips for using Lava

     In the previous Newsletter, we announced Lava! and promised that many exciting Java developments would follow. Since then, we have posted four WorkBooks at the Library. These are: curves, taylor, symbolic, and newton. More will follow shortly.

    But we have not had much feedback on these WorkBooks, and we suspect that the reason may be partly attributable to the fact that Lava is a Java 2 Applet, and so, there are certain steps one has to take (now) to get it working properly in your Browser. This will inevitably change as Java 2 becomes more universally accepted, and as the hardware and the Internet itself catches up, but, for now, there are certain steps that you should take for best performance.

    These may not be familiar to you, and so we will step through them here in order to encourage you to explore this new technology with us. You will find that it is worth the trouble.

A] First of all, you know that Applets run in Browsers (typically, Microsoft Internet Explorer, or NetScape). This is unlike the Mathwright Library WorkBooks in that no software is permanently downloaded to your machine. For some, that is a virtue. But it holds the promise (now, only a promise) of true platform interoperability of the software. Most Browsers are equipped to run Java 1.1 Applets, but, at present, none have the capability of playing Java 1.2.2 (also called Java 2) Applets. Sun’s solution is to provide a “plug-in” for your Browser (NetScape 4.5 or better, MIE 5.0 or beyond) that enables your Browser to read Java 2 code.

     It works this way: The first time you visit the Lava! page at the Library: www.mathwright.com/lavapage.htm and you attempt to open Lava! if your Browser is not able to read Java 1.2.2 Applets, it offers to download the Java 1.2.2 “plug-in” for you. You follow the step-by-step instructions to install it, and thenceforth, you will be able to read web pages that incorporate Java 1.2.2 code. It is a familiar procedure for those of you who have, for example, downloaded other plug-ins (for example, for reading pdf files). In any case, it is a one-time operation that simply upgrades your Browser. Now Lava requires the Java 1.2.2 plug-in, and should ask for it, even if you have the Java 1.2.1 plug-in installed. It is important that you install at least the Java 1.2.2 version.

B] Once you have the plug-in installed, there are some other considerations. As mentioned on the Lava Page, you should be using screen resolution at least 1024x768. This is because Lava! is a multipage Applet. It plays books with many pages, and so scrolling is neither necessary nor desirable. It is best if the entire page fits on your screen, and that will happen if the screen resolution is at least 1024x768. Also, you should have at least 32M Ram (more is better) to view the books comfortably.

C] Java was cleverly designed for the web. When you open a Java Applet, the actual program that will run on your computer is brought down (and cached) on your machine as needed. So when you first open Lava! there should be a delay, while the WorkBook itself is being downloaded from the server. Depending on your connection, that may be only a moment (WorkBooks are generally smaller than GIFs), or it may be as long as a minute. You will know that things are ready when the Lava! banner appears in the new window. You should maximize this window to view your WorkBooks, but first, you will have to know which WorkBooks are available. They are listed on the Lava Page from which you launched the Applet. So far, they are: curves, taylor, symbolic, and newton. (all lowercase). You may move the Lava Window around to view the names when the latter is not maximized. The reason for not making a directory available to you is that Java Security restrictions make it extremely difficult (without going through many hoops) to read directories on remote machines. So you must simply type the name. Later, if you want to read a different WorkBook without starting Lava! again, just restore the Lava Window so that you can move it around to see the list of WorkBooks, then maximize it again, and select File, Open, and type the name of the new WorkBook. This will avoid your having to reload Lava!.

D] Now Lava! is a complete Computer Algebra and Graphics Language, already having almost 200 built-in functions, and arbitrarily many functions defined in terms of those. When your WorkBook comes over the web, only those parts of the language are brought over to your machine as are immediately needed. So generally, even when the page is open, the system will wait until you push a button or something before it brings the rest of the language. Thus, there will usually be another delay until the entire language is on board. Once that happens, there should be no further lengthy delays, and you should be able to read books smoothly, as though the language was installed on your hard-drive. These delays are due to the necessary growing-pains of a new technology that aims to open up computation to software that is distributed all over the web. It is worth the wait to see what Lava! can do.

E] Most Applets are single-purpose appliances, dedicated to doing one thing well. On the other hand, in the spirit of all Mathwright explorations, the Lava! Applet aims to provide a rich and diverse environment for mathematical experimentation. It is like the Mathwright Library Player in that regard. This single applet can play an unlimited variety of WorkBooks, and that is the reason for its size. We urge you to try it out. Especially, let us know about problems you may have with it. This is the best and surest way we have to improve it for you. So visit our demonstration page: www.mathwright.com/lavapage.htm We will be adding WorkBooks frequently to the list.

2] Taylor Polynomial Exploration in Lava

In this piece, we report on a new Lava! WorkBook that we hope you will find both useful and entertaining. It illustrates the synergy reached by combining algebra and graphics in support of Calculus. The taylor WorkBook is designed to support experimentation. In particular, the player may calculate Taylor Polynomial approximations to functions at 0 to any desired degree. These polynomials are exact rational polynomials, not decimal approximations. This is important for the sort of algebraic exploration we want to support. These exact rational polynomials may then be manipulated and combined algebraically, and they may be differentiated, and finally, various expressions in them may be graphed. The best way to illustrate this is with some examples.

Suppose, for example, one wanted to approximate the Euler function exp(t) at 0 to degree 8. He would see: EXP(0)+EXP(0)*T+1/2*EXP(0)*(T^2)+1/6*EXP(0)*(T^3)+1/24*EXP(0)*(T^4)+1/120*EXP(0)*(T^5)+1/720*EXP(0)*(T^6)+1/5040*EXP(0)*(T^7)+1/40320*EXP(0)*(T^8) together with the graph of this degree-8 polynomial superimposed on the graph of exp(t). In this form, it is not really useful for algebraic manipulation, so the player might tell the system to replace all occurrences of exp(0) with 1, and calculate again. Now the system prints: 1+T+1/2*(T^2)+1/6*(T^3)+1/24*(T^4)+1/120*(T^5)+1/720*(T^6)+1/5040*(T^7)+1/40320*(T^8)

At this point, the player could make this polynomial function a new “object” by giving it a name, say p(t). Now he could evaluate the derivative with respect to t, and see:

1+T+1/2*(T^2)+1/6*(T^3)+1/24*(T^4)+1/120*(T^5)+1/720*(T^6)+1/5040*(T^7) Not surprising, but notice the importance of exact rational calculation. Next, the player, being aware of the identity: exp(x)*exp(y) = exp(x+y) might calculate for his polynomial approximation: p(x)*p(y)-p(x+y). The result would be:

1/40320*X*(Y^8)+1/10080*(X^2)*(Y^7)+1/80640*(X^2)*(Y^8)+1/4320*(X^3)*(Y^6)+1/30240*(X^3)*(Y^7)+1/241920*(X^3)*(Y^8)+1/2880*(X^4)*(Y^5)+1/17280*(X^4)*(Y^6)+1/120960*(X^4)*(Y^7)+1/967680*(X^4)*(Y^8)+1/2880*(X^5)*(Y^4)+1/14400*(X^5)*(Y^5)+1/86400*(X^5)*(Y^6)+1/604800*(X^5)*(Y^7)+1/4838400*(X^5)*(Y^8)+1/4320*(X^6)*(Y^3)+1/17280*(X^6)*(Y^4)+1/86400*(X^6)*(Y^5)+1/518400*(X^6)*(Y^6)+1/3628800*(X^6)*(Y^7)+1/29030400*(X^6)*(Y^8)+1/10080*(X^7)*(Y^2)+1/30240*(X^7)*(Y^3)+1/120960*(X^7)*(Y^4)+1/604800*(X^7)*(Y^5)+1/3628800*(X^7)*(Y^6)+1/25401600*(X^7)*(Y^7)+1/203212800*(X^7)*(Y^8)+1/40320*(X^8)*Y+1/80640*(X^8)*(Y^2)+1/241920*(X^8)*(Y^3)+1/967680*(X^8)*(Y^4)+1/4838400*(X^8)*(Y^5)+1/29030400*(X^8)*(Y^6)+1/203212800*(X^8)*(Y^7)+1/1625702400*(X^8)*(Y^8)

This polynomial in two variables is equivalent to 0 up to degree 8. And the graph of p(t)^2-p(2*t) immediately indicates that.

Next, the student might ask what the Taylor polynomial approximation to exp at x=1 looks like. This is easy to obtain, say to order 5, by returning to the polynomial page, and entering: exp(t+1). He sees: EXP(1)+EXP(1)*T+1/2*EXP(1)*(T^2)+1/6*EXP(1)*(T^3)+1/24*EXP(1)*(T^4)+1/120*EXP(1)*(T^5) Which is visibly equal to EXP(1)*( 1+T+1/2*(T^2)+1/6*(T^3)+1/24*(T^4)+1/120*(T^5)).

More interesting perhaps would be to approximate sqrt(1+t) at 0. To order 5, Lava reports that this is:

1+1/2*T- 1/8*(T^2)+1/16*(T^3)- 5/128*(T^4)+7/256*(T^5). If we set this to the polynomial object q(t), then the evaluation of q(x)^2 yields:

1+X+21/512*(X^6)- 3/256*(X^7)+81/16384*(X^8)- 35/16384*(X^9)+49/65536*(X^10)

This is congruent to 1+X to order 5, which was to be expected.

One could illustrate a variety of trigonometric identities using this little environment, and all output (in its present “telegraphic” – 1-dimensional form) may be easily cut and pasted from Lava to any document, as it was here.

The collateral graphical exploration, which is a natural partner to these calculations is more difficult to represent on the pages of this Newsletter. My advice: go to: www.mathwright.com/lavapage.htm and open up taylor and see for yourself.

                                                                                                                                                      

James E. White, Editor

If you came here from the old building,

click on the picture below to check out our new location...