
SymPy Gamma
by marimo team
A tiny SymPy Gamma in a notebook: analyze an expression to get its simplified form, roots, derivative, integral, series expansion, and plot.
About this notebook
This notebook is a small SymPy Gamma clone. You type one math expression and the notebook studies it. There is no dataset. The default expression is (x-1)(x+1)(x**2-2). The notebook uses SymPy to parse and transform the expression. It uses NumPy and Matplotlib for the plot. It uses marimo for the interface and mohtml for the layout.
You edit the expression in a single text box. The parser accepts implicit multiplication, so 2x means 2*x. A table then shows the simplified, factored, and expanded forms. The table also shows the roots, the derivative, the integral, and a series expansion around zero. Next to the table, a plot draws the function. Red dots mark the real roots. Everything recomputes each time you change the box. A bad expression shows a red parse error instead of results.
The notebook finds the working variable from the free symbols in the expression. It falls back to x when the variable is unclear. It converts the expression to a NumPy function with sympy.lambdify. It solves for the real roots and uses them to set the x-range of the plot. The plot forces a light theme, so it stays readable under both light and dark app themes.











