Jose A Vallejo


In this page, you can find some files related to mathematical software, mostly Maxima CAS. I have also worked with GeoGebra and, lately, with Cinderella, both of them DGS. Cinderella is used in conjunction with KeTCindy, a set of macros written in Cindyscript for producing LaTeX code for complex graphics, developed by Setsuo Takato (Toho University, Japan). I have had a long time experience with Mathematica (I wrote a package for computing in -graded rings and algebras while doing my PhD) and Maple, but these otherwise excellent programs turned out to be extremely expensive (even with a student license) for the average guy in Mexico, so after moving here I started working with Maxima, quickly falling in love with it. Two of my favorite interfaces for Maxima are Minima (developed by M. Saturka. I maintain a Slackware package), and wxMaxima (developed by A. Vodopivec).

A tour of Maxima

In this document we try to illustrate the possibilities offered by the CAS (Computer Algebra System) Maxima, along the lines of the chapters "A Tour of Mathematica" that appeared in the printed versions of The Mathematica Book by Wolfram Research up to its 5th edition (2003). Although it is free software (as in 'freedom' and as in 'free beer'), the quality of Maxima is comparable to that of commercial programs such as Mathematica (TM) or Maple (TM). Its development began at the MIT (Massachusetts Institute of Technology) in the 60s, and it is nowadays active thanks to the dedicated work of a wide group of people around the world. Maxima admits many graphical interfaces (originally, it is invoked from the shell). The one we will use in this document is wxMaxima, although almost all of the results are independent of the interface (the only exception being the animations).

LaTeX code with KeTCindy

The set of macros KeTCindy, written in the Cinderella scripting language, is very flexible and it is possible to call some CAS such as Maxima, FriCAS or Risa/Asir within them. Even pure C can be called for computationally demanding tasks (for instance, the removal of hidden parts in 3D graphics). A sample of applications is given here and here.

Cryptography with Maxima on Android

There is a port of Maxima to Android, called Maxima on Android (or MoA, for short), developed by Yasuaki Honda, a Japanese software engineer (living in Chiba, Japan) who is also responsible for Imaxima, a frontend for Maxima based on Emacs. You can write Maxima scripts much in the same way you write a .mac file, and then save it in the /sdcard/Downloads folder of your smartphone (that is, the 'Downloads' folder of your internal card). The script must have the .txt extension. Then, it is possible to call these scripts from within Maxima. I use MoA this way on a regular basis in my classes.

Here is a script file containing some Maxima functions useful to study cryptography at a elementary level. Its usage is described in this paper (see also the Research section). The following video shows how to download a script created in a PC and sent by mail (this is a very useful procedure to make your scripts available to Maxima, but of course you can connect your smartphone to your PC or even write the scripts directly in your phone. For the later technique, I recommend the Jota app, available in the Play Store).

Partial differential equations solver

The solution of the general Sturm-Liouville problem for a constant-coefficients linear second-order partial differential operator on bounded domains is usually calculated using techniques of Fourier analysis, namely, separation of variables. This is a well-defined procedure whose algorithmic nature leads to a natural treatment with a CAS. Jointly with Emmanuel Roque, we have developed a Maxima packgage called pdefourier, which easily allows us to find the Fourier series solutions to this kind of problems. The results and releted programming techniques are explained in this paper. The package has a dedicated page on GitHUb.

Dynamical systems

Maxima is particularly well suited for the study of dynamical systems, both in the continuous and the discrete settings. Here is a wxMaxima session studying chaotic dynamics: dynamical-systems.wxm. The results are explained in this paper.

An example of a computer lab session studying the double pendulum can be found here. It is a Maxima version of the wonderful Javascript applet in

Hamiltonian sytems are also a piece of cake. The package pdynamics.mac allows to compute Poisson brackets, Hamiltonian equations and flows, and Lie normal forms for perturbed Hamiltonians whose non-perturbed part is invariant under circle actions, up to second order (it is also possible to express the normal form in terms of the Hopf generators of the ring of invariant smooth functions). Examples and applications are given in this paper (the package is also used in this one). On the other hand, the package poincare.mac provides the same functionality of Maple's DEtools. Again, examples and applications can be found here.

Seminar in Shibaura

RSA cryptosystem

Here are some files related to a "real life" implementation of the RSA cryptosystem in Maxima (click with the right button to save). To see some examples of use, take a look at this paper.

Arithmetic of p-adic numbers

This is a package for doing very basic computations with Hensel codes of p-adic numbers. Do not expect anything sophisticate here, it is just an aid for teaching and generating counter-examples.