Repository navigation
Integrate the reciprocal of a binomial in a high power of a sine, cosine or hyperbolic one over its roots - #1905
Merged
Rafael-SOWNet merged 5 commits intoOct 16, 2026
Conversation
…roots With q = 2 for an even n and 1 for an odd one, m = n/q and r_k the m-th roots of -a/b, 1/(a + b s^n) = (1/(m a)) sum r_k/(r_k - s^q), and each term is an arctangent of tan(y) or of tan(y/2), written F(K u)/K so that only K^2 is fixed. The roots of unity are a cosine and a sine: (-1)^(2/3) is the real cube root of 1 here. Rubi's 4.1.7 and 4.2.7 1/(a + b sin(x)^5), 1/(a - b cos(x)^6) and the like, with a symbol in a or b, were declined. Part of #718 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
…e or cosine over its roots The same split as for the sine and cosine, each term an inverse hyperbolic tangent of tanh(y) or of tanh(y/2), the functions read back from (e^y -+ e^(-y))/2 as the parser writes them. Rubi's 6.1.7 and 6.2.7 1/(a + b sinh(x)^5), 1/(a - b cosh(x)^3) and the like were declined. Part of #718 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
They write 1/(a + b cosh(x)^3) through e^x in 655 characters, where the split writes 1491. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
…inomial-in-a-power-of-a-hyperbolic-function-by-its-roots
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.
1/(a + b s^n)forsa sine, cosine, hyperbolic sine or hyperbolic cosine of a linear,nfrom 5 to 12, and a symbol inaorb, is split over the roots of the binomial. Withq = 2for an evennand1for an odd one,m = n/qandr_kthem-th roots of-a/b:1/(a + b s^n) = (1/(m a)) sum_k r_k/(r_k - s^q)Each term is an arctangent of
tan(y)(evenn) or oftan(y/2)(oddn), or the inverse hyperbolic tangent oftanhfor the hyperbolic functions. It is writtenF(K u)/Kwith onlyK^2fixed, so its derivative does not depend on which rootKis.(atan(K tan(y))/K)'is1/(cos(y)^2 + K^2 sin(y)^2)for either. A root that makesK^2zero or infinite declines. The hyperbolic functions are read back from(e^y -+ e^(-y))/2, which is how the parser writes them.Two things the first version got wrong:
(-1)^(2/3)simplifies to 1 here, the real cube root of 1. It means the principale^(2 pi i/3)in Rubi's answers. Written that way, every term was the same. They are written ascos + i sinnow.DerivativeHoldsAtSampledPointscould not settle the arctangents of complex arguments at enough points, and declined1/(a + b sin(x)^5), which is right at every point checked exactly. The rule refuses an answer only where it differs, throughDerivativeDiffersWhereReal.nup to 4 is left to the rules before it. They answer1/(a + b cosh(x)^3)throughe^xin 655 characters, and asked first this rule wrote 1491. That costs Rubi's 6.2.71/(a - b cosh(x)^3), which those rules decline on the sign ofbalone; that is a separate defect.Checks
aandbof every sign pattern: 768/768 for the sine and cosine (twelve shapes, a linear argument,n= 7 and 10), 624/624 for the hyperbolic ones (eleven shapes).AReciprocalOfABinomialInAPowerOfASineIntegralTest: 11 cases.Corpus, measured against master 55a8044 (this branch then merged 5b5252b):
No losses and no slower rows once narrowed; the pocket was re-run on both arms after the narrowing. Gate passed. The chain's suite was killed by the local memory guard at 7.8 GB, as on four earlier branches. Re-run under a 4 GB heap limit: 15,424 passed, 0 failed.
The answers are long: 0.6–3.6 K characters, against about 1 K for Rubi's. The hyperbolic tangent and its inverse are written out in exponentials and a logarithm.
🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura