Skip to content

Tutorials

A guided path through Mathilda, from your first REPL session to writing your own pattern-based rules and doing symbolic calculus. Every example is worked end to end and verified against the current Mathilda build.

Work through them in order if you're new — each one builds on the last.

  • 1. Getting started

    Build Mathilda, launch the REPL, understand In[]/Out[], learn the surface syntax, and get help on any function with ?Name.

  • 2. Expressions & evaluation

    Everything is an expression. Meet FullForm, Head, the attribute system, the fixed-point evaluator, and how Hold suspends evaluation.

  • 3. Pattern matching & rules

    Blanks and named patterns, conditions and tests, transformation rules (->, :>), replacement (/., //.), and defining your own functions.

  • 4. Arithmetic

    Exact integers and rationals, fast machine-precision reals, and arbitrary-precision arithmetic (N, Precision); the basic operators, digit and radix manipulation, and combinatorial functions.

  • 5. Number theory

    GCD, ExtendedGCD, modular arithmetic and PowerMod, primes (PrimeQ, FactorInteger, NextPrime), EulerPhi, and continued fractions — up to RSA-style worked examples.

  • 6. Algebra

    Expand and factor polynomials, dissect and divide them, reshape rational expressions with Together/Apart, simplify, and put the polynomial toolkit (Resultant, GroebnerBasis) to work on real problems.

  • 7. Solutions of equations

    Solve polynomial, transcendental, and simultaneous equations with Solve; Root objects and ToRadicals; eliminate variables with Eliminate; and tackle geometry and optimisation problems.

  • 8. Calculus

    Differentiate and integrate, expand power series, take limits, evaluate symbolic sums, and find roots and extrema numerically.

  • 9. Numerical calculus

    When there is no closed form: numerical integration, differentiation, summation, products, limits, series, and residues — NIntegrate, ND, NSum, NProduct, NLimit, NSeries, NResidue.

  • 10. Special functions

    The higher transcendental functions: Gamma, Zeta, PolyGamma, Erf, PolyLog, the Bernoulli and Euler numbers, and the hypergeometric family — with their exact reductions and numerical values.

Following along

Start the REPL with ./Mathilda and type each In[...] line yourself (without the prompt). Press Return to evaluate. End a line with \ to continue a long expression onto the next line.