Skip to content

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 into
masterfrom
a-reciprocal-of-a-binomial-in-a-power-of-a-hyperbolic-function-by-its-roots
Oct 16, 2026
Merged

Rafael-SOWNet merged 5 commits into
masterfrom
a-reciprocal-of-a-binomial-in-a-power-of-a-hyperbolic-function-by-its-roots

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Part of #718.

1/(a + b s^n) for s a sine, cosine, hyperbolic sine or hyperbolic cosine of a linear, n from 5 to 12, and a symbol in a or b, is split over the roots of the binomial. 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_k r_k/(r_k - s^q)

Each term is an arctangent of tan(y) (even n) or of tan(y/2) (odd n), or the inverse hyperbolic tangent of tanh for the hyperbolic functions. It is written F(K u)/K with only K^2 fixed, so its derivative does not depend on which root K is. (atan(K tan(y))/K)' is 1/(cos(y)^2 + K^2 sin(y)^2) for either. A root that makes K^2 zero 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:

  • The roots of unity. (-1)^(2/3) simplifies to 1 here, the real cube root of 1. It means the principal e^(2 pi i/3) in Rubi's answers. Written that way, every term was the same. They are written as cos + i sin now.
  • The check. DerivativeHoldsAtSampledPoints could not settle the arctangents of complex arguments at enough points, and declined 1/(a + b sin(x)^5), which is right at every point checked exactly. The rule refuses an answer only where it differs, through DerivativeDiffersWhereReal.

n up to 4 is left to the rules before it. They answer 1/(a + b cosh(x)^3) through e^x in 655 characters, and asked first this rule wrote 1491. That costs Rubi's 6.2.7 1/(a - b cosh(x)^3), which those rules decline on the sign of b alone; that is a separate defect.

Checks

  • Exact checks at 50–2000 digits, a and b of 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):

master this branch
pocket: every row of 4.1.7, 4.2.7, 6.1.7, 6.2.7 (966 statable) 924 945
families 0–8 samples 4.1.7:323, 4.2.7:147 +2 (the same rows)
rows moved +21: 4.1.7:320–325, 4.2.7:145–150, 6.1.7:310–312, 6.2.7:111–116

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

Rafael-SOWNet and others added 5 commits October 16, 2026 07:05
…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
@Rafael-SOWNet Rafael-SOWNet added this to the 2.6.0 milestone Oct 16, 2026
@Rafael-SOWNet
Rafael-SOWNet merged commit 2d17cd1 into master Oct 16, 2026
34 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in AngouriMath Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant