AngouriMath

Navigation

← Back to list of members

answered

 Field

Summary

The integrals already answered under the settings in force, so that the same question
is not worked out again.

Remarks

Why an integral is asked for twice at all. Two layers of it. Within one call the
solvers overlap — substitution, partial fractions, splitting a sum and integration by
parts each decompose the integrand differently and produce pieces that coincide — and
across calls Simplify asks about one integral through every
rewritten candidate it generates. Traced on sin(x)/(x^2 + 1)^2, which has no
elementary antiderivative and so runs the search to exhaustion, that is 562
top-level calls for 3 distinct integrands
, one of them asked 500 times; on
e^x/(x^2 + 1)^2 a single call enters the integrator 5330 times for 23.
The answers are held across calls and not only within one, which is where the
repetition is: discarding them at the end of each top-level call leaves the 562 to be
paid in full. Measured on those three integrands, keeping them takes a
Simplify from 115, 86 and 51 seconds to about 1.2, 1.5 and 0.2, and a single
cold Integrate of sqrt(tan(x)) from 155 ms to 79.
https://github.com/asc-community/AngouriMath/issues/1156
Why it is sound to hold them. An answer depends on the ambient settings —
Codomain decides whether the logarithms carry an
abs, MaxExpansionTermCount bounds the by-parts recursion — and a setting
is scoped to a flow rather than to a thread, so "the settings have not changed" is not
something a per-thread cache can assume. SettingsState answers it
exactly, by comparing what every setting reads as rather than by counting changes —
which matters, because the library opens and closes thousands of balanced scopes while
simplifying and a change count is therefore never still.
A decline is held with the scope it was made in. Rules answer only the question
asked (AnsweringTheQuestionAsked), or it and one or two levels below it
(AnsweringTheQuestionAskedOrOneBelow,
AnsweringTheQuestionAskedOrTwoBelow), and decline the same integrand
deeper, so a null computed at one depth says nothing about a
shallower one. Held without the scope it was served there: sec(x)^3, tried and
declined inside another rule's search, then asked for directly and declined from the
cache in two milliseconds. And held with the top told only from the rest, a decline at
depth three was served at depth two: the search for 1/(x^(3/2) (a + c x^4)) declines the root's substitution 2/(w^2 (a + c w^8)) at depth three and asks it
again at depth two, and the integral was declined. The key carries the depth as far as
a scope reaches, ScopeDepth, and a lookup takes a decline only from its
own depth and an answer from any, since an antiderivative that was found is right
wherever it is asked for.

























Angouri © 2019-2023 · Project's repo · Site's repo · Octicons · Transparency · 4862 pages online