Skip to content

Read the symbolic trigonometric power as a factor of the integrand - #1958

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
a-symbolic-power-as-a-derivative-reads-the-power-as-a-factor
Oct 20, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
a-symbolic-power-as-a-derivative-reads-the-power-as-a-factor

Conversation

@Rafael-SOWNet

@Rafael-SOWNet Rafael-SOWNet commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

The rule that integrates f^m (alpha + beta f^2) as the derivative of a product (f a sine, cosine, secant or cosecant, m symbolic) found its power by writing 1 for the first such power anywhere in the tree. A power below the bar, or inside one term of a sum, was taken for a factor of the integrand. Five such integrands came back wrong on master. 2.5.0 declined them, so these wrong answers never shipped:

  • (-m + (1+m) sec(x)^2)/sec(x)^m
  • -m sec(x)^m + (1+m) sec(x)^2
  • sin(x)^m (1+m) - (2+m) sin(x)^2
  • (1+m - (2+m) sin(x)^2)/sin(x)^m
  • (-m + (1+m) csc(x)^2)/csc(x)^m

None of these is the derivative of a single product. The rule no longer takes them, and any answer they get now differentiates back.

The rule reads its power among the integrand's factors instead. A power under the bar counts as f^(-m), so (m + (1-m) sec^2)/sec^m is integrated as the derivative of tan sec^(-m). The rule also takes a power that is not whole: the identities hold for any m on the principal branch. That answers Rubi's 4.5.4.1 (3 + 3 sec(c + d x)^2)/sqrt(sec(c + d x)).

Measured on 8a1ef454, branch against master:

Run Problems Master Branch
Pocket: the files the rule reads 1,791 1,784 solved 1,785 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,361

Two problems moved. 4.5.4.1:35 goes from declined to answered in 2 ms. 3.2.1:292 times out on both builds when re-run alone. No run had a wrong answer.

ASymbolicPowerOfATrigonometricFunctionAsADerivativeIntegralTest checks that the five are not answered wrongly, and checks the under-the-bar and non-whole cases as answered. The BREAKING-CHANGES.md entry for the rule is extended.

Part of #233.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

The rule for `f^m (alpha + beta f^2)` as the derivative of a product, for a
symbolic m and f a sine, cosine, secant or cosecant, wrote 1 for the first
such power anywhere in the tree. A power below the bar or inside one term of
a sum was taken for a factor of the integrand, and five such integrands came
back wrong on master; 2.5.0 declined them. The rule now reads its power among
the integrand's factors, so one under the bar is `f^(-m)`. It also takes a
number that is not whole, which the identities hold for on the principal
branch, as in Rubi's 4.5.4.1 `(3 + 3 sec(c + d x)^2)/sqrt(sec(c + d x))`.

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 46a56fb 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
@Rafael-SOWNet
Rafael-SOWNet deleted the a-symbolic-power-as-a-derivative-reads-the-power-as-a-factor branch October 29, 2026 00:43
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