31 of 40 focal problems use RatMath for a calculation or a substantive step.
Direct calculation
29 · 72.5%
Assisted
2 · 5%
Worked by hand
9 · 22.5%
Using the packages
Coordinate computations become manageable when the parametrization and metric are explicit. Interpreting singular charts, orientation and intrinsic geometry is a separate mathematical task.
Calculator interface
Keep the chart, parameter range and chosen normal visible. Link a curve or surface plot to tangent vectors and offer coordinate and orthonormal components side by side.
Each of the 40 focal problems has equal weight. Direct means the displayed package calculation answers the computational question after the inputs are set up. Assisted means it contributes a step and the worked solution supplies essential reasoning, interpretation or selection. Worked by hand means the guide relies on a construction, argument or judgment for that task. The helpful share combines direct and assisted days. Courses and instructors assign different mixes of problems. The percentages describe this syllabus.
Classroom inputs and practical limits
31 of 40 days include a checked executable example. On 12 days the measured size sweep exercises a named API used in the lesson. Each day identifies its tested inputs and the mathematical property checked. Hand-worked days give the input scale and the argument to verify.
Ranges across the five units
Days 1–8 · Geometry of curves. Two- or three-coordinate smooth curves, first through third derivatives and one bounded parameter interval.
Unit benchmark · analytic.curve.length, parameter interval end. Largest passing sample 10,000 (3.10 ms, 76.2 MiB peak process RSS). The runs did not locate a ceiling for this family.
Days 9–16 · Geometry of surfaces. Smooth patches in two parameters, usually with three ambient coordinates and simple bounds.
Unit benchmark · analytic.surface, coefficient of the mixed term. Largest passing sample 100 (5.09 ms, 76.7 MiB peak process RSS). The runs did not locate a ceiling for this family.
Days 17–24 · Curvatures. One patch and a few evaluation points; metrics must be nonsingular there, and orientation fixes signed mean curvature.
Unit benchmark · analytic.surface, coefficient of the mixed term. Largest passing sample 100 (5.09 ms, 76.7 MiB peak process RSS). The runs did not locate a ceiling for this family.
Days 25–32 · Connections and geodesics. A two-dimensional metric, one path and a finite interval; a coordinate chart may break down along a geodesic.
Unit benchmark · analytic.surface, coefficient of the mixed term. Largest passing sample 100 (5.09 ms, 76.7 MiB peak process RSS). The runs did not locate a ceiling for this family.
Days 33–40 · Global geometry. Simple closed surfaces or piecewise smooth patches with few corners; topology and orientation enter global identities.
Unit benchmark · analytic.surface, coefficient of the mixed term. Largest passing sample 100 (5.09 ms, 76.7 MiB peak process RSS). The runs did not locate a ceiling for this family.
Accuracy notes (1)
Fixed · Invalid boundary counts are rejected. Euler characteristic 2 with orientability true and −2 boundary circles now raises GeoError. The boundary count must be a nonnegative integer.
For the helix , find the speed, curvature and torsion.
Worked solution
. For : , .
Using RatMath
Use the data and parameter order shown below. Compare the returned value with the intermediate quantities in the worked solution.
JavaScript module
import * as analytic from "@ratmath/analytic";
const h = analytic.curve(["cos(t)", "sin(t)", "t/2"], "t");
console.log([h.speed(), h.curvature(), h.torsion()].map(String));
Checked output
["sqrt(5/4)", "4/5", "2/5"]
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Two- or three-coordinate smooth curves, first through third derivatives and one bounded parameter interval.
For this problem type. Use one or two parameters, two or three ambient coordinates and one regular evaluation point or a short parameter interval.
Focal example. The code above passed its displayed check in 1.32 ms on Node.
Related workload in this unit.analytic.curve.length · parameter interval end. Baseline test points across courses 1, 2, 5, 10. The straight curve (3t,4t) from 0 to n has length 5n.
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 10,000 (3.10 ms, 76.2 MiB peak process RSS). The runs did not locate a ceiling for this family. Smooth straight-line speed is constant here. Near a cusp or a zero of speed, curvature can be undefined and length integration harder.
Measured times, memory and outcomes
parameter interval end · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
2.87
75.7
2
Baseline
Passed
2.89
75.5
5
Baseline
Passed
2.81
75.3
10
Baseline
Passed
2.85
76.1
100
Stretch
Passed
2.93
75.3
1,000
Stretch
Passed
3.16
75.2
10,000
Stretch
Passed
3.10
76.2
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
analytic.curve · 3 passing test cases, 7 distinct argument descriptions
Use the data and parameter order shown below. Compare the returned value with the intermediate quantities in the worked solution.
JavaScript module
import * as analytic from "@ratmath/analytic";
console.log(analytic.curve(["cos(t)", "sin(t)", "t/2"], "t").length([0, "2*pi"]));
Checked output
7.0248147310407263931[5:6]
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Two- or three-coordinate smooth curves, first through third derivatives and one bounded parameter interval.
For this problem type. Use one or two parameters, two or three ambient coordinates and one regular evaluation point or a short parameter interval.
Focal example. The code above passed its displayed check in 0.817 ms on Node. Both enclosure endpoints also met the lesson’s stated numerical tolerance.
Same API, measured input family.analytic.curve.length · parameter interval end. Baseline test points across courses 1, 2, 5, 10. The straight curve (3t,4t) from 0 to n has length 5n.
Practical limit. Largest passing sample 10,000 (3.10 ms, 76.2 MiB peak process RSS). The runs did not locate a ceiling for this family. Smooth straight-line speed is constant here. Near a cusp or a zero of speed, curvature can be undefined and length integration harder.
Measured times, memory and outcomes
parameter interval end · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
2.87
75.7
2
Baseline
Passed
2.89
75.5
5
Baseline
Passed
2.81
75.3
10
Baseline
Passed
2.85
76.1
100
Stretch
Passed
2.93
75.3
1,000
Stretch
Passed
3.16
75.2
10,000
Stretch
Passed
3.10
76.2
Each row measures the stated fixture. Other inputs to this API can take different paths. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
analytic.curve · 3 passing test cases, 7 distinct argument descriptions
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Two- or three-coordinate smooth curves, first through third derivatives and one bounded parameter interval.
For this problem type. Use one or two parameters, two or three ambient coordinates and one regular evaluation point or a short parameter interval.
Focal example. The code above passed its displayed check in 2.65 ms on Node. Both enclosure endpoints also met the lesson’s stated numerical tolerance.
Related workload in this unit.analytic.curve.length · parameter interval end. Baseline test points across courses 1, 2, 5, 10. The straight curve (3t,4t) from 0 to n has length 5n.
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 10,000 (3.10 ms, 76.2 MiB peak process RSS). The runs did not locate a ceiling for this family. Smooth straight-line speed is constant here. Near a cusp or a zero of speed, curvature can be undefined and length integration harder.
Measured times, memory and outcomes
parameter interval end · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
2.87
75.7
2
Baseline
Passed
2.89
75.5
5
Baseline
Passed
2.81
75.3
10
Baseline
Passed
2.85
76.1
100
Stretch
Passed
2.93
75.3
1,000
Stretch
Passed
3.16
75.2
10,000
Stretch
Passed
3.10
76.2
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
analytic.curve · 3 passing test cases, 7 distinct argument descriptions
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Two- or three-coordinate smooth curves, first through third derivatives and one bounded parameter interval.
For this problem type. Use one or two parameters, two or three ambient coordinates and one regular evaluation point or a short parameter interval.
Focal example. The code above passed its displayed check in 0.503 ms on Node.
Related workload in this unit.analytic.curve.length · parameter interval end. Baseline test points across courses 1, 2, 5, 10. The straight curve (3t,4t) from 0 to n has length 5n.
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 10,000 (3.10 ms, 76.2 MiB peak process RSS). The runs did not locate a ceiling for this family. Smooth straight-line speed is constant here. Near a cusp or a zero of speed, curvature can be undefined and length integration harder.
Measured times, memory and outcomes
parameter interval end · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
2.87
75.7
2
Baseline
Passed
2.89
75.5
5
Baseline
Passed
2.81
75.3
10
Baseline
Passed
2.85
76.1
100
Stretch
Passed
2.93
75.3
1,000
Stretch
Passed
3.16
75.2
10,000
Stretch
Passed
3.10
76.2
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
analytic.curve · 3 passing test cases, 7 distinct argument descriptions
Use the data and parameter order shown below. Compare the returned value with the intermediate quantities in the worked solution.
JavaScript module
import * as analytic from "@ratmath/analytic";
const a = analytic.curve(["t", "t^2"], "t").at(0);
console.log([a.radius, ...a.centre]);
Checked output
[1/2, 0, 1/2]
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Two- or three-coordinate smooth curves, first through third derivatives and one bounded parameter interval.
For this problem type. Use one or two parameters, two or three ambient coordinates and one regular evaluation point or a short parameter interval.
Focal example. The code above passed its displayed check in 0.257 ms on Node.
Related workload in this unit.analytic.curve.length · parameter interval end. Baseline test points across courses 1, 2, 5, 10. The straight curve (3t,4t) from 0 to n has length 5n.
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 10,000 (3.10 ms, 76.2 MiB peak process RSS). The runs did not locate a ceiling for this family. Smooth straight-line speed is constant here. Near a cusp or a zero of speed, curvature can be undefined and length integration harder.
Measured times, memory and outcomes
parameter interval end · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
2.87
75.7
2
Baseline
Passed
2.89
75.5
5
Baseline
Passed
2.81
75.3
10
Baseline
Passed
2.85
76.1
100
Stretch
Passed
2.93
75.3
1,000
Stretch
Passed
3.16
75.2
10,000
Stretch
Passed
3.10
76.2
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
analytic.curve · 3 passing test cases, 7 distinct argument descriptions
Find the evolute (the locus of centres of curvature) of .
Worked solution
Centre : , a semicubical parabola.
Using RatMath
Use the data and parameter order shown below. Compare the returned value with the intermediate quantities in the worked solution.
JavaScript module
import * as analytic from "@ratmath/analytic";
console.log(analytic.curve(["t", "t^2"], "t").evolute().position.map(String));
Checked output
["-4*t^3", "3*t^2 + 1/2"]
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Two- or three-coordinate smooth curves, first through third derivatives and one bounded parameter interval.
For this problem type. Use one or two parameters, two or three ambient coordinates and one regular evaluation point or a short parameter interval.
Focal example. The code above passed its displayed check in 0.584 ms on Node.
Related workload in this unit.analytic.curve.length · parameter interval end. Baseline test points across courses 1, 2, 5, 10. The straight curve (3t,4t) from 0 to n has length 5n.
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 10,000 (3.10 ms, 76.2 MiB peak process RSS). The runs did not locate a ceiling for this family. Smooth straight-line speed is constant here. Near a cusp or a zero of speed, curvature can be undefined and length integration harder.
Measured times, memory and outcomes
parameter interval end · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
2.87
75.7
2
Baseline
Passed
2.89
75.5
5
Baseline
Passed
2.81
75.3
10
Baseline
Passed
2.85
76.1
100
Stretch
Passed
2.93
75.3
1,000
Stretch
Passed
3.16
75.2
10,000
Stretch
Passed
3.10
76.2
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
analytic.curve · 3 passing test cases, 7 distinct argument descriptions
Its velocity vanishes at zero, so this parametrization fails regularity there even though its image is a straight line.
Working without a calculator
Use the argument or construction in the worked solution. This lesson assigns the reasoning to the student.
Input range and limits
Typical inputs for this unit. Two- or three-coordinate smooth curves, first through third derivatives and one bounded parameter interval.
Scope of verification. This day asks for a hand argument, construction or interpretation. The worked instance gives the input. General claims need the reasoning shown above. A measured time, memory ceiling or finite input sweep would not verify that claim.
Day 08 / 40 · Geometry of curves
Curves in space
Direct calculation@ratmath/analytic
Problem
For the helix , find the length for and the curvature.
Worked solution
Speed : length . Curvature .
Using RatMath
Use the data and parameter order shown below. Compare the returned value with the intermediate quantities in the worked solution.
JavaScript module
import * as analytic from "@ratmath/analytic";
const c = analytic.curve(["cos(t)", "sin(t)", "t"], "t");
console.log([c.length([0, "2*pi"]), c.curvature()]);
Checked output
[8.8857658763167324940[2:4], "1/2"]
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Two- or three-coordinate smooth curves, first through third derivatives and one bounded parameter interval.
For this problem type. Use one or two parameters, two or three ambient coordinates and one regular evaluation point or a short parameter interval.
Focal example. The code above passed its displayed check in 4.90 ms on Node.
Same API, measured input family.analytic.curve.length · parameter interval end. Baseline test points across courses 1, 2, 5, 10. The straight curve (3t,4t) from 0 to n has length 5n.
Practical limit. Largest passing sample 10,000 (3.10 ms, 76.2 MiB peak process RSS). The runs did not locate a ceiling for this family. Smooth straight-line speed is constant here. Near a cusp or a zero of speed, curvature can be undefined and length integration harder.
Measured times, memory and outcomes
parameter interval end · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
2.87
75.7
2
Baseline
Passed
2.89
75.5
5
Baseline
Passed
2.81
75.3
10
Baseline
Passed
2.85
76.1
100
Stretch
Passed
2.93
75.3
1,000
Stretch
Passed
3.16
75.2
10,000
Stretch
Passed
3.10
76.2
Each row measures the stated fixture. Other inputs to this API can take different paths. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
analytic.curve · 3 passing test cases, 7 distinct argument descriptions
Use the data and parameter order shown below. Compare the returned value with the intermediate quantities in the worked solution.
JavaScript module
import * as analytic from "@ratmath/analytic";
const f = analytic.surface(["(2 + cos(v))*cos(u)", "(2 + cos(v))*sin(u)", "sin(v)"], ["u", "v"]).first();
console.log([f.E, f.F, f.G].map(String));
Checked output
["cos(v)^2 + 4*cos(v) + 4", "0", "1"]
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Smooth patches in two parameters, usually with three ambient coordinates and simple bounds.
For this problem type. Use one or two parameters, two or three ambient coordinates and one regular evaluation point or a short parameter interval.
Focal example. The code above passed its displayed check in 10.71 ms on Node.
Same API, measured input family.analytic.surface · coefficient of the mixed term. Baseline test points across courses 1, 2, 3, 5. The graph z=k u v at the origin has Gaussian curvature −k².
Practical limit. Largest passing sample 100 (5.09 ms, 76.7 MiB peak process RSS). The runs did not locate a ceiling for this family. The patch must be regular at the evaluation point. Small metric determinants or high expression complexity make geometry more sensitive or costly.
Measured times, memory and outcomes
coefficient of the mixed term · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
4.66
76.2
2
Baseline
Passed
14.67
76
3
Baseline
Passed
7.08
77.2
5
Baseline
Passed
5.04
76.2
10
Stretch
Passed
4.97
76.7
50
Stretch
Passed
4.73
76.7
100
Stretch
Passed
5.09
76.7
Each row measures the stated fixture. Other inputs to this API can take different paths. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
analytic.surface · 1 passing test case, 4 distinct argument descriptions
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Smooth patches in two parameters, usually with three ambient coordinates and simple bounds.
For this problem type. Use one or two parameters, two or three ambient coordinates and one regular evaluation point or a short parameter interval.
Focal example. The code above passed its displayed check in 261 ms on Node. Both enclosure endpoints also met the lesson’s stated numerical tolerance.
Same API, measured input family.analytic.surface · coefficient of the mixed term. Baseline test points across courses 1, 2, 3, 5. The graph z=k u v at the origin has Gaussian curvature −k².
Practical limit. Largest passing sample 100 (5.09 ms, 76.7 MiB peak process RSS). The runs did not locate a ceiling for this family. The patch must be regular at the evaluation point. Small metric determinants or high expression complexity make geometry more sensitive or costly.
Measured times, memory and outcomes
coefficient of the mixed term · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
4.66
76.2
2
Baseline
Passed
14.67
76
3
Baseline
Passed
7.08
77.2
5
Baseline
Passed
5.04
76.2
10
Stretch
Passed
4.97
76.7
50
Stretch
Passed
4.73
76.7
100
Stretch
Passed
5.09
76.7
Each row measures the stated fixture. Other inputs to this API can take different paths. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
analytic.surface · 1 passing test case, 4 distinct argument descriptions
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Smooth patches in two parameters, usually with three ambient coordinates and simple bounds.
For this problem type. Use one or two parameters, two or three ambient coordinates and one regular evaluation point or a short parameter interval.
Focal example. The code above passed its displayed check in 77.55 ms on Node.
Same API, measured input family.analytic.surface · coefficient of the mixed term. Baseline test points across courses 1, 2, 3, 5. The graph z=k u v at the origin has Gaussian curvature −k².
Practical limit. Largest passing sample 100 (5.09 ms, 76.7 MiB peak process RSS). The runs did not locate a ceiling for this family. The patch must be regular at the evaluation point. Small metric determinants or high expression complexity make geometry more sensitive or costly.
Measured times, memory and outcomes
coefficient of the mixed term · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
4.66
76.2
2
Baseline
Passed
14.67
76
3
Baseline
Passed
7.08
77.2
5
Baseline
Passed
5.04
76.2
10
Stretch
Passed
4.97
76.7
50
Stretch
Passed
4.73
76.7
100
Stretch
Passed
5.09
76.7
Each row measures the stated fixture. Other inputs to this API can take different paths. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
analytic.surface · 1 passing test case, 4 distinct argument descriptions
Find the Gaussian and mean curvature of the unit cylinder .
Worked solution
Principal curvatures 1 (round) and 0 (along the rulings): , (the sign depends on the normal: with the outward normal , ).
Using RatMath
Use the data and parameter order shown below. Compare the returned value with the intermediate quantities in the worked solution.
JavaScript module
import * as analytic from "@ratmath/analytic";
const C = analytic.surface(["cos(u)", "sin(u)", "v"], ["u", "v"]);
console.log([C.gaussian(), C.mean()].map(String));
Checked output
["0", "-1/2"]
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Smooth patches in two parameters, usually with three ambient coordinates and simple bounds.
For this problem type. Use one or two parameters, two or three ambient coordinates and one regular evaluation point or a short parameter interval.
Focal example. The code above passed its displayed check in 0.683 ms on Node.
Same API, measured input family.analytic.surface · coefficient of the mixed term. Baseline test points across courses 1, 2, 3, 5. The graph z=k u v at the origin has Gaussian curvature −k².
Practical limit. Largest passing sample 100 (5.09 ms, 76.7 MiB peak process RSS). The runs did not locate a ceiling for this family. The patch must be regular at the evaluation point. Small metric determinants or high expression complexity make geometry more sensitive or costly.
Measured times, memory and outcomes
coefficient of the mixed term · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
4.66
76.2
2
Baseline
Passed
14.67
76
3
Baseline
Passed
7.08
77.2
5
Baseline
Passed
5.04
76.2
10
Stretch
Passed
4.97
76.7
50
Stretch
Passed
4.73
76.7
100
Stretch
Passed
5.09
76.7
Each row measures the stated fixture. Other inputs to this API can take different paths. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
analytic.surface · 1 passing test case, 4 distinct argument descriptions
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Smooth patches in two parameters, usually with three ambient coordinates and simple bounds.
For this problem type. Use a low-degree or elementary integrand and one to three integration variables, with one interval per dimension or a few piecewise bounds.
Focal example. The code above passed its displayed check in 18,961 ms on Node. Both enclosure endpoints also met the lesson’s stated numerical tolerance.
Related workload in this unit.symbolic.integrate · degree. Baseline test points across courses 0, 1, 2, 5, 10. The integral of x^n over [0,1] is 1/(n+1).
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 500 (195 ms, 88.7 MiB peak process RSS). The first sampled passing call above 100 ms used 500 (195 ms). The runs did not locate a ceiling for this family. Polynomial primitives are a favorable case. Singular endpoints, non-elementary primitives and unevaluated integrals need separate treatment.
Measured times, memory and outcomes
degree · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
0
Baseline
Passed
5.98
75.7
1
Baseline
Passed
8.66
75.9
2
Baseline
Passed
7.14
75.7
5
Baseline
Passed
9.22
75.5
10
Baseline
Passed
8.48
75.8
30
Stretch
Passed
56.11
88.9
100
Stretch
Passed
78.06
88.4
500
Stretch
Passed
195
88.7
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
analytic.surfaceIntegral · 1 passing test case, 2 distinct argument descriptions
["0", "0", "z + x"] (n=3), ["x", "y", "z"] (n=3), {x="u", y="w", z="1"}, ["u", "w"] (n=2), {u=[0, 1] (n=2), w=[0, 2] (n=2)} or "1", ["x", "y", "z"] (n=3), {x="cos(u)", y="sin(u)", z="w"}, ["u", "w"] (n=2), {u=[0, 1] (n=2), w=[0, 2] (n=2)}, {digits=4} · flux through a flat patch and the area of a cylinder
Day 14 / 40 · Geometry of surfaces
Jacobian
Direct calculation@ratmath/analytic
Problem
Find the Jacobian determinant of , .
Worked solution
.
Using RatMath
Use the data and parameter order shown below. Compare the returned value with the intermediate quantities in the worked solution.
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Smooth patches in two parameters, usually with three ambient coordinates and simple bounds.
For this problem type. Use a low-degree or elementary integrand and one to three integration variables, with one interval per dimension or a few piecewise bounds.
Focal example. The code above passed its displayed check in 1.96 ms on Node.
Related workload in this unit.symbolic.integrate · degree. Baseline test points across courses 0, 1, 2, 5, 10. The integral of x^n over [0,1] is 1/(n+1).
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 500 (195 ms, 88.7 MiB peak process RSS). The first sampled passing call above 100 ms used 500 (195 ms). The runs did not locate a ceiling for this family. Polynomial primitives are a favorable case. Singular endpoints, non-elementary primitives and unevaluated integrals need separate treatment.
Measured times, memory and outcomes
degree · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
0
Baseline
Passed
5.98
75.7
1
Baseline
Passed
8.66
75.9
2
Baseline
Passed
7.14
75.7
5
Baseline
Passed
9.22
75.5
10
Baseline
Passed
8.48
75.8
30
Stretch
Passed
56.11
88.9
100
Stretch
Passed
78.06
88.4
500
Stretch
Passed
195
88.7
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
analytic.changeOfVariables · 2 passing test cases, 3 distinct argument descriptions
"x^2 + y^2", ["x", "y"] (n=2), {x="r*cos(t)", y="r*sin(t)"}, ["r", "t"] (n=2), {r=[0, 1] (n=2), t=[0, "2*pi"] (n=2)} · polar coordinates show the factor r
"x + y", ["x", "y"] (n=2), {x="u + v", y="u - v"}, ["u", "v"] (n=2), {u=[0, 1] (n=2), v=[0, 1] (n=2)} or "x + y", ["x", "y"] (n=2), {x="2*u", y="3*v"}, ["u", "v"] (n=2), {u=[0, 1] (n=2), v=[0, 1] (n=2)}, {original={x=array[2], y=array[2]}} · a negative determinant is used by its size, and the direct integral agrees
Day 15 / 40 · Geometry of surfaces
Surface patches
Worked by hand
Problem
At which latitudes does the usual longitude-latitude chart of a sphere lose rank?
Worked solution
Longitude has no effect at either pole. The longitude derivative vanishes there while the sphere itself remains smooth.
Working without a calculator
Use the argument or construction in the worked solution. This lesson assigns the reasoning to the student.
Input range and limits
Typical inputs for this unit. Smooth patches in two parameters, usually with three ambient coordinates and simple bounds.
Scope of verification. This day asks for a hand argument, construction or interpretation. The worked instance gives the input. General claims need the reasoning shown above. A measured time, memory ceiling or finite input sweep would not verify that claim.
Day 16 / 40 · Geometry of surfaces
Area scale
Direct calculation@ratmath/core
Problem
A patch has first-form coefficients E=4, F=1, G=2. What is the square of its area density?
Worked solution
The determinant EG−F² is 7, so the density itself is √7.
Using RatMath
Put the arithmetic inside the R tag so RatMath parses the literals. Keep fractions as ratios throughout the calculation and attach the units from the problem to the result.
JavaScript module
import { R } from "@ratmath/core";
console.log(String(R`4*2-1^2`));
Checked output
7
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Smooth patches in two parameters, usually with three ambient coordinates and simple bounds.
Focal example. The code above passed its displayed check in 0.132 ms on Node.
Same arithmetic expression. Replaced its first numeral 4 with 0, 1, 2, 7, 12, 100, 1000, -3, 1/2. All 9 defined variants agreed exactly with Python’s rational arithmetic. This varies the arithmetic operation while holding the rest of the expression fixed.
Related workload in this unit.core.Rational.multiply · operand bits. Baseline test points across courses 8, 32, 64, 256. Cross-multiply the unreduced integer products; operands have unlike denominators.
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 131,072 (1.53 ms, 75.5 MiB peak process RSS). The runs did not locate a ceiling for this family. Intermediate products can have twice the bit length of their factors. Repeated squaring can exhaust the engine’s BigInt allocation limit in a small number of steps.
Measured times, memory and outcomes
operand bits · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
8
Baseline
Passed
0.317
74.6
32
Baseline
Passed
0.035
75.5
64
Baseline
Passed
0.045
75.1
256
Baseline
Passed
0.106
74
1,024
Stretch
Passed
0.035
75.3
8,192
Stretch
Passed
0.075
75.8
32,768
Stretch
Passed
0.245
75
131,072
Stretch
Passed
1.53
75.5
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
core.R · 2 passing test cases, 10 distinct argument descriptions
Find the curvature and the total curvature of the circle of radius 3.
Worked solution
, length : total (the turning number of a simple closed curve times ).
Using RatMath
Use the data and parameter order shown below. Compare the returned value with the intermediate quantities in the worked solution.
JavaScript module
import * as analytic from "@ratmath/analytic";
const c = analytic.curve(["3*cos(t)", "3*sin(t)"], "t");
console.log([c.curvature(), c.totalCurvature([0, "2*pi"])]);
Checked output
["1/3", 6.2831853071795864769[1:8]]
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. One patch and a few evaluation points; metrics must be nonsingular there, and orientation fixes signed mean curvature.
For this problem type. Use one or two parameters, two or three ambient coordinates and one regular evaluation point or a short parameter interval.
Focal example. The code above passed its displayed check in 1.11 ms on Node.
Related workload in this unit.analytic.surface · coefficient of the mixed term. Baseline test points across courses 1, 2, 3, 5. The graph z=k u v at the origin has Gaussian curvature −k².
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 100 (5.09 ms, 76.7 MiB peak process RSS). The runs did not locate a ceiling for this family. The patch must be regular at the evaluation point. Small metric determinants or high expression complexity make geometry more sensitive or costly.
Measured times, memory and outcomes
coefficient of the mixed term · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
4.66
76.2
2
Baseline
Passed
14.67
76
3
Baseline
Passed
7.08
77.2
5
Baseline
Passed
5.04
76.2
10
Stretch
Passed
4.97
76.7
50
Stretch
Passed
4.73
76.7
100
Stretch
Passed
5.09
76.7
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
analytic.curve · 3 passing test cases, 7 distinct argument descriptions
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. One patch and a few evaluation points; metrics must be nonsingular there, and orientation fixes signed mean curvature.
For this problem type. Use one or two parameters, two or three ambient coordinates and one regular evaluation point or a short parameter interval.
Focal example. The code above passed its displayed check in 6.91 ms on Node.
Same API, measured input family.analytic.surface · coefficient of the mixed term. Baseline test points across courses 1, 2, 3, 5. The graph z=k u v at the origin has Gaussian curvature −k².
Practical limit. Largest passing sample 100 (5.09 ms, 76.7 MiB peak process RSS). The runs did not locate a ceiling for this family. The patch must be regular at the evaluation point. Small metric determinants or high expression complexity make geometry more sensitive or costly.
Measured times, memory and outcomes
coefficient of the mixed term · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
4.66
76.2
2
Baseline
Passed
14.67
76
3
Baseline
Passed
7.08
77.2
5
Baseline
Passed
5.04
76.2
10
Stretch
Passed
4.97
76.7
50
Stretch
Passed
4.73
76.7
100
Stretch
Passed
5.09
76.7
Each row measures the stated fixture. Other inputs to this API can take different paths. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
analytic.surface · 1 passing test case, 4 distinct argument descriptions
Use the data and parameter order shown below. Compare the returned value with the intermediate quantities in the worked solution.
JavaScript module
import * as analytic from "@ratmath/analytic";
const a = analytic.surface(["u", "v", "u*v"], ["u", "v"]).at(0, 0);
console.log([a.gaussian, a.mean]);
Checked output
[-1, 0]
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. One patch and a few evaluation points; metrics must be nonsingular there, and orientation fixes signed mean curvature.
For this problem type. Use one or two parameters, two or three ambient coordinates and one regular evaluation point or a short parameter interval.
Focal example. The code above passed its displayed check in 0.600 ms on Node.
Same API, measured input family.analytic.surface · coefficient of the mixed term. Baseline test points across courses 1, 2, 3, 5. The graph z=k u v at the origin has Gaussian curvature −k².
Practical limit. Largest passing sample 100 (5.09 ms, 76.7 MiB peak process RSS). The runs did not locate a ceiling for this family. The patch must be regular at the evaluation point. Small metric determinants or high expression complexity make geometry more sensitive or costly.
Measured times, memory and outcomes
coefficient of the mixed term · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
4.66
76.2
2
Baseline
Passed
14.67
76
3
Baseline
Passed
7.08
77.2
5
Baseline
Passed
5.04
76.2
10
Stretch
Passed
4.97
76.7
50
Stretch
Passed
4.73
76.7
100
Stretch
Passed
5.09
76.7
Each row measures the stated fixture. Other inputs to this API can take different paths. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
analytic.surface · 1 passing test case, 4 distinct argument descriptions
Show the catenoid is minimal, and find its Gaussian curvature.
Worked solution
; .
Using RatMath
Use the data and parameter order shown below. Compare the returned value with the intermediate quantities in the worked solution.
JavaScript module
import * as analytic from "@ratmath/analytic";
const C = analytic.surface(["cosh(v)*cos(u)", "cosh(v)*sin(u)", "v"], ["u", "v"]);
console.log([C.mean(), C.gaussian()].map(String));
Checked output
["0", "-(1/(sinh(v)^4 + 2*sinh(v)^2 + 1))"]
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. One patch and a few evaluation points; metrics must be nonsingular there, and orientation fixes signed mean curvature.
For this problem type. Use one or two parameters, two or three ambient coordinates and one regular evaluation point or a short parameter interval.
Focal example. The code above passed its displayed check in 2.82 ms on Node.
Same API, measured input family.analytic.surface · coefficient of the mixed term. Baseline test points across courses 1, 2, 3, 5. The graph z=k u v at the origin has Gaussian curvature −k².
Practical limit. Largest passing sample 100 (5.09 ms, 76.7 MiB peak process RSS). The runs did not locate a ceiling for this family. The patch must be regular at the evaluation point. Small metric determinants or high expression complexity make geometry more sensitive or costly.
Measured times, memory and outcomes
coefficient of the mixed term · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
4.66
76.2
2
Baseline
Passed
14.67
76
3
Baseline
Passed
7.08
77.2
5
Baseline
Passed
5.04
76.2
10
Stretch
Passed
4.97
76.7
50
Stretch
Passed
4.73
76.7
100
Stretch
Passed
5.09
76.7
Each row measures the stated fixture. Other inputs to this API can take different paths. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
analytic.surface · 1 passing test case, 4 distinct argument descriptions
Compute the Gaussian curvature of the sphere intrinsically from , , (with the polar angle and the longitude).
Worked solution
For , : the same as the extrinsic value.
Using RatMath
Use the data and parameter order shown below. Compare the returned value with the intermediate quantities in the worked solution.
JavaScript module
import * as analytic from "@ratmath/analytic";
console.log(String(analytic.metric({ E: "sin(v)^2", F: 0, G: "1" }, ["u", "v"]).gaussian()));
Checked output
1
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. One patch and a few evaluation points; metrics must be nonsingular there, and orientation fixes signed mean curvature.
For this problem type. Use one or two parameters, two or three ambient coordinates and one regular evaluation point or a short parameter interval.
Focal example. The code above passed its displayed check in 1.39 ms on Node.
Related workload in this unit.symbolic.sym.diff · degree. Baseline test points across courses 1, 2, 4, 8. Derivative of x^n at 2 is n·2^(n−1).
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 1,024 (0.459 ms, 74.4 MiB peak process RSS). The runs did not locate a ceiling for this family. A monomial differentiates to one term. Products, repeated derivatives and expression expansion can make intermediate expressions much larger.
Measured times, memory and outcomes
degree · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
0.157
75.7
2
Baseline
Passed
0.192
75.7
4
Baseline
Passed
0.276
75.2
8
Baseline
Passed
0.642
75.5
16
Stretch
Passed
18.83
74.7
64
Stretch
Passed
0.406
75
256
Stretch
Passed
0.241
75.3
1,024
Stretch
Passed
0.459
74.4
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
analytic.metric · 1 passing test case, 1 distinct argument description
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. One patch and a few evaluation points; metrics must be nonsingular there, and orientation fixes signed mean curvature.
Focal example. The code above passed its displayed check in 91.32 ms on Node.
Related workload in this unit.symbolic.sym.diff · degree. Baseline test points across courses 1, 2, 4, 8. Derivative of x^n at 2 is n·2^(n−1).
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 1,024 (0.459 ms, 74.4 MiB peak process RSS). The runs did not locate a ceiling for this family. A monomial differentiates to one term. Products, repeated derivatives and expression expansion can make intermediate expressions much larger.
Measured times, memory and outcomes
degree · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
0.157
75.7
2
Baseline
Passed
0.192
75.7
4
Baseline
Passed
0.276
75.2
8
Baseline
Passed
0.642
75.5
16
Stretch
Passed
18.83
74.7
64
Stretch
Passed
0.406
75
256
Stretch
Passed
0.241
75.3
1,024
Stretch
Passed
0.459
74.4
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
analytic.field · 20 passing test cases, 22 distinct argument descriptions
What happens to mean and Gaussian curvature when a unit normal is reversed?
Worked solution
Both principal curvatures reverse sign. Their mean changes sign and their product stays fixed.
Working without a calculator
Use the argument or construction in the worked solution. This lesson assigns the reasoning to the student.
Input range and limits
Typical inputs for this unit. One patch and a few evaluation points; metrics must be nonsingular there, and orientation fixes signed mean curvature.
For this problem type. Use a few coin denominations or one transaction, usually with two decimal places and totals small enough to count by hand.
Scope of verification. This day asks for a hand argument, construction or interpretation. The worked instance gives the input. General claims need the reasoning shown above. A measured time, memory ceiling or finite input sweep would not verify that claim.
Day 24 / 40 · Curvatures
Umbilic points
Worked by hand
Problem
How can the shape operator identify an umbilic?
Worked solution
At an umbilic it is a scalar multiple of the identity. Every tangent direction is then principal.
Working without a calculator
Use the argument or construction in the worked solution. This lesson assigns the reasoning to the student.
Input range and limits
Typical inputs for this unit. One patch and a few evaluation points; metrics must be nonsingular there, and orientation fixes signed mean curvature.
Scope of verification. This day asks for a hand argument, construction or interpretation. The worked instance gives the input. General claims need the reasoning shown above. A measured time, memory ceiling or finite input sweep would not verify that claim.
Day 25 / 40 · Connections and geodesics
The hyperbolic plane
Direct calculation@ratmath/analytic
Problem
Find the Gaussian curvature of the half-plane metric .
Worked solution
For , ; here , , so .
Using RatMath
Use the data and parameter order shown below. Compare the returned value with the intermediate quantities in the worked solution.
JavaScript module
import * as analytic from "@ratmath/analytic";
console.log(String(analytic.metric({ E: "1/v^2", F: 0, G: "1/v^2" }, ["u", "v"]).gaussian()));
Checked output
-1
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. A two-dimensional metric, one path and a finite interval; a coordinate chart may break down along a geodesic.
For this problem type. Use one or two parameters, two or three ambient coordinates and one regular evaluation point or a short parameter interval.
Focal example. The code above passed its displayed check in 2.51 ms on Node.
Related workload in this unit.symbolic.sym.diff · degree. Baseline test points across courses 1, 2, 4, 8. Derivative of x^n at 2 is n·2^(n−1).
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 1,024 (0.459 ms, 74.4 MiB peak process RSS). The runs did not locate a ceiling for this family. A monomial differentiates to one term. Products, repeated derivatives and expression expansion can make intermediate expressions much larger.
Measured times, memory and outcomes
degree · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
0.157
75.7
2
Baseline
Passed
0.192
75.7
4
Baseline
Passed
0.276
75.2
8
Baseline
Passed
0.642
75.5
16
Stretch
Passed
18.83
74.7
64
Stretch
Passed
0.406
75
256
Stretch
Passed
0.241
75.3
1,024
Stretch
Passed
0.459
74.4
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
analytic.metric · 1 passing test case, 1 distinct argument description
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. A two-dimensional metric, one path and a finite interval; a coordinate chart may break down along a geodesic.
For this problem type. Use one or two parameters, two or three ambient coordinates and one regular evaluation point or a short parameter interval.
Focal example. The code above passed its displayed check in 0.852 ms on Node.
Related workload in this unit.symbolic.sym.diff · degree. Baseline test points across courses 1, 2, 4, 8. Derivative of x^n at 2 is n·2^(n−1).
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 1,024 (0.459 ms, 74.4 MiB peak process RSS). The runs did not locate a ceiling for this family. A monomial differentiates to one term. Products, repeated derivatives and expression expansion can make intermediate expressions much larger.
Measured times, memory and outcomes
degree · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
0.157
75.7
2
Baseline
Passed
0.192
75.7
4
Baseline
Passed
0.276
75.2
8
Baseline
Passed
0.642
75.5
16
Stretch
Passed
18.83
74.7
64
Stretch
Passed
0.406
75
256
Stretch
Passed
0.241
75.3
1,024
Stretch
Passed
0.459
74.4
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
analytic.metric · 1 passing test case, 1 distinct argument description
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. A two-dimensional metric, one path and a finite interval; a coordinate chart may break down along a geodesic.
For this problem type. Use one or two parameters, two or three ambient coordinates and one regular evaluation point or a short parameter interval.
Focal example. The code above passed its displayed check in 12,122 ms on Node. Both enclosure endpoints also met the lesson’s stated numerical tolerance.
Related workload in this unit.symbolic.sym.diff · degree. Baseline test points across courses 1, 2, 4, 8. Derivative of x^n at 2 is n·2^(n−1).
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 1,024 (0.459 ms, 74.4 MiB peak process RSS). The runs did not locate a ceiling for this family. A monomial differentiates to one term. Products, repeated derivatives and expression expansion can make intermediate expressions much larger.
Measured times, memory and outcomes
degree · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
0.157
75.7
2
Baseline
Passed
0.192
75.7
4
Baseline
Passed
0.276
75.2
8
Baseline
Passed
0.642
75.5
16
Stretch
Passed
18.83
74.7
64
Stretch
Passed
0.406
75
256
Stretch
Passed
0.241
75.3
1,024
Stretch
Passed
0.459
74.4
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
analytic.metric · 1 passing test case, 1 distinct argument description
Parallel-transport a tangent vector once round the circle of polar angle on the unit sphere. By what angle is it rotated?
Worked solution
The holonomy equals the enclosed area (the cap): .
Using RatMath
Use the data and parameter order shown below. Compare the returned value with the intermediate quantities in the worked solution.
JavaScript module
import * as analytic from "@ratmath/analytic";
const S = analytic.surface(["cos(u)*sin(v)", "sin(u)*sin(v)", "cos(v)"], ["u", "v"]);
console.log(S.transport({ u: "2*pi*t", v: "pi/3" }, [0, 1], [1, 0]).angle);
Checked output
3.141[46458095877464051:59265358979323847]
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. A two-dimensional metric, one path and a finite interval; a coordinate chart may break down along a geodesic.
For this problem type. Use one or two parameters, two or three ambient coordinates and one regular evaluation point or a short parameter interval.
Focal example. The code above passed its displayed check in 5,512 ms on Node. Both enclosure endpoints also met the lesson’s stated numerical tolerance.
Same API, measured input family.analytic.surface · coefficient of the mixed term. Baseline test points across courses 1, 2, 3, 5. The graph z=k u v at the origin has Gaussian curvature −k².
Practical limit. Largest passing sample 100 (5.09 ms, 76.7 MiB peak process RSS). The runs did not locate a ceiling for this family. The patch must be regular at the evaluation point. Small metric determinants or high expression complexity make geometry more sensitive or costly.
Measured times, memory and outcomes
coefficient of the mixed term · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
4.66
76.2
2
Baseline
Passed
14.67
76
3
Baseline
Passed
7.08
77.2
5
Baseline
Passed
5.04
76.2
10
Stretch
Passed
4.97
76.7
50
Stretch
Passed
4.73
76.7
100
Stretch
Passed
5.09
76.7
Each row measures the stated fixture. Other inputs to this API can take different paths. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
analytic.surface · 1 passing test case, 4 distinct argument descriptions
On the unit sphere, how far apart are the points at latitude 0°, longitudes 0° and 90°?
Worked solution
The central angle is : distance .
Using RatMath
Use the data and parameter order shown below. Compare the returned value with the intermediate quantities in the worked solution.
JavaScript module
import * as geo from "@ratmath/geo";
console.log(String(geo.latLon(0, 0).distanceTo(geo.latLon(0, "1/4"))));
Checked output
π/2
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. A two-dimensional metric, one path and a finite interval; a coordinate chart may break down along a geodesic.
Focal example. The code above passed its displayed check in 0.215 ms on Node.
Related workload in this unit.analytic.surface · coefficient of the mixed term. Baseline test points across courses 1, 2, 3, 5. The graph z=k u v at the origin has Gaussian curvature −k².
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 100 (5.09 ms, 76.7 MiB peak process RSS). The runs did not locate a ceiling for this family. The patch must be regular at the evaluation point. Small metric determinants or high expression complexity make geometry more sensitive or costly.
Measured times, memory and outcomes
coefficient of the mixed term · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
4.66
76.2
2
Baseline
Passed
14.67
76
3
Baseline
Passed
7.08
77.2
5
Baseline
Passed
5.04
76.2
10
Stretch
Passed
4.97
76.7
50
Stretch
Passed
4.73
76.7
100
Stretch
Passed
5.09
76.7
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
geo.latLon · 1 passing test case, 1 distinct argument description
In the Poincaré disc, find the distance from the centre to the point .
Worked solution
.
Using RatMath
Use the data and parameter order shown below. Compare the returned value with the intermediate quantities in the worked solution.
JavaScript module
import * as geo from "@ratmath/geo";
console.log(String(geo.horigin().distanceTo(geo.hpoint("1/2", 0))));
Checked output
ln(3)
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. A two-dimensional metric, one path and a finite interval; a coordinate chart may break down along a geodesic.
Focal example. The code above passed its displayed check in 0.271 ms on Node.
Related workload in this unit.geo.midpoint · absolute coordinate. Baseline test points across courses 0, 1, 10, 100. Midpoint of (−k,0) and (k,2k) equals (0,k).
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 1,000,000,000 (0.175 ms, 75.5 MiB peak process RSS). The runs did not locate a ceiling for this family. Coordinate size and dimension affect exact distance and dot products. Floating geometry near coincidence can lose significant digits.
Measured times, memory and outcomes
absolute coordinate · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
0
Baseline
Passed
0.193
74.9
1
Baseline
Passed
0.197
75.2
10
Baseline
Passed
0.151
75.4
100
Baseline
Passed
0.169
75.6
1,000,000
Stretch
Passed
0.298
76.3
1,000,000,000
Stretch
Passed
0.175
75.5
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
geo.horigin · 3 passing test cases, 1 distinct argument description
Is a great-circle arc longer than a semicircle length-minimizing on the unit sphere?
Worked solution
It is geodesic but the complementary arc along the same circle is shorter.
Working without a calculator
Use the argument or construction in the worked solution. This lesson assigns the reasoning to the student.
Input range and limits
Typical inputs for this unit. A two-dimensional metric, one path and a finite interval; a coordinate chart may break down along a geodesic.
For this problem type. Use one or two parameters, two or three ambient coordinates and one regular evaluation point or a short parameter interval.
Scope of verification. This day asks for a hand argument, construction or interpretation. The worked instance gives the input. General claims need the reasoning shown above. A measured time, memory ceiling or finite input sweep would not verify that claim.
Day 32 / 40 · Connections and geodesics
Straightest paths
Worked by hand
Problem
In Euclidean Cartesian coordinates what do the geodesic equations reduce to?
Worked solution
All Christoffel symbols vanish, so each coordinate has second derivative zero in an affine parameter.
Working without a calculator
Use the argument or construction in the worked solution. This lesson assigns the reasoning to the student.
Input range and limits
Typical inputs for this unit. A two-dimensional metric, one path and a finite interval; a coordinate chart may break down along a geodesic.
Scope of verification. This day asks for a hand argument, construction or interpretation. The worked instance gives the input. General claims need the reasoning shown above. A measured time, memory ceiling or finite input sweep would not verify that claim.
Day 33 / 40 · Global geometry
Gauss–Bonnet
Assisted@ratmath/analytic
Problem
Check the Gauss–Bonnet theorem on the patch , of the unit sphere.
Worked solution
On this spherical patch the area integral is cos(1)−cos(2). The two meridians are geodesics; the two parallels contribute a total signed geodesic curvature cos(2)−cos(1). Four right-angle exterior turns sum to 2π. Their sum is 2π, as required for a disk.
Using RatMath
Orient the boundary consistently, include the corner turns and compare both sides. The Boolean output records agreement for this patch.
JavaScript module
import * as analytic from "@ratmath/analytic";
console.log(
analytic.surface(["cos(u)*sin(v)", "sin(u)*sin(v)", "cos(v)"], ["u", "v"]).gaussBonnet({ u: [0, 1], v: [1, 2] }).agree
);
Checked output
true
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Simple closed surfaces or piecewise smooth patches with few corners; topology and orientation enter global identities.
For this problem type. Use one or two parameters, two or three ambient coordinates and one regular evaluation point or a short parameter interval.
Focal example. The code above passed its displayed check in 10.11 ms on Node.
Same API, measured input family.analytic.surface · coefficient of the mixed term. Baseline test points across courses 1, 2, 3, 5. The graph z=k u v at the origin has Gaussian curvature −k².
Practical limit. Largest passing sample 100 (5.09 ms, 76.7 MiB peak process RSS). The runs did not locate a ceiling for this family. The patch must be regular at the evaluation point. Small metric determinants or high expression complexity make geometry more sensitive or costly.
Measured times, memory and outcomes
coefficient of the mixed term · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
4.66
76.2
2
Baseline
Passed
14.67
76
3
Baseline
Passed
7.08
77.2
5
Baseline
Passed
5.04
76.2
10
Stretch
Passed
4.97
76.7
50
Stretch
Passed
4.73
76.7
100
Stretch
Passed
5.09
76.7
Each row measures the stated fixture. Other inputs to this API can take different paths. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
analytic.surface · 1 passing test case, 4 distinct argument descriptions
Compute for the tetrahedron, cube and icosahedron.
Worked solution
, , : all 2, the Euler characteristic of the sphere.
Using RatMath
Use the data and parameter order shown below. Compare the returned value with the intermediate quantities in the worked solution.
JavaScript module
import * as geo from "@ratmath/geo";
console.log(["tetrahedron", "cube", "icosahedron"].map((n) => geo.solids[n]().euler));
Checked output
[2, 2, 2]
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Simple closed surfaces or piecewise smooth patches with few corners; topology and orientation enter global identities.
For this problem type. Use a low-genus surface or a small complex with a few to tens of faces. Face identifications and valid boundary data matter as much as counts.
Focal example. The code above passed its displayed check in 105 ms on Node.
Same API, measured input family.geo.solids · number of catalog solids checked. Baseline test points across courses 1, 2, 3, 5. Compare the vertex, edge and face counts with the known convex polyhedra and verify V−E+F=2 for each.
Practical limit. Largest passing sample 9 (939 ms, 99.7 MiB peak process RSS). The first sampled passing call above 100 ms used 5 (444 ms). The runs did not locate a ceiling for this family. These inputs select named solids from a finite catalog. Mesh processing for an arbitrary number of faces would be a different operation.
Measured times, memory and outcomes
number of catalog solids checked · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
1.23
75.4
2
Baseline
Passed
3.73
75.8
3
Baseline
Passed
3.42
76.6
5
Baseline
Passed
444
94.9
7
Stretch
Passed
437
95.5
9
Stretch
Passed
939
99.7
Each row measures the stated fixture. Other inputs to this API can take different paths. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Day 35 / 40 · Global geometry
Classification of surfaces
Assisted@ratmath/geo
Problem
A closed orientable surface has a triangulation with 10 vertices, 36 edges and 24 triangles. Check that these counts are possible, and say which surface it is.
Worked solution
In a closed triangulated surface every triangle has 3 edges and every edge lies on exactly 2 triangles, so : . Then : genus 2, the double torus. (This is the f-vector of a minimal genus-2 triangulation.)
Using RatMath
Check 3F=2E, then use connectedness, closedness and orientability to infer the genus. Incidence balance alone does not construct a triangulation.
JavaScript module
import * as geo from "@ratmath/geo";
const [V, E, F] = [10, 36, 24];
const s = geo.classifySurface({ euler: V - E + F, orientable: true });
console.log([3 * F === 2 * E, s.eulerCharacteristic, s.genus]);
Checked output
[true, -2, 2]
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Simple closed surfaces or piecewise smooth patches with few corners; topology and orientation enter global identities.
For this problem type. Use a low-genus surface or a small complex with a few to tens of faces. Face identifications and valid boundary data matter as much as counts.
Focal example. The code above passed its displayed check in 0.212 ms on Node.
Related workload in this unit.geo.countTopologies · labeled points. Baseline test points across courses 1, 2, 3, 4. Compare the counts of labeled topologies with 1,4,29,355,6942,209527.
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 5 (941 ms, 88.6 MiB peak process RSS). Library refusal at 6. The first sampled passing call above 100 ms used 5 (941 ms). The number of labeled topologies grows rapidly. An explicit census on a finite set is much harder than checking a given topology.
Measured times, memory and outcomes
labeled points · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
0.172
75
2
Baseline
Passed
0.209
75.4
3
Baseline
Passed
0.298
76.1
4
Baseline
Passed
18.86
77.3
5
Stretch
Passed
941
88.6
6
Stretch
Library refusal · GeoError: counting by preorders is limited to n ≤ 5 here (6 points have 209527 topologies)
0.170
75.6
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
geo.classifySurface · 1 passing test case, 4 distinct argument descriptions
Fixed · Invalid boundary counts are rejected. Euler characteristic 2 with orientability true and −2 boundary circles now raises GeoError. The boundary count must be a nonnegative integer.
Day 36 / 40 · Global geometry
Spherical triangles
Direct calculation@ratmath/geo
Problem
On the unit sphere, take the north pole and the equator points at longitudes 0° and 90°. Find the angle sum, excess and area of the triangle.
Worked solution
Three right angles: sum , excess , area = excess , one eighth of the sphere's .
Using RatMath
Use the data and parameter order shown below. Compare the returned value with the intermediate quantities in the worked solution.
JavaScript module
import * as geo from "@ratmath/geo";
const T = geo.striangle(geo.northPole(), geo.latLon(0, 0), geo.latLon(0, "1/4"));
console.log([T.angleSum, T.excess, T.area, T.fractionOfSphere].map(String));
Checked output
["3π/2", "π/2", "π/2", "1/8"]
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Simple closed surfaces or piecewise smooth patches with few corners; topology and orientation enter global identities.
Focal example. The code above passed its displayed check in 0.923 ms on Node.
Related workload in this unit.geo.triangle · scale on a 3–4–5 triangle. Baseline test points across courses 1, 2, 5, 10. The unsigned area scales by k² from 6.
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 1,000,000 (0.273 ms, 75.3 MiB peak process RSS). The runs did not locate a ceiling for this family. Rescaling preserves this triangle’s shape. Collinear and nearly collinear coordinates need separate checks for undefined angles and small signed area.
Measured times, memory and outcomes
scale on a 3–4–5 triangle · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
1
Baseline
Passed
0.270
74.8
2
Baseline
Passed
0.388
74.9
5
Baseline
Passed
0.287
76.4
10
Baseline
Passed
0.264
75.6
100
Stretch
Passed
0.278
75.3
10,000
Stretch
Passed
0.268
76.8
1,000,000
Stretch
Passed
0.273
75.3
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
geo.striangle · 3 passing test cases, 3 distinct argument descriptions
Parallel transport around a positively oriented octant triangle on the unit sphere turns a vector through what angle modulo 2π?
Worked solution
The signed holonomy is the integral of Gaussian curvature over the triangle. Its area is one eighth of 4π, so the turn is +π/2 modulo 2π for the positive orientation.
Working without a calculator
Use the argument or construction in the worked solution. This lesson assigns the reasoning to the student.
Input range and limits
Typical inputs for this unit. Simple closed surfaces or piecewise smooth patches with few corners; topology and orientation enter global identities.
Scope of verification. This day asks for a hand argument, construction or interpretation. The worked instance gives the input. General claims need the reasoning shown above. A measured time, memory ceiling or finite input sweep would not verify that claim.
Day 38 / 40 · Global geometry
Flat torus
Worked by hand
Problem
What does Gauss–Bonnet predict for total curvature of a smooth closed torus?
Worked solution
Its Euler characteristic is zero, so the integral of Gaussian curvature is zero. This allows positive and negative regions.
Working without a calculator
Use the argument or construction in the worked solution. This lesson assigns the reasoning to the student.
Input range and limits
Typical inputs for this unit. Simple closed surfaces or piecewise smooth patches with few corners; topology and orientation enter global identities.
Scope of verification. This day asks for a hand argument, construction or interpretation. The worked instance gives the input. General claims need the reasoning shown above. A measured time, memory ceiling or finite input sweep would not verify that claim.
Day 39 / 40 · Global geometry
Scaling
Direct calculation@ratmath/core
Problem
A sphere of radius 3 has what Gaussian curvature?
Worked solution
Principal curvatures have magnitude 1/3, so their product is 1/9.
Using RatMath
Put the arithmetic inside the R tag so RatMath parses the literals. Keep fractions as ratios throughout the calculation and attach the units from the problem to the result.
JavaScript module
import { R } from "@ratmath/core";
console.log(String(R`1/3^2`));
Checked output
1/9
Run this example locally
Use the integrated RatMath workspace with the subject packages linked. Save this example as lesson.mjs in its root and run node lesson.mjs. The guide formats library objects as mathematical values. Your console may also print their fields or JavaScript type suffixes.
Typical inputs for this unit. Simple closed surfaces or piecewise smooth patches with few corners; topology and orientation enter global identities.
Focal example. The code above passed its displayed check in 0.139 ms on Node.
Same arithmetic expression. Replaced its first numeral 1 with 0, 1, 2, 7, 12, 100, 1000, -3, 1/2. All 9 defined variants agreed exactly with Python’s rational arithmetic. This varies the arithmetic operation while holding the rest of the expression fixed.
Related workload in this unit.core.Rational.multiply · operand bits. Baseline test points across courses 8, 32, 64, 256. Cross-multiply the unreduced integer products; operands have unlike denominators.
Practical limit. The cutoff for this lesson’s own code is unmeasured. Largest passing sample 131,072 (1.53 ms, 75.5 MiB peak process RSS). The runs did not locate a ceiling for this family. Intermediate products can have twice the bit length of their factors. Repeated squaring can exhaust the engine’s BigInt allocation limit in a small number of steps.
Measured times, memory and outcomes
operand bits · one run per input
Input
Sample
Result
Call (ms)
Peak RSS (MiB)
8
Baseline
Passed
0.317
74.6
32
Baseline
Passed
0.035
75.5
64
Baseline
Passed
0.045
75.1
256
Baseline
Passed
0.106
74
1,024
Stretch
Passed
0.035
75.3
8,192
Stretch
Passed
0.075
75.8
32,768
Stretch
Passed
0.245
75
131,072
Stretch
Passed
1.53
75.5
Each row measures the stated fixture. This workload uses a different operation or expression from the focal example. Its thresholds apply only to the named fixture. Course intervals are estimates. Finite samples leave intermediate inputs and other problem families unverified.
Additional inputs from package tests
These arguments were observed in passing test cases. The linked assertions show what the tests actually checked. Structured inputs are abbreviated.
core.R · 2 passing test cases, 10 distinct argument descriptions
Why can Christoffel symbols vanish at a point even when curvature does not?
Worked solution
Normal coordinates remove first-order metric variation there. Curvature involves derivatives of the connection as well.
Working without a calculator
Use the argument or construction in the worked solution. This lesson assigns the reasoning to the student.
Input range and limits
Typical inputs for this unit. Simple closed surfaces or piecewise smooth patches with few corners; topology and orientation enter global identities.
Scope of verification. This day asks for a hand argument, construction or interpretation. The worked instance gives the input. General claims need the reasoning shown above. A measured time, memory ceiling or finite input sweep would not verify that claim.