Skip to content

An even power of the secant or the cosecant under a root is written in the tangent - #1717

Merged
Rafael-SOWNet merged 3 commits into
masterfrom
an-even-power-of-the-secant-under-a-root
Oct 3, 2026
Merged

Rafael-SOWNet merged 3 commits into
masterfrom
an-even-power-of-the-secant-under-a-root

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Part of #718.

sqrt(a + b csc(x)^2) was declined where sqrt(a + b cot(x)^2) was answered, although under u = tan(x) the two are one integrand: csc^2 is (1 + tan^2)/tan^2.

integrand master 8f3757cd this
sqrt(a + b csc(x)^2) declined 0.5 s
(a + b csc(c + d x)^2)^(3/2) declined 0.4 s
sqrt(a + b sec(x)^2) declined 0.1 s
1/sqrt(a + b sec(x)^2) declined 0.05 s
sqrt(1 + csc(x)^2) declined 0.2 s
1/sqrt(-1 + csc(x)^2) declined 0.03 s

What changes. The tangent substitution writes an even power of the secant as 1 + tan^2 and of the cosecant as (1 + tan^2)/tan^2, but it went on only where the tangent, or a sine or a cosine under a root, was already in the integrand. It goes on now for an even power of the secant or the cosecant under a root too. The cosecant's answers carry sgn(tan(x)), from the root of 1/tan(x)^2.

Tests: TangentSubstitutionIntegralTest.AnEvenPowerOfTheSecantOrTheCosecantUnderARoot, eight rows, each differentiated back.

Measured first on the 124 problems of 4.5.0, 4.5.7, 4.6.0, 4.6.7 and 4.7.7 with an even power of the secant or the cosecant under a root, at the corpus's 5-second budget, against master dbe5b382, the branch's base:

master this
solved 46 118
wrong 0 0

Measured then on the Rubi corpus against master dbe5b382:

master this
family 0, independent suites (1814) 1766 1768
family 1, 40 a file (1381) 1293 1293
families 2 to 8, sampled (2410) 2212 2225

No answer is wrong on either build. The 76 problems the two builds disagreed on, run again one build at a time, are 74 answered here and not on master -- 52 in 4.5.7, 19 in 4.6.7, Timofeev's 591 and 592, (4 - 5 sec(x)^2)^(3/2) and its reciprocal, and one in 4.7.7 -- and two that are the machine: one both builds answer alone, one both run out of time on.

The corpus was measured on 6d5dce68. Master 8f3757cd is merged in since, without conflicts, and the suite passes on that merge, 107efc7c, 14,599 tests, and so does the allocation gate.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

Rafael-SOWNet and others added 3 commits October 3, 2026 03:09
…n the tangent

The tangent substitution writes sec^2 as 1 + tan^2 and csc^2 as
(1 + tan^2)/tan^2, but went on only where the tangent, or a sine or a
cosine under a root, was already in the integrand, so sqrt(a + b csc(x)^2)
was declined where sqrt(a + b cot(x)^2) was answered. An even power of
the secant or the cosecant under a root goes on now too. Rubi's 4.5.7
and 4.6.7.

Part of #718

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
@Rafael-SOWNet Rafael-SOWNet added this to the 2.6.0 milestone Oct 3, 2026
@Rafael-SOWNet
Rafael-SOWNet merged commit 3a3d016 into master Oct 3, 2026
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant