Graphical Interface in TeXmacs for doing symbolic mathematics using Maxima

Hello,

I would like to suggest using texmacs as a graphical interface for Maxima.
How I come up with it: I have been using the Scientific Notebook program for about 25 years. It works as I imagine it should, however the manufacturer MacKichan Software has gone out of business (https://www.mackichan.com/) and furthermore the software is proprietary. It uses an interface to the computer algebra software MuPad.
The program uses TEX to display the files and also to save them.
It obviously contains an interpreter that translates the TEX syntax into a MuPad syntax, performs calculations and displays the result back in TEX.

The user does not need any TEX knowledge or MuPAD knowledge for the calculations, but the dokument always looks excelent. If someone would manage to transfer this concept to TeXmacs with Maxima, it would result in a mathematics program without competition.

I think with TeXmacs and Maxima there is already a good basis for such a program. Essentially the translation of the formulas from TEX to Maxima is missing.

I would like to explain briefly by means of an example, how the data input in Scientifc Notebook works, how it is displayed and how the saved files look like.

This document in Scientific Notebook (Display.png) is generated as follows:

Ctrl+T
Beispiel
Ctrl+M
Ctrl+i Ctrl+↓ 1 → Ctrl+↑ 2 → xdx Ctrl+e enter
menu square brake menu Matrix Rows: 2 Columns: 2 a → b ↓ d ← ← c → → → → Ctrl+↑ -1 → Ctrl+e enter
Ctrl+f 50uN umme Ctrl+↑ 2 → ↓ 25 Ctrl+. 10 Strg+↑ -3 → ume Ctrl+↑ 2 → → menu Compute Simplify

The file is saved and the corresponding text block looks like this:

\QTP{Body Math}
$\vspace{1pt}$Beispiel

\QTP{Body Math}
[dollar]\int_{1}^{2}xdx=\allowbreak \frac{3}{2}$

\QTP{Body Math}
[dollar]\left[
\begin{array}{cc}
a & b \
c & d%
\end{array}%
\right] ^{-1}=\allowbreak \left[
\begin{array}{cc}
-\frac{d}{-ad+bc} & \frac{b}{-ad+bc} \
\frac{c}{-ad+bc} & -\frac{a}{-ad+bc}%
\end{array}%
\right] $

[dollar]\frac{50\unit{N}\unit{mm}^{2}}{25\cdot 10^{-3}\unit{m}^{2}}=\allowbreak
0.002,\frac{\unit{m}}{\unit{s}^{2}}\unit{kg}$

The user can call most commands with short-cuts and also select them from menus.

Calculations can also be selected via the Compute menu and then the following:

Evaluate Strg+e
Evaluate numerically
Simpify
Combine
-Exponentials
-Logs
-Powers
-Trig Functions
Factor
Expand
Rewrite
-Rational
-Float
-Exponential
-Factorial
-Gamma
-Logarithm
-Sin and Cos
-Sinh and Cosh
-Tan
-Polar
-Rectangular
-Equations as Matrix
-Matrix as Equations
Check Equality
Solve
-Exact
-Integer
-Numeric
-Recursion
Polynomials
-Collect…
-Divide
-Partial Fractions
-Roots
-Sort
-Companion Matrix
Calculus
-Integrate by Parts…
-Change Variable…
-Partial Fractions
-Approximate Integral…
-Plot Approximate Integral
-Find Extrema
-Iterate
-Implicit Differentiation
Power Series
Solve ODE
-Exact
-Laplace
-Numeric
Transformations
-Fourier
-Inverse Fourier
-Laplace
-Inverse Laplace
Vector Calculus
-Gradient
-Divergence
-Curl
-Laplacian
-Jacobian
-Hessian
-Wronskian
-Scalar Potential
-Vector Potential
-Set Basis Variables…
Matrices
-Adjugate
-Characteristic Polynomial
-Cholesky Decomposition
-Column Basis
-Concatenate
-Condition Number
-Definiteness Tests
-Determinant
-Eigenvalues
-Eigenvectors
-Fill Matrix…
-Fraction-Free Gaussian Elimination
-Gaussian Elimination
-Hermite Normal Form
-Hermitian Transpose
-Inverse
-Jordan Form
-Minimum Polynomial
-Norm
-Nullspace Basis
-Orthogonality Test
-Permanent
-PLU Decomposition
-QR Decomposition
-Random Matrix…
-Rank
-Rational Canonical Form
-Reduced Row Echolon Form
-Reshape…
-Row Basis
-Singular Values
-Smith Normal Form
-Spetral Radius
-Stack
-SVD
-Trace
-Transpose
Simplex
-Dual
-Feasible?
-Maximize
-Minimize
-Standardize
Statistics
-Fit Curve to Data…
-Random Numbers…
-Mean
-Median
-Mode
-Correlation
-Covariance
-Geometric Mean
-Harmonic Mean
-Mean Deviation
-Moment…
-Quantile…
-Standard Deviation
-Variance
Plot 2D
-Rectangular
-Polar
-Implicit
-Parametric
-Conformal
-Gradient
-Vector Field
-ODE
Plot 3D
-Rectangular
-Cylindrical
-Spherical
-Tube
-Gradient
-Vector Field
Definitions
-New Definition Ctrl+=
-Undefine
-Show Definitions…
-Clear Definitions
-Save Definitions
-Restore Definitions
-Define MuPAD Name…

The Greek letters and many symbols are accessible via short-cuts. To write Greek variables you can write for example for alpha: Ctrl+g a or Ctrl+alpha, the small gamma with Ctrl+g g or Ctrl+gamma, the large gamma with Ctrl+Gamma, the multiplication point with Ctrl+., arrow to the right with Ctrl+s 1 and the approximately sign with Ctrl+s w.

There are two more programs from MacKichan: Scientific Workplace and Scientific Word. Scientific Workplace can additionally save in TEX, while Scientific Notebook saves the equations this way, but the whole file is not in TEX format. Scientific Word is free of cost but cannot calculate.

Can anyone who is good at programming get excited about the idea? I think the main work is the corresponding table TEX-Maxima. In any case I would be very happy about it.

Many greetings
calculator

Addition: the following menus are available.
The graphical menus are as follows (menu.png).

Hi @calculator and welcome to the forum!

Something like this is already possible: when in a Maxima session, enable Focus -> Input options -> Mathematical input

1 Like

Hello jeroen,

  1. How did you enter the equations?
  2. Could you also calculate with units?
  3. It would be so nice, if the beginning of the lines “(%i5)”, “(%o5)” etc. could be deleted and if the rest of the text could be edited as desired afterwards, just like in other continuous text.

I think this might be possible with the so-called “Executable switches” (or maybe possible to develop it with some work based on that) but I cannot try it because my TeXmacs installation (on Ubuntu 22.04) crashes when I try and run an external program—I am trying and fixing this and maybe I will be able to better contribute to this discussion.

I did enable Focus -> Input options -> Mathematical input and wrote this:


But I got this error. What was wrong with my equation?

You probably inserted a space between sin(x) and dx. Try using multiplication: *.

I wrote Shift F5 Shift i _ 0 ←← ^ [blank] x → sin ( x → * dx enter and got an error message again:

The interface seems rather picky about the formatting. Try entering dx as d Tab Tab x.

The sequence d Tab Tab results in an upright d, as is often used to format integrals.