Maxima Basics #1

Maxima Version 5.20.1
wxMaxima Version 0.8.4

(1)
Text is entered into text cells. To insert a text cell, press F6
or use the menu (Cell -> Insert Text Cell). To quit a text cell,
press Ctrl-Enter or click outside the cell.

Practice inserting a text cell below this cell.

(2)
To configure your wxMaxima interface, click on Edit -> Configure.
I recommend that you check: Use centered dot character for multiplication
& Enter evaluates cells. (If you don't check "Enter evaluates cells", then
you must use Shift+Enter to evaluate cells.)

(3)
To delete a cell, right-click on the left cell border and select "Delete Selection."
Try deleting the following cell.

DELETE THIS CELL.

(4)
Maxima uses the colon, not the equals symbol, for assignment. For example,
the following command assigns the value of sqrt(2) to the variable root2.

(%i1) root2: sqrt(2);
Result

(5)
Maxima has a few very important built-in constants. They are %pi, %e, %i, %phi, %gamma,
which represent pi, e, i, the golden ratio, and Euler's constant, respectively.

Assign the value of pi+e to the variable num.

(%i2) num: %pi + %e;
Result

(6)
Use the float() command to obtain the decimal form of a number.
For example, float(%pi) returns the decimal approximation for pi.

(%i3) float(%pi);
Result

Find the decimal approximation for each of the built-in constants.

(%i4) float(%pi); float(%e); float(%i); float(%phi); float(%gamma);
Result

(7)
Notice that several commands can be placed on one line. In fact, commands can span
several lines. Use Shift+Enter to for a line break within an input cell, and place
a semicolon after each individual command.
(Depending on your configuration, the roles of Enter and Shift+Enter may be reversed.)

(%i9) num1: 2*%pi;
num2: -2*%pi + %e;
num3: num1 + num2; float(num3);

Result

(8)
Any variables or expressions that are assigned during your Maxima session stay in memory
and can always be recalled by name. To delete variables or expressions from memory, use
the kill() command.

(%i13) num: 6+7;
Result

(%i14) num;
Result

(%i15) kill(num); num;
Result

(%i17) kill(all);
Result

(9)
To suppress the output of a command, end the command with $ instead of a semicolon.

(%i1) num: 3*%pi + 1$

(%i2) num;
Result

(%i3) kill(num)$

(10)
The subst() command can be used to substitute values into expressions.
subst( a, x, expr ) is used to substitute the value a into the variable x
in the expression expr.

(%i4) f: x^2+3*x-1;
Result

(%i5) subst( %pi, x, f );
Result

(%i6) float(%);
Result

Notice that the % symbol, by itself, refers to Maxima's previous output (just like
the TI-83's Ans).


Created with wxMaxima.