Repository navigation
Integrate a function of an inverse times its derivative up to a factor constant though written with x - #1909
Merged
Rafael-SOWNet merged 3 commits intoOct 16, 2026
Conversation
…r constant though written with x atan(c x/sqrt(a - c^2 x^2)) has the derivative c/sqrt(a - c^2 x^2), and beside it 1/sqrt(d - c^2 d x^2/a) is that times a factor constant wherever it is real. With u the inverse, the integrand over u' splits into a function of u and that factor, and the integral is the factor times the integral of the function. The factor is taken as constant where it holds its value across sampled points; asking Simplify for its derivative took four seconds. Rubi's 5.3.7 atan(c x/sqrt(a - c^2 x^2))^m/sqrt(d - c^2 d x^2/a) and eleven more were declined, master spending up to 28 seconds on one. Part of #718 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
…verse-times-its-derivative-up-to-a-constant
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #718.
u = atan(c x/sqrt(a - c^2 x^2))has the derivativec/sqrt(a - c^2 x^2). Rubi's 5.3.7 puts1/sqrt(d - c^2 d x^2/a)beside it, which is that derivative timessqrt(a - c^2 x^2)/(c sqrt(d - c^2 d x^2/a)). That factor is constant wherever it is real, though written withxin it. Nothing read it as constant, soatan(...)^m/sqrt(d - c^2 d x^2/a)was declined, and the rules before it spent up to 28 seconds getting there.SolveAFunctionOfAnInverseTimesItsDerivativeUpToAConstanttakes each inverse sine, cosine or tangent of something not linear, substitutestfor it, and divides by its derivative. It splits what is left into the factors that holdtand those that do not. If the second are constant, the integral is their product times the integral overt."Constant" is decided by comparing the factor with its value at
x = 3/10, at the sampled points with every symbol pinned. I tried two symbolic tests first. AskingSimplifywhether the factor's derivative vanished took four seconds a row. The factor's square stayed a power of a quotient of roots, so the cheaper test of its square could not read it. A point the comparison cannot settle counts against constancy, and the answer is then checked where the integrand is real.It is asked early, after the constant sums are folded, at the question asked only. It fires only where that factor holds
x; a factor free ofxis the ordinary substitution's.Checks
AFunctionOfAnInverseTimesItsDerivativeIntegralTest: 5 cases.Corpus, measured against master 90c9d3e (this branch then merged adba48c):
All twelve solve on this branch re-run alone and none on master; on this branch the slowest takes 0.12 s. No losses. Two family-1 rows read as slow (1.2.1.6:191, 194). Re-timed alone they are 1,735 vs 1,695 ms and 446 vs 414 ms; the rule does not reach them, since they hold no inverse function. Gate passed; suite 15,469 passed, 0 failed.
One pocket row is wrong on master and on this branch alike: 5.1.4:650, answered
NaN. A separate branch fixes it.🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura