Skip to content

A rational function of the hyperbolic functions odd in the sine or the cosine is integrated by the other - #1464

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
hyperbolic-bioche
Sep 22, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
hyperbolic-bioche

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

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 (SolveByBiochesOddSubstitution): 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, both exact on the reals (cosh is positive, so u = sinh is a bijection of the line and u = cosh one on each side of zero).

What is new in SolveByBiochesOddHyperbolicSubstitution:

  • The six hyperbolic functions are read back from their exponential spellings through the gathered exponentials (TryGatherExponentialsOfOneLinearForm), for any linear argument and either sign of it (sinh(-x), or y named from e^-y); tanh(c + d x) alone, written with e^(2(c + d x)), is read as the tangent of half the gathered form.
  • A written power is handed on factor by factor as the power it is: (a + b sech(x)^2)^2 becomes (a u^2 + b)^2/u^4 and 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 root of a polynomial in the two even in the function is admitted; a Laurent radicand (a + b sech(x) is a + b/u) is declined — measured: with it admitted coth(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).
  • ParityIn and InU are lifted out of the trigonometric rule and shared (fSquared is the parameter now: 1 - u^2, u^2 - 1 or u^2 + 1).
  • Registered right after the rational-in-tanh route and before the substitution search, which with a symbolic coefficient spends the budget on u = e^x.

Measured (final build):

  • Family 6 (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.
  • Family 7: 215/270, 0 wrong (one row flipped Unsolved → Timeout on the 5 s cap; it is 20 s+ on master solo too). 1774-problem suite: 1707, 0 wrong, 0 timeout, wall 85 s, unchanged.
  • Unit suite: 12,610 tests, 0 failed. bench.sh: PASSED on all 19 gated benchmarks.
  • Every new test row verified by quadrature (IP_QUAD=1) as well as by the pinned differentiate-back test.

BREAKING-CHANGES.md carries 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

…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant