the 1st term (for n=0) of sum(1/((n+1)(2n-1)), n, 0,inf) is -1, the rest are positive. However:
(%i42) bfloat(simplify_sum(sum(1/((n+1)*(2*n-1)), n, 1,inf)) -simplify_sum(sum(1/((n+1)*(2*n-1)), n, 0,inf))); (%o42) 1.888888888888889b0
instead of 1.0 (one can also see this symbolically, it outputs an expression off by a rational number).
This is checked with Maxima 5.38.1 complied with SBCL, as well as with ECL.
Diff:
+tags; formatting
Fixed with commit 989086adeb0b5dd72b3e809edc36a30c976ca3ba
Thanks.
Why are you commending out things, rather than removing them?
(isn't it what git is for, to make such poor man's way of version control unnecessary?)
this patch breaks the following (at least on 5.38.1 with ECL):
which should be 3/256pi^2, and not 3/256pi^2 - 1/32, as I get after the patch is applied.
Please re-open.
IMHO, these two examples ought to make it into Maxima's testsuite.
Both sums are computed correctly after commit 8ec3a05cd24c756f29e0501488be971fe13f7c1f
Does this also cover
where the answer apparently should be
1/64%pi^2
(see https://ask.sagemath.org/question/35839/sage-incorrectly-evaluates-series/ )?With current source code, and using Clisp and ECL, I get
1/64*%pi^2
as expected. Are you sure you are getting a different result? If so, is it perhaps an interaction with some flags that Sage is setting?I presume Karl-Dieter talks about an old Maxima version (5.35).
I hope so, yes! In fact perhaps this commit fixed this bug - I just wasn't able to check.