A half-angle integrand with symbols in it is put over one bar and not simplified - #1730
Merged
Rafael-SOWNet merged 5 commits intoOct 4, 2026
Merged
Conversation
Under t = tan(x/2) the integrand was simplified before it was integrated, and with symbols in it the simplifier's search grew past any budget: sec(x)^2/(a + b cos(x))^3 spent 43 s in it and the fourth power more than two minutes, where integrating what it returned takes 0.14 s. With a symbol in it the integrand is put over one bar and not simplified; one without a symbol is simplified as before. Two things the simplifier did are done instead, since the steps after it read them: whole powers of products are written as products of powers, so that the 1 + t^2 the division takes off as a factor is not hidden inside ((1 + t^2)(1 - t^2))^6, and a base of a lower degree than it is written in is written as its polynomial, a (1 + t^2) + a (1 - t^2) as 2 a, where read as a quadratic its leading coefficient is zero as a value only. Part of #718. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
Under a root the simplifier's writing of the radicand is what the radical rules read: 1/(b cos(x) + c sin(x) - sqrt(b^2 + c^2))^(3/2) was declined in 3 s with it and ran past two minutes without it. Part of #718. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
Rafael-SOWNet
force-pushed
the
a-half-angle-integrand-with-symbols-is-not-simplified
branch
from
October 4, 2026 04:13
916f7c2 to
e4048ed
Compare
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.
Under
t = tan(x/2)a rational function of the sine and cosine was simplified before it was integrated, and with symbols in it the simplifier's search grew past any budget, where integrating what it returned takes a fraction of a second:ba8eb99bsec(x)^2/(a + b cos(x))^3sec(x)^2/(a + b cos(x))^4sec(c + d x)^2/(a + b cos(c + d x))^4sec(x)/(a + b cos(x))^31/(cos(x) (a + b cos(x))^2)Timed one integrand at a time, beside other work on the machine.
What changes. A rational function of
twith a symbol in it is put over one bar, with its whole powers of products written as products of powers and its bases of a lower degree than they are written in lowered, and is not simplified further. One without a symbol, or with a root oftin it, is simplified as before: under a root the simplifier's writing of the radicand is what the radical rules read, and1/(b cos(x) + c sin(x) - sqrt(b^2 + c^2))^(3/2)went from a decline in three seconds to a search past two minutes without it.Tests:
HalfAngleSubstitutionIntegralTest.APowerOfALinearInTheCosineBesideASecant, five rows, each differentiated back with the symbols pinned.Measured first on every sixth of the 5,655 problems in Rubi's family 4 that are rational functions of trigonometric functions of one argument with a symbol in them, 938 run, at the corpus's 5-second budget, against master
8f3757cd, the branch's base:Measured then on the Rubi corpus against master
8f3757cd:No answer is wrong in the sample on either build. Of the 49 problems the two builds disagreed on, run again one build at a time, 43 ran out of time on master and are answered here, 34 of them in the secant files 4.5 --
1/(a + b sec(c + d x))^2,sec(e + f x) (a + b sec(e + f x))/(c + d sec(e + f x))^3and(A + B sec(c + d x))/(a + b sec(c + d x))^2among them -- and the other nine rational functions of the trigonometric functions over a power of a linear or a quadratic in one of them. Five are answered on both: four take 21 to 23 s on either build, past the corpus's five seconds, and family 1's one difference in the sample,x^4/((a + b x^2)^2 (c + d x^2)^3), is one of them; the fifth,(A + B sin(e + f x))/((a + a sin(e + f x))^3 (c + d sin(e + f x))^3), takes 21 s on master and 7 s here. One,sqrt(g sin(e + f x))/((c + d sin(e + f x)) sqrt(a + a sin(e + f x))), runs out of time on both.The suite passes on the merge with master
ba8eb99b,095cb42a, 14,673 tests with 13 skipped, run under a 4 GB heap limit, and the allocation gate on the commit measured,489eb68b; every row above is as the table says on the merge.🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura