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
- 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.
- 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.
- 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.
- 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
| Course | Agrees | Partly | Can't yet | Wrong | |
|---|---|---|---|---|---|
| School: elementary and middle | |||||
| Grades K–2: number sense and early arithmetic Counting, place value, adding and subtracting within 1000, measurement, money, time. |
20 | 0 | 0 | 0 | |
| Grades 3–5: multiplication, fractions and decimals Multi-digit multiplication and division, fraction and decimal operations, factors, area and volume. |
20 | 0 | 0 | 0 | |
| Grade 6: ratios, negative numbers and expressions Ratios and rates, percent, fraction division, GCF and LCM, integers, expressions, one-step equations, statistics. |
20 | 0 | 0 | 0 | |
| Grade 7: proportional reasoning and rational numbers Proportions, percent change, operations on rational numbers, two-step equations, circles, probability. |
20 | 0 | 0 | 0 | |
| Grade 8: linear equations, functions and the Pythagorean theorem Exponents and roots, scientific notation, linear equations and systems, slope, Pythagoras, volume, transformations, scatter plots. |
20 | 0 | 0 | 0 | |
| School: high school | |||||
| Algebra I Linear equations and inequalities, systems, exponents, polynomials, factoring, quadratics, sequences. |
20 | 0 | 0 | 0 | |
| Geometry (high school) Coordinate geometry, triangles, similarity, right-triangle trigonometry, circles, transformations, solids, proof. |
20 | 0 | 0 | 0 | |
| Algebra II Complex numbers, polynomials, rational and radical equations, exponentials and logarithms, series, binomial theorem. |
20 | 0 | 0 | 0 | |
| Precalculus and trigonometry Unit circle, identities, trigonometric equations, inverse trig, polar form, vectors, rational functions, conics, limits. |
20 | 0 | 0 | 0 | |
| High-school statistics (AP Statistics) Describing data, normal distributions, correlation and regression, probability, sampling distributions, inference. |
20 | 0 | 0 | 0 | |
| 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. |
20 | 0 | 0 | 0 | |
| Calculus II Techniques of integration, improper integrals, applications, numerical integration, sequences and series, Taylor series, polar area. |
20 | 0 | 0 | 0 | |
| 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. |
20 | 0 | 0 | 0 | |
| Linear algebra Row reduction, determinants, inverses, subspaces, eigenvalues, orthogonality, least squares, diagonalisation, SVD, Jordan form. |
20 | 0 | 0 | 0 | |
| Ordinary differential equations First-order methods, linear equations with constant coefficients, Laplace transforms, systems and phase planes, series solutions, Euler's method. |
20 | 0 | 0 | 0 | |
| Discrete mathematics Logic, sets, counting, recurrences, induction sums, modular arithmetic, graphs, trees, relations. |
20 | 0 | 0 | 0 | |
| Probability Counting probabilities, discrete and continuous distributions, expectation and variance, joint distributions, the central limit theorem, Markov chains. |
20 | 0 | 0 | 0 | |
| Mathematical statistics Maximum likelihood, t tests and ANOVA, regression inference, nonparametric tests, power and sample size, Bayesian updating. |
20 | 0 | 0 | 0 | |
| 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. |
20 | 0 | 0 | 0 | |
| Abstract algebra I: groups Permutations, cyclic and dihedral groups, Lagrange, conjugacy and the class equation, Sylow, quotients, abelian groups, group actions. |
20 | 0 | 0 | 0 | |
| 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. |
20 | 0 | 0 | 0 | |
| 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. |
20 | 0 | 0 | 0 | |
| 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. |
20 | 0 | 0 | 0 | |
| 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. |
20 | 0 | 0 | 0 | |
| Graph theory Degrees, connectivity, trees and spanning trees, Euler and Hamilton, planarity, colouring and chromatic polynomials, matchings and flows, spectra, extremal graphs. |
20 | 0 | 0 | 0 | |
| 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. |
20 | 0 | 0 | 0 | |
| 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. |
20 | 0 | 0 | 0 | |
| 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. |
20 | 0 | 0 | 0 | |
| 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. |
20 | 0 | 0 | 0 | |
| 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. |
20 | 0 | 0 | 0 | |
| 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. |
20 | 0 | 0 | 0 | |
| 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. |
18 | 0 | 2 | 0 | |
| 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. |
17 | 1 | 2 | 0 | |
| 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. |
20 | 0 | 0 | 0 | |
| Partial differential equations Classification, characteristics, separation of variables, heat, wave and Laplace equations, Sturm–Liouville problems. |
20 | 0 | 0 | 0 | |
| Financial mathematics Interest and rates, annuities, loans, cash-flow analysis, bonds, the term structure, options, life contingencies. |
20 | 0 | 0 | 0 | |
| Optimisation Linear programming and duality, integer programs, assignment and transportation, unconstrained and constrained calculus optimisation, convexity. |
20 | 0 | 0 | 0 | |
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).