A rational function of the hyperbolic functions odd in the sine or the cosine is integrated by the other - #1464
Merged
Merged
Conversation
…e cosine is integrated by the other `sinh(x)^3/(a + b cosh(x)^2)` was a search past the budget: under u = e^x it is a rational function of a symbolic palindromic quartic, and under u = tanh(x/2) of a symbolic polynomial of degree eight. It is (u^2 - 1)/(a + b u^2) under u = cosh(x) -- Bioche's first two rules, which the trigonometric functions already had: odd in the hyperbolic sine, u = cosh with sinh^2 = u^2 - 1; odd in the hyperbolic cosine, u = sinh with cosh^2 = u^2 + 1. The six hyperbolic functions are read back from their exponential spellings through the gathered exponentials, for any linear argument and either sign of it; a written power is handed on as the power it is, factor by factor, and not expanded into a symbolic quartic for the rational integrator to factor again; a root of a polynomial in the two even in the function is admitted, a Laurent one (`a + b sech(x)`) declined, since the search after `sqrt(a + b/u)` is longer than the exponential substitution's. ParityIn and InU are lifted out of SolveByBiochesOddSubstitution and shared. In front of the substitution search, which with a symbolic coefficient spends the budget on u = e^x. Family 6 of the Rubi suite: 344 -> 357 of 417, 0 wrong, timeouts 34 -> 24; family 7 215/270 and the 1774-problem suite 1707 unchanged. Suite 12610 passed; allocation gate passed on all 19 gated benchmarks. Part of #718. Co-Authored-By: Claude Opus 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.
sinh(x)^3/(a + b cosh(x)^2)was a search past the budget: underu = e^xit is a rational function of a symbolic palindromic quartic, and underu = tanh(x/2)of a symbolic polynomial of degree eight. It is(u^2 - 1)/(a + b u^2)underu = cosh(x)— Bioche's first two rules, which the trigonometric functions already had (SolveByBiochesOddSubstitution): odd in the hyperbolic sine,u = coshwithsinh^2 = u^2 - 1; odd in the hyperbolic cosine,u = sinhwithcosh^2 = u^2 + 1, both exact on the reals (cosh is positive, sou = sinhis a bijection of the line andu = coshone on each side of zero).What is new in
SolveByBiochesOddHyperbolicSubstitution:TryGatherExponentialsOfOneLinearForm), for any linear argument and either sign of it (sinh(-x), orynamed frome^-y);tanh(c + d x)alone, written withe^(2(c + d x)), is read as the tangent of half the gathered form.(a + b sech(x)^2)^2becomes(a u^2 + b)^2/u^4and not the expanded symbolic quartic the rational integrator would have to factor again. A factor neither even nor odd (1 + sinh(x)) falls back to the expanded-and-mirrored form the trigonometric rule uses.a + b sech(x)isa + b/u) is declined — measured: with it admittedcoth(c + d x)^3/(a + b sech(c + d x))^(3/2)went from 8.9 s to past the budget, and the family run peaked at 2.7 GB; declined, both are back (8.6 s, 503 MB).ParityInandInUare lifted out of the trigonometric rule and shared (fSquaredis the parameter now:1 - u^2,u^2 - 1oru^2 + 1).u = e^x.Measured (final build):
familycap.sh 6 20): 344 → 357/417, 0 wrong, timeouts 34 → 24 — 6.1.5, 6.1.7, 6.2.5, 6.2.7, 6.3.7, 6.5.3, 6.5.7 rows, nothing lost.bench.sh: PASSED on all 19 gated benchmarks.IP_QUAD=1) as well as by the pinned differentiate-back test.BREAKING-CHANGES.mdcarries the entry with the 2.5.0 column measured on a 2.5.0 build (every row unevaluated there, including the rational-coefficient one).Part of #718.
🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura