Using REDUCE as a computer algebra system (CAS)

Post date: Mar 24, 2011 6:54:37 AM

There are many computer algebra systems (CAS) available for doing math intensive operations. I needed one in MacOS and Linux/Unix platforms for complex operations, and potentially in an iPad for quick explorations. I previously used Mathematica, but it is an expensive beast specially for many platforms, and it is still not available for the iPad (WolframAlpha is a temporary solution). The only one matching these requirements is the old, proven, and free REDUCE.

Together with Maxima (commercial version is Macsyma), REDUCE was one of the first computer algebra systems born in the 1960's. It is available for almost any platform including the iPad with the iCAS implementation ($15 from the Apple Store, also available for the iPhone). iCAS does not look as pretty as SpaceTime and PocketCAS but it is based in a proven and mature CAS compatible with many platforms, so I can reuse and not need to relearn a CAS syntax for each platform. REDUCE also uses for plotting the syntax of gnuplot so it will be familiar to those with experience in that package.

Manuals and tutorials are available in the REDUCE Project Homepage, the online manual and this reference are specially useful. Here is an example of using reduce to solve some simple problems with MacOS (Figure 1). REDUCE is called from the command line shell in MacOS and Linux/Unix using $reduce with the IDE and $reduce -w without the IDE.

REDUCE Sample Program

% 3D Plotting;

load_package "gnuplot";

plot( cos(sqrt(x**2 + y**2)), x=(-3 .. 3), y=(-3 .. 3), hidden3d);

% Solving integrals;

int(sin(x)*exp(2*x),x);

% Solving equations;

solve({3x + 5y = -4,2*x + y = -10},{x,y});

% Using fixed precision;

on rounded; precision 30;

(1+sqrt(5))/2;

Figure 1. REDUCE window on MacOS using the included IDE.