Tutorial Maxima
Tutorial Maxima
What is wxMaxima?
wxMaxima is a computer algebra system (CAS). Imagine a calculator which understands not
only numbers but variables as well. Maxima can do virtually all of the mathematics you have
learned up to now FOILing, simplifying, rationalizing, solving, graphing, functions, fractions,
trig, derivatives, integrals, etc. It can also do a great deal of the math you will learn in the next
couple years. It will do it quickly, it will (usually) do it correctly, but it will only work if you
know exactly how to use it.
So a brief Tutorial of how Maxima works:
1) Open up wxMaxima. You should see a big blank screen and maybe some buttons somewhere
(if you dont see the buttons labeled simplify and such, go to Maxima > Panes > General
Math).
2) Type in a basic arithmetic problem using +, - , *, / and whatever numbers you want and press
shift+enter.
3) Notice two things: (1) You need to use shift+enter to get the line of code to run. (2)
Maxima automatically added a ; to the end of your line. The semi-colon is important from a
coding standpoint, and its good practice to ensure that it ends all of the operations you want
Maxima to do (although not strictly necessary).
4) Maxima deals with variables, too. This time, type in: x+x; then shift+enter.
5) Now try x+3x;
6) Oops. What happened? We humans understand what we meant, but Maxima doesnt
recognize 3x as a number or a variable. Edit the line you just wrote (you dont need a new
line) so that it reads: x+3*x; and press shift+enter.
7) Please note that every multiplication operation should use the *. Also, variables need not be a
single letter. You can add apple+apple. Variables are case-sensitive, however, so check
your capitalization.
8) On the subject of making an error: You will make them. Dont panic. In the event that you
inadvertently send your computer into an infinitely repeating loop of calculations (entirely
possible with this sort of software), notice the stop-sign-shaped Interrupt button on the toolbar.
9) Maxima understands order of operations to a fault. Suppose we want:
If you type in x+2/x+4; what do you get?
How do you fix it?
Press the solve button, type both equations into the field separated by a comma, and use both
variables in the variable(s) field.
23) What if you want to set and save a particular constant or function? Suppose we want to set
the letter c as a constant value 6. Type c:6; and hit shift+enter. Youve just saved the letter
c as 6. Test it. Try c;. Now try c+3;. From now on, anytime you use c, Maxima will
read it as 6.
24) Saving a function is very similar. Well make the function
. Type
f(x):=4*x+1; and hit shift+enter. Now the function is saved. Try f(0); and
f(2); and f(c);
25) What if I want to make c and f variables again? Youll need to clear Maximas
memory. On the menu, go to Maxima > Clear Memory. This calls the kill(all) command.
26) Maxima can graph. Click the Plot 2d... button. Input x^2 as the expression. Keep the x
range between -5 and 5, and adjust the y range between -1 and 25. Ignore the rest of the fields.
Hit ok.
Note: If you do not adjust the y range, then Maxima will automatically choose a scale for you.
This can often be helpful.
27) Maxima should have written something that looks like:
wxplot2d([x^2], [x,-5,5], [y,-1,25])$
You can do a few things from here. Without having to use the plot button again, you can adjust
the window by changing the x and y limits (be careful the order matters; the number on the left
must be smaller than the number on the right). You can also enlarge the graph and use your
mouse to approximate points by deleting the wx in front. Try it (it should look like
plot2d([x^2], [x,-5,5], [y,-1,25])$).
Please note: If you enlarge the graph, you cant do anything else in the main window until you
close the graph!
28) You can plot multiple graphs at once, just separate each expression by a comma in the Plot
2d window.
29) Maxima differentiates. Define the function f(x):=x^2+4*x+6; and press shift+enter.
Now press the diff... button (or find Differentiate... in the calculus menu). Type in f(x)
for the expression. We want to differentiate once with respect to x, so leave the remaining fields
alone and hit ok.
30) Finally, Maxima integrates. Press the integrate... button (or find it in the calculus menu).
Again, use f(x) for the expression. Notice you can check the definite integration box and
define the upper and lower limits if you wish. In this case, however, lets just do the indefinite
integral, so hit ok.
Note: Maxima does not include the +C typically required.