Tutorials¶
A guided path through Mathilda, from your first REPL session to writing your own pattern-based rules, doing symbolic calculus, and closing infinite series and products into constants. 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.
-
Build Mathilda, launch the REPL, understand
In[]/Out[], learn the surface syntax, and get help on any function with?Name. -
Everything is an expression. Meet
FullForm,Head, the attribute system, the fixed-point evaluator, and howHoldsuspends evaluation. -
Blanks and named patterns, conditions and tests, transformation rules (
->,:>), replacement (/.,//.), and defining your own functions. -
Exact integers and rationals, fast machine-precision reals, and arbitrary-precision arithmetic (
N,Precision); the basic operators, digit and radix manipulation, and combinatorial functions. -
GCD,ExtendedGCD, modular arithmetic andPowerMod, primes (PrimeQ,FactorInteger,NextPrime),EulerPhi, and continued fractions — up to RSA-style worked examples. -
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. -
Solve polynomial, transcendental, and simultaneous equations with
Solve;Rootobjects andToRadicals; eliminate variables withEliminate; and tackle geometry and optimisation problems. -
Differentiate and integrate, expand power series, take limits, evaluate symbolic sums, and find roots and extrema numerically.
-
Advanced, per-method deep dives into
Integrate's cascade — the transcendental Risch decision procedure and Cherry's special-function extensions (erf,Ei,li, dilogarithm), the Mellin transform engine for half-line integrals \(\int_0^\infty x^{s-1} f\,dx\), and the residue theorem engine for improper, periodic, and contour integrals. Algorithm, references, and worked examples. -
When there is no closed form: numerical integration, differentiation, summation, products, limits, series, and residues —
NIntegrate,ND,NSum,NProduct,NLimit,NSeries,NResidue. -
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. -
Close infinite series into constants with
Sum: telescoping and Gosper's algorithm, the Basel problem and the zeta family, Euler sums and multiple zeta values, binomial sums, and the hypergeometric machines forπ. -
Evaluate infinite products with
Product: rational telescoping, the Wallis/Viète trigonometric factorizations, Euler prime products forζ, and the exponential products fore,γ, and Glaisher's constant. -
Call the machine-precision BLAS kernels directly through the
BLAS`context: dot products and norms,dgemv,dgemm, the symmetric and triangular Level-3 routines, and their complexz*counterparts. -
Solve systems and least squares, factor matrices (LU, QR, Cholesky), compute the SVD, and solve symmetric and general eigenproblems with the
LAPACK`context.
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.