\( \DeclareMathOperator{\abs}{abs} \newcommand{\ensuremath}[1]{\mbox{$#1$}} \)

Functions, Variables, and Equations

 1 Variables

If you type any letter, such as x, or t, or p, in a Maxima command, it automatically interprets it as a variable.
But what if you want to make a variable have a specific value?  Let's say we are doing a
problem that has a constant R that is defined to be 3.75, and all of the calculations we
need to do are written using R.  It would be nice to set R=3.75 and then use R in our
calculations.  Let's try this in the most obvious way:

--> R=3.75;
\[\tag{%o1} R=3.75\]

O.k., that looks pretty good.  But watch what happens if we try to get back the value of R:

--> R;
\[\tag{%o5} R\]

Or try to do a calculation with R:

--> %pi*R^2;
\[\tag{%o2} \ensuremath{\pi} {{R}^{2}}\]

Wait... this isn't really what we want!  The issue is that Maxima uses = for equations, *not* for
setting values.  The way to set a value in Maxima is to use a colon (:), which is called -binding-

--> R:3.75;
\[\tag{%o9} 3.75\]
--> %pi*R^2;
\[\tag{%o3} \ensuremath{\pi} {{R}^{2}}\]
--> A:%pi*R^2; float(A);
\[\tag{A}\ensuremath{\pi} {{R}^{2}}\] \[\tag{%o5} 3.141592653589793 {{R}^{2}}\]

 1.1 Killing a Variable

Now, if we want to use R or A to represent a different value later on, we have two options:

1) We can redefine R and A using (:) again.

2) We can kill them.

You read that right.  Maxima is a violent language (things were rougher in the 1960's...) To free up a variable
so that you can use it somewhere else, we kill it like so:

--> kill(A);
\[\tag{%o22} \mathit{done}\]
--> A;
\[\tag{%o23} A\]
--> kill(R);R;
\[\tag{%o20} \mathit{done}\] \[\tag{%o21} R\]

We can kill multiple variables at once:

--> A:35.7;R=%pi/%e;
\[\tag{%o24} 35.7\] \[\tag{%o25} R={{\% e}^{-1}} \ensuremath{\pi} \]
--> kill(A,R);
\[\tag{%o26} \mathit{done}\]
--> A; R;
\[\tag{%o27} A\] \[\tag{%o28} R\]

You can use kill to free up ANY object that you create in Maxima - not just variables!
Finally, you can kill all variables that have been assigned in a given session by typing:

--> kill(all);
\[\tag{%o0} \mathit{done}\]

 2 Functions

Let's say that we want to define a function f(x) = 2x+7.  We just saw that using = doesn't cut it.
What if we try (:)

--> f(x):2*x+7;
\[\mbox{}\\\mbox{assignment: cannot assign to }\operatorname{f}(x)\mbox{ -- an error. To debug this try: debugmode(true);}\]

Hrmm... That's frustrating.  The issue here is the same issue that we encountered when we tried to
multiply using ()'s.  Maxima is programmed to read () as a function - even though we are in the
process of trying to define f(x)!  Maxima has a special symbol for function definitions, it is the
same symbol used frequently in Computer Science Textbooks to define values: it is a colon followed by
and equal sign (:=)

--> f(x):=2*x+7;
\[\tag{%o6} \operatorname{f}(x):=2 x+7\]
--> f(x);
\[\tag{%o7} 2 x+7\]
--> f(3);f(2.56); f(%e);
\[\tag{%o8} 13\] \[\tag{%o9} 12.12\] \[\tag{%o10} 2 \% e+7\]

Nice!  Any arithmetic or built in function can be used in a function definition, and any letter can be used for the variable:

--> g(y):=sin(y)/(log(y)+y^2);
\[\tag{%o11} \operatorname{g}(y):=\frac{\sin{(y)}}{\log{(y)}+{{y}^{2}}}\]
--> g(%pi);
g(%pi/2);
g(x);
\[\tag{%o12} 0\] \[\tag{%o13} \frac{1}{\log{\left( \frac{\ensuremath{\pi} }{2}\right) }+\frac{{{\ensuremath{\pi} }^{2}}}{4}}\] \[\tag{%o14} \frac{\sin{(x)}}{\log{(x)}+{{x}^{2}}}\]

The nice thing about Maxima's insistence on treating all letters as variables is that if you type in something like:

--> g(3*x+7);
\[\tag{%o16} \frac{\sin{\left( 3 x+7\right) }}{\log{\left( 3 x+7\right) }+{{\left( 3 x+7\right) }^{2}}}\]

Maxima is smart enough to do the right thing and make a composition.  Speaking of compositions, they work exactly like
they should:

--> f(x):=3*x+7; h(x):=g(f(x));
\[\tag{%o20} \operatorname{f}(x):=3 x+7\] \[\tag{%o21} \operatorname{h}(x):=\operatorname{g}\left( \operatorname{f}(x)\right) \]
--> h(x);
\[\tag{%o22} \frac{\sin{\left( 3 x+7\right) }}{\log{\left( 3 x+7\right) }+{{\left( 3 x+7\right) }^{2}}}\]
--> h(3);
\[\tag{%o23} \frac{\sin{(16)}}{\log{(16)}+256}\]

Not too bad!  Now that we are done with f(x), g(x), and h(x), let's kill 'em:

--> kill(f,g,h);
\[\tag{%o24} \mathit{done}\]

 2.1 The define() Command for Function Definition

There is another way to define a function that comes in really handy when working with symbolic expressions.
Let's start with an expression in x:

--> E:x^3-2*x*sin(x);
\[\tag{E}{{x}^{3}}-2 x \sin{(x)}\]

O.k., that looks pretty good and for calculations like:

--> expand(E^3-2*E+E^2);
\[\tag{%o26} -8 {{x}^{3}}\, {{\sin{(x)}}^{3}}+12 {{x}^{5}}\, {{\sin{(x)}}^{2}}+4 {{x}^{2}}\, {{\sin{(x)}}^{2}}-6 {{x}^{7}} \sin{(x)}-4 {{x}^{4}} \sin{(x)}+4 x \sin{(x)}+{{x}^{9}}+{{x}^{6}}-2 {{x}^{3}}\]

It works just fine.  But what if you wanted to evalute E for x=%pi?  Let's give it a try:

--> E(%pi);
\[\mbox{}\\\mbox{apply: found }E\mbox{ evaluates to }{{x}^{3}}-2 x \sin{(x)}\mbox{ where a function was expected.}\mbox{ -- an error. To debug this try: debugmode(true);}\]

The problem here is that E is an -expression- not a function.  We can substitute values into an expression
using subst() like so:

--> subst(x=%pi,E);
\[\tag{%o28} {{\ensuremath{\pi} }^{3}}\]

But what we really need is a way to elevate E to a function.  This will become even more important later
when we want to "catch" the results of integration and differentiation as functions and not symbolic
expressions.  The solution is the command define(), and we use it like so:

--> define(fE(x),E);
\[\tag{%o29} \operatorname{fE}(x):={{x}^{3}}-2 x \sin{(x)}\]

Note that the function has to spell out the fact that x is the dependent variable in the notation fE(x).  Now we have the -functional- version fE(x) of E that is a genuine function:

--> fE(%pi); fE(%pi/2);
\[\tag{%o32} {{\ensuremath{\pi} }^{3}}\] \[\tag{%o33} \frac{{{\ensuremath{\pi} }^{3}}}{8}-\ensuremath{\pi} \]
--> trigexpand(expand(fE(x+1)));
\[\tag{%o35} -2 x\, \left( \cos{(1)} \sin{(x)}+\sin{(1)} \cos{(x)}\right) -2 \left( \cos{(1)} \sin{(x)}+\sin{(1)} \cos{(x)}\right) +{{x}^{3}}+3 {{x}^{2}}+3 x+1\]

Finally we mention that define() can be used directly as follows:

--> define(F(x),x+5);
\[\tag{%o36} \operatorname{F}(x):=x+5\]
--> kill(all);
\[\tag{%o0} \mathit{done}\]

 2.2 Lazy Use of define()

It is tempting to want to be economical and write something like:

--> E:x^2+2*x+7;
\[\tag{E}{{x}^{2}}+2 x+7\]
--> define(E(x),E);
\[\tag{%o2} \operatorname{E}(x):={{x}^{2}}+2 x+7\]

Note that this does indeed work:

--> E(x); E(2);
\[\tag{%o3} {{x}^{2}}+2 x+7\] \[\tag{%o4} 15\]
--> subst(x=2,E);
\[\tag{%o5} 15\]
--> E;expand(E(x+3));
\[\tag{%o7} {{x}^{2}}+2 x+7\] \[\tag{%o8} {{x}^{2}}+8 x+22\]

But note that E is now a function, and not a symbolic expression.   Most of the time
this will not cause any serious issues, but we note it here just in case.

--> kill(all);
\[\tag{%o0} \mathit{done}\]

 3 Equations

 3.1 Defining and Working With Equations

We saw that wxMaxima reserves = for use in equations.  A cool feature is that we can actually write
down an equation and assign a name for it!

--> E:x^2 = 4;
\[\tag{E}{{x}^{2}}=4\]
--> E;
\[\tag{%o2} {{x}^{2}}=4\]
--> F:2*x - 5 = 7;
\[\tag{F}2 x-5=7\]

Why would you want to name an equation?!  Well, this makes it easier to work with (we'll see this later on)
but we can also do some pretty cool algebra.  For example, let's say I wanted to add equation E to F and see the
result.  Here's how it works in Maxima:

--> E+F;
\[\tag{%o16} {{x}^{2}}+2 x-5=11\]

Which is nice, because this is precisely the obvious thing to do.  So what about a more complicated combination like:
Square both sides of F:

--> F^2;
\[\tag{%o17} {{\left( 2 x-5\right) }^{2}}=49\]

Or, square root both sides of F and subtract three times E:

--> sqrt(F) - 3*E;
\[\tag{%o18} \sqrt{2 x-5}-3 {{x}^{2}}=\sqrt{7}-12\]

You have to admit, that's pretty neat.  One last thing.  What if we want just the right hand side of an equation, or the left hand side?
Maxima has functions rhs() and lhs() that grab the left and right hand sides of equations:

--> G:x^2+2*x = 4*sin(x); rhs(G); lhs(G);
\[\tag{G}{{x}^{2}}+2 x=4 \sin{(x)}\] \[\tag{%o11} 4 \sin{(x)}\] \[\tag{%o12} {{x}^{2}}+2 x\]

Let's say that we want to grab the right hand side of G and use it as its own function rG(x).
We can do that easily!

--> define(rG(x),rhs(G));rG(x);rG(%pi/3);
\[\tag{%o6} \operatorname{rG}(x):=4 \sin{(x)}\] \[\tag{%o7} 4 \sin{(x)}\] \[\tag{%o8} 2 \sqrt{3}\]

Let's clean up our mess and move on:

--> kill(E,F,G);
\[\tag{%o104} \mathit{done}\]

 3.2 Solving Equations

One of the main reasons computer algebra systems like Maxima were created was to simplify the task of
solving tedious equations.  Maxima has a built in function called solve() that does this:

--> solve(3*x-7=15,x);
\[\tag{%o9} [x=\frac{22}{3}]\]
--> solve(x^2 - 3*x + 3=0,x);
\[\tag{%o64} [x=-\frac{\sqrt{3} \% i-3}{2},x=\frac{3+\sqrt{3} \% i}{2}]\]

The %i here represents sqrt(-1), the complex unit.

So we see that the solve function takes in an equation as the first input and the variable we want to solve for as the second.  It returns a list of all the solutions.  Why do we have to specify a variable?  Because Maxima can solve equations that
only are written using variables!

--> solve(P=2*(L+W),L);
\[\tag{%o21} [L=-\frac{2 W-P}{2}]\]
--> solve(P=2*(L+W),W);
\[\tag{%o20} [W=\frac{P-2 L}{2}]\]
--> solve(A = %pi*r^2, r);
\[\tag{%o19} [r=-\frac{\sqrt{A}}{\sqrt{\ensuremath{\pi} }},r=\frac{\sqrt{A}}{\sqrt{\ensuremath{\pi} }}]\]
--> solve(A=(1/2)*h*(a+b), a);
\[\tag{%o22} [a=\frac{2 A-b h}{h}]\]
--> solve(a*x^2 + b*x + c=0,x);
\[\tag{%o23} [x=-\frac{\sqrt{{{b}^{2}}-4 a c}+b}{2 a},x=\frac{\sqrt{{{b}^{2}}-4 a c}-b}{2 a}]\]

O.k., so that's already pretty cool, but it gets better.  Let's say we have a function f(x) = 3*x^2 - 2*x and want to know
when f(x) = 7.  We can do the obvious thing:

--> f(x):=3*x^2-2*x;
\[\tag{%o68} \operatorname{f}(x):=3 {{x}^{2}}-2 x\]
--> solve(f(x)=7,x);
\[\tag{%o69} [x=-\frac{\sqrt{22}-1}{3},x=\frac{1+\sqrt{22}}{3}]\]

Or, we can find the values of x for which our function f(x) and some other function g(x) are equal:

--> g(x):=3*x^3 - 2*x^2;
\[\tag{%o70} \operatorname{g}(x):=3 {{x}^{3}}-2 {{x}^{2}}\]
--> solve(f(x)=g(x),x);
\[\tag{%o71} [x=1,x=\frac{2}{3},x=0]\]
--> kill(f,g);
\[\tag{%o72} \mathit{done}\]

Recall that we can name equations.  This can make things really nice:

--> E:3*x^2 = 2*x; F:3*x^3 = 2*x;
\[\tag{%o3} 3 {{x}^{2}}=2 x\] \[\tag{%o4} 3 {{x}^{3}}=2 x\]
--> E-F;solve(E-F,x);
\[\tag{%o5} 3 {{x}^{2}}-3 {{x}^{3}}=0\] \[\tag{%o6} [x=0,x=1]\]
--> kill(E,F);
\[\tag{%o79} \mathit{done}\]

If you type in a function into solve() instead of an equation - like solve(f(x)), then solve() solves f(x) = 0 for x.

--> solve(x^3 + 3*x^2 - 5);
\[\tag{%o83} [x=\frac{\frac{\sqrt{3} \% i}{2}-\frac{1}{2}}{{{\left( \frac{3}{2}+\frac{\sqrt{5}}{2}\right) }^{\frac{1}{3}}}}+{{\left( \frac{3}{2}+\frac{\sqrt{5}}{2}\right) }^{\frac{1}{3}}}\, \left( -\frac{1}{2}-\frac{\sqrt{3} \% i}{2}\right) -1,x={{\left( \frac{3}{2}+\frac{\sqrt{5}}{2}\right) }^{\frac{1}{3}}}\, \left( \frac{\sqrt{3} \% i}{2}-\frac{1}{2}\right) +\frac{-\frac{1}{2}-\frac{\sqrt{3} \% i}{2}}{{{\left( \frac{3}{2}+\frac{\sqrt{5}}{2}\right) }^{\frac{1}{3}}}}-1,x={{\left( \frac{3}{2}+\frac{\sqrt{5}}{2}\right) }^{\frac{1}{3}}}+\frac{1}{{{\left( \frac{3}{2}+\frac{\sqrt{5}}{2}\right) }^{\frac{1}{3}}}}-1]\]

Yuck!  It's nice we did not have to go and calculate all of that!  But now that we have this list, what if I want to use one of
the solutions, but I don't want to type it in?  Here's how we do it: "Catch" the solutions by assigning a name to them:

--> L:solve(x^3+3*x^2-5)$
--> L;
\[\tag{%o88} [x=\frac{\frac{\sqrt{3} \% i}{2}-\frac{1}{2}}{{{\left( \frac{3}{2}+\frac{\sqrt{5}}{2}\right) }^{\frac{1}{3}}}}+{{\left( \frac{3}{2}+\frac{\sqrt{5}}{2}\right) }^{\frac{1}{3}}}\, \left( -\frac{1}{2}-\frac{\sqrt{3} \% i}{2}\right) -1,x={{\left( \frac{3}{2}+\frac{\sqrt{5}}{2}\right) }^{\frac{1}{3}}}\, \left( \frac{\sqrt{3} \% i}{2}-\frac{1}{2}\right) +\frac{-\frac{1}{2}-\frac{\sqrt{3} \% i}{2}}{{{\left( \frac{3}{2}+\frac{\sqrt{5}}{2}\right) }^{\frac{1}{3}}}}-1,x={{\left( \frac{3}{2}+\frac{\sqrt{5}}{2}\right) }^{\frac{1}{3}}}+\frac{1}{{{\left( \frac{3}{2}+\frac{\sqrt{5}}{2}\right) }^{\frac{1}{3}}}}-1]\]

Now to get each of these solutions, we type:

--> L[1];
\[\tag{%o89} x=\frac{\frac{\sqrt{3} \% i}{2}-\frac{1}{2}}{{{\left( \frac{3}{2}+\frac{\sqrt{5}}{2}\right) }^{\frac{1}{3}}}}+{{\left( \frac{3}{2}+\frac{\sqrt{5}}{2}\right) }^{\frac{1}{3}}}\, \left( -\frac{1}{2}-\frac{\sqrt{3} \% i}{2}\right) -1\]
--> L[2];
\[\tag{%o90} x={{\left( \frac{3}{2}+\frac{\sqrt{5}}{2}\right) }^{\frac{1}{3}}}\, \left( \frac{\sqrt{3} \% i}{2}-\frac{1}{2}\right) +\frac{-\frac{1}{2}-\frac{\sqrt{3} \% i}{2}}{{{\left( \frac{3}{2}+\frac{\sqrt{5}}{2}\right) }^{\frac{1}{3}}}}-1\]
--> L[3];
\[\tag{%o91} x={{\left( \frac{3}{2}+\frac{\sqrt{5}}{2}\right) }^{\frac{1}{3}}}+\frac{1}{{{\left( \frac{3}{2}+\frac{\sqrt{5}}{2}\right) }^{\frac{1}{3}}}}-1\]

Now, that's great, but what if we want, for instance, the actual value contained in L[3]?  Typing
L[3] gives back an equation, not the value.  To get the value, we use rhs():

--> rhs(L[3]);float(rhs(L[3]));
\[\tag{%o106} {{\left( \frac{3}{2}+\frac{\sqrt{5}}{2}\right) }^{\frac{1}{3}}}+\frac{1}{{{\left( \frac{3}{2}+\frac{\sqrt{5}}{2}\right) }^{\frac{1}{3}}}}-1\] \[\tag{%o107} 1.103803402735536\]

I will be the first to admit that this is a little goofy, but this is one of the challenges that faces
us when we use technology to solve problems.  The computer can only give back the
solutions in the form that it is programmed to give it, and it is up to us to extract the information
that we want.

--> kill(L);
\[\tag{%o108} \mathit{done}\]

 3.3 Solving Equations with Radicals

Often we come across equations with radicals in them, like:

--> E:sqrt(x)=sqrt(8-x);
\[\tag{E}\sqrt{x}=\sqrt{8-x}\]

And we would like to solve them.  But notice that when we attempt to use solve() we get:

--> solve(E,x);
\[\tag{%o7} [\sqrt{x}=\sqrt{8-x}]\]

Which is really not helpful.  The problem is that Maxima views the radical expressions are variable quantities in their own right, and thus it thinks that it did solve the equation.  To get around this
we use a more powerful version of solve() called to_poly_solve() that converts radical equations to
polynomial equations first before solving.

To use to_poly_solve() we first have to load it:

--> load(to_poly_solve);
\[\mbox{}\\\mbox{Loading maxima-grobner \$ Revision: 1.6 \$ \$ Date: 2009-06-02 07:49:49 \$ }\] \[\tag{%o24} /usr/share/maxima/5.32.1/share/to\_ poly\_ solve/to\_ poly\_ solve.mac\]

and then:

--> to_poly_solve(E,x);
\[\mbox{}\\\mbox{to\_ poly\_ solve: to\_ poly\_ solver.mac is obsolete; I'm loading to\_ poly\_ solve.mac instead.}\] \[\tag{%o26} \operatorname{\% union}\left( [x=4]\right) \]

Unlike solve(), you *must* indicate the variable that you are solving for!
Let's solve another:

--> kill(E);
\[\tag{%o27} \mathit{done}\]
--> E:sqrt(2*x-1)+sqrt(x) = 3;
\[\tag{E}\sqrt{2 x-1}+\sqrt{x}=3\]
--> to_poly_solve(E,x);
\[\tag{%o44} \operatorname{\% union}\left( [x=28-6 \sqrt{19}]\right) \]

So what's the deal with %union?  This is telling us that the solutions form a set comprised on the elements in the
union.  To get the elements out of the union, we use the part() function like so:

--> E:x^2=4;
\[\tag{E}{{x}^{2}}=4\]
--> S:to_poly_solve(E,x);
\[\tag{S}\operatorname{\% union}\left( [x=-2],[x=2]\right) \]
--> part(S,1,1);part(S,2,1);
\[\tag{%o49} x=-2\] \[\tag{%o50} x=2\]

We can further extract the values using rhs() and lhs() for use!

--> kill(all);
\[\tag{%o0} \mathit{done}\]

 3.4 Solving an Equation and Substituting the Result

MANY times in Algebra, we need to solve an equation, and then turn around and substitute our solution into
another formula.  In Maxima, the function: subst() does substitution for us.

--> subst(x=3, x^2 + 1);
\[\tag{%o109} 10\]

Admittedly, in this context, subst() seems pretty lame.  But let's take a look at how this can be *really* useful.
Imagine a problem where the radius of a sphere is found by solving: 2*R^3 - 5*R = 7.  So let's solve to find the
radius, and then use the radius to find the volume of the sphere!

--> r:solve(2*R^3-5*R=7,R);
\[\tag{r}[R=\frac{5 \left( \frac{\sqrt{3} \% i}{2}-\frac{1}{2}\right) }{6 {{\left( \frac{\sqrt{1073}}{4 {{3}^{\frac{3}{2}}}}+\frac{7}{4}\right) }^{\frac{1}{3}}}}+{{\left( \frac{\sqrt{1073}}{4 {{3}^{\frac{3}{2}}}}+\frac{7}{4}\right) }^{\frac{1}{3}}}\, \left( -\frac{\sqrt{3} \% i}{2}-\frac{1}{2}\right) ,R={{\left( \frac{\sqrt{1073}}{4 {{3}^{\frac{3}{2}}}}+\frac{7}{4}\right) }^{\frac{1}{3}}}\, \left( \frac{\sqrt{3} \% i}{2}-\frac{1}{2}\right) +\frac{5 \left( -\frac{\sqrt{3} \% i}{2}-\frac{1}{2}\right) }{6 {{\left( \frac{\sqrt{1073}}{4 {{3}^{\frac{3}{2}}}}+\frac{7}{4}\right) }^{\frac{1}{3}}}},R={{\left( \frac{\sqrt{1073}}{4 {{3}^{\frac{3}{2}}}}+\frac{7}{4}\right) }^{\frac{1}{3}}}+\frac{5}{6 {{\left( \frac{\sqrt{1073}}{4 {{3}^{\frac{3}{2}}}}+\frac{7}{4}\right) }^{\frac{1}{3}}}}]\]

Taking a look at these solutions, it looks like the third one is the only real solution.  Let's use the fact that

--> r[3];
\[\tag{%o2} R={{\left( \frac{\sqrt{1073}}{4 {{3}^{\frac{3}{2}}}}+\frac{7}{4}\right) }^{\frac{1}{3}}}+\frac{5}{6 {{\left( \frac{\sqrt{1073}}{4 {{3}^{\frac{3}{2}}}}+\frac{7}{4}\right) }^{\frac{1}{3}}}}\]

gives the value of R in an equation that subst() can use:

--> subst(r[3],(4/3)*%pi*R^3);
\[\tag{%o3} \frac{4 {{\left( {{\left( \frac{\sqrt{1073}}{4 {{3}^{\frac{3}{2}}}}+\frac{7}{4}\right) }^{\frac{1}{3}}}+\frac{5}{6 {{\left( \frac{\sqrt{1073}}{4 {{3}^{\frac{3}{2}}}}+\frac{7}{4}\right) }^{\frac{1}{3}}}}\right) }^{3}} \ensuremath{\pi} }{3}\]
--> float(subst(r[3],(4/3)*%pi*R^3));
\[\tag{%o4} 36.1385405321193\]

So, even though giving solutions as equations seems a little awkward, there is good reason for it!

As a parting thought, we can streamline a lot of the work that we just did, provided we already
know (by doing the calculation above) yields the real solution:

--> float(subst(solve(2*R^3-5*R=7,R)[3],(4/3)*%pi*R^3));
\[\tag{%o5} 36.1385405321193\]

The above is a demonstration of the real power of a CAS, but please do note that the above is
very difficult to read.  If you have the option of solving something in one very complicated
line of dense expressions, or using several, easy to understand calculations - it is always
better to do the latter.

--> kill(all);
\[\tag{%o0} \mathit{done}\]
Created with wxMaxima.