Re: GosperSum division by zero



You can get the result if you change trig functions to exponential
form and then use simpsum flag.

(%i8) expr : cos(b*k);
(%o8) cos(b*k)
(%i9) sum(expr, k, D, N), exponentialize, simpsum;
(%o9) ((%e^(%i*b*(N+1))-%e^(%i*b*D))/(%e^(%i*b)-1)+(%e^(-%i*b*(N+1))-%e^(-%i*b*D))/(%e^(-%i*b)-1))/2
(%i10) trigsimp(rectform(%));
(%o10) -(sin(b)*sin(b*N+b)+(cos(b)-1)*cos(b*N+b)-sin(b)*sin(b*D)+(1-cos(b))*cos(b*D))/(2*cos(b)-2)

Andrej

On 7/30/06, Anton <berlach at koncon.nl> wrote:
> "Richard Fateman" <fateman at cs.berkeley.edu> writes:
>
> > nusum in commercial macsyma gives
> >
> > ((cos((b/2)))/(2 * sin((b/2)))) - ((cos(b * (k + (1/2))))/(2 *
> sin((b/2))))
> >
> ...
> >> I tried to find a closed form for this simple summation:
> >>
> >>    GosperSum(sin(b*n), n, 0, N);
> >>
> >> I get this error message:
> >>
> >> Division by 0
> >> #0: intLinPolyNorm(expr=sin(b*(n+1)),k=n)(norm.mac line 26)
> >> #1: intLinNorm(expr=sin(b*(n+1)),k=n)(norm.mac line 45)
> >> #2: intLinNormList(exprlist=[sin(b*(n+1))],k=n)(norm.mac line 135)
> >>  -- an error.  Quitting.  To debug this try debugmode(true);
>
> Hi,
>
> Thank you very much for the result.
> I have to find some other similar sums like:
>
> GosperSum(cos(b*k), k, D,N);
> GosperSum(sin(b*k), k, D,N);
> GosperSum(a^k*sin(b*k), k, D,N);
>
> They all give the same Division by 0 errors.
> If I can, I would like to help to improve GosperSum, even
> though I don't think I have big chances to succeed
> (because of very limited math skills and being a newbie to maxima).
> Anyway if somebody can give me some hints where to start
> I would appreciate it.
>
> thanks,
> Anton
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>