Repository navigation
Integrate a function of the hyperbolic tangent alone under u = tanh - #1956
Merged
Merged
Conversation
The parser writes tanh(L) as (e^(2 L) - 1)/(e^(2 L) + 1) and coth(L) as its reciprocal, so an integrand built from those alone is R(u) with u = tanh(L), and dx = du/(b (1 - u^2)). tanh(x)/sqrt(a + b tanh(x)^2 + c tanh(x)^4) is u/((1 - u^2) sqrt(a + b u^2 + c u^4)), and sin(tanh(x)) is sin(u)/(1 - u^2), onto the sine and cosine integrals. The trigonometric counterparts are answered under u = tan(x); the hyperbolic functions arrive as exponentials, and nothing read them as a tangent. Only where R is not rational in u: those the exponential substitution answers. Rubi's 6.3 and 6.4: 33 rows go from unevaluated or timed out to solved (689 -> 722 of 728), 0 wrong. Families 0 and 1 and samples of 2-8 otherwise identical; gate and suite pass. Part of #233. 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 #233.
The parser writes
tanh(L)as(e^(2 L) - 1)/(e^(2 L) + 1)andcoth(L)as its reciprocal, so an integrand built from those alone isR(u)withu = tanh(L), anddx = du/(b (1 - u^2)):tanh(x)/sqrt(a + b tanh(x)^2 + c tanh(x)^4)isu/((1 - u^2) sqrt(a + b u^2 + c u^4)).sin(tanh(x))issin(u)/(1 - u^2), onto the sine and cosine integrals.The trigonometric counterparts are answered under
u = tan(x). The hyperbolic functions arrive as exponentials, and nothing read them as a tangent. The new rule,SolveAFunctionOfTheHyperbolicTangent, applies only whereRis not rational inu. Rational functions of tanh keep the answers the exponential substitution gives them;tanh(x)^2andtanh(x)/(1 + tanh(x))are pinned as unchanged.Measured against master
8a1ef454:The gains include
tanh/cothover the root of a quartic in them,tanh/(a + b tanh^4)^k,sin(tanh(a + b x))^kwith its cos and coth twins, and(b coth(c + d x)^4)^(k/3).The rebase onto #1950–#1955 conflicted at the shared anchors. I resolved it by keeping every rule. The combined tests of #1952, #1953, #1955 and this branch pass, 21/21. All gained rows were declined (35) or timed out (1) on 2.5.0, and
BREAKING-CHANGES.mdhas the entry.🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura