Skip to content

Decline four slow routes ahead of the answering one by value, for the hyperbolic integral functions and the tangent - #2021

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
decline-slow-routes-for-the-hyperbolic-integral-functions
Oct 21, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
decline-slow-routes-for-the-hyperbolic-integral-functions

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Part of #233.

On Rubi's 8.5 (the hyperbolic integral functions) and 4.3.3.1, four routes spent gigabytes declining before the one that answers.

  1. SolveBySplittingSum expanded Shi(u) or Chi(u) times (e^u ± e^-u)/x^n into exponential terms, each non-elementary on its own. It declined after 10–13 GB, and SolveIntegratingByParts then answered the whole in 0.2–0.9 GB. IsAHyperbolicIntegralBesideItsExponentialsOverAPolynomial now sends such an integrand to by-parts first, the same call at the same depth, as the rule for an inverse function times a rational one already does.
  2. SolveByScalingTheVariable ran three full Simplify calls before finding that x = c t leaves c inside e^(b x) or Shi(u): about 4.6 of the 5.2 GB of x Shi(b x)^2. TheScaleStaysInsideAFunction evaluates the scaled integrand at two scales and two points first. It can only decline; where the values agree, the symbolic check runs as before.
  3. SolveBySubstitution simplified each quotient by a special function's derivative, about a gigabyte each, three times for x^2 Chi(a + b x)^2. A special function is transcendental over the elementary functions, so if the quotient takes two values at two points with the function held, no rewriting removes x from it. VariesWhereASpecialFunctionIsHeld refuses it before the simplification. It complements Differentiate what does not mention the variable to 0, whatever its node #2014's KeepsTheVariableThroughEveryRewriting, which leaves special functions out.
  4. SolveByTangentSubstitution's cot^k leaves 1^k above the bar and u^k below. That fell outside Skip simplifications that cannot help in the tangent rule and the substitution search #2002's lowest-terms class, which skips Simplify, and a full Simplify spent 4.8 GB dropping the 1^7. It is in that class now.

The first mechanism this branch had, stopping a split at its first declined term, merged as #2016 meanwhile; the rebase took master's side.

Answers are identical.

Chain against master f7f2a7a, which already has #2015's Simplify change, with the harness at its current revision on both arms:

  • pocket of 3,919 rows (4.5.x, 4.3.3.x and 8.x every 2nd row, the rest of 4.3 and 4.4 every 6th, every 30th elsewhere): verdicts identical;
  • allocation over the rows solved on both: 460.9 → 435.0 GB; 8.5 alone: 31.0 → 11.8 GB;
  • samples of families 0–8: unchanged in verdicts; family 8's allocation 7.9 → 6.4 GB;
  • no row's allocation grew past 1.3×.

Per row, by the probe against d3a6bce, before the rebase:

row before this
8.5:62 cosh Shi/x^2 12.59 GB 0.17 GB
8.5:154 Chi sinh/x^2 12.68 GB 0.19 GB
8.5:21 x Shi(b x)^2 5.21 GB 0.46 GB
4.3.3.1:313 5.01 GB 0.20 GB

A new class pins each shape: 8 cases differentiate back, and 7 more are bounded at 2 GB on the test's own thread, which they exceed (3.5–23.5 GB) without these changes. Locally, 1,166 tests pass across that class, the hyperbolic, substitution and tangent classes, and the corpus gate.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

… hyperbolic integral functions and the tangent

Four routes spent gigabytes declining before the one that answers, on Rubi's
8.5 and 4.3.3.1:

- SolveBySplittingSum expanded Shi(u) or Chi(u) times (e^u ± e^-u)/x^n into
  exponential terms, each non-elementary on its own, and declined after
  10-13 GB; SolveIntegratingByParts then answered the whole in 0.2-0.9 GB.
  IsAHyperbolicIntegralBesideItsExponentialsOverAPolynomial sends such an
  integrand to it first, the same call at the same depth.
- SolveByScalingTheVariable ran three Simplify calls before finding that
  x = c t leaves c inside e^(b x) or Shi(u). TheScaleStaysInsideAFunction
  evaluates the scaled integrand at two scales and two points first; it can
  only decline.
- SolveBySubstitution simplified each quotient by a special function's
  derivative, a gigabyte each for x^2 Chi(a + b x)^2. A special function is
  transcendental over the elementary ones, so with it held a quotient taking
  two values at two points keeps x through any rewriting:
  VariesWhereASpecialFunctionIsHeld refuses it before the simplification.
- SolveByTangentSubstitution's cot^k leaves 1^k above the bar and u^k below,
  outside the lowest-terms class that skips Simplify; it is in it now.

Answers are identical. Chain against master f7f2a7a: pocket of 3,919 rows
(4.5.x, 4.3.3.x and 8.x every 2nd row, the rest of 4.3 and 4.4 every 6th,
every 30th elsewhere), verdicts identical, allocation over the rows solved
on both 460.9 -> 435.0 GB, 8.5 alone 31.0 -> 11.8 GB; samples unchanged; no
row's allocation grew past 1.3x. By the probe against d3a6bce: 8.5:62
12.59 -> 0.17 GB, 8.5:154 12.68 -> 0.19 GB, 4.3.3.1:313 5.01 -> 0.20 GB.

Part of #233.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
@Rafael-SOWNet Rafael-SOWNet added this to the 2.6.0 milestone Oct 21, 2026
@Rafael-SOWNet
Rafael-SOWNet merged commit c32fdaa into master Oct 21, 2026
36 of 37 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in AngouriMath Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant