Skip to content

The substitution search drops a trigonometric candidate its quotient cannot be a function of - #1493

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
substitution-numeric-screen
Sep 26, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
substitution-numeric-screen

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

The first measurable result for #1486's question of whether a stated precondition can make the search cheaper.

Over the problems the integrator answers, most of its time goes to SolveBySubstitution declining candidates. Each candidate costs a few milliseconds: the integrand over du/dx is written in u and simplified, and the candidate is refused if x survives. A candidate that takes one value at two points, where that quotient takes two, can't be a substitution whatever the simplifier makes of it, because a function of u agrees wherever u does.

For a sine, cosine, tangent, cotangent, secant or cosecant of a linear, the second point is known. A sine repeats at pi - theta, a cosine at -theta, and a tangent a period on. So two evaluations with the symbols pinned now settle it before the simplification runs. The complement pass is the same function spelled differently, so it's skipped with it. Other candidates aren't screened: for x^2 the mirror point -x can sit off a branch the rule answers on today.

Measured

master this branch
Rubi 4.7.2, 4.3.10, 4.4.10: time on the 269 problems answered, two interleaved pairs 154.2 s, 153.4 s 120.5 s, 119.5 s (−22%)
the same, every answer — identical, verdict and text, on all 297 that finish
Rubi family 4 (not interleaved) 148.3 s 132.8 s
Rubi families 1, 4–7, the 7.1 files and the 1774-problem suite — every row unchanged
unit suite 12,718 12,718 run to completion, 0 failed; the six new cases pass on their own
allocation gate — PASSED on all 19 gated benchmarks

The new theory integrates six substitutions under a trigonometric function of a linear, which the screen has to keep, and checks each by differentiating back.

Part of #1486.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

…cannot be a function of

A candidate u that takes one value at two points, where the integrand
over du/dx takes two, is no substitution whatever the simplifier makes of
it. A sine of a linear repeats at pi - theta, a cosine at -theta and a
tangent a period on, so two evaluations with the symbols pinned settle it
before the quotient is written in u and simplified, which is milliseconds
per candidate.

Rubi's 4.7.2, 4.3.10 and 4.4.10: the problems the integrator answers take
22% less time (154.2 -> 120.5 s and 153.4 -> 119.5 s, two interleaved
pairs), with every verdict and every answer unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
@Rafael-SOWNet
Rafael-SOWNet merged commit e8cc9d8 into master Sep 26, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant