Repository navigation
A substitution whose variable may be negative is answered for it positive and extended by parity, and the complement of a written sine or cosine is a candidate - #1307
Merged
Conversation
…tive and extended by parity, and the complement of a written sine or cosine is a candidate
Charlwood's `sin(x)/sqrt(1 - sin(x)^6)` and `sec(x)/sqrt(sec(x)^4 - 1)` had no
antiderivative. The first wants `u = cos(x)`, which was no candidate -- only what
is written is -- and under which the sine that is left is the differential and
the sixth power is `(1 - u^2)^3`: the complement of a written sine or cosine is
offered now, and in a second pass over the sines and cosines, after every
candidate as written has been tried, the even powers of the function that is
left are written in `u` -- second, because `cos(x)/sin(x)` that way under the
cosine is `ln(1 - cos(x)^2)/2`, and under the sine it is written with,
`ln(sin(x))`, which is the answer to give. What that leaves for Charlwood's is
`-1/sqrt(u^2 (3 - 3u^2 + u^4))`,
and `u` comes out of the root as `|u|`; the rule for that takes `|u| = u`, an
antiderivative for `u > 0`, and the substitution rule extends it by parity as
the reciprocal substitution extends its own -- the integrand is even in `u`, so
the antiderivative is `sgn(u) F(|u|)` -- through one helper both now share.
Nothing is known of the sign of a cosine, and this is what makes it not matter.
An even root is not negative and is not extended: `sqrt(x^(1/3))` under
`1/(sqrt(x) - x^(-1/3))` was, to an answer with a sign function in it that
nothing could differentiate, and is pinned.
The secant is written as the reciprocal of the cosine under its root, where
`sec(x)^4 - 1` is `(1 - cos(x)^4)/cos(x)^4`, a root of a quotient whose denominator
is an even power: not negative whatever it is a power of, so the split is exact,
and the root of the denominator is the whole power `cos(x)^2`. A sum with a
quotient among its terms is combined into one before either the counting or
the splitting reads it.
And a power substitution reads written powers, so the quotient of the
integrand by `du/dx` is written as one quotient with its powers of `x` collected
first: `1/(x sqrt(P))` over `2x` is `x^2` only once collected, and a bare `x` is not
a power of `x^2`. Bronstein's `(1 + 2x^8) sqrt(1 + x^8)/(x + 2x^9 + x^17)` is
answered by that alone. For the power candidates of a numeric integrand of
modest size only: a half-angle image with a quartic under its root, written as
one quotient, is a page whose simplification did not return, and Charlwood's
`cos(x)^2/sqrt(1 + cos(x)^2 + cos(x)^4)` was a timeout for one corpus run; and a
symbolic partial fraction written as one quotient took twelve minutes of one
test where it takes six seconds as written.
Every answer differentiated back on both sides of zero.
Rubi corpus, 463-problem sample, on the same morning:
master at #1304 380/463, 0 wrong, 0 timeouts, 79 s
with this 384/463, 0 wrong, 0 timeouts, 82 s
Four more, nothing lost: Charlwood 131 and 137, Charlwood's
`tan(x)/sqrt(1 + sec(x)^3)` through the secant rewriting, and Bronstein 8.
The five test suites are green.
Part of #718.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
…cals are asked as the question at the top One level down, the factored form was a second search per candidate, and the by-parts remainder of arcsin(sqrt(1 + x) - sqrt(x)) spent a minute in them -- seven on the CI runner. Scoped to the question asked; and since the secant case reaches the substitution through the combining rule, that rule asks its exact rewriting as the question at the top now. The collected quotient is for whole powers of x only, the same remainder having been admitted a substitution under x^(-1/2) it was refused before. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
Member
Author
|
CI failed on |
Rafael-SOWNet
added a commit
that referenced
this pull request
Sep 13, 2026
… before the complement of a substitution is, and never where that leaves an odd power of the complement under a root (#1312) Charlwood's `arctan(sqrt(sec(x) - 1)) sin(x)` had no antiderivative. By parts it leaves `sin(x)/sqrt(sec(x) - 1)`, and under `u = cos(x)` -- the complement of the written sine, a candidate since #1307 -- that is `-1/sqrt(1/u - 1)`, a root of a quotient of two linears, which is the linear-radical substitution's since #1308. With the secant left standing it kept its `x` and the candidate was refused. The pass that writes the complement's even powers in `u` writes the secant, cosecant, tangent and cotangent of the argument as quotients of the sine and cosine first now, and substitutes `u` again where that has written the function anew. And refuses the rewriting where it leaves an odd power of the complement under a root. The first draft did not, and Timofeev's `(sec(x)^2 - 3 sqrt(4 sec(x)^2 + 5 tan(x)^2) tan(x))/(sin(x)^2 (...)^(3/2))` under `u = sin(x)` became a root of a quotient by `cos(x)^2`, which the simplification the substitution runs takes as `.../cos(x)` -- its value where the cosine is positive and its negative elsewhere -- and the integrand was answered wrongly on half the line, measured at two of six sampled points and pinned as declined-or-right on both sides. An even power of the complement under a root is `1 - u^2` by then and is no such hazard. One answer changes shape: `sin(x) sin(2x)` over `cos(x)` is `2 sin(x)^2` once the simplification has written the double angle out, and the second pass reads the sine that wrote as `u` again, so it is `2 sin(x)^3/3` now rather than product-to-sum's cosines of `x + 2x`; the test that pinned the old shape pins the new one. ## Measured Every answer differentiated back on both sides of zero. Rubi corpus, 463-problem sample, on the same evening: master at #1309 401/463, 0 wrong, 0 timeouts, 100 s with this 402/463, 0 wrong, 0 timeouts, 99 s One more, nothing lost: Charlwood 32. The five test suites are green. Part of #718. Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura Co-authored-by: Claude Opus 5 (1M context) <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.
Charlwood's
sin(x)/sqrt(1 - sin(x)^6)andsec(x)/sqrt(sec(x)^4 - 1)had noantiderivative. The first wants
u = cos(x), which was no candidate -- only whatis written is -- and under which the sine that is left is the differential and
the sixth power is
(1 - u^2)^3: the complement of a written sine or cosine isoffered now, and in a second pass over the sines and cosines, after every
candidate as written has been tried, the even powers of the function that is
left are written in
u-- second, becausecos(x)/sin(x)that way under thecosine is
ln(1 - cos(x)^2)/2, and under the sine it is written with,ln(sin(x)), which is the answer to give. What that leaves for Charlwood's is-1/sqrt(u^2 (3 - 3u^2 + u^4)),and
ucomes out of the root as|u|; the rule for that takes|u| = u, anantiderivative for
u > 0, and the substitution rule extends it by parity asthe reciprocal substitution extends its own -- the integrand is even in
u, sothe antiderivative is
sgn(u) F(|u|)-- through one helper both now share.Nothing is known of the sign of a cosine, and this is what makes it not matter.
An even root is not negative and is not extended:
sqrt(x^(1/3))under1/(sqrt(x) - x^(-1/3))was, to an answer with a sign function in it thatnothing could differentiate, and is pinned.
The secant is written as the reciprocal of the cosine under its root, where
sec(x)^4 - 1is(1 - cos(x)^4)/cos(x)^4, a root of a quotient whose denominatoris an even power: not negative whatever it is a power of, so the split is exact,
and the root of the denominator is the whole power
cos(x)^2. A sum with aquotient among its terms is combined into one before either the counting or
the splitting reads it.
And a power substitution reads written powers, so the quotient of the
integrand by
du/dxis written as one quotient with its powers ofxcollectedfirst:
1/(x sqrt(P))over2xisx^2only once collected, and a barexis nota power of
x^2. Bronstein's(1 + 2x^8) sqrt(1 + x^8)/(x + 2x^9 + x^17)isanswered by that alone. For the power candidates of a numeric integrand of
modest size only: a half-angle image with a quartic under its root, written as
one quotient, is a page whose simplification did not return, and Charlwood's
cos(x)^2/sqrt(1 + cos(x)^2 + cos(x)^4)was a timeout for one corpus run; and asymbolic partial fraction written as one quotient took twelve minutes of one
test where it takes six seconds as written.
Measured
Every answer differentiated back on both sides of zero.
Rubi corpus, 463-problem sample, on the same morning:
Part of #718.
🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura