AngouriMath

Navigation

← Back to list of members

StirlingRewritten​(AngouriMath.​Entity,​AngouriMath.​Entity.​Variable,​AngouriMath.​Entity)

 Method (no overloads)

Summary

The expression with the logarithm of every diverging factorial in it replaced by
Stirling's expansion, or null where there is none or the error the
expansion drops would not vanish out of the answer.

Remarks

StirlingExponent(AngouriMath.Entity,AngouriMath.Entity,AngouriMath.Entity.Variable,AngouriMath.Entity) can state its guard as power / f -> 0 because
it knows the shape it is working in: the answer there is
e^(power * ln(base)), so power *is* the coefficient the dropped
1/(12f) gets multiplied by. Anywhere else that coefficient has to be found
rather than read off, and it is found by putting a variable where the logarithm is
and differentiating with respect to it.
This is not a rewrite that may be applied wherever a factorial's logarithm appears.
x * (ln(x!) - (x*ln(x) - x + ln(2*pi*x)/2)) is 1/12 -- an expression
built out of the dropped term itself -- and a rewrite that did not ask would answer
it 0. There the coefficient is x and x / x does not vanish, so
it is refused. For ln(x!) / x the coefficient is 1/x and the ratio is
1/x^2, so it is allowed.
The coefficient is put back in terms of the logarithm before it is judged, since an
expression need not be linear in it: for ln(x!)^2 the derivative is
2*ln(x!), which grows like 2*x*ln(x) and is refused -- correctly, as
the difference of the squares is ln(x)/6 and diverges.
#765

























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