Repository navigation
Read the symbolic trigonometric power as a factor of the integrand - #1958
Merged
Rafael-SOWNet merged 1 commit intoOct 20, 2026
Merged
Rafael-SOWNet merged 1 commit into
Rafael-SOWNet merged 1 commit into
Conversation
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
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.
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)^2sin(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)^mNone 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^mis integrated as the derivative oftan 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: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.
ASymbolicPowerOfATrigonometricFunctionAsADerivativeIntegralTestchecks that the five are not answered wrongly, and checks the under-the-bar and non-whole cases as answered. TheBREAKING-CHANGES.mdentry for the rule is extended.Part of #233.
🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura