Repository navigation
A polynomial over a power of a quadratic beside the root of another is reduced a power at a time - #1595
Merged
Rafael-SOWNet merged 1 commit intoSep 29, 2026
Conversation
…s reduced a power at a time P/(A^k sqrt(B)), two different quadratics and k at least two, was left unevaluated, and so were Rubi's sqrt(a + a sec(x))/(c + d sec(x))^2 and its kin, which the half-angle tangent writes as (1 - t^2)^(3/2)/((1 + t^2)((c + d) + (d - c) t^2)^2). Over A^j, P is L + A R with L linear; L/(A^j sqrt(B)) is the derivative of (p + q x) sqrt(B)/A^(j - 1) plus S/(A^(j - 1) sqrt(B)) wherever 2 L = 2 q A B + (p + q x) W + 2 A S, W = B' A - 2 (j - 1) B A'. The x^4 equation gives S2 = 2 q B2 (j - 2), the x^3 and x^2 ones S1 and S0 linear in p and q, and the x and constant ones are two equations in p and q, solved by their determinant; the linear solver over the symbols took 28 s on the five and failed. Down to the closed form over A, past a bound on the coefficients' size declined. The secant rule hands its rational function beside the root to the rule for it before the chain, whose substitution search spent the budget ahead of it, and the split beside the root drops a piece that is zero with a condition on it, which it asked for and declined on. Measured with work/intbench against dd72825, 3 s a problem: Rubi's 970 rows with a half-odd power of a +- a sec or a +- a csc, 937 -> 946, none lost, timeouts 13 -> 5, 328 s -> 200 s; 1.2.1.6, 4.3.9 and 4.4.9, 200 -> 202; family 0, Welz 43, declined after 9.8 s, answered in 0.6 s. Part of #718. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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:
P/(A^k sqrt(B))with two different quadratics andkat least two, one power ofAat a time down to the closed form #1583 gives fork = 1. Symbols in the coefficients are included.The reduction. Over
A^j,PisL + A RwithLlinear, andRgoes a power down as it is. ForL = g + h x, the derivative of(p + q x) sqrt(B)/A^(j - 1)is(2 q A B + (p + q x) W)/(2 A^j sqrt(B))withW = B' A - 2 (j - 1) B A'. SoL/(A^j sqrt(B))is that derivative plusS/(A^(j - 1) sqrt(B))wherever2 L = 2 q A B + (p + q x) W + 2 A S. That is five linear equations, one for each power of x up to the fourth, inp,qand the three coefficients of a quadraticS. They have a solution whereAandBhave no root in common. This is Hermite's reduction, which is how Rubi's 1.2.1.6 takes these. OverAitself, what is left issigma A + L:sigmaover the root alone, andLoverAbeside it, which #1583's rule closes.Solved by hand. The general linear solver over the symbols took 28 s on the five equations and then failed. They don't need it: the fourth power's equation gives
S2 = 2 q B2 (j - 2), the third's and the second's giveS1andS0linear inpandq, and the first's and the constant's are then two equations inpandq, solved by their determinant. Past a bound on the size ofp + q x, the reduction declines rather than grind: with six symbols the cube's coefficients reach 10,700 nodes at the second step.Where it comes from. It is a rule of its own, beside #1583's, and a piece the rational function beside a root is now split into as well. With #1584's half-angle tangent,
sqrt(a + a sec(x))/(c + d sec(x))^2becomes(1 - t^2)^(3/2)/((1 + t^2)((c + d) + (d - c) t^2)^2)int = tan(x/2), and the square below the bar is this. Two more things stood in the way of those rows:t, and the substitution search ahead of the rule for a rational function beside a root spent the budget on it. It now asks that rule first, and the chain only if it declines.0 provided not 1 - t^2 = 0, and declined on it. Such a piece is now dropped as the zero it is.(g + h*x)/((d + k*x + f*x^2)^2*sqrt(a + b*x + c*x^2))integral(...)(7 + 13*x)/((5 + x + 2*x^2)^3*sqrt(2 + x + 3*x^2))integral(...)sqrt(a + a*sec(x))/(c + d*sec(x))^2integral(...)tan(x/2)QuadraticBesideARootIntegralTestdifferentiates seven more integrands back with the symbols pinned.Measured with
work/intbenchagainst master atdd728251, the commit this is cut from, 3 s a problem:a ± a secora ± a csc(970 problems): 937 → 946 solved, none lost, 0 wrong. Eight of the 4.5.2.1 timeouts Half-odd powers of a ± a sec and a ± a csc by the half-angle tangent #1584 left are answered, in 69 to 466 ms:(a + a sec)^(k/2)over the square or cube ofc + d sec. So is 4.5.2.3:312, which master declined after 4.7 s. Timeouts fall from 13 to 5, and the rows take 200 s instead of 328 s.(A + B x)/((a e + b e x + b f x^2)^2 sqrt(d + e x + f x^2)), declined by master after 19 s and answered in 2.7 s. The other,x^2 (a + b x + c x^2)^(3/2)/(d - f x^2), timed out on master and took 20 s here, past the budget either way.dd728251: 793 → 804 and 1752 → 1753. Re-run on each branch alone, this branch's is family 0's Welz 43,(sqrt(x) - sqrt(x^2 - 1))^2/((1 + x - x^2)^2 sqrt(x^2 - 1)), declined by master after 9.8 s and answered in 0.6 s. None of the moves is a loss.The unit tests pass on a build with this branch and two others of mine merged (net10.0, 13,685), and every target builds.
🤖 Generated with Claude Code