From: DAVID L. JOHNSON (dlj0@ns1.cc.lehigh.edu)
Date: 09/16/93


From: dlj0@ns1.cc.lehigh.edu (DAVID L. JOHNSON)
Subject: Re: Mathmatica like package for linux?
Date: 16 Sep 1993 05:18:38 GMT

In article <2780o5$hg8@Tut.MsState.Edu>, simmons@EE.MsState.Edu (David Simmons) writes:
>Does anybody know of a "simple", small program that can handle
>simplifying algebraic expressions and calculating derivatives
>and integrals, like MET or DERIVE?
>
>I really don't have much of a need for an extensive, programmable
>math system; i just need something to help me with calculus and
>engineering classes.
>
I have to recommend maxima over the others mentioned in this thread. It'll do
more than you asked, but does what you ask better than anything else in
linux, w/o the hassle (IMO) of calc/emacs.

Here is a simple sample session

(some stuff deleted -- like when I make a mistake)

(C3) expand((x-1)*(x+2)*(x^2+1));

                              4 3 2
(D3) X + X - X + X - 2
(C4) factor(x^4 + x^3 - x^2 + x - 2);

                                             2
(D4) (X - 1) (X + 2) (X + 1)
(C5) integrate((sec(x))^5,x);

                                                      3
      3 LOG(SIN(X) + 1) 3 LOG(SIN(X) - 1) 3 SIN (X) - 5 SIN(X)
(D5) ----------------- - ----------------- - --------------------------
             16 16 4 2
                                              8 SIN (X) - 16 SIN (X) + 8
(C6) diff(tan(x),x);

                                       2
(D6) SEC (X)
(C7) describe(limit);

  0: LIMIT(exp,
  1: TLIMIT(exp,var,val,dir)
Enter a number, or a Maxima list of numbers, all or none:0;

LIMIT(exp, var, val, dir) finds the limit of exp as the real variable
var approaches the value val from the direction dir. Dir may have the
value PLUS for a limit from above, MINUS for a limit from below, or
may be omitted (implying a two-sided limit is to be computed). For
the method see Wang, P., "Evaluation of Definite Integrals by Symbolic
Manipulation" - Ph.D. Thesis - MAC TR-92 October 1971. LIMIT uses the
following special symbols: INF (positive infinity) and MINF (negative
infinity). On output it may also use UND (undefined), IND (indefinite
but bounded) and INFINITY (complex infinity).
LHOSPITALLIM[4] is the maximum number of times L'Hospital's rule
is used in LIMIT. This prevents infinite looping in cases like
LIMIT(COT(X)/CSC(X),X,0).
TLIMSWITCH[FALSE] when true will cause the limit package to use
Taylor series when possible.
LIMSUBST[FALSE] prevents LIMIT from attempting substitutions on
unknown forms. This is to avoid bugs like LIMIT(F(N)/F(N+1),N,INF);
giving 1. Setting LIMSUBST to TRUE will allow such substitutions.
--More--
Since LIMIT is often called upon to simplify constant expressions,
for example, INF-1, LIMIT may be used in such cases with only one
argument, e.g. LIMIT(INF-1);
Do EXAMPLE(LIMIT); for examples.

(D7) DONE
(C8) limit(sin(x)/x,x,0);

(D8) 1

This even shows how you can get on-line help, using describe();.

This is not as small a program as you might be looking for, but it sure
does what you need, and you can figure out how to use it reasonably
easily.

For graphics, use gnuplot.

-- 

David L. Johnson ID: dlj0@lehigh.edu Department of Mathematics Lehigh University, Bethlehem, PA 18015 Telephone: 215-758-3759 (office) 215-282-3708 (home) #include <std/disclaimer.h>