Skip to content

Two tangents of arguments a constant apart are written apart - #1767

Merged
Rafael-SOWNet merged 3 commits into
masterfrom
two-tangents-of-shifted-arguments-are-written-apart
Oct 5, 2026
Merged

Rafael-SOWNet merged 3 commits into
masterfrom
two-tangents-of-shifted-arguments-are-written-apart

Conversation

@Rafael-SOWNet

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

Copy link
Copy Markdown
Member

Part of #718.

tan(a + b x) tan(c + b x) was declined, with the secants, cotangents and cosecants the same way and the products whose arguments add to a constant, the eight of Rubi's 4.7.7. 2.5.0 declined them:

integrand 2.5.0 master 763f7bae this
tan(a + b x) tan(c + b x) declined declined cot(a - c) (ln(cos(c + b x)) - ln(cos(a + b x)))/b - x, in 0.4 s
tan(c - b x) tan(a + b x) declined declined in 0.02 s
cot(a + b x) cot(c + b x) declined declined in 0.01 s
sec(a + b x) sec(c + b x) declined after 3.4 s declined in 0.03 s
csc(c - b x) csc(a + b x) declined declined in 0.02 s

Each answer is differentiated back with a = 0.3, b = 0.9, c = 1.1 and compared at x = -1, -0.8, 0.1, 0.2, 0.9, 1; the times include that. Each answer is under eighty characters.

What changes. The addition formulas, read for the product: for a constant d = A - B, tan(A) tan(B) = cot(d) (tan(A) - tan(B)) - 1, cot(A) cot(B) = cot(d) (cot(B) - cot(A)) - 1, sec(A) sec(B) = csc(d) (tan(A) - tan(B)) and csc(A) csc(B) = csc(d) (cot(B) - cot(A)); for a constant s = A + B the same with the signs of the sums. Each holds wherever both sides are defined, for d or s not a multiple of pi, which a symbolic one is taken not to be, as everywhere in the integrator. A constant times such a product of two functions of one kind is written so and asked as the same question.

Tests: TwoFunctionsOfShiftedArgumentsIntegralTest, the eight, differentiated back with the symbols pinned on both sides of zero and away from every pole; master declines all eight.

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 687 695
wrong 0 0
past the budget 24 24

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 1307
families 2 to 8, sampled (2410) 2301 2300

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 12 problems the two builds disagreed on, pocket and sample together, run again one build at a time, master answers 1 and this 9: the eight more are 4.7.7's products of two tangents, cotangents, secants or cosecants of arguments a constant apart, each in a hundredth of a second, where master declines them. Both builds answer the other one, and both run past the budget on the remaining three.

The suite on the commit measured, a78d7128, passed, all 14,830, on a second run: the first ended when the test host crashed after 6,724, with no test of this change among the ones running, and with four other corpus runs and a four-gigabyte probe on the machine. The allocation gate passed. The head here, 2eb59e84, merges master 18038b0d, and gives every row of the first table the answer it says.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

Rafael-SOWNet and others added 2 commits October 4, 2026 17:54
By the addition formulas, tan(A) tan(B) = cot(A - B) (tan(A) - tan(B))
- 1 for a constant A - B, and 1 - cot(A + B) (tan(A) + tan(B)) for a
constant A + B; the cotangents, secants and cosecants likewise. A
constant times such a product of two functions of one kind, of linear
arguments with one slope or opposite ones, is written so and asked as
the same question. Rubi's tan(a + b x) tan(c + b x) and the rest of its
4.7.7 with two such arguments were declined.

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 85d6601 into master Oct 5, 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