Welcome to calcE

About calcE

What is calcE?

calcE is a collection of Mathematica packages and supporting documentation. The goal is to improve the power and ease of use of Mathematica through extensive use of Mathematica's internal programming language, with emphasis on graphics.

The calcE Story

calcE grew out of my frustration with the standard Plot command in Mathematica. In December 1990 I began tinkering with the Plot command to see if I could improve it. I found that I could capture the results of Plot, disassemble them, and put them back together the way I wanted. I also found that could capture the contents of the command before execution, and have Mathematica itself translate them into its own language. It then became possible to use easy English words in place of obscure and lengthy options, and to have each item recognized as what it was (function, label, style, geometric object, etc.) and used accordingly.
    I also began applying the same techniques to other commands. Since I am involved in developing and administering a teaching laboratory, I wanted to make using Mathematica as easy as possible for students, who are nearly always new to Mathematica but need to begin using it immediately. As a result calcE concentrates on the basic everyday activities of Mathematica, such as defining functions, producing graphics, making tables of values, performing algebraic manipulations, and solving equations.

The calcE Philosophy

I believe that Stephen Wolfram and the programmers at Wolfram Research have done an outstanding job designing and implementing the Mathematica kernel. They have made a great number of excellent design decisions that make Mathematica an extremely powerful and flexible tool.
    But many of those design decisions have also made Mathematica more difficult to use. I think it is neither desirable nor necessary for non-expert users, or even expert users who are just trying to get something done, to have to face the consequences of every design decision. It is possible for Mathematica to be both powerful and easy-to-use. Here are some of the principles I have tried to follow in the development of calcE:

-- Syntax should be as simple and flexible as possible.

-- All commonly used commands and functions should be accepted in lower case 
    form.

-- Whenever possible, there should be no restriction on the order in which items 
    appear inside a command.

-- Commonly used options should be replaced by easy-to-remember "keywords", 
    single words appearing as items.

-- A single comprehensive command is better than a lot of specialized 
    one-gimmick commands that are difficult or impossible to use in combination.

-- When defining enhanced commands, the standard Mathematica syntax should 
    still work, giving the same result. The original command should still be 
    accessible to the user.

Files Included

Packages

calcE.m
    contains everything in the five packages below in one convenient package for 
    easy loading. Uses 900K of kernel memory in Macintosh version 2.2.
InitE.m
    contains many utility routines used by the other packages, lower case 
    substitutions for standard Mathematica words, and the EOn/EOff and 
    lcOn/lcOff routines that control conversion to enhanced commands and 
    conversion of lower case words, respectively. Uses 92K of kernel memory in 
    Macintosh version 2.2. Required by all other packages.
MathE.m
    contains routines for everyday use concerning basic numerical calculations and 
    algebra. These include the enhanced commands DefinE, ExpandE, FactorE, 
    MaxE, MinE, NestE, NestListE, NSolvE, RoundE, SolvE, and TablE; also 
    facilities for defining and using Piece functions, and several other minor 
    improvements. Uses 75K of kernel memory in Macintosh version 2.2. 
    Automatically loads InitE.m if needed.
PlotE.m
    contains the enhanced command PlotE. Uses 392K of kernel memory in 
    Macintosh version 2.2. Automatically loads InitE.m and MathE.m if needed.
TeachE.m
    contains routines for use in a teaching laboratory and for general use in 
    calculus. The enhanced commands DiffE, IntegrateE, and NIntegratE 
    are included, along with the following routines: CSpline, Difference, 
    PartialSum, DRule, Euler, FindInverse, ImplicitD, Improper, 
    Subst, IBP, InterP, RandomFunction, TrigSolve, Newton, Riemann, 
    Trapezoidal, Simpson, Cobweb, SlopeMovie, DerivMovie, ParaMovie, 
    DrawArea, AreaGraph, and DrawAreaGraph. Uses 328K of kernel memory 
    in Macintosh version 2.2. Automatically loads InitE.m, MathE.m, and PlotE.m if 
    needed.
Plot3DE.m
    contains the enhanced command Plot3DE. Uses 38K of kernel memory in 
    Macintosh version 2.2. Automatically loads InitE.m and MathE.m if needed.

Notebooks

InitE.ma
MathE.ma
PlotE.ma
TeachE.ma
Plot3DE.ma
    all contain the code for their respective packages in notebook form for 
    convenient browsing. These can also be directly loaded if desired just like 
    packages.

Documentation

CalcEDoc.ma  (This file) 
   contains general information about calcE and documentation for the 
    user features of InitE.

The remaining documentation files are loaded with examples showing how calcE can be used.

MathEDoc.ma
    contains documentation and examples for the package MathE.m.
PlotEDocI.ma
    contains documentation and examples for the package PlotE.m, except for 
    geometric objects.
PlotEDocII.ma
    contains documentation and examples for geometric objects in the package 
    PlotE.m.
TeachEDoc.ma
    contains documentation and examples for the packages TeachE.m and 
    Plot3DE.m.

Installing and Using calcE

The simplest thing to do is to copy all packages (or if you prefer, all notebook versions of the packages, or both) into your Mathematica "Packages" folder or directory. You may need assistance from your system adminstrator if installing on a Unix system.
    You can then load calcE by executing the command line

<<calcE.m

or similarly to load the smaller packages. You may wish to have calcE loaded automatically when Mathematica starts up. You can do this by placing this command line in the package init.m, a package used by Mathematica specifically for such purposes.
    In any case it is best to load calcE.m at the beginning of a work session. If you do some other calculations first, or attempt to use commands or keywords from calcE before loading the package, you may fall victim to the "shadow trap", where commands or other words defined in a package are hidden because they were previously used in the Global context (where new words ordinarily go). If you see a number of "shdw" warning messages when loading calcE, it is simplest to quit Mathematica and restart it. Even for experts this is often the quickest way to get a fresh start.
    Not sure what to do first? Open up one of the documentation notebooks, and evaluate the example input cells as you go along. If you have plenty of memory, you can just select "Evaluate Notebook" from the Action menu.

Space, Time, and Reality

calcE shares some of the problems of Mathematica itself.
    calcE will add to the usual problems of RAM shortage. The full calcE package takes up about 900K of kernel memory in the Macintosh 2.2 version, even more for earlier versions, although the package itself is just a little over 200K. It also takes 1-2 minutes to load. You can cut down on these problems somewhat by removing the usage messages, which take up about 25% of the code. The main disadvantage of doing so is that the Function Browser (notebook versions 2.2 and higher only) then does not contain information on calcE.
    PlotE runs about 3 times slower than Plot. This is hard to complain about since Plot by itself does so little, but it is an important issue for teaching laboratories using slower computers. You can help somewhat by changing the option Asymptotes->True to Asymptotes->False, which tells PlotE not to attempt to locate and draw asymptotes.
    Finally, does calcE gum up your ordinary uses of Mathematica? No, it is 99.4% compatible with standard Mathematica syntax. The single major exception is that SolvE by default does not give solutions in Rule form. To fix this, you can change the option Rules->False to Rules->True. Another step to ensure compatibility is to execute EOff (see InitE documentation below), which turns off conversion of standard functions to enhanced functions. Then you have direct access to the old Plot, the old Solve, etc.

About This Version

Version 2.0 is the first version released to the public. I am not starting with version 2.0 in the way that some people start numbering their checks at 2000; this is a legitimate version number. In the last two years I have been through versions 1.0, 1.1, 1.2, etc., each with many subversions.

Help and Support

The packages MathE and PlotE are fully documented, and the documentation for TeachE and Plot3DE is adequate or better, in the documentation notebooks listed above. InitE is not properly documented at this time. All commands, functions, options, and keywords have usage messages defined, so you can use the Function Browser as online help (available on some platforms in version 2.2 or higher).

Mathematica is a very complex program, and so (in its own little way) is the calcE package. As one way of measuring the complexity, there are 339 usage messages defined in the calcE code, each one representing a new command, function, option, or keyword. Most of you will think of ways of combining of the hundreds of features in this package that I have never thought of, and therefore have not tested. Trust me, there will sometimes be problems or bugs! But chances are, they will occur when you are attempting to do something you wouldn't have dreamed of attempting without calcE!

If you have problems with calcE, you can get support by electronic mail at rmercer@desire.wright.edu, by fax at 513-429-2179, or by post at
SoftE Solutions
P.O. Box 340388
Dayton, OH 45434.
    I would like to hear not only about what doesn't work, but what doesn't work the way you think it should, and what is not in the package that should be. Help make the next version a better product by sending in your suggestions!

About the Author

Dr. Richard Mercer is an Associate Professor of Mathematics at Wright State University, where he has been employed since receiving his Ph. D. in Mathematics from the University of Washington in 1980.

InitE Documentation

The following section assumes you have loaded the calcE package. If it is in the Packages folder, you can do so now by executing the next cell:

<<calcE.m

EOn and EOff

The command EOn turns on automatic conversion of certain standard Mathematica commands to enhanced commands defined in calcE. This command is executed by calcE itself at the end of the loading process, so you will not ordinarily need to use it unless you have first turned off automatic conversion by using EOff.
    The list of automatic conversions is contained in the global variable $ERules. You can add or subtract from this list by editing the package itself, or by using the commands AddERules and DelERules. For example, to automatically convert the fictional commands Blah and Foo to your powerful, streamlined versions Blahh and Fooo, you can execute

AddERules[{Blah->Blahh,Foo->Fooo}]

Blah[trash]
Foo[junk]

EOff
Blah[trash]
Foo[junk]
EOn

To delete a command from the list of those automatically converted, use it as a string in DelERules.

DelERules[{"Blah","Foo"}]

Blah[trash]
Foo[junk]

In both AddERules and DelERules, the list braces are optional. There are no lower case equivalents for EOn, EOff, AddERules and DelERules; you must use these with proper capitalization.

Conversions

Execute the following cell to see the full list of enhancement conversions.

$ERules

lcOn and lcOff

lcOn and lcOff control the conversion of lower case words to their capitalized equivalents. They behave much as EOn and EOff do. calcE executes lcOn at the end of the loading process. There

{sin,cos,tan,cot,sec,csc}

lcOff
{sin,cos,tan,cot,sec,csc}
lcOn

You can have control over individual lower case conversion by editing the package, or by using the commands AddlcRules and DellcRules, which work exactly as do AddERules and DelERules.
    Scattered among the lower case conversions are a very few abbreviations:
inf-> Infinity, int-> Integrate, lim-> Limit, nint-> NIntegrate.

There are no lower case equivalents for lcOn, lcOff, AddlcRules and DellcRules; you must use these with proper capitalization.

Conversions

Execute the following cell to see the full list of lower case conversions.

$lcRules