[Maxima] Numerical summation of series
Stavros Macrakis
macrakis at alum.mit.edu
Sun Dec 24 08:22:10 CST 2006
I don't believe Maxima has any automatic way of summing infinite
series numerically. It is easy enough to sum to a given number of
terms:
sum(1/(1+n^2),n,1,10000)
calculates the result in exact rationals, giving a huge but exact
result. Floating that result gives 1.075674547634748.
To calculate with floats, use
sum(1/(1+float(n)^2),n,1,10000);
or
sum(1.0/(1+n^2),n,1,10000);
=> 1.076574052468745
This naively sums starting with n=1, so has a larger error (14 ulp) than say
sum(1.0/(1+(10001-n)^2),n,1,10000)
=> 1.076574052468748
which is exact.
> sum(1/(1+n^2),n,1,inf)
>
> numerically? Setting numer:true and applying float(-) did not seem to have
> any effect (except for replacing 1 by 1.0).
>
> The Levin u-transform is an often used method for summing such series
It would be great if you could contribute this method to Maxima.
-s
More information about the Maxima
mailing list