Skip to content

A cos + i A sin below the bar is written as the exponential it is - #1485

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
imaginary-cosine-sine
Sep 24, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
imaginary-cosine-sine

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

cos(x)^2/(a cos(x) + i a sin(x))^3 was declined after twelve seconds. A cos(y) + i A sin(y) is A e^(i y) and A cos(y) - i A sin(y) is A e^(-i y); written so, the integrand is an exponential times a power of a cosine, which the closed rules answer at once. As a sum of a cosine and a sine it has no real rotation — A^2 + (i A)^2 is zero — so the rule for a cos + b sin (#1484) declines it by design. This is the sibling of the rule for A + i A tan(y), and reads below the bar only for the same reason.

A second gap under it, found by the tests. A whole power of the product written is split, (A e^(i y))^n as A^n e^(i n y): SolveByDistributingWholePowersOfProducts distributes only a constant with a symbol in it, so cos(x)^2/(2 e^(i x))^3 was declined where cos(x)^2/(a e^(i x))^3 was not. The corpus rows are all symbolic and passed; the tests with numeric coefficients are what failed.

Measured

before after
cos(x)^2/(a cos(x) + i a sin(x))^3 declined after 12.6 s 0.27 s, exact as complex numbers at five points
Rubi 4.7.2 trig^m (a trig + b trig)^n, all 290 problems 237 (after #1484) 249, no row lost, 16 timeouts → 14
Rubi families 1, 4, 5, 6, 7 and the 1774-problem suite — unchanged, row for row
unit suite 12,689 12,694 (five cases added), 0 failed, run to completion
allocation gate — PASSED on all 19 gated benchmarks

Family 7 reports two rows as timeouts that the previous run reported as unevaluated, with the same number answered. Both take far longer than the five-second cap on either build, timed alone: e^(2 acoth(a x)) (c - a^2 c x^2)^(9/2) declines in 26.0 s here and 26.5 s on master, and x^3 (d - c^2 d x^2)^(5/2)(a + b acosh(c x)) runs past 50 s on both. Which of the two verdicts a corpus run prints for them is warmth, not this change.

A secant above the bar is still declined: sec(x)^2 e^(-3 i x) is rational in e^(i x) with an imaginary rate, which nothing answers yet. With #1483 and #1484, the 4.7.2 file goes from 199 to 249 of 290.

Part of #718.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

`cos(x)^2/(a cos(x) + i a sin(x))^3` was declined after twelve seconds. `A cos(y) + i A sin(y)`
is `A e^(i y)` and `A cos(y) - i A sin(y)` is `A e^(-i y)`; written so, the integrand is an
exponential times a power of a cosine, which the closed rules answer at once. As a sum of a
cosine and a sine it has no real rotation -- `A^2 + (i A)^2` is zero -- so the rule for
`a cos + b sin` has nothing to do with it. The sibling of the rule for `A + i A tan(y)`, and
below the bar only for the same reason.

A whole power of the product written is split, `(A e^(i y))^n` as `A^n e^(i n y)`: the rule that
distributes such powers takes a constant with a symbol in it and leaves a number, and
`cos(x)^2/(2 e^(i x))^3` was declined where `cos(x)^2/(a e^(i x))^3` was not -- found by the tests
with numeric coefficients after the corpus rows, which are symbolic, had all passed.

Rubi's 4.7.2, all 290 problems: 237 to 249, no row lost, 16 timeouts to 14. Families 1, 4, 5, 6
and 7 and the 1774-problem suite unchanged, row for row.

Part of #718.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
@Rafael-SOWNet
Rafael-SOWNet merged commit b4519ee into master Sep 24, 2026
31 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