A quotient by the square of a base is integrated by parts against the base's reciprocal - #1759
Merged
Rafael-SOWNet merged 5 commits intoOct 4, 2026
Conversation
… base's reciprocal Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
…ctions too Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
x^2/(x cos(x) - sin(x))^2 is (x sin(x) + cos(x))/(x cos(x) - sin(x)) by the tower ansatz, continuous across the zeros of the base's derivative, where the by-parts answer's two terms each have a pole that cancels. 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
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.
x^2/(a x cos(a x) - sin(a x))^2was declined, with the rest of Rubi's 4.7.7 over the square ofa x cos(a x) - sin(a x)or ofcos(a x) + a x sin(a x). 2.5.0 declined them too:9848e467x^2/(a x cos(a x) - sin(a x))^2x/(a^2 sin(a x) (a x cos(a x) - sin(a x))) - cot(a x)/a^3, in 0.4 ssin(a x)^2/(a x cos(a x) - sin(a x))^2sin(a x)^3/(x (a x cos(a x) - sin(a x))^2)Si(a x), in 0.1 ssin(a x)^4/(x^2 (a x cos(a x) - sin(a x))^2)x^2/(cos(a x) + a x sin(a x))^2cos(a x)^2/(cos(a x) + a x sin(a x))^2cos(a x)^3/(x (cos(a x) + a x sin(a x))^2)Each answer is differentiated back with
a = 1.3and compared atx = -2.3, -1.1, -0.4, 0.4, 1.1, 2.3; the times include that.What changes. A quotient
N/(M v^2)by the square of a basevwith a function ofxin it isg v'/v^2withg = N/(M v'), andv'/v^2is the derivative of-1/v; by parts its integral is-g/vplus that ofg'/v. Taken where the base's derivative is one term --(a x cos(a x) - sin(a x))'is-a^2 x sin(a x)-- and wherevcancels fromg'/v, so that what is left is an integral without the base;gis cancelled with the functions in it taken for indeterminates, and a power ofxthat divides the base comes out of it first. Where the tower ansatz answers the quotient its answer comes first:x^2/(x cos(x) - sin(x))^2is(x sin(x) + cos(x))/(x cos(x) - sin(x))there, as before, continuous across the zeros of the base's derivative, where-g/vand the remainder each have a pole that cancels. The base has to holdxoutside its functions as well:(a + b sin(x))^2below the bar is a quotient the other rules answer, and this one sent eight of them past the budget.Tests:
SquaredBaseByPartsIntegralTest, seven rows differentiated back witha = 1.3on both sides of zero; master declines all seven.Measured first on 4.7.7's 66 problems with a squared base and 300 more of family 4 drawn at random, 247 of them run, at the corpus's 5-second budget, against master
cb8e133d, the branch's base:Measured then on the Rubi corpus against master
cb8e133d:The harness counts no answer wrong in the pocket or the sample on either build. Of the 22 problems the two builds disagreed on, pocket and sample together, run again one build at a time, master answers 8 and this 18. The twelve more are 4.7.7's quotients by the squared bases,
sin(a x)^6/(x^4 (a x cos(a x) - sin(a x))^2)among them, answered here in a hundredth of a second to two seconds where master declines them. Two that master answers at seventeen and nineteen seconds ran past the harness's patience here; run again, twice on each build, both builds answer both at nineteen to twenty-four seconds. Two are declined or past the budget on both, and the other six both answer at nine to twenty seconds.The suite on the commit measured,
e5a2b3c0, passed but forTrigonometricTowerAnsatzTest.TheAnswerIsInTheSineAndCosine, which asks for the ring's form ofx^2/(x cos(x) - sin(x))^2; the rule asks the ring first now. On the merge with master9848e467,f9dbd7b0, the 4,160 calculus and corpus tests that run pass, that one among them, with 2 skipped, and the allocation gate passed on the commit measured. Every row of the first table is as it says on the merge. On the merge with master4c3aa3b4,890210ff, the head here, the 4,177 that run pass, with 2 skipped, and the library builds fornetstandard2.0.🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura