Skip to content

Ask a hyperbolic integrand as a trigonometric one - #1961

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
a-hyperbolic-integrand-as-a-trigonometric-one
Oct 20, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
a-hyperbolic-integrand-as-a-trigonometric-one

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

The parser writes the hyperbolic functions as exponentials, so the trigonometric rules never read them: (b cosh(x) + c sinh(x) + sqrt(b^2 - c^2))^(1/2) was declined where (b cos(x) + c sin(x) + sqrt(b^2 + c^2))^(1/2) is answered at once.

The rule uses Osborn's rule. With L = i s, cosh(L) = cos(s), sinh(L) = i sin(s) and dx = i ds/b, and the trigonometric rules answer the question in s. The answer is written back with s = -i L and checked against the integrand at sampled points. A branch that holds for a real s and differs on the imaginary axis is declined.

The rule fires only where:

  • every exponential of x is a whole power of one e^L;
  • x stands nowhere else;
  • it is the question asked, not a sub-question;
  • every rule in x has already declined.

A first version was asked early and allowed x beside the exponentials. It answered 46 problems and cost 11 that master answers, because the question in s is slow to decline and took the budget from rules that answer x/cosh(x)^(7/2) + 3/5 x sqrt(cosh(x)) and the like at once. This version is the one measured below.

Measured on 8a1ef454, branch against master:

Run Problems Master Branch
Pocket: Rubi's 6.1–6.7 2,962 2,866 solved 2,897 solved
Family 1, 40 a file 1,381 1,362 1,362
Family 0, whole 1,814 1,789 1,789
Families 2 to 8, sampled 2,410 2,362 2,360

Re-run alone on both builds, 30 of the 38 problems that moved go from declined or timed out to answered: 27 in 6.7.1, two in 6.5.3 and one in 6.6.3. None goes the other way. The two-row drop in families 3 and 7 is the problems that time out on both builds when re-run alone. One problem reads wrong on both builds: 6.1.5:94, #1944, an evaluator defect.

AHyperbolicIntegrandAsATrigonometricOneIntegralTest differentiates the answers back. It also checks that the rules in x keep the problems the first version took from them. BREAKING-CHANGES.md has the entry, with the 2.5.0 column measured on v2.5.0.

Part of #233.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

The parser writes the hyperbolic functions as exponentials, so the
trigonometric rules never read them. `(b cosh(x) + c sinh(x) + sqrt(b^2 - c^2))^(1/2)`
was declined where `(b cos(x) + c sin(x) + sqrt(b^2 + c^2))^(1/2)` is
answered at once. By Osborn's rule, with L = i s, cosh(L) is cos(s),
sinh(L) is i sin(s) and dx = i ds/b, and the question in s is one the
trigonometric rules answer. The answer is written back with s = -i L and
checked at sampled points, so a branch that holds for a real s but differs on
the imaginary axis is declined.

The rule only applies where every exponential of x is a whole power of one e^L
and x appears nowhere else. It is asked of the question asked only, and after
every rule in x. Asked early, the question in s, which is slow to decline,
took the budget from rules that answer `x/cosh(x)^(7/2) + 3/5 x sqrt(cosh(x))`
and its neighbours at once. Rubi's 6.5.3, 6.6.3 and 6.7.1.

Part of #233.

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 20, 2026
@Rafael-SOWNet
Rafael-SOWNet merged commit 015078c into master Oct 20, 2026
34 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in AngouriMath Oct 20, 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