Repository navigation
A root of a square in a trigonometric function is its modulus - #1765
Merged
Rafael-SOWNet merged 3 commits intoOct 5, 2026
Merged
Rafael-SOWNet merged 3 commits into
Rafael-SOWNet merged 3 commits into
Conversation
b^2 + 2 a b f + a^2 f^2 is a^2 (f + b/a)^2, so a half-odd power of it is that power of sqrt(a^2) |f + b/a|, written with the sign of f + b/a in front of the integral, as the root of a perfect square in x already is. At the top, for one trigonometric function f and where each such root is a factor of the integrand. Rubi's (a + b sin(x)) sqrt(b^2 + 2 a b sin(x) + a^2 sin(x)^2) and the rest of its 4.7.7 with a tangent or a secant were declined or past the budget. Part of #718. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
…in-a-trigonometric-function-is-its-modulus
…in-a-trigonometric-function-is-its-modulus
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.
Part of #718.
(a + b sin(x)) sqrt(b^2 + 2 a b sin(x) + a^2 sin(x)^2)was declined or past the budget, with the rest of Rubi's 4.7.7 half-odd powers of a perfect square in a sine, a tangent or a secant. 2.5.0 declined them:a4141483(a + b sin(x)) sqrt(b^2 + 2 a b sin(x) + a^2 sin(x)^2)sgn(sin(x) + b/a) sqrt(a^2)times the integral of the square, in 0.6 s(a + b tan(x))/sqrt(b^2 + 2 a b tan(x) + a^2 tan(x)^2)(a + b sec(x)) (b^2 + 2 a b sec(x) + a^2 sec(x)^2)^(3/2)(a + b sin(g + f x))/(b^2 + 2 a b sin(g + f x) + a^2 sin(g + f x)^2)^(3/2)Each answer is differentiated back with
a = 1.3,b = 0.7,f = 1.1,g = 0.4and compared atx = -2.3, -1.1, -0.3, 0.4, 1.1, 2.3; the times include that.What changes.
b^2 + 2 a b f + a^2 f^2isa^2 (f + b/a)^2, so a half-odd power of it is that power ofsqrt(a^2) |f + b/a|, and the sign off + b/a, constant between its zeros, goes in front of the integral -- whatSolveByTakingARootOfAPerfectSquaredoes for a square inx, with one trigonometric function for the variable. The rest is rational in the function. At the top only, where each such root is a factor of the integrand; the leading coefficient a positive number or one of known sign for a real parameter, whose condition,a^2 > 0, travels with the answer as that rule's does.Tests:
RootOfASquareInATrigonometricFunctionIntegralTest, four rows differentiated back with the symbols pinned, on both sides of the zeros off + b/aand of zero; none is answered on master.Measured first on all of Rubi's 4.7.7, 836 problems, at the corpus's 5-second budget, against master
287c69a7, the branch's base:Measured then on the Rubi corpus against master
287c69a7:The harness counts no answer wrong in the pocket or the sample on either build. The family figures were measured with three other corpus runs on the machine. Of the 22 problems the two builds disagreed on, pocket and sample together, run again one build at a time, master answers 7 and this 14. This answers 12 that master does not, 4.7.7's half-odd powers of
b^2 + 2 a b f + a^2 f^2forfthe sine, the tangent and the secant, all but three in under a second and those in two and a half to five, where master declines them or runs past the budget. Master answers five that ran past the harness's patience here, logarithms of 3.2.1 and 3.2.3 that it answers at twenty-one to twenty-five seconds, at the edge of that patience. Run again, twice on each build, master answered two of the five in each run, at twenty-two and twenty-three seconds, and this ran past the patience on all five both times. Timed one at a time with a minute's budget, the first is answered on both builds in seven to eight and a half seconds, and the next two run past the minute on both: they sit at the edge of the harness's patience on a loaded machine, and the new rule, which reads trigonometric functions, runs once at the top of the question.The suite on the commit measured,
4517be5b, passed, and so did the allocation gate. On the merge with mastera4141483,1b17303f, the 4,196 calculus and corpus tests that run pass, with 2 skipped, and the library builds fornetstandard2.0. Every row of the first table is as it says on the merge.The head here,
b98ba491, merges master763f7baeinto that; its checks are this pull request's.🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura