You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 70b4be6
Browse filesBrowse the repository at this point in the historyBrowse files
Two piecewises split on one quantity combine sign by sign (#1686)
* Two piecewises split on one quantity combine sign by sign
A piecewise combined with a piecewise joins every case to every other. The integrator's answers for a
rational function with symbols in it are split on the sign of a quantity -- `t^k/(d - f t^2)^4` on
that of `d/f` -- and a sum of them kept the pairs of opposite strict signs, `q > 0 and q < 0`, which
are NaN rather than False off the real line, and the pairs where a vanishing coefficient met a case
that divides by it, `f = 0 and not 2 f = 0`. Six such terms made 32,769 cases, and
`x sqrt(1 + d x) sqrt(1 + f x)` ran out of time.
A quantity is now read up to a constant factor, and a pair asking it to be zero and not zero, or zero
and of a sign, goes: that is false for every value, complex or not. A pair asking it to be both
positive and negative goes where every later pair tests it too: those are false or undecided off the
real line, never true, so what the undecided pair stopped is not reached without it either. The sum
stays at three cases, and the integral answers in a second.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
* A breaking-changes entry for two piecewises combined sign by sign
Measured on the 2.5.0 tag, master 94ba5ff and this branch.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
---------
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
| `piecewise(1 provided f = 0, 2 provided not 2 * f = 0) + piecewise(10 provided 3 * f = 0, 20 provided not f = 0)`, `.InnerSimplified` | four cases | two |
683
+
| the same with a third case `provided p > 0` in each | nine cases | nine, unchanged |
684
+
| `"x*sqrt(1 + d*x)*sqrt(1 + f*x)".Integrate("x")`, and with `x^2`, or `A + B x + K x^2`, for `x` | left unevaluated | the antiderivative, a piecewise of three cases |
685
+
669
686
### A union with an empty interval is the other set
670
687
671
688
**Wrong answer fixed.** Two intervals were joined wherever one ended where the other began, before
0 commit comments