Skip to content

A tangent times that of its double is a secant less one - #1762

Merged
Rafael-SOWNet merged 4 commits into
masterfrom
a-tangent-times-that-of-its-double-is-a-secant-less-one
Oct 4, 2026
Merged

Rafael-SOWNet merged 4 commits into
masterfrom
a-tangent-times-that-of-its-double-is-a-secant-less-one

Conversation

@Rafael-SOWNet

@Rafael-SOWNet Rafael-SOWNet commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

Part of #718.

sec(2(a + b x))^2 sqrt(c tan(a + b x) tan(2(a + b x))) was declined, with the rest of Rubi's 4.7.7 powers of c tan(y) tan(2y) beside the secant or cosine of 2y. 2.5.0 declined them or ran past the budget, and master answers one of them:

integrand 2.5.0 master a10be86c this
sec(2(a + b x))^2 sqrt(c tan(a + b x) tan(2(a + b x))) past 20 s declined after 1.7 s in 0.8 s
cos(2(a + b x)) (c tan(a + b x) tan(2(a + b x)))^(3/2) past 20 s declined after 4.6 s in 0.4 s
1/sqrt(c tan(a + b x) tan(2(a + b x))) declined answered answered, in 0.3 s
sec(2(a + b x))/(c tan(a + b x) tan(2(a + b x)))^(3/2) declined declined in 0.3 s
tan(x) tan(2x) declined ln(tan(x) + 1)/2 - ln(tan(x) - 1)/2 - arctan(tan(x)) ln((1 + sin(2x))/(1 - sin(2x)))/4 - x, in 0.04 s

Each answer is differentiated back with a = 0.4, b = 1.1, c = 1.3 and compared at x = -0.9, -0.7, -0.5, 0.05, 0.2; the times include that.

What changes. tan(y) is (1 - cos(2y))/sin(2y), so tan(y) tan(2y) is (1 - cos(2y))/cos(2y), which is sec(2y) - 1 wherever both sides are defined; at the zeros of cos(y) the left side is -2 as a limit, which the right side is. Written so, a power of c tan(y) tan(2y) beside powers of the secant or cosine of 2y is in the one argument 2y, and SolveByTheHalfAngleTangentBesideAHalfOddPowerOfOnePlusASecant answers it there; in two arguments nothing read it. The product is respelled in any product of the integrand and the same question asked, so the answer is that rule's, which is exact where the integrand is real -- for a positive c where cos(2y) is positive. A whole power is respelled the same way: tan(x) tan(2x), which master answers through the tangent, is answered as ln((1 + sin(2x))/(1 - sin(2x)))/4 - x now.

Tests: TangentTimesThatOfItsDoubleIntegralTest, five rows differentiated back with the symbols pinned where the integrand is real, on both sides of the zero of tan(a + b x).

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:

master this
solved 686 712
wrong 0 0
past the budget 26 26

Measured then on the Rubi corpus against master 287c69a7:

master this
family 0, independent suites (1814) 1772 1772
family 1, 40 a file (1381) 1308 1308
families 2 to 8, sampled (2410) 2301 2295

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 35 problems the two builds disagreed on, pocket and sample together, run again one build at a time, master answers 3 and this 31. This answers 29 that master does not: 27 of 4.7.7's powers of c tan(y) tan(2y) beside the secant or cosine of 2y, each in a third of a second or less, where master 287c69a7 declines them, some after six seconds; and a 6.6.1 and a 7.3.2 integrand at twenty-one and twenty-four seconds, at the edge of the harness's patience. Master answers one that ran past the patience here, a 3.2.3 logarithm at twenty-three seconds. Run again, twice on each build, both builds ran past it on both.

The suite on the commit measured, b6465ba3, passed. The allocation gate failed there once, on time alone -- EvalTrigPrecise at 3.23 times its baseline, with three other corpus runs on the machine -- and passed when run again, at 1.92 times, its allocation the baseline's. On the merge with master a10be86c, 33f946c6, the 4,182 calculus and corpus tests that run pass, with 2 skipped, and the library builds for netstandard2.0; the head here merges master 9f2cc36d into that. Every row of the first table is as it says on the first merge. On the merge with master 9f2cc36d, 0abc6233, the 4,189 that run pass, with 2 skipped; and on the merge with master a4141483, de64dea7, the head here, the 4,197 that run pass, with 2 skipped, and the library builds for netstandard2.0.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

Rafael-SOWNet and others added 3 commits October 4, 2026 17:23
tan(y) tan(2y) is (1 - cos(2y))/cos(2y), which is sec(2y) - 1 wherever
both are defined. Written so, a power of c tan(y) tan(2y) beside the
secant or cosine of 2y is in the one argument 2y, where the half-angle
tangent answers it; with two arguments nothing read Rubi's
sec(2(a + b x))^2 sqrt(c tan(a + b x) tan(2(a + b x))) and the rest of
its 4.7.7 with that product. The same question, asked as it.

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 4, 2026
@Rafael-SOWNet
Rafael-SOWNet merged commit bf5d1a1 into master Oct 4, 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