(09/15/2009, 10:47 PM)Ansus Wrote: This is not the numerical value of the derivative at 0 though because I used indefinite formula. If you want the canstant to be the derivative at 0 you should use the definite formula
\(
\log_a \frac{f'_a(x)}{f'_a(0)(\ln a)^{x}} =\sum_{n=1}^{\infty} \frac{f^{(n-1)} (0)}{n!} (B_n(x)-B_n(0))
\)
i.e. slighly modify your sum operator.
Well I'm trying out this formula (though I'm still not quite sure as to how "indefinite" sum yields the derivative constant...). Here's my new code for it (Pari/GP again):
Code:
/* Bernoulli number B_n */
bernoulli(n) = if(n==0, 1, (-1)^(n+1) * n * zeta(1 - n));
/* Bernoulli polynomial B_n(x) */
bernpoly(n) = sum(k=0,n,binomial(n,k)*bernoulli(k)*x^(n-k));
/* Continuum sum sum_{n=1...inf} f^(n-1)(0)/(n!) (B_n(x) - B_n(0)),
* where f^(n-1) = (n-1)th derivative of f
*/
rhssumpoly(p) = sum(n=1,poldegree(p)+1,polcoeff(p,n-1)*(bernpoly(n) - subst(bernpoly(n), x, 0))/n);
/* Compute exp of a power series */
exppoly(p) = truncate(exp(p));
/* Compute definite integral from -1 to x of a truncated power series polynomial */
defint(p) = { local(integ=intformal(p)); return(integ - subst(integ, x, -1)); }
/* Do one iteration of the formula */
iterate(p) = 1.0917673512583217*defint(exppoly(rhssumpoly(p)));
/* Normalized iteration */
iternorm(p) = { local(pi=iterate(p)); return(pi/polcoeff(pi, 0)); }
/* Calculation loop. */
numiter = 32;
\p 128; /* arithmetic precision (decimals) */
\ps 32; /* series term limit */
p = 1
for(i=1,numiter,p=iternorm(p)); /* change iternorm to iterate for unnormalized iteration */
/* Now you can run subst(p, x, y) to evaluate series at value y, or polcoeff(p, n) to get nth coefficient */if I use 16 terms of series it seems to converge to a truncated series giving 5-6 decimals of natural tetration. If I use 32 (as the above is set to), it collapses to a truncated series with -1 in the highest-order coefficient and 1 in the lowest-order with all the rest zero. Why is that? Why can't I get more accuracy? Is it due to the lack of precision in the derivative constant (the 1.0917... part)? (Yet *dropping* the accuracy of that part, to, say just 1.091 doesn't make it diverge with 16 terms... so I'm mystified by this whole thing) If so, how can I get that to higher precision? If not, what's going on? Also, you mentioned the "indefinite" version of the formula which doesn't require preknowing (or lets you obtain) the value of f'(0) but I'm still not sure how to make that go as that introduces various spurious constants (constant of summation/product, constant of integration too?). Could you write out the indefinite formula in a form with f(x) on the left and the operations to be performed on the right? I.e. like how the definite formula (the one I quoted out of your post) can be written as (for base e):
\( f(x) = f'(0) \int_{-1}^{x} \exp\left(\sum_{n=1}^{\infty} \frac{f^{(n-1)} (0)}{n!} (B_n(x)-B_n(0)) \right) dx \)
?

