Repository navigation
An odd power of the complement left by the substitution of a sine or a cosine is its sign times a root, and the sign is a constant between the complement's zeros - #1323
Merged
Conversation
…a cosine is its sign times a root, and the sign is a constant between the complement's zeros Charlwood's `ln(sin(x)) sqrt(1 + sin(x))` by parts leaves `-2 cos(x)^2/(sin(x) sqrt(1 + sin(x)))`, and under `u = sin(x)` that is `-2 cos(x)/(u sqrt(1 + u)) du`, a cosine over: the substitution reads even powers of the complement as powers of `1 - u^2` and refuses an odd one, since `cos(x)` is not a function of `sin(x)`. It is one on every interval between the zeros of the cosine, `sgn(cos(x)) sqrt(1 - u^2)`, and the sign is a constant there. So the integrand is that constant times an algebraic function of `u` -- `-2 sgn(cos(x)) sqrt(1 - u)/u` -- which is integrated, `-4 sqrt(1 - u) + 4 atanh(sqrt(1 - u))`, and the sign goes back in as `sgn(cos(x))`. Exact wherever the cosine is not zero, the generic case, and checked on both signs of it. Charlwood's `cos(x)^2/sqrt(1 + cos(x)^2 + cos(x)^4)` is the same under the cosine: `-u^2/(sin(x) sqrt(1 + u^2 + u^4))`, which is `-sgn(sin(x)) u^2/sqrt(1 - u^6)` once the roots combine, and `-sgn(sin(x)) arcsin(u^3)/3` -- Rubi's `x/3 + arctan(...)/3` written the other way. A rule of its own, and late, after the half-angle substitution: inside the general substitution it answered `1/(1 + sin(x))` as a sign times a root where the half-angle substitution gives the tangent of the half angle, and the remainder by parts left beside that root was nine seconds of search for `ln(sin(x))/(1 + sin(x))`, which the tangent answers in a moment. Only for an integrand with a root in it, since a rational function of the sine and cosine is the half-angle substitution's and Jeffrey's paid half a second here on the way to it; only where the complement is a factor of the product, since inside a sum, `1/(cos(x) + sin(x))`, the sign beside a root of `1 - u^2` is a search that timed out; and only where what is left is algebraic in `u`, since beside a logarithm of `u` it ended nowhere. Rubi sample: +2 (Charlwood 128 and 20), 0 wrong, 0 timeouts. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
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
ln(sin(x)) sqrt(1 + sin(x))by parts leaves-2 cos(x)^2/(sin(x) sqrt(1 + sin(x))), and underu = sin(x)that is-2 cos(x)/(u sqrt(1 + u)) du, a cosine over: the substitution reads evenpowers of the complement as powers of
1 - u^2and refuses an odd one,since
cos(x)is not a function ofsin(x). It is one on every intervalbetween the zeros of the cosine,
sgn(cos(x)) sqrt(1 - u^2), and the signis a constant there. So the integrand is that constant times an algebraic
function of
u---2 sgn(cos(x)) sqrt(1 - u)/u-- which is integrated,-4 sqrt(1 - u) + 4 atanh(sqrt(1 - u)), and the sign goes back in assgn(cos(x)). Exact wherever the cosine is not zero, the generic case,and checked on both signs of it. Charlwood's
cos(x)^2/sqrt(1 + cos(x)^2 + cos(x)^4)is the same under the cosine:-u^2/(sin(x) sqrt(1 + u^2 + u^4)), which is-sgn(sin(x)) u^2/sqrt(1 - u^6)once the roots combine, and
-sgn(sin(x)) arcsin(u^3)/3-- Rubi'sx/3 + arctan(...)/3written the other way.A rule of its own, and late, after the half-angle substitution: inside
the general substitution it answered
1/(1 + sin(x))as a sign times aroot where the half-angle substitution gives the tangent of the half
angle, and the remainder by parts left beside that root was nine seconds
of search for
ln(sin(x))/(1 + sin(x)), which the tangent answers in amoment. Only for an integrand with a root in it, since a rational
function of the sine and cosine is the half-angle substitution's and
Jeffrey's paid half a second here on the way to it; only where the
complement is a factor of the product, since inside a sum,
1/(cos(x) + sin(x)), the sign beside a root of1 - u^2is a search thattimed out; and only where what is left is algebraic in
u, since beside alogarithm of
uit ended nowhere.Rubi sample (463 problems, 5 s budget), against the #1320 master this branch is cut from:
Two more, nothing lost: Charlwood 128 in 1.4 s and Charlwood 20 in 0.3 s. Charlwood 131 (
sec(x)/sqrt(sec(x)^4 - 1), answered) takes 0.7 s where it took 0.4; nothing else moved by more than noise. Three things were measured on the way and are not in this branch: the sign inside the general substitution (Apostol 192 to a timeout, Charlwood 125 and 47 lost), the rule without the algebraic condition, and the rule without the root condition (half a second on each of Jeffrey 20 and 23).Independent of #1321 (merged meanwhile) and #1322 (open), which touch other rules.
The five test suites are green.
Part of #718.
🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura