|
From: philippe <rou...@gm...> - 2023-05-14 12:28:58
|
Hi, 3 years after our discussion about simplify_sum errors, I've found another example where maxima (and sagemath) fails to simplify a summation. Wolframalpha.com also fails to find the simplest expression (pi/16) but gives different closed forms and a numerical value compatible with it. Here is a minimal example showing the problem in maxima : 'S=S:sum(sin(n*%pi/3)^3*cos(n*%pi/3)/n,n,1,inf); 'S=S:ratsimp(simplify_sum(S2)); /* false!*/ S_exact:%pi/16; S_num:float(sum(sin(n*%pi/3)^3*cos(n*%pi/3)/n,n,1,10000)); S_exact=float(S_exact); you can check that the value given by simplify_sum is far from the numerical value, and this one is compatible with pi/16 (which has been obtained by Dirichlet Theorem for the Fourier series of some piecewise constant function): S= 3/8*sqrt(3)*e + 3/8*sqrt(3) = 2.4150948914066888 S_exact= 1/16*pi = 0.19634954084936207 S_num= 0.1965659389111564 I've added this example in comment to bug report 3630 : https://sourceforge.net/p/maxima/bugs/3630/ thanks for reading, Philippe Le 07/04/2020 à 22:52, philippe a écrit : > Hi, > > I want to check the limit of the following serie > > sum((k*sin((k*%pi)/3))/(4*k^2-1),k,1,inf) > > I know it converge to (sqrt(3)*%pi)/16=0.3400873807939158... > > simplify_sum find the limit in terms of erf(%i) but floating point > approximation is far from the expected value : 2.564242426927912... > > I don't know if the problem comes from simplify_sum or floating point > approximations of erf function, but there is no error for the similar serie > > sum(k*sin(k*%pi/2)/(4*k^2-1),k,1,inf)=sqrt(2)*%pi/16 > > if some one is interested in this problem here is a short piece of code > to test it : > > load(simplify_sum)$ > S2:sum(k*sin(k*%pi/3)/(4*k^2-1),k,1,inf)$ > S2s:simplify_sum(S2)$ > S2c:sqrt(3)*%pi/16$ > print(S2,"=",S2s,"=",float(S2s)); > print(S2,"=",S2c,"=",float(S2c)); > > thanks for reading, > Philippe |