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. Five rules answer only the
question asked (AnsweringTheQuestionAsked) and decline the same
integrand one level down, so a null computed at depth two says
nothing about depth one — and once held without the scope it was served to the
top-level ask: sec(x)^3, tried and declined inside another rule's search, then
asked for directly and declined from the cache in two milliseconds. The key carries
the scope, and a lookup takes a decline only from its own scope and an answer from
either, since an antiderivative that was found is right wherever it is asked for.

























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