RatMath Shelf

Course Test

How far do the RatMath libraries reach across school and university mathematics? For each course, a twenty-question test of the kind the course sets; answers worked out independently, by hand; and the same test answered with RatMath Core and the Shelf libraries alone. Every question where the two disagree, or the libraries fall short, is listed under Findings.

How the tests were made

  1. The tests. For each course, twenty exercises of the kind a teacher sets in that course, spread over its usual topics. They are ordinary exercises, not chosen to suit the libraries.
  2. Independent answers. Each exercise was answered by hand first, with the working shown, without RatMath. Long arithmetic and the statistical tables were checked a second way, by another method or in Python (SymPy, SciPy), never with RatMath.
  3. RatMath answers. Then each exercise was answered with code that uses only RatMath Core and the Shelf libraries. The code is run whenever these pages are built, and what it prints is compared with the independent answer.
  4. Verdicts. A question is Agrees when the outputs match, Partly when RatMath gets the answer but not all the question asks (a form, a step, a proof, or only a numeric check), and Can't yet when no library has the tool. A disagreement or an error is a finding: either a bug, now fixed or reported, or a convention worth knowing.

The code on these pages uses each library under its own name (linalg, stats, …) with Core's names (R, Rational, …) and Core's units (units.Q) in scope. The Shelf libraries are not yet on npm, so the code boxes here are not live; the outputs shown are those printed when the pages were built (bun run course-tests).

Overall

37 courses, 740 exercises.

Agrees 735 Partly 1 Can't yet 4

  • Agrees RatMath's answer is the independent answer.
  • Partly RatMath gets the answer, but not all of what the question asks (a form, a step, a proof, or only a numeric check).
  • Can't yet The libraries have no tool for this yet.
  • Disagrees RatMath's answer differs from the independent answer.
  • Error The RatMath code threw an error.

Courses

CourseAgreesPartlyCan't yetWrong
School: elementary and middle
Grades K–2: number sense and early arithmetic
Counting, place value, adding and subtracting within 1000, measurement, money, time.
20000
Grades 3–5: multiplication, fractions and decimals
Multi-digit multiplication and division, fraction and decimal operations, factors, area and volume.
20000
Grade 6: ratios, negative numbers and expressions
Ratios and rates, percent, fraction division, GCF and LCM, integers, expressions, one-step equations, statistics.
20000
Grade 7: proportional reasoning and rational numbers
Proportions, percent change, operations on rational numbers, two-step equations, circles, probability.
20000
Grade 8: linear equations, functions and the Pythagorean theorem
Exponents and roots, scientific notation, linear equations and systems, slope, Pythagoras, volume, transformations, scatter plots.
20000
School: high school
Algebra I
Linear equations and inequalities, systems, exponents, polynomials, factoring, quadratics, sequences.
20000
Geometry (high school)
Coordinate geometry, triangles, similarity, right-triangle trigonometry, circles, transformations, solids, proof.
20000
Algebra II
Complex numbers, polynomials, rational and radical equations, exponentials and logarithms, series, binomial theorem.
20000
Precalculus and trigonometry
Unit circle, identities, trigonometric equations, inverse trig, polar form, vectors, rational functions, conics, limits.
20000
High-school statistics (AP Statistics)
Describing data, normal distributions, correlation and regression, probability, sampling distributions, inference.
20000
University: first two years
Calculus I
Limits, derivatives and their rules, tangent lines, extrema, related rates, optimisation, Newton's method, integrals and the fundamental theorem.
20000
Calculus II
Techniques of integration, improper integrals, applications, numerical integration, sequences and series, Taylor series, polar area.
20000
Calculus III: several variables and vector calculus
Vectors and planes, partial derivatives, gradients, optimisation, multiple integrals, line and surface integrals, the theorems of Green, Stokes and Gauss.
20000
Linear algebra
Row reduction, determinants, inverses, subspaces, eigenvalues, orthogonality, least squares, diagonalisation, SVD, Jordan form.
20000
Ordinary differential equations
First-order methods, linear equations with constant coefficients, Laplace transforms, systems and phase planes, series solutions, Euler's method.
20000
Discrete mathematics
Logic, sets, counting, recurrences, induction sums, modular arithmetic, graphs, trees, relations.
20000
Probability
Counting probabilities, discrete and continuous distributions, expectation and variance, joint distributions, the central limit theorem, Markov chains.
20000
Mathematical statistics
Maximum likelihood, t tests and ANOVA, regression inference, nonparametric tests, power and sample size, Bayesian updating.
20000
University: upper level
Number theory
Divisibility and the Euclidean algorithm, congruences, the Chinese remainder theorem, arithmetic functions, quadratic residues, primitive roots, continued fractions and Pell's equation.
20000
Abstract algebra I: groups
Permutations, cyclic and dihedral groups, Lagrange, conjugacy and the class equation, Sylow, quotients, abelian groups, group actions.
20000
Abstract algebra II: rings, fields and Galois theory
Polynomial rings, irreducibility, quotient rings and ideals, finite fields, field extensions and degrees, Galois groups, solvability, constructibility.
20000
Complex analysis
Complex arithmetic and polar form, roots, the exponential and logarithm with branches, analytic functions, contour integrals, residues, real integrals, Laurent series, counting zeros, Möbius maps, gamma and zeta.
20000
Real analysis
Limits of sequences, suprema and monotone sequences, series tests and sums, power series, ε–δ continuity, the mean value and intermediate value theorems, Taylor remainders, Riemann sums, uniform convergence, contractions.
20000
Numerical analysis
Floating point and round-off, root finding, interpolation and splines, numerical differentiation and integration, ODE methods and stability, linear systems, conditioning, iterative methods and eigenvalues.
20000
Graph theory
Degrees, connectivity, trees and spanning trees, Euler and Hamilton, planarity, colouring and chromatic polynomials, matchings and flows, spectra, extremal graphs.
20000
Combinatorics
Binomial and multinomial counts, stars and bars, inclusion–exclusion, derangements and surjections, Stirling, Bell, Catalan and partition numbers, recurrences and generating functions, Pólya counting, designs.
20000
Game theory
Pure and mixed Nash equilibria, zero-sum games and saddle points, extensive form and backward induction, combinatorial games and Nim, cooperative games, voting, matching and apportionment.
20000
College geometry
Triangle centres and the Euler line, the nine-point circle, inversion, cross ratio and harmonic conjugates, conics through five points, isometries, Pick's theorem, spherical and hyperbolic triangles, finite planes, polyhedra, taxicab geometry.
20000
Dynamical systems and chaos
Fixed points and their stability, periodic orbits, period doubling and Feigenbaum, Lyapunov exponents, symbolic dynamics, Sharkovskii's theorem, Hénon and Lorenz, toral automorphisms, fractal dimension, Mandelbrot and Life.
20000
Fourier analysis and transforms
Fourier series, orthogonality and Parseval, the discrete Fourier transform, aliasing, Fourier and Laplace transforms, convolution, Legendre polynomials, Sturm–Liouville problems and the heat, wave and Laplace equations.
20000
Mathematical logic
Propositional semantics and normal forms, satisfiability, natural deduction, resolution, intuitionistic logic, first-order semantics, prenex and Skolem forms, models and countermodels, modal logic, syllogisms.
20000
Theory of computation
Finite automata, regular expressions, the subset construction and minimisation, closure properties, context-free grammars and Chomsky normal form, pushdown automata, Turing machines, recursive functions, decidability, recurrences for running time.
18020
Topology
Finite topologies, metrics and their balls, connectedness and compactness, winding numbers and degree, fixed points, Euler characteristic, homology of surfaces from cell structures, the classification of surfaces, Cantor sets and fractal dimension.
17120
Differential geometry
Curves: speed, arc length, curvature, torsion, the Frenet frame, osculating circles and evolutes. Surfaces: fundamental forms, Gaussian and mean curvature, Christoffel symbols, geodesics, parallel transport, Gauss–Bonnet.
20000
Partial differential equations
Classification, characteristics, separation of variables, heat, wave and Laplace equations, Sturm–Liouville problems.
20000
Financial mathematics
Interest and rates, annuities, loans, cash-flow analysis, bonds, the term structure, options, life contingencies.
20000
Optimisation
Linear programming and duality, integer programs, assignment and transportation, unconstrained and constrained calculus optimisation, convexity.
20000

Versions tested

@ratmath/core 0.12.0 (commit 4e8c3f5), @ratmath/algebraic 0.1.0 (commit 04a0898), @ratmath/analytic 0.1.0 (commit 08d78e7), @ratmath/linalg 0.1.0 (commit 77cf842), @ratmath/graphics 0.1.0 (commit 17713ff), @ratmath/structures 0.5.0 (commit 0eabfd2), @ratmath/symbolic 0.2.0 (commit decb4bf), @ratmath/complex 0.3.0 (commit 180da31), @ratmath/discrete 0.3.0 (commit 94d099a), @ratmath/stats 0.3.0 (commit 8f9d83c), @ratmath/numtheory 0.3.0 (commit e340cee), @ratmath/logic 0.2.0 (commit 29a99e9), @ratmath/chaos 0.3.0 (commit a0dd13b), @ratmath/geo 0.4.0 (commit f147654), @ratmath/finance 0.2.0 (commit 4d9d4e8).