John Peach

Mind-sized STEM ideas and experiments, beyond the textbook.

Mathics and Nebo

Home

keywords: Mathics, Nebo, mathematical notation, handwriting recognition, symbolic mathematics

Many of us who work with mathematics find ourselves switching between different modes of work throughout the day. Sometimes we need to solve complex equations or plot functions. Other times we're scribbling notes and derivations, preferring the freedom and fluidity of handwriting over the constraints of typing mathematical notation. Traditional digital tools often force us to choose between handwriting and computation, or require us to learn specialized syntax just to write basic equations.

This article introduces two complementary tools that bridge this gap: Mathics and Nebo. Mathics is a free, open-source symbolic mathematics system that can handle everything from basic arithmetic to complex algebraic manipulations. Think of it as a powerful calculator that understands mathematical notation and can solve equations, plot functions, and perform symbolic calculations. If you've used Mathematica but balked at its price tag, Mathics offers many similar capabilities at no cost.

Nebo, on the other hand, is a note-taking app that excels at recognizing handwritten mathematics. For those of us who prefer to work out problems by hand, Nebo can convert our natural mathematical handwriting into cleanly formatted equations. Whether you're deriving equations, solving problems, or taking notes in a mathematics class, Nebo lets you write naturally while maintaining the benefits of digital organization and searchability. It can even solve basic equations directly from your handwriting. Nebo is free for the iPad, ($10 on Windows), and you can try Nebo here.

Together, these tools provide a flexible workflow for mathematical work: use Nebo for initial note-taking and problem-solving, then switch to Mathics when you need more computational power or want to explore solutions symbolically. I'll also describe the note-taking app Obsidian and a tool called SyncThing that keeps folders synchronized between devices so you can switch between your desktop computer and your laptop without losing any of your work. Let's look at how each tool works and how they might fit into your mathematical toolkit.

Mathics

The description of Mathics says,

Mathics is a free, open-source general-purpose computer algebra system featuring Mathematica®-compatible syntax and functions.

It relies on Python libraries, in particular, Sympy for symbolics, mpmath for arbitrary precision floating-point arithmetic, MathJax to render equations, and three.js and Asymptote to create graphics. Mathics isn't as powerful as Mathematica, but the price is much better. Here's a problem we can try in Mathics,

x = i + 1 i + 1 i + 1 i + … x = i + \frac{1}{i + \frac{1}{i + \frac{1}{i + \ldots}}} \\ x=i+i+i+i+111

Find x x x.

Notice that everything in the denominator of the first fraction is identical to x x x, so the equation can be rewritten as

x = i + 1 x x 2 = i x + 1 x 2 − i x − 1 = 0 \begin{aligned} x &= i + \frac{1}{x} \\ x^2 & = ix + 1 \\ x^2 &- ix - 1 = 0 \end{aligned} xx2x2=i+x1=ix+1ix1=0

Using the quadratic formula,

x = i ± i 2 − 4 ( − 1 ) 2 = i ± − 1 + 4 2 = i ± 3 2 . x = \frac{i \pm \sqrt{i^2 - 4(-1)}}{2} = \frac{i \pm \sqrt{-1+4}}{2} = \frac{i \pm \sqrt{3}}{2}. x=2i±i24(1) =2i±1+4 =2i±3 .

In Mathics, the symbol for the imaginary unit i = − 1 i = \sqrt{-1} i=1 is I I I, so to solve for x x x type

x2-Ix-1

followed by Ctrl-Enter to get the solution. Hmmm. These solutions are correct, but not informative. The solution for x x x has an x x x in it.

The roots of a polynomial are the values of x x x that make the polynomial zero, in this case, x 2 − i x − 1 = 0 x^2 - ix -1 = 0 x2ix1=0. An n t h − n^{th}- nthdegree polynomial will always have n n n roots, even if some are complex (real + imaginary parts). Suppose the two roots to this polynomial are r r r and s s s, which means that

x 2 − i x − 1 = ( x − r ) ( x − s ) . x^2-ix-1 = (x-r)(x-s). x2ix1=(xr)(xs).

Putting this into Mathics and collecting terms,

expand-rs

Then r s = − 1 rs = -1 rs=1 and − r − s = − i ⇒ r + s = i -r-s = -i \Rightarrow r + s = i rs=ir+s=i. Solving these two equations simultaneously in Mathics,

rs-simul

which is correct.

To open a help window in Mathics, click on the ? in the upper right corner. Complete documentation is available online here.

Mathics-help

Nebo

MyScript Nebo uses AI to interpret handwriting. If you have a tablet or laptop that accepts input from a stylus, Nebo will convert your handwritten notes to text. With Nebo, you can draw diagrams, and it will clean them up:

nebo-diagram

You can insert images into a document, and draw freehand sketches. I tend to write ideas down on a pad of paper, and the next great idea goes on the next empty page in the pad. My house is cluttered with pads. What was this one all about?

notes

So I thought Nebo might be useful in organizing and cleaning up all my scribblings. Here's an example:

nebo-script-to-tex

On the left are the original hand-written equations. After tapping twice on the screen, Nebo converted everything to MathJax format. I had to fix three errors - two of the lower case v v v's had been changed to upper case, and one of the r r r's was interpreted as an n n n. Other than that, Nebo got it exactly right on the first try.

If you copy a section of math in Nebo, you can paste it into a markdown editor like this.

x 2 + b x + c = 0 ( x − r ) × ( x − s ) = x 2 − ( r + s ) x + r s b = − ( r + s ) c = r s u = r + s 2 v = u − r = s − u r = u − v , s = u + v r s = ( u − v ) × ( u + v ) = u 2 − v 2 \begin{aligned} x^{2}+bx+c&=0\\ \left( x-r\right) \times \left( x-s\right) &=x^{2}-\left( r+s\right) x+rs\\ b&=-\left( r+s\right) \\ c&=rs\\ u&=\dfrac{r+s}{2}\\ v&=u-r=s-u\\ r&=u-v,s=u+v\\ rs&=\left( u-v\right) \times \left( u+v\right) =u^{2}-v^{2} \end{aligned} x2+bx+c(xr)×(xs)bcuvrrs=0=x2(r+s)x+rs=(r+s)=rs=2r+s=ur=su=uv,s=u+v=(uv)×(u+v)=u2v2

Nebo includes the formatting characters

\begin{aligned}
x^{2}+bx+c&=0\\
\left( x-r\right) \times \left( x-s\right) &=x^{2}-\left( r+s\right) x+rs\\
b&=-\left( r+s\right) \\
c&=rs\\
u&=\dfrac{r+s}{2}\\
v&=u-r=s-u\\
r&=u-v,s=u+v\\
rs&=\left( u-v\right) \times \left( u+v\right) =u^{2}-v^{2}
\end{aligned}

I added ampersands before the equal signs to align each equation with the one above it. Nebo did all of the rest, including the \begin{aligned} and \end{aligned}.

Getting back to the math, to find the roots of the quadratic polynomial f ( x ) = x 2 + b x + c f(x) = x^2 + bx + c f(x)=x2+bx+c, you might remember the quadratic formula,

x = − b ± b 2 − 4 c 2 . x = \frac{-b \pm \sqrt{b^2 - 4c}}{2}. x=2b±b24c .

If you have the form f ( x ) = a x 2 + b x + c f(x) = ax^2 + bx + c f(x)=ax2+bx+c, divide by a a a and calling b a \frac{b}{a} ab the new b b b, and c a \frac{c}{a} ac the new c c c, which has the same roots.

fx-GeoGebra

If we call the roots r r r and s s s, then the plot of f ( x ) f(x) f(x) will cross the x − x- xaxis at r r r and s s s, and f f f can be written as

f ( x ) = x 2 + b x + c = ( x − r ) ( x − s ) . f(x) = x^2 + bx + c = (x-r)(x-s). f(x)=x2+bx+c=(xr)(xs).

Expanding the terms on the right,

f ( x ) = ( x − r ) ( x − s ) = x 2 − ( r + s ) x + r s f(x) = (x-r)(x-s) = x^2 - (r+s)x + rs f(x)=(xr)(xs)=x2(r+s)x+rs

which means that b = − ( r + s ) b = -(r+s) b=(r+s) and c = r s c = rs c=rs.

Let's call the midpoint between r r r and s s s the point u u u. Then

u = r + s 2 u = \frac{r+s}{2} u=2r+s

or

u = − b 2 . u = -\frac{b}{2}. u=2b.

Since u u u is the midpoint, the distance from u u u to s s s is the same as the distance from r r r to u u u, so let's call that distance v v v. Another way to express this is u = r + v u = r + v u=r+v and s = v + u s = v + u s=v+u. Solving for r r r in the first equation, r = u − v . r = u-v. r=uv. Since c = r s c = rs c=rs then

c = r s = ( u − v ) ( u + v ) = u 2 − v 2 . c = rs = (u-v)(u+v) = u^2 - v^2. c=rs=(uv)(u+v)=u2v2.

After calculating u u u in terms of b b b, we can get v v v from c c c and u u u,

v = u 2 − c . v = \sqrt{u^2 - c}. v=u2c .

To recap, first find the midpoint of the unknown roots which will be at − b 2 -\frac{b}{2} 2b, and then get the distance to the roots which is u 2 − c \sqrt{u^2-c} u2c . The roots will be v ± u v \pm u v±u. So, now you can follow all of my chicken-scratching in Nebo.

For example, suppose f ( x ) = x 2 − 3 x + 1 f(x) = x^2 - 3x + 1 f(x)=x23x+1, the plot in the figure above drawn in GeoGebra. Then u = − 3 2 u = -\frac{3}{2} u=23 and

v = ( − 3 2 ) 2 − 1 = 9 4 − 1 = 9 4 − 4 4 = 5 2 . v = \sqrt{\left( -\frac{3}{2} \right)^2 - 1} = \sqrt{\frac{9}{4} - 1} = \sqrt{\frac{9}{4}-\frac{4}{4}} = \frac{\sqrt{5}}{2}. v=(23)21 =491 =4944 =25 .

So, the roots are

x = 3 2 ± 5 2 = 3 ± 5 2 . x = \frac{3}{2} \pm \frac{\sqrt{5}}{2} = \frac{3 \pm \sqrt{5}}{2}. x=23±25 =23±5 .

One more Nebo trick - write the equation with an equal sign at the end like this:

root-handwritten-Nebo

Double-tap, and you'll get a neatly written equation with the solution!

root-solution-Nebo

Erase the + + +, replace it with a minus sign, and double-tap to get the other root r ≈ 0.382 r \approx 0.382 r0.382. Nebo doesn't do complex math, so we wouldn't be able to solve the problem done earlier in Mathics, but for quick calculations, it's pretty neat!

A nice introduction to Nebo is available from Paperless and Vojislav Dimitrijevic of My Deep Guide reviews the mathematical capabilities here.

Obsessed with Obsidian

Obsidian is the electronic version of my pads of paper. Obsidian is a markdown editor and a knowledge database of your ideas linked together. Upmath shows how to get started using LaTeX in Markdown files to write equations. Help is available by clicking on the ? in the lower left-corner, which opens a new pop-up window. An outline appears in the left panel, and document links are shown in the right panel.

obsidian-help

The graphical view of help looks like this:

obsidian-help-graph-view

Click on Open another vault to switch to your files. To extend the capabilities of Obsidian there are both core plugins and community plugins. The Sweet Setup blog lists some of their favorite plugins, and LibHunt lists the top community projects.

SyncThing

I switch between the desktop computer and laptop frequently, depending on whichever is the most convenient at the moment. But, how should I keep files synchronized between the two? Copying back and forth whenever I modify a file on one seemed tedious.

floppy

This is where SyncThing comes to the rescue. It continuously synchronizes files between any number of your computers, all in the background, using your home network. Take a look at the "Getting Started" page, and online documentation. After installation, all you need to do is identify your computers and the folders you'd like to synchronize. After that, the software keeps everything up-to-date.

SyncThing

For Windows users, SyncTrayzor is a tray utility for SyncThing.

After installing SyncThing on both computers, I realized I needed to have both running simultaneously to be able to sync, but I almost always shut down one when working on the other. The solution is that SyncThing is available for both Android and iOS phones, using the same convenient GUI.

Since my phone is almost always on, it keeps the latest version of all the files from whichever computer I'm currently using. I've even found that Python code is automatically reloaded in the Spyder editor, so long as I've remembered to save my work.

Now, with the phone acting as an intermediary, SyncThing makes switching between computers indistinguishable from magic.

Here's a suggested conclusion section that ties all the tools together:

Building Your Digital Mathematical Workspace

The tools we've explored form a powerful ecosystem for mathematical work and note-taking. Each addresses a specific need while complementing the others:

Mathics provides the computational engine, letting you solve complex mathematical problems and explore solutions symbolically without the cost of commercial alternatives. When you need to verify a calculation, plot a function, or manipulate equations, Mathics offers a capable open-source solution.

Nebo bridges the gap between handwritten mathematics and digital notation. For those of us who think best with pen in hand, Nebo's AI-powered handwriting recognition transforms our natural mathematical notation into cleanly formatted digital equations. Whether you're working through derivations, taking notes in class, or sketching out ideas, Nebo preserves the fluidity of handwriting while adding the benefits of digital organization.

Obsidian serves as the knowledge hub, connecting all your mathematical notes, derivations, and insights. Its markdown support means you can seamlessly incorporate both Nebo's exported equations and Mathics' calculations into your notes, while its linking capabilities help you build connections between related concepts. Think of it as your digital mathematical notebook, but one where every page can be instantly found and every concept is connected.

SyncThing ties everything together by keeping your work synchronized across all your devices. No more emailing files to yourself or wondering which device has the latest version of your notes. Whether you're working at your desk, on your laptop, or reviewing notes on your phone, SyncThing ensures you always have access to your complete mathematical workspace.

Together, these tools create a workflow that combines the best of both worlds: the natural feel of handwritten mathematics with the power of digital computation and organization. While each tool is valuable on its own, their combination provides a comprehensive environment for mathematical thinking, computation, and note-taking that adapts to your preferred way of working.

The best part? This entire ecosystem is built on free, open-source software (except for Nebo's modest one-time fee on some platforms), making it accessible to students, educators, and mathematics enthusiasts alike. Whether you're studying advanced mathematics, teaching others, or simply exploring mathematical ideas for fun, these tools provide a flexible and powerful platform for your mathematical journey.


Mathics Installation

Installing Nebo, Obsidian, and SyncThing is just a matter of following their instructions. Mathics is slightly more complicated but still easy. Here are the steps I used:

  1. Start Anaconda Powershell as administrator. I use Anaconda Python.
  2. Check python version: python --version
  3. Check pip version: pip --version
  4. Install Mathics: pip install Mathics-omnibus[full]
  5. Type: mathicsserver --help to check the installation
  6. Start mathics: mathicsserver
  7. In your browser (Chrome or Firefox) go to localhost:8000
  8. Save the mathics.png image from https://github.com/Mathics3
  9. Convert the image to mathics.ico using https://www.icoconverter.com/
  10. Make a batch file called mathics.bat containing the single command mathicsserver
  11. Create a desktop icon linked to mathics.bat, and change the icon to mathics.ico
  12. Click on the desktop icon to start Mathics, and type localhost:8000 in the address bar. Drag to the bookmarks bar.

Running Mathics from now on requires two steps - clicking on the icon to start the server followed by clicking the link to localhost:8000.


Image credits

Software

  • Mathics - A free, open-source alternative to Mathematica.
  • Nebo - Create beautiful notes and professional documents by hand, sketch ideas on a limitless canvas and annotate PDFs. Powered by the world's best AI handwriting recognition.
  • Anaconda - is a distribution of the Python and R programming languages for scientific computing (data science, machine learning applications, large-scale data processing, predictive analytics, etc.), that aims to simplify package management and deployment.
  • Python - Python is an interpreted, high-level and general-purpose programming language.
  • Geogebra - GeoGebra is dynamic mathematics software for all levels of education that brings together geometry, algebra, spreadsheets, graphing, statistics and calculus in one easy-to-use package.
  • Obsidian - Obsidian is a personal knowledge base and note-taking software application that operates on Markdown.
  • SyncThing - is a continuous file synchronization program. It synchronizes files between two or more computers in real time, safely protected from prying eyes. Your data is your data alone and you deserve to choose where it is stored, whether it is shared with some third party, and how it’s transmitted over the internet.
  • SyncTrayzor - is a little tray utility for Syncthing on Windows. It hosts and wraps Syncthing, making it behave more like a native Windows application and less like a command-line utility with a web browser interface.

References

📬 Subscribe and stay in the loop. · Email · GitHub · Forum · Facebook

© 2020 – 2025 Jan De Wilde & John Peach